fixed method not found exception

wrong class for get Method call... i hate reflexion >_>
This commit is contained in:
bartimaeusnek committed 2020-03-23 17:18:25 +01:00
1 parent ff4c09324b
commit 43f98e9cca
1 file changed
+1 -1
@@ -238,7 +238,7 @@ public abstract class BlockUtil {
if (bw)
try {
BW_MetaGenerated_WerkstoffBlocksClass = (Class<? extends Block>) Class.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_WerkstoffBlocks");
getDamage = BW_MetaGenerated_WerkstoffBlocksClass.getMethod("getDamageValue", World.class, int.class, int.class, int.class);
getDamage = Class.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Blocks").getMethod("getDamageValue", World.class, int.class, int.class, int.class);
BWBlocks = (Block) Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader").getField("BWBlocks").get(null);
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException | NoSuchMethodException e) {
e.printStackTrace();