From 11eb4b62df92666315f318df5b6b72e2bca5174a Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Sun, 8 Sep 2024 22:50:17 +0200 Subject: [PATCH] Fix broken reflection into GT post-renaming (#80) * fix reflection * spotlessApply (#81) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/main/java/forestry/core/utils/BlockUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/forestry/core/utils/BlockUtil.java b/src/main/java/forestry/core/utils/BlockUtil.java index 093333998..499906020 100644 --- a/src/main/java/forestry/core/utils/BlockUtil.java +++ b/src/main/java/forestry/core/utils/BlockUtil.java @@ -241,16 +241,16 @@ public abstract class BlockUtil { if (bw) try { // noinspection unchecked BW_MetaGenerated_WerkstoffBlocksClass = (Class) Class - .forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_WerkstoffBlocks"); - BWBlocks = (Block) Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader") - .getField("BWBlocks").get(null); + .forName("bartworks.system.material.BWMetaGeneratedWerkstoffBlocks"); + BWBlocks = (Block) Class.forName("bartworks.system.material.WerkstoffLoader").getField("BWBlocks") + .get(null); } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); } if (gt) try { // noinspection unchecked - GTBlockMachines_Class = (Class) Class.forName("gregtech.common.blocks.GT_Block_Machines"); - GTBlockMachines = (Block) Class.forName("gregtech.api.GregTech_API").getField("sBlockMachines").get(null); + GTBlockMachines_Class = (Class) Class.forName("gregtech.common.blocks.BlockMachines"); + GTBlockMachines = (Block) Class.forName("gregtech.api.GregTechAPI").getField("sBlockMachines").get(null); } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); }