Minetweaker cannot resolve Logistics Pipes blocks.
sihawken opened this issue · 43 comments
For some odd reason, minetweaker breaks when it comes to LogisticsPipes blocks. This isn't my first script, so I'm 90% it wasn't an error on my part. I've described the entire issue over on MineTweaker3's issue tracker, but I think its probably something that Logistics Pipes is doing. Another person has confirmed that they had the same issue.
Even values provided by an NEI dump didn't work. I am a bit confused.
The issue I posted was here: stanhebben/MineTweaker3#164
What actual error code are you Getting?
Can you provide the error Log from Minetweaker?
This is the log from the LP.zs file that is causing the issue: http://pastebin.com/WntexhAi
weirdly enough, I can see why it can't resolve it. It is searching for
LogisticsPipes : logisticsSolidBlock : 1
when it should be searching for
LogisticsPipes:logisticsSolidBlock:1
which is what I have set in LP.zs . This behaviour is odd, it only happens with Logistics Pipes :/ I have about 10 other scripts, each per mod. The other ones work well.
That doesnt seem like somethign related to LP, it seems something with the Script is not working correctly. Make sure you have the latest version of Minetweaker.
Because its not something that a Block is not resolvable, its rather that there is a method missing in the Scripting Engine!
I using the last Minetweaker (3.09c)version and the last mod tweaker (0.7.5)Version. Every script works except logistic pipes. Are logistic pipes using a different Method than other mods?
ive definitly had stuff working before so I can confirm you this isnt something thats on LP´s side, since we Use normal Block registering, same with Items...
(I changed all the recipes before I actually came around implementing the Beta Recipes for the 0.9 Version)
Nope, LP uses just the Same stuff as every other mod ;)
There is nothing special in particular that could break such funktionality.
I make a minetweaker addon for Gregtech and run it in my pack. I think this can't be the error because the other guy don't use it. I post tomorrow a minetweaker log file.
Here the proof:
recipes.remove(<LogisticsPipes:logisticsSolidBlock>);
ERROR: LP.zs:1: Could not resolve <LogisticsPipes : logisticsSolidBlock>
ERROR: Error executing LP.zs: null
java.lang.NullPointerException
at minetweaker.mc1710.recipes.MCRecipeManager.remove(MCRecipeManager.java:94)
at LP.__script__(LP.zs:1)
at __ZenMain__.run(LP.zs)
at minetweaker.runtime.MTTweaker.load(MTTweaker.java:157)
at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:624)
at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:82)
at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:610)
at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124)
at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94)
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739)
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718)
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.NetworkManager.func_74428_b(NetworkManager.java:212)
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
It make space between the ":"
Every other Mods recipes i can remove and i have a lot of scripts
Hmmm, minetweaker should default to :0, but in my script that's what I did
and got the same issue.
I don't think that's the problem :/
On Mar 25, 2015 9:24 AM, "Bitterholz" [email protected] wrote:
Found your problem! In NEI, the Soldering Station and all other items that
are the First Subtype of an ID, are shown as "No Metadata".But actually they are of Meta Value 0!
So instead of LogisticsPipes:logisticsSolidBlock you actually need to do:
LogisticsPipes:logisticsSolidBlock:0That goes for ALL Blocks/Items that have subtypes. You allways register
the first Item as Value 0, because Subblocks are actually dealing with
Arrays and the first Entry in an Array is allways 0.—
Reply to this email directly or view it on GitHub
#622 (comment)
.
Found your problem! In NEI, the Soldering Station and all other items that are the First Subtype of an ID, are shown as "No Metadata".
But actually they are of Meta Value 0!
So instead of LogisticsPipes:logisticsSolidBlock you actually need to do:
LogisticsPipes:logisticsSolidBlock:0
That goes for ALL Blocks/Items that have subtypes. You allways register the first Item as Value 0, because Subblocks are actually dealing with Arrays and the first Entry in an Array is allways 0.
I'll have to try it again, but actually this is the variable I was using
and getting this issue:
LogisticsPipes:logisticsSolidBlock:1
As you can see in my script here: http://pastebin.com/iJ41bBcv
Following what you just tried, that should have worked. Maybe there is a
new minetweaker update or something. I'll write a new script and try it out.
It actually is! Its funny and retarded, but it is the actual Issue your scripts have there.
DANGER!
Stuff that Changes, AKA. the Recipe for a Block may only be a "var" not a "val" in your script! Because "val" is a final Value!
In my case I don't use a var a val. What you did mean with the value 0? How i can get my scripts working ?
@Dream-Master :
You need to do:
var lpBlockSolder = LogisticsPipes:logisticsSolidBlock:0;
You allways NEED to specify Metadata, if Metadata is a thing for that Block your dealing with.
Metadata usually starts with 0, wich is the case if there are metadata Blocks on the same ID, but the first Block is show WITHOUT any Metadata.
So IF there is a Block without Metadata that defenitely has Subtypes, for Example Minecraft Log-Types, LP-SolidBlocks and many more, you HAVE to specify:
itemOrBlockWithMeta = ModName:itemidentifier:0;
@simlhawk :
You need to allways specify the Metadata! even if its Zero, Otherwhise you would call an Item that is not Existent!
PLUS
If you plan on Changing a Recipe, you need to set your Variable as "var"!
Example:
//This needs to be "VAR"iable because we want to change the recipe!
var lpBlockPower = LogisticsPipes:logisticsSolidBlock:1;
All the recipe.something() functions ONLY work on VARIABLES, aka "var" prefix!
If you need an item just for the definition, for example Redstone:
//This doesn´t ever Change!
val MC_RSDUST = Minecraft:redstone;
var = Varibale, ANY changes require this
val = Final(Unchangeable) definition of an Item, just for shortening your Code and using one single refrence on the actual Item. You can basicly say these are CONSTANTS
Your error occurs because you tried recipes.remove(); on a CONSTANT. Thats why you get a NoSuchMethodException in your script.
@Bitterholz I will test it later. Thanks
I try this and it doesn't work :
recipes.remove(<LogisticsPipes:logisticsSolidBlock:0>);`
and this:
recipes.remove(<LogisticsPipes:logisticsSolidBlock:*>);
Error log:
ERROR: LP.zs:1: Could not resolve <LogisticsPipes : logisticsSolidBlock : 0>
ERROR: Error executing LP.zs: null
java.lang.NullPointerException
at minetweaker.mc1710.recipes.MCRecipeManager.remove(MCRecipeManager.java:94)
at LP.__script__(LP.zs:1)
at __ZenMain__.run(LP.zs)
at minetweaker.runtime.MTTweaker.load(MTTweaker.java:157)
at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:624)
at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:82)
at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:610)
at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124)
at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94)
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739)
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718)
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.NetworkManager.func_74428_b(NetworkManager.java:212)
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
Or i have to var all items first. I hope not.
@Dream-Master may i have your whoole script + instance of minecraft?
Because i just ran a old script of mine, and it worked BEAUTIFULLY
@Bitterholz
I make only one line in the script(Logistic Pipes) I using Minecraft 1.7.10 and forge 1291. I using also many other scripts for my other mods.
My Modpack and scripts here.
https://github.com/Dream-Master/DreamCraft
What files you need more ?
And my two custom Mods i using
https://github.com/Dream-Master/Minetweaker-Gregtech-5-Addon
Maybe the G-Tech addon breaks something. Don´t know. I just tested it today and it worked for me...
I did:
var lpBlockPower = LogisticsPipes:logisticsSolidBlock:1;
recipes.remove(lpBlockPower);
That worked beautifully for me
I using the same code in G-Tech addon that Minetweaker use. i add only the missing machines. And why all other mods scripts working fine. So what is in LP different ? I don't get it why this error occurs.
As I understand and as Bitterholz points out: Minetweaker basically works.
If someone finds the issue and if it is actually fixable by changing something in LP, this is a valid issue.
Otherwise, as we are not officially supporting Minetweaker AND we do not have time to investigate every mod combination on earth, this issue will be closed when it gets inactive.
You could try it without Minetweaker addons first. You can try and get help from someone, who is very familiar with Minetweaker. I do not have experience with Minetweaker.
Dreammaster if you give me your instance of Minecraft, including all mods and configs, and a sheet of work you want to acomplish with MT, I can try and help you out with the scripts.
Let me try this out first by my self. I try it without mod Tweaker and my Mod. If it not work we go deeper inside. I let you know when I test it later this evening. Thanks for help.
@Bitterholz After a bit thesting i find out in this case it is my Mod that cause this error. I dont understund because my code have the same code than modtweaker only with missing fluid import and add some other Gt Machines. My Source Code is here. https://github.com/Dream-Master/Minetweaker-Gregtech-5-Addon and i link to my modpack i want to send you via pm. Thanks for help.
@simlhawk
It would be very interesting why you get this error. You are using my Mod GTTweaker?
Thanks for testing. It is very likely that @simlhawk has a similar problem. Or his got solved from using metadata 0.
@Bitterholz what you mean with "Nope never heared of it :P"?
@hron84 But this Question goes to simlhawk !?!?
@Dream-Master i think it was the answer for your last question (You are using my Mod GTTweaker?)