#i need help with the on place event
1 messages · Page 1 of 1 (latest)
on spawn:
if event-entity is a tnt minecart:
cancel event
this doesnt work
wait
i am just dumb
well
still doesnt work
on spawn:
if event-entity is a minecart with tnt:
cancel event

what do you want me to explain to you
i am trying to stop people from placing tnt minecarts
i want you to explain what you mean by "doesnt work"
which part(s) dont work?
do they give any errors?
have you tried debugging?
on right click with tnt minecart: cancel event
just take a quick guess.
no i was just using tnt minecart when its called minecart with tnt
it still didnt work
cancel an on click
you can use skbee's on entity added to world, that would also stop dispensers and such
oh yeah. i didnt think abt that
you can also do on explode if entity is tnt minecart cancel
just that they don't explode
but you can still place
or just disable the crafting recipe
i tried that
and?
on entity added to world:
event-entity is a tnt minecart:
cancel event
it just exploded
this didnt work aswell
errors?
no errors
do you have skbee?
yes
broadcast the entity to debug
broadcast event-entity
or, rather the type of the entity
if you're going to send code, you should put it in a code block; ```code here```
If youre going to indent after that condition, it should be an if statement
this works
i tought it didnt
i also recommend doing on explode cancel event bcs dispensers
or removing the recipe
what did the debugging show
i didnt debug
broadcast the type
i dont know whats that
so we can see if
- the event is run
- you are checking for the right thing
literally broadcast type of event-entity
explosive minecart
i guess you can kill it then
it doesnt kill it tho
event-entity is an explosive minecart:
kill event-entity```
the example on the docs is delete event-entity
try waiting a tick before
yes

