#mob killing issues
1 messages · Page 1 of 1 (latest)
on death:
if attacker is player:
give player 2 of command block```
k
options:
itemPicker: chain command block of sharpness 1 named "&7Item Picker" with nbt compound from "{Hideflags:127}"
headShard: player skull named "&6Head Shard"
mendingBook: enchanted book with nbt compound from "{StoredEnchantments:[{id:""minecraft:mending"",lvl:1s}]}"
reviveShard: amethyst shard named "&eRevive Shard"
on load:
set {_a} to {@headShard}
set {_n} to netherite ingot
set {_r} to {@reviveShard}
register new shaped recipe for {_r} using {_a}, {_a}, {_a}, {_a}, {_n}, {_a}, {_a}, {_a} and {_a} with id "custom_recipes:reviveshard"
command /getItemPicker:
permission: op
trigger:
give 1 of {@itemPicker} to player
on death:
set {_killer} to attacker
if {_killer} isn't set:
stop
give 1 of {@itemPicker} to {_killer}
on right click:
if player's tool = {@itemPicker}:
set metadata tag "item" of player to a chest inventory with 1 rows named "&6Pick an Item."
set {_inv} to metadata tag "item" of player
# - items in gui
set slot 0 of {_inv} to {@mendingBook}
set slot 1 of {_inv} to {@headShard}
open {_inv} to player
on inventory click:
if event-inventory = (metadata tag "item" of player):
cancel event
if event-item is set:
if player has enough space for event-item:
give 1 of event-item to player
else:
drop 1 of event-item at player
close player's inventory
remove 1 of {@itemPicker} from player's inventory
Also mobs drop command blocks
Why
if victim is player:
can you edit the code and fix it?
options:
itemPicker: chain command block of sharpness 1 named "&7Item Picker" with nbt compound from "{Hideflags:127}"
headShard: player skull named "&6Head Shard"
mendingBook: enchanted book with nbt compound from "{StoredEnchantments:[{id:""minecraft:mending"",lvl:1s}]}"
reviveShard: amethyst shard named "&eRevive Shard"
on load:
set {_a} to {@headShard}
set {_n} to netherite ingot
set {_r} to {@reviveShard}
register new shaped recipe for {_r} using {_a}, {_a}, {_a}, {_a}, {_n}, {_a}, {_a}, {_a} and {_a} with id "custom_recipes:reviveshard"
command /getItemPicker:
permission: op
trigger:
give 1 of {@itemPicker} to player
if victim is player:
on death:
set {_killer} to attacker
if {_killer} isn't set:
stop
give 1 of {@itemPicker} to {_killer}
on right click:
if player's tool = {@itemPicker}:
set metadata tag "item" of player to a chest inventory with 1 rows named "&6Pick an Item."
set {_inv} to metadata tag "item" of player
# - items in gui
set slot 0 of {_inv} to {@mendingBook}
set slot 1 of {_inv} to {@headShard}
open {_inv} to player
on inventory click:
if event-inventory = (metadata tag "item" of player):
cancel event
if event-item is set:
if player has enough space for event-item:
give 1 of event-item to player
else:
drop 1 of event-item at player
close player's inventory
remove 1 of {@itemPicker} from player's inventory
would this work?
wdym no
No what