File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
src/main/java/net/wurstclient Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1515import net .wurstclient .hacks .chestesp .ChestEspBlockGroup ;
1616import net .wurstclient .settings .CheckboxSetting ;
1717import net .wurstclient .settings .ColorSetting ;
18+ import net .wurstclient .util .LootrModCompat ;
1819
1920public final class NormalChestsGroup extends ChestEspBlockGroup
2021{
@@ -35,6 +36,7 @@ protected ColorSetting createColorSetting()
3536 protected boolean matches (BlockEntity be )
3637 {
3738 return be instanceof ChestBlockEntity
38- && !(be instanceof TrappedChestBlockEntity );
39+ && !(be instanceof TrappedChestBlockEntity )
40+ && !LootrModCompat .isLootrTrappedChest (be );
3941 }
4042}
Original file line number Diff line number Diff line change 1414import net .wurstclient .hacks .chestesp .ChestEspBlockGroup ;
1515import net .wurstclient .settings .CheckboxSetting ;
1616import net .wurstclient .settings .ColorSetting ;
17+ import net .wurstclient .util .LootrModCompat ;
1718
1819public final class TrapChestsGroup extends ChestEspBlockGroup
1920{
@@ -34,6 +35,7 @@ protected ColorSetting createColorSetting()
3435 @ Override
3536 protected boolean matches (BlockEntity be )
3637 {
37- return be instanceof TrappedChestBlockEntity ;
38+ return be instanceof TrappedChestBlockEntity
39+ || LootrModCompat .isLootrTrappedChest (be );
3840 }
3941}
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ public enum LootrModCompat
2323 "noobanidus.mods.lootr.common.block.entity.LootrBarrelBlockEntity" );
2424 private static final Class <?> lootrShulkerBoxClass = getClassIfExists (
2525 "noobanidus.mods.lootr.common.block.entity.LootrShulkerBlockEntity" );
26+ private static final Class <?> lootrTrappedChestClass = getClassIfExists (
27+ "noobanidus.mods.lootr.common.block.entity.LootrTrappedChestBlockEntity" );
2628
2729 public static boolean isLootrBarrel (BlockEntity blockEntity )
2830 {
@@ -40,6 +42,14 @@ public static boolean isLootrShulkerBox(BlockEntity blockEntity)
4042 return lootrShulkerBoxClass .isInstance (blockEntity );
4143 }
4244
45+ public static boolean isLootrTrappedChest (BlockEntity blockEntity )
46+ {
47+ if (blockEntity == null || lootrTrappedChestClass == null )
48+ return false ;
49+
50+ return lootrTrappedChestClass .isInstance (blockEntity );
51+ }
52+
4353 private static Class <?> getClassIfExists (String name )
4454 {
4555 try
You can’t perform that action at this time.
0 commit comments