Skip to content

Commit

Permalink
Remove IItemExtension#onArmorTick
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Jun 11, 2024
1 parent 00ab975 commit 57bca00
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
return l;
}
}
@@ -214,13 +_,18 @@
@@ -214,11 +_,15 @@
}

public void tick() {
Expand All @@ -25,10 +25,7 @@
+ slot++;
}
}
+ armor.forEach(e -> e.onArmorTick(player.level(), player));
}

public boolean add(ItemStack p_36055_) {
@@ -268,6 +_,8 @@
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Adding item to inventory");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,6 @@ default boolean doesSneakBypassUse(ItemStack stack, net.minecraft.world.level.Le
return false;
}

/**
* Called to tick armor in the armor slot. Override to do something
*
* @deprecated Use {@link Item#inventoryTick(ItemStack, Level, Entity, int, boolean)} by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.
*/
@Deprecated(forRemoval = true, since = "1.20.4")
default void onArmorTick(ItemStack stack, Level level, Player player) {}

/**
* Determines if the specific ItemStack can be placed in the specified armor
* slot, for the entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,6 @@ default float getXpRepairRatio() {
return self().getItem().getXpRepairRatio(self());
}

/**
* Called to tick armor in the armor slot. Override to do something
*
* @deprecated Use {@link Item#inventoryTick(ItemStack, Level, Entity, int, boolean)} by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.
*/
@Deprecated(forRemoval = true, since = "1.20.4")
default void onArmorTick(Level level, Player player) {
self().getItem().onArmorTick(self(), level, player);
}

/**
* Called every tick when this item is equipped {@linkplain Mob#isBodyArmorItem(ItemStack) as an armor item} by a horse {@linkplain Mob#canWearBodyArmor()} that can wear armor}.
* <p>
Expand Down

0 comments on commit 57bca00

Please sign in to comment.