Topic category: Help with Minecraft modding (Java Edition)
Hey peeps..
I wan't to make a couple of custom gui crafter things, I want one to only make tools with CanDestroy and one that give's items the CanPlaceOn function...
Basically my question is how can I make this (if possible) get the block data from a block placed in the input slot of a gui (with another slot having a tool in it) and add it to the CanDestroy command and have that gui's output slot give a tool that can then destroy that block type?
As for the CanPlaceOn function I basically just want to place a block in another gui and have it come out as a CanPlaceOn nearly everything which I think I already made a code somewhere for but yea, How can I do these things if it's possible?
Can we use variable codes with this and no I don't mean numbers..
They aren't currently possible with mcreator, you gotta code it
yeah I want to code it in mcreator coz you can't use variable code with codeblocks so i can't say have a command block with /give @p item with CanDestroy minecraft:diamond_block and set the minecraft:diamond_block as a variable from another codeblock with a block data command if you understand what i'm saying..
I'm not looking for a button to do it or whatever, I just kinda don't know how to code it lol I can do it seperately for each item i know but yea thats what 300+ blocks and well that would take around 600+ command blocks to do it the other way i wanted too which is to place a block in a spot and have it pop out a tool to destroy it..
so I'm looking for an easier way and a possibility of only using one block to stop lag etc..
I'm thinking i can make a variable for each block type entered into a slot and having it goto true from false and have that do a command once true to give player the tool but yea again that would be like 300 variables lol.. but that would probably work..
I would much rather a way to just detect the block data and transfer the block type to the give command in the CanDestroy section.. I guess thats a bit too complicated though and maybe impossible.. which makes me sad lol..
try using the command with the "execute command" event.
lol seems like i just said about that while you replied Cameron :P but yea as I said that would mean setting around 300+ varibles :/ and also making a cammand for each thats allot of work lol..
@#2 yea got it