#convert liquid to certain block when placed in nether

14 messages · Page 1 of 1 (latest)

delicate crypt
#

I want some water-based modded fluid to be converted/entirely removed to certain kind of block if they are placed in nether in any methods. (like how water functions in nether)
Is it possible by Kubejs? If it possible, which event should I use?

glossy stumpBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

hollow imp
#

try using BlockEvents.placed()

#

idk if it works with fluids but maybe it works

delicate crypt
#
BlockEvents.placed("block",event  => 
{
    let block_id = event.block.getId()
    if (block_id=="light_liquid:lightliquid")
    {
        if (event.block.getDimension() == "minecraft:the_nether")
        {
            event.player.tell("lightliquid evaporated ");
            event.block.popItem("minecraft:glowstone");
            event.block.set("minecraft:air");           
        }
    }
    else if(block_id=="funkyfluids:redstone_suspension_block")
    {
        if (event.block.getDimension() == "minecraft:the_nether")
        {
            event.player.tell("redstone_suspensionevaporated ");
            event.block.popItem("minecraft:redstone");
            event.block.set("minecraft:air");           
        }
    }
})
#

I think this do not work

#

I want to make placed fluid (light_liquid:lightliquid or funkyfluids:redstone_suspension_block) in nether turned into minecraft:air, and make glowstone / restone pop out.

#

At first, I used datapack and modified minecraft/tag/fluids/water.json by putting all fluids that I do not wanted to allow in nether. It worked, however, resulted in some unwanted consequences (like putting sugar cane next to acid, poision, liquid slime is allowed/riding boat on dimensional tear is totally fun and safe), so I want to make fluid convert to something weird block in nether / or pop out some related items.

hollow imp
#

yeah, you actually can't detect the water being placed using block events but i did this js //Startup Scripts ForgeEvents.onEvent('net.minecraftforge.event.entity.player.FillBucketEvent', e => { if(e.entity.mainHandItem.id == 'minecraft:water_bucket' && e.level.dimension == 'minecraft:the_end'){ let blockHit = e.entity.rayTrace(6, false) if(!e.level.isClientSide()){ e.level.server.scheduleInTicks(2, () => { blockHit.block.offset(blockHit.facing).popItem('glowstone') e.level.setBlockAndUpdate(blockHit.block.offset(blockHit.facing).pos, Block.id('air').blockState) }) }else{ Client.player.playNotifySound("minecraft:entity.generic.extinguish_fire","blocks",1,1) } } })

#

just change the dimension, and it should be good to go. i didn't have any modded fluid so i tested with water in the end

#

i guess only works with your fluid has a bucket item and is the player trying to use it

delicate crypt
#

Thank you, can I use same scheme for Dispenser bucket event? I think there is no other ways to change device...

clear portalBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You should generally create a new post for unrelated issues.