Skip to content

Commit

Permalink
Prevent all (Ender)ChestBlockEntity subclasses from rendering. May br…
Browse files Browse the repository at this point in the history
…eak some mods, but should increase overall compatibility.
  • Loading branch information
FakeDomi committed Oct 26, 2024
1 parent 1135db4 commit 82ecc27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.2+build.4
loader_version=0.14.24

# Mod Properties
mod_version=1.5+1.20.2
mod_version=1.6+1.20.2
maven_group=re.domi
archives_base_name=fast-chest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.ChestBlockEntity;
import net.minecraft.block.entity.EnderChestBlockEntity;
import net.minecraft.block.entity.TrappedChestBlockEntity;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -20,12 +19,7 @@ private <E extends BlockEntity> void removeBlockEntityRenderer(E blockEntity, Ca
{
if (Config.simplifiedChest)
{
Class<?> beClass = blockEntity.getClass();

if (beClass == ChestBlockEntity.class ||
beClass == TrappedChestBlockEntity.class ||
beClass == EnderChestBlockEntity.class ||
beClass.getSuperclass().getName().equals("io.github.cyberanner.ironchests.blocks.blockentities.GenericChestEntity"))
if (blockEntity instanceof ChestBlockEntity || blockEntity instanceof EnderChestBlockEntity)
{
cir.setReturnValue(null);
}
Expand Down

0 comments on commit 82ecc27

Please sign in to comment.