#Cancel falling block conversion to item

1 messages · Page 1 of 1 (latest)

dry stump
#

Someone have an idea how to prevent falling block to be converted as item when it collide with certain blocks like slab, flower pot, cactus and other small block ??

In fact, I try to change anvil interaction with other blocks. For exemple, anvil crushing fragile blocks like all type of glass 😇😏

hallow kelp
#

Cancel the EntityChangeBlockEvent or whatever its called

#

Wait you mean if the Block doesnt hit another solid Block?

dry stump
#

This event is not trigger because the falling block (an entity) doesn't change the block, at the opposite, the block convert this falling block as Item (an other entity).

hallow kelp
#

Then look for the EntityDeathEvent

dry stump
#

Doesn't triggered too 😢

#

Maybe the entity is not considered dead…

#

Weird… The entity should die…

dry stump
#

I reconfirm that falling blocks are not affected by the event EntityDeathEvent.

#

I try to review the code to find why but I can not find it.

long gulch
#

Falling Blocks call EntityBlockChangeEvent ?

#

if you want it to destroy some blocks you could try creating a custom falling block which @override the tick() method or smth else and break specific blocks from there

dry stump
novel sinew
#

Let me guess, you’re on an ancient version

dry stump
#

1.16.5 is an "ancient" version ??

long gulch
#

almost

novel sinew
#

If it doesn’t have that method it is

dry stump
#

Nope, I have this method and it is not the solution I searching…

hallow kelp
#

Is called when a falling block lands on a torch for example

novel sinew
#

I mean that method does work

dry stump
#

Works for the item but that doesn't keep alive the falling block, right ??

hallow kelp
dry stump
dry stump
#

Thanks you very much, I was don't thinking about this type of solution 😆😅