Drop the bartworks werkstoff block lookup

This commit is contained in:
Ruling-0 committed 2026-10-12 15:23:58 -05:00
1 parent f5e8fcd0a3
commit 448406b81f
1 file changed
-14
@@ -230,20 +230,11 @@ public abstract class BlockUtil {
return vec != null && (vec.xCoord >= minX && vec.xCoord <= maxX && vec.yCoord >= minY && vec.yCoord <= maxY);
}
private static Class<? extends Block> BW_MetaGenerated_WerkstoffBlocksClass;
private static Class<? extends Block> GTBlockMachines_Class;
private static Block GTBlockMachines;
private static final boolean bw = Loader.isModLoaded("bartworks");
private static final boolean gt = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
static {
if (bw) try {
// noinspection unchecked
BW_MetaGenerated_WerkstoffBlocksClass = (Class<? extends Block>) Class
.forName("bartworks.system.material.BWMetaGeneratedWerkstoffBlocks");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
if (gt) try {
// noinspection unchecked
GTBlockMachines_Class = (Class<? extends Block>) Class.forName("gregtech.common.blocks.BlockMachines");
@@ -265,11 +256,6 @@ public abstract class BlockUtil {
} while (stillInside.test(tile));
block = world.getBlock(x, y - depth, z);
if (bw && BW_MetaGenerated_WerkstoffBlocksClass != null
&& BW_MetaGenerated_WerkstoffBlocksClass.isInstance(block)) {
return new ItemStack(block, 1, block.getDamageValue(world, x, y - depth, z));
}
if (gt && GTBlockMachines_Class != null && GTBlockMachines != null && GTBlockMachines_Class.isInstance(block)) {
return new ItemStack(GTBlockMachines, 1, block.getDamageValue(world, x, y - depth, z));
}