Topic category: Help with Minecraft modding (Java Edition)
I have a program for a teleporter that checks the coordinates that the player puts in, but when a negative number is entered, it doesn't work. I just need a way to add in the negative sign (-)
Couldn't upload an image so this is the section of the block code that checks the location:
WarpSourceGUIWhenSetBlockButtonPressed:
Set NBT tag "xbox" of block at x: x y: y z: z to Get text inside textfield XTextBox if it has tile entity
Set NBT tag "ybox" of block at x: x y: y z: z to Get text inside textfield YTextBox if it has tile entity
Set NBT tag "zbox" of block at x: x y: y z: z to Get text inside textfield ZTextBox if it has tile entity
WarpSourceEntityCollidesWithBlock:
If: WarpDestination = Get block at
x: number from text Get NBT text tag "xbox" of block at x: x y: y z: z if it has tile entity
y: number from text Get NBT text tag "ybox" of block at x: x y: y z: z if it has tile entity
z: number from text Get NBT text tag "zbox" of block at x: x y: y z: z if it has tile entity