Skip to content

Commit

Permalink
Add slot clearing api
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofaa2 committed May 9, 2024
1 parent 63aa8b7 commit 5cbb05d
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ public WrapperEntityEquipment(WrapperLivingEntity entity) {
Arrays.fill(equipment, ItemStack.EMPTY);
}


public void clearSlot(@NotNull EquipmentSlot slot) {
equipment[slot.ordinal()] = ItemStack.EMPTY;
refresh();
}

public void clearAll() {
Arrays.fill(equipment, ItemStack.EMPTY);
refresh();
}

public void setHelmet(@Nullable ItemStack itemStack) {
equipment[5] = itemStack == null ? ItemStack.EMPTY : itemStack;
refresh();
Expand Down

0 comments on commit 5cbb05d

Please sign in to comment.