SIlk touch drops
bookerthegeek opened this issue ยท 11 comments
Heyo
[05:07:29] [Client thread/ERROR] [railcraft]: Cannot initialize silk touch drops
[05:07:29] [Client thread/ERROR] [railcraft]: java.lang.NoSuchMethodException: net.minecraft.block.Block.getSilkTouchDrop(net.minecraft.block.state.IBlockState)
[05:07:29] [Client thread/ERROR] [railcraft]: java.lang.Class.getDeclaredMethod(Unknown Source)
[05:07:29] [Client thread/ERROR] [railcraft]: mods.railcraft.common.plugins.forge.HarvestPlugin.<clinit>(HarvestPlugin.java:53)
[05:07:29] [Client thread/ERROR] [railcraft]: mods.railcraft.common.items.ItemSteelAxe.initializeDefinition(ItemSteelAxe.java:41)
To Reproduce
- Install forge-1.12.2-14.23.5.2796-universal
- Install railcraft-12.0.0-alpha-9
- Look in the logs
Environment
- railcraft-12.0.0-alpha-9
- forge-1.12.2-14.23.5.2796-universal
This thing is intended for tunnel bores to mine with silk touch enchantment. Should not impact your daily lives by too much in theory.
Hmm, is Game.DEVELOPMENT_ENVIRONMENT
initialized incorrectly? This cannot be done with access transformers because this method is protected (overriding methods cannot be all transformed to be public).
You should use ReflectionHelper. It does most of this for you.
The reflection helper does not cache the method or method handle, making it inefficient.
The reflection helper is deprecated as well. Looking for Entity.world
is fine because mods can only run under searge name (playing) or mcp name (dev env).
Oh, because that class is loaded by another class loader which is not the launch classloader.