fix error + cleanup

This commit is contained in:
Adrien1106 2024-03-08 20:45:11 +01:00
parent e6c9ee63cd
commit 394c75f9ed
4 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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) {

View File

@ -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<CullElement, Integer[]> INNER_CULL_MAP = CacheBuilder.newBuilder().maximumSize(1024).concurrencyLevel().build();
private static final Cache<CullElement, Integer[]> INNER_CULL_MAP = CacheBuilder.newBuilder().maximumSize(1024).build();
private record CullElement(Object state_key, int model) {}