Skip to content

Commit

Permalink
Fix broken reflection into GT post-renaming (#80)
Browse files Browse the repository at this point in the history
* fix reflection

* spotlessApply (#81)

Co-authored-by: GitHub GTNH Actions <>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
NotAPenguin0 and github-actions[bot] authored Sep 8, 2024
1 parent a172cb3 commit 11eb4b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/forestry/core/utils/BlockUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,16 @@ private static boolean isVecInsideXYBounds(Vec3 vec, float minX, float minY, flo
if (bw) try {
// noinspection unchecked
BW_MetaGenerated_WerkstoffBlocksClass = (Class<? extends Block>) 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<? extends Block>) Class.forName("gregtech.common.blocks.GT_Block_Machines");
GTBlockMachines = (Block) Class.forName("gregtech.api.GregTech_API").getField("sBlockMachines").get(null);
GTBlockMachines_Class = (Class<? extends Block>) Class.forName("gregtech.common.blocks.BlockMachines");
GTBlockMachines = (Block) Class.forName("gregtech.api.GregTechAPI").getField("sBlockMachines").get(null);
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 11eb4b6

Please sign in to comment.