#(sudvel) How can I make a custom block drop when it breaks?

26 messages · Page 1 of 1 (latest)

safe tree
#

sorry i'm a newbie and i can't figure this out for an hour

wasterland_sand_item:
type: item
material: sand
display name: "<white>Песок Пустоши"
lore:
- "<light_purple>● Горсть фиолетовой пыли, раскаленной солнцем."
- "<light_purple>Порой в ней можно найти полезный мусор"

world1:
type: world
events:
on player breaks block:
- narrate "Сломан блок Песка пустоши"
- determine wasterland_sand_item

quiet capeBOT
#

(sudvel) How can I make a custom block drop when it breaks?

quiet capeBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

runic epoch
#

!e block drops

signal crowBOT
# runic epoch !e block drops
Group

Player

Event Lines

block drops item from breaking <block> drops <item> from breaking

Triggers

when a items drop from a block due to a player breaking the block in survival mode.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.location> returns the LocationTag the block was broken at.
<context.material> returns the MaterialTag of the block that was broken.
<context.drop_entities> returns a ListTag of EntityTags of type DROPPED_ITEM. To get the list of I...

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

somber bane
#

!debug

signal crowBOT
# somber bane !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

somber bane
#

can you record a debug of it?

safe tree
#

that is, default sand

tight basin
#

When custom items are placed they become normal blocks, that's just how Minecraft works

#

If you want a custom item that can be placed but still drops a custom item when broken, you'll need to store that data yourself (usually by flagging the block)

safe tree
tight basin
#

You can just handle it with events

#

!e piston

signal crowBOT
safe tree
tight basin
#

!e entity changes block

signal crowBOT
# tight basin !e entity changes block
Group

Entity

Event Lines

<entity> changes <block> (into <block>)

Triggers

when an entity changes the material of a block.

Has Player

when the entity that changed the block is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.entity> returns the EntityTag that changed the block.
<context.location> returns the LocationTag of the changed block.
<context.old_material> returns the old material of the block.
<context.new_material> returns the new material of the block.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

tight basin
#

And I believe this event for blocks falling (I.e. becoming falling block entities)

tight basin
safe tree
sonic roverBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

Error: Missing thread owner. Did they leave the Discord? If so, just use </resolved:1028673926114594866> yourself.