From 394c75f9edcb8a70b56347e490c17a5a12f99053 Mon Sep 17 00:00:00 2001 From: Adrien1106 Date: Fri, 8 Mar 2024 20:45:11 +0100 Subject: [PATCH] fix error + cleanup --- src/main/java/fr/adrien1106/reframed/block/ReFramedBlock.java | 2 +- .../reframed/client/model/UnbakedRetexturedModel.java | 2 +- src/main/java/fr/adrien1106/reframed/generator/GLanguage.java | 4 +--- .../java/fr/adrien1106/reframed/util/blocks/BlockHelper.java | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/adrien1106/reframed/block/ReFramedBlock.java b/src/main/java/fr/adrien1106/reframed/block/ReFramedBlock.java index c75b6a9..05e7aef 100644 --- a/src/main/java/fr/adrien1106/reframed/block/ReFramedBlock.java +++ b/src/main/java/fr/adrien1106/reframed/block/ReFramedBlock.java @@ -115,7 +115,7 @@ public class ReFramedBlock extends Block implements BlockEntityProvider, RecipeS && themes.stream().noneMatch(theme -> theme.getLuminance() != 0)) drops.add(new ItemStack(Items.GLOWSTONE_DUST)); if(!frame_entity.isSolid() - && themes.stream().anyMatch(theme -> theme.isSolid())) + && themes.stream().anyMatch(AbstractBlockState::isSolid)) drops.add(new ItemStack(Items.POPPED_CHORUS_FRUIT)); ItemScatterer.spawn(world, pos, drops); diff --git a/src/main/java/fr/adrien1106/reframed/client/model/UnbakedRetexturedModel.java b/src/main/java/fr/adrien1106/reframed/client/model/UnbakedRetexturedModel.java index 8345833..948cd0f 100644 --- a/src/main/java/fr/adrien1106/reframed/client/model/UnbakedRetexturedModel.java +++ b/src/main/java/fr/adrien1106/reframed/client/model/UnbakedRetexturedModel.java @@ -14,7 +14,7 @@ public abstract class UnbakedRetexturedModel implements UnbakedModel { protected int theme_index = 1; protected BlockState item_state; - protected boolean ao = true; + protected final boolean ao = true; public UnbakedRetexturedModel(Identifier parent) { this.parent = parent; diff --git a/src/main/java/fr/adrien1106/reframed/generator/GLanguage.java b/src/main/java/fr/adrien1106/reframed/generator/GLanguage.java index 61dc3fb..d9270fb 100644 --- a/src/main/java/fr/adrien1106/reframed/generator/GLanguage.java +++ b/src/main/java/fr/adrien1106/reframed/generator/GLanguage.java @@ -17,9 +17,7 @@ public class GLanguage extends FabricLanguageProvider { public void generateTranslations(TranslationBuilder builder) { builder.add(Registries.ITEM_GROUP.getKey(ReFramed.ITEM_GROUP).get(), "Frames"); builder.add("advancements.reframed.description", "Get all the frame types."); - ReFramed.BLOCKS.forEach(block -> { - builder.add(block, beautify(Registries.BLOCK.getId(block).getPath()) + " Frame"); - }); + ReFramed.BLOCKS.forEach(block -> builder.add(block, beautify(Registries.BLOCK.getId(block).getPath()) + " Frame")); } private static String beautify(String name) { diff --git a/src/main/java/fr/adrien1106/reframed/util/blocks/BlockHelper.java b/src/main/java/fr/adrien1106/reframed/util/blocks/BlockHelper.java index 99f8652..6450843 100644 --- a/src/main/java/fr/adrien1106/reframed/util/blocks/BlockHelper.java +++ b/src/main/java/fr/adrien1106/reframed/util/blocks/BlockHelper.java @@ -47,7 +47,7 @@ import static net.minecraft.util.shape.VoxelShapes.combine; public class BlockHelper { // self culling cache of the models not made thread local so that it is only computed once - private static final Cache INNER_CULL_MAP = CacheBuilder.newBuilder().maximumSize(1024).concurrencyLevel().build(); + private static final Cache INNER_CULL_MAP = CacheBuilder.newBuilder().maximumSize(1024).build(); private record CullElement(Object state_key, int model) {}