Magic

Magic

190k Downloads

create a way to delete original block's drop

rhisth opened this issue ยท 2 comments

commented

how to select the item with areaofeffect class that falls out of the block when you break it?
i tried to select items that i drop with dropitem class and everything works, but not with the item that falls out of the block

(executes a spell to drop the item)

fantasy:
 world: world
 block_break:
  iron_ore:
   class: Cast
   types: iron_ore
   spells:
    piece_iron

here i am trying to select iron ore that falls out of the block, but it doesn't select it.
and then dropping my custom items that are actually wands (works)

piece_iron:
 name: ironblock
 icon: stick
 actions:
   cast:
   - class: AreaOfEffect
     radius: 1
     actions:
       - class: RemoveEntity
         target_types: dropped_item,experience_orb
   - class: Repeat
     repeat: rand(1, 3)
     target: self
     actions:
     - class: DropItem
       item: piece_iron

if i add this my items are getting selected and removed, but not iron ore that falls out of the block

   - class: AreaOfEffect
     radius: 1
     actions:
       - class: RemoveEntity
         target_types: dropped_item,experience_orb

whats the problem?

commented

Sup
I have been testing this out, magic can't kill dropped items for some reason, but I managed it using commands. If you check out the showcase chat on the discord server you will see.
It simply uses the kill command {type=droppeditem,id=raw_iron} something like this I guess, you can use MCStacker to compile commands like this, but I would use with execute command so there is no console message.
I may make a simple example out of this.

commented

thanks for the answer
i have wrote to you in discord