fix error + cleanup
This commit is contained in:
parent
e6c9ee63cd
commit
394c75f9ed
@ -115,7 +115,7 @@ public class ReFramedBlock extends Block implements BlockEntityProvider, RecipeS
|
|||||||
&& themes.stream().noneMatch(theme -> theme.getLuminance() != 0))
|
&& themes.stream().noneMatch(theme -> theme.getLuminance() != 0))
|
||||||
drops.add(new ItemStack(Items.GLOWSTONE_DUST));
|
drops.add(new ItemStack(Items.GLOWSTONE_DUST));
|
||||||
if(!frame_entity.isSolid()
|
if(!frame_entity.isSolid()
|
||||||
&& themes.stream().anyMatch(theme -> theme.isSolid()))
|
&& themes.stream().anyMatch(AbstractBlockState::isSolid))
|
||||||
drops.add(new ItemStack(Items.POPPED_CHORUS_FRUIT));
|
drops.add(new ItemStack(Items.POPPED_CHORUS_FRUIT));
|
||||||
|
|
||||||
ItemScatterer.spawn(world, pos, drops);
|
ItemScatterer.spawn(world, pos, drops);
|
||||||
|
@ -14,7 +14,7 @@ public abstract class UnbakedRetexturedModel implements UnbakedModel {
|
|||||||
|
|
||||||
protected int theme_index = 1;
|
protected int theme_index = 1;
|
||||||
protected BlockState item_state;
|
protected BlockState item_state;
|
||||||
protected boolean ao = true;
|
protected final boolean ao = true;
|
||||||
|
|
||||||
public UnbakedRetexturedModel(Identifier parent) {
|
public UnbakedRetexturedModel(Identifier parent) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
@ -17,9 +17,7 @@ public class GLanguage extends FabricLanguageProvider {
|
|||||||
public void generateTranslations(TranslationBuilder builder) {
|
public void generateTranslations(TranslationBuilder builder) {
|
||||||
builder.add(Registries.ITEM_GROUP.getKey(ReFramed.ITEM_GROUP).get(), "Frames");
|
builder.add(Registries.ITEM_GROUP.getKey(ReFramed.ITEM_GROUP).get(), "Frames");
|
||||||
builder.add("advancements.reframed.description", "Get all the frame types.");
|
builder.add("advancements.reframed.description", "Get all the frame types.");
|
||||||
ReFramed.BLOCKS.forEach(block -> {
|
ReFramed.BLOCKS.forEach(block -> builder.add(block, beautify(Registries.BLOCK.getId(block).getPath()) + " Frame"));
|
||||||
builder.add(block, beautify(Registries.BLOCK.getId(block).getPath()) + " Frame");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String beautify(String name) {
|
private static String beautify(String name) {
|
||||||
|
@ -47,7 +47,7 @@ import static net.minecraft.util.shape.VoxelShapes.combine;
|
|||||||
public class BlockHelper {
|
public class BlockHelper {
|
||||||
|
|
||||||
// self culling cache of the models not made thread local so that it is only computed once
|
// 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) {}
|
private record CullElement(Object state_key, int model) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user