CraftTweaker

CraftTweaker

151M Downloads

Cannot set block hardness

Entoarox opened this issue ยท 2 comments

commented

I am unable to use .hardness to set a block's hardness value, this causes a error to show in the chat:
net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
Since I dont know if it matters or not, I will add that this happens on a dedicated SMP server.

commented

I will need a few things...

Scripts
Minetweaker.log file
Minecraft version
Forge Version
Mod version

Because right now, I got literally nothing to work with.

commented

The scripts are as follows:

recipes.remove(<fluxedsolars:solarpanel:1>);
recipes.remove(<fluxedsolars:solarpanel:2>);
recipes.remove(<fluxedsolars:solarpanel:3>);
recipes.addShaped(<fluxedsolars:solarpanel:3>,[
    [<fluxedsolars:solarpanel:2>,<fluxedsolars:solarpanel:2>,<fluxedsolars:solarpanel:2>],
    [<fluxedsolars:solarpanel:2>,<minecraft:end_stone>,<fluxedsolars:solarpanel:2>],
    [<fluxedsolars:solarpanel:2>,<fluxedsolars:solarpanel:2>,<fluxedsolars:solarpanel:2>]
]);
recipes.addShaped(<fluxedsolars:solarpanel:2>,[
    [<fluxedsolars:solarpanel:1>,<fluxedsolars:solarpanel:1>,<fluxedsolars:solarpanel:1>],
    [<fluxedsolars:solarpanel:1>,<minecraft:blaze_rod>,<fluxedsolars:solarpanel:1>],
    [<fluxedsolars:solarpanel:1>,<fluxedsolars:solarpanel:1>,<fluxedsolars:solarpanel:1>]
]);
recipes.addShaped(<fluxedsolars:solarpanel:1>,[
    [<fluxedsolars:solarpanel:0>,<fluxedsolars:solarpanel:0>,<fluxedsolars:solarpanel:0>],
    [<fluxedsolars:solarpanel:0>,<minecraft:gold_ingot>,<fluxedsolars:solarpanel:0>],
    [<fluxedsolars:solarpanel:0>,<fluxedsolars:solarpanel:0>,<fluxedsolars:solarpanel:0>]
]);
<chisel:cobblestone>.hardness=2;
<chisel:cragRock>.hardness=2;

The minetweaker log:

INFO: MineTweaker: Building registry
INFO: MineTweaker: Sucessfully built item registry
INFO: Adding command minetweaker
INFO: Adding minetweaker command tooltips
INFO: Adding minetweaker command entities
INFO: Adding minetweaker command research
INFO: Adding minetweaker command aspectList
ERROR: Error executing hardnessfix.zs: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
    at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117)
    at minetweaker.mc18.actions.SetBlockHardnessAction.<init>(SetBlockHardnessAction.java:29)
    at minetweaker.mc18.item.MCItemStack.setBlockHardness(MCItemStack.java:130)
    at Hardnessfix.__script__(hardnessfix.zs:1)
    at __ZenMain__.run(hardnessfix.zs)
    at minetweaker.runtime.MTTweaker.load(MTTweaker.java:163)
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:656)
    at minetweaker.MineTweakerImplementationAPI.onServerStart(MineTweakerImplementationAPI.java:566)
    at minetweaker.mc18.MineTweakerMod.onServerAboutToStart(MineTweakerMod.java:169)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:560)
    at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
    at net.minecraftforge.fml.common.Loader.serverAboutToStart(Loader.java:857)
    at net.minecraftforge.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:279)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:252)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:441)
    at java.lang.Thread.run(Thread.java:745)
Caused by: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
    at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:90)
    at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:113)
    ... 38 more
Caused by: java.lang.NoSuchFieldException: blockHardness
    at java.lang.Class.getDeclaredField(Class.java:2070)
    at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:81)
    ... 39 more
INFO: Adding minetweaker command tooltips
INFO: Adding minetweaker command entities
INFO: Adding minetweaker command research
INFO: Adding minetweaker command aspectList
INFO: Removing minetweaker command aspectList
INFO: Removing minetweaker command research
INFO: Removing minetweaker command entities
INFO: Removing minetweaker command tooltips
INFO: Removing minetweaker command aspectList
INFO: Removing minetweaker command research
INFO: Removing minetweaker command entities
INFO: Removing minetweaker command tooltips
INFO: Removing command minetweaker
INFO: Adding command minetweaker
INFO: Adding minetweaker command tooltips
INFO: Adding minetweaker command entities
INFO: Adding minetweaker command research
INFO: Adding minetweaker command aspectList
ERROR: Error executing hardnessfix.zs: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
    at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:117)
    at minetweaker.mc18.actions.SetBlockHardnessAction.<init>(SetBlockHardnessAction.java:29)
    at minetweaker.mc18.item.MCItemStack.setBlockHardness(MCItemStack.java:130)
    at Hardnessfix.__script__(hardnessfix.zs:1)
    at __ZenMain__.run(hardnessfix.zs)
    at minetweaker.runtime.MTTweaker.load(MTTweaker.java:163)
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:656)
    at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:83)
    at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:642)
    at minetweaker.mc18.server.MCServer$MCCommand.func_71515_b(MCServer.java:147)
    at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100)
    at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:79)
    at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:815)
    at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:794)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37)
    at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9)
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at net.minecraft.util.Util.func_181617_a(SourceFile:44)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:660)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:344)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481)
    at java.lang.Thread.run(Thread.java:745)
Caused by: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: blockHardness
    at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:90)
    at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:113)
    ... 24 more
Caused by: java.lang.NoSuchFieldException: blockHardness
    at java.lang.Class.getDeclaredField(Class.java:2070)
    at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:81)
    ... 25 more
INFO: Removing minetweaker command aspectList
INFO: Removing minetweaker command research
INFO: Removing minetweaker command entities
INFO: Removing minetweaker command tooltips
INFO: Removing command minetweaker
INFO: Adding command minetweaker
INFO: Adding minetweaker command tooltips
INFO: Adding minetweaker command entities
INFO: Adding minetweaker command research
INFO: Adding minetweaker command aspectList
INFO: Removing 1 recipes
INFO: Removing 1 recipes
INFO: Removing 1 recipes
INFO: Adding recipe for Ender Solar Panel
INFO: Adding recipe for Blaze Solar Panel
INFO: Adding recipe for Gold Solar Panel

Minecraft: 1.8.9
Forge: 11.15.1.1756
Mod: 1.8.8-3.0.2