#i need help with the on place event

1 messages · Page 1 of 1 (latest)

obsidian flax
#

TNT minecarts are not blocks, they aren't placed

#

They are entities, they are spawned

sick skiff
#

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

rain rampart
sick skiff
#

what do you want me to explain to you

#

i am trying to stop people from placing tnt minecarts

rain rampart
#

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?

minor cipher
minor cipher
sick skiff
#

it still didnt work

minor cipher
#

cancel an on click

sick skiff
#

i will try that

rain rampart
#

you can use skbee's on entity added to world, that would also stop dispensers and such

minor cipher
#

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

minor cipher
#

and?

sick skiff
#

on entity added to world:
event-entity is a tnt minecart:
cancel event

sick skiff
minor cipher
#

that could also work

#

bruh

rain rampart
#

errors?

sick skiff
#

no errors

minor cipher
#

do you have skbee?

sick skiff
#

yes

rain rampart
#

broadcast the entity to debug

minor cipher
#

broadcast event-entity

rain rampart
#

or, rather the type of the entity

rain rampart
minor cipher
#

i allways do

code




#

bruh discord is stupid

sick skiff
minor cipher
#

i also recommend doing on explode cancel event bcs dispensers

#

or removing the recipe

rain rampart
#

what did the debugging show

sick skiff
#

i didnt debug

rain rampart
sick skiff
#

i dont know whats that

rain rampart
#

so we can see if

  1. the event is run
  2. you are checking for the right thing
rain rampart
sick skiff
#

oh

#

on spawn:

#

?

sick skiff
#

explosive minecart

rain rampart
#

oh, great

#

use that then

sick skiff
rain rampart
#

i guess you can kill it then

sick skiff
#

it doesnt kill it tho

rain rampart
#

you may need to waitatick

sick skiff
#
    event-entity is an explosive minecart:
        kill event-entity```
rain rampart
#

the example on the docs is delete event-entity

sick skiff
#

still

#

doesnt do anything

rain rampart
sick skiff
#

yes