Negative Coordinates

Started by SuperSamD on

Topic category: Help with modding (Java Edition)

Last seen on 03:05, 18. May 2023
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Negative Coordinates
Thu, 05/27/2021 - 23:30 (edited)

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

Edited by SuperSamD on Thu, 05/27/2021 - 23:30