About GT6 Machine Recipe Edit

You’re right:grinning:

Many days passed…How’s this going now?
Besides, I’m not sure if you noticed this:

Blockquote
Last, MineTweaker still cannot modify Dungeon Loot when both GT6 and MineTweaker are installed at the same time.

Okay… It seems that editing Topic will not remind you.
@Gregorius

2 Likes

Yeah editing wont remind me at all, there is only very few cases where editing actually causes a notification, and even you mentioning me directly barely did anything, I almost skipped over that one.

And how the heck does MineTweaker not work?!

1 Like

I’m sorry to reply so late.Somehow, I didn’t receive email notifications as before.

Blockquote
ERROR: Error executing test.zs: null
java.lang.NullPointerException
at minetweaker.mc1710.vanilla.MCLootRegistry$RemoveLootAction.apply(MCLootRegistry.java:162)
at minetweaker.runtime.MTTweaker.apply(MTTweaker.java:70)
at minetweaker.MineTweakerAPI.apply(MineTweakerAPI.java:169)
at minetweaker.mc1710.vanilla.MCLootRegistry.removeChestLoot(MCLootRegistry.java:53)
at Test.script(test.zs:1)
at ZenMain.run(test.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.mc1710.MineTweakerMod.onServerAboutToStart(MineTweakerMod.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.serverAboutToStart(Loader.java:859)
at cpw.mods.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:273)
at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:91)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

This error occurs when I install both GT6 and MineTweaker.
If I delete GT6, this error will not occur.

2 Likes

Do you already have scripts in your script folder? One called test?

2 Likes

Yeah you already have a Script there, which does already remove some Dungeon Loot, and I presume it removes loot that has already been removed using the Config, since it results in a Nullpointer.

2 Likes

I tried again, this time using the following script:

vanilla.loot.removeChestLoot("dungeonChest", <minecraft:iron_ingot>);

This time I’m sure there’s iron ingot in dungeon Chest.(I used NEI to get the treasure box of GT6 and open it.)

2 Likes

“dungeonChest” is not the correct name for the loot selector, that’s what I got when I asked around on IRC, though nobody told me what the right name would be. So the Iron Ingot is right, but the Dungeon Loot Chest is wrong. At least according to them. I have looked at the MC Code and it looked like “dungeonChest” was actually right, but I am not sure.

1 Like

But the same script did not report an error when GT6 was not installed…
Although I can’t find a dungeon Chest to verify that it works, there is at least no error.
If I knew how to quickly view dungeon Chest items, I would definitely try again.

2 Likes

There MIGHT be an NEI Plugin for Loot, but I dont know what its named or if its even for 1.7.10

1 Like

Use /mt loot to dump the list of chests and their contents.

2 Likes

Thanks to @MoreThanHidden for his reply, /mt look is very useful.
I tested it again.It seems that my script is valid when GT6 is not installed.

2 Likes

Ah seems to not be handling a null in the loot table:

[02:21:29] [Server thread/ERROR]: Couldn't process command: 'mt loot'
java.lang.NullPointerException
	at minetweaker.mc1710.vanilla.MCLootRegistry.getLoot(MCLootRegistry.java:62) ~[MCLootRegistry.class:?]
	at minetweaker.MineTweakerImplementationAPI$13.execute(MineTweakerImplementationAPI.java:400) ~[MineTweakerImplementationAPI$13.class:?]
	at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:642) ~[MineTweakerImplementationAPI$19.class:?]
	at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124) ~[MCServer$MCCommand.class:?]
	at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94) [z.class:?]
	at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739) [nh.class:?]
	at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718) [nh.class:?]
	at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37) [ir.class:?]
	at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9) [ir.class:?]
	at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
	at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111) [bsx.class:?]
	at fastcraft.u.a(F:289) [fastcraft-1.25.jar:?]
	at fastcraft.H.aq(F:36) [fastcraft-1.25.jar:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396) [MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [?:?]
2 Likes

Then try dumping the Loot Table when GT6 is installed. :wink:

Also how does a null show up in the Loot Table ?!

1 Like

This is the error with GT6 installed so it fails to dump the list.

2 Likes

Any way to know what line of code in MineTweaker causes this? Would like to know what it accesses to cause this Error. I have the suspicion I know what causes that crash.

1 Like

Crashing at the for (WeightedRandomChestContent content : contents) { line:

	@Override
	public List<LootEntry> getLoot(String type) {
		ChestGenHooks recipe = LOOT.get(type);
		List<WeightedRandomChestContent> contents = MineTweakerHacks.getPrivateObject(recipe, "contents");

		List<LootEntry> results = new ArrayList<LootEntry>();
		for (WeightedRandomChestContent content : contents) {
			results.add(new LootEntry(new WeightedItemStack(
					MineTweakerMC.getIItemStack(content.theItemId),
					content.itemWeight),
					content.theMinimumChanceToGenerateItem,
					content.theMaximumChanceToGenerateItem));
		}
		return results;
	}

ChestGenHooks is just from forge with a reflection function to read the private.

2 Likes

Ah I see, yeah that would sure as fuck crash, there is public Functions for that purpose and ofcourse MineTweaker doesn’t use them. I will see how I can fix that in the next Version.

1 Like

This Version SHOULD have it fixed, would require testing. :wink:

1 Like

Still isn’t working seemed to be having the issue because dungeonChest was returning blank.

But now the chest is returning but the minetweaker private object getter is returning null.

2 Likes

As is tying to access the field “contents” on ChestGenHooksChestReplacer directly.

2 Likes