Make a specific block (gas) disapear at a Y coord

Started by gustavowizard123 on

Topic category: Help with modding (Java Edition)

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a specific block (gas) disapear at a Y coord

so i made a Gas here, from a block not a fluid, i made the gas fly up (each tick delete/place y+1), but i want it to vanish at a Y point, like 25 blocks tall, so the gas dissipate and the game dont go craze with ethernal loops :D

anybody got any idea?

thanks!

Last seen on 02:22, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hope this helps if [ [Y] <= …
Fri, 08/14/2020 - 06:37

Hope this helps

if [ [Y] <= [maxHeight] ] do

[ delete/place y+1 ]

else

[ place [air] at [X Y Z] ]

 

you probably already fixed this but I would check if the block above is air before changing it so it don't make holes in the roof if gas is in a room.

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah it does check if its…
Sat, 08/15/2020 - 00:11

yeah it does check if its air, so it wont replace solid blocks, i will try this tonight thanks a lot!

 

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the thing is when you set …
Sat, 08/15/2020 - 01:57

the thing is when you set 'If Y = 20' for example, it counts from 0 block position (bedrock), up, so the gas will only work like that from Y = 0 to Y = 20, i will try to set up like Y =150 just to test out, but then the gas would disapear on that altitude... i would need a Y position relative to the current position of block maybe?

Last seen on 02:22, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A solution idea would be…
Sun, 08/16/2020 - 03:03

A solution idea would be rather than instantly making it disapear at that altitude you could make it have a chance of disapearing.

Or when it goes up there is a chance for it to disapear like a 5% chance (1 in 20).

This is unless you want to use NBT data which might make it a bit more complicated

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah that is also a idea…
Mon, 08/17/2020 - 00:19

yeah that is also a idea..

the thing is for example, if the player set up a base on the sky for example, at high 120, you see, the gas will simple wont exist in some Y values then, for now i set it up for Y = 150 until i find anything better

i used NBT number data on a lot of blocks i can handle it to make timers, however, NBT number is also not working for some reason i dont know, was the first thing i tried actually.

 

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also i use a single…
Mon, 08/17/2020 - 00:20

also i use a single procedure for 5 different gases, i will also try make a separated one with NBT numbers again

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i tried in like 20 ways…
Mon, 08/17/2020 - 01:22

i tried in like 20 ways using NBT number tags... it just wont work, i even tried to apply the variance to the block above it, to be sure... nothing, the gas just climb up and up forever lol

 

ada

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i prb will use your % idea…
Mon, 08/17/2020 - 01:29

i prb will use your % idea if that dont work

Last seen on 02:22, 16. Jul 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi just looked at your code,…
Mon, 08/24/2020 - 02:27

Hi just looked at your code, when you were setting NBT data to the block above it was air since you replaced the block above after you set the NBT.

Simple fix, just move the replace block part to be above the NBT parts.

Last seen on 18:52, 20. Jan 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm a bit late to this convo…
Sun, 01/10/2021 - 22:08

I'm a bit late to this convo, did you find a way to do it?

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lol nope, this one still…
Mon, 04/12/2021 - 01:56

lol nope, this one still without solution.