mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Deprecate Item.onUsingTick, as vanilla provides the same function in Item.onUseTick now. Closes #9342
This commit is contained in:
8 files changed
+53
-15
No files matched your search
@@ -196,7 +196,9 @@ public interface IForgeItem
|
||||
* @param player The Player using the item
|
||||
* @param count The amount of time in tick the item has been used for
|
||||
* continuously
|
||||
* @deprecated {@link net.minecraft.world.item.Item#onUseTick(Level, LivingEntity, ItemStack, int) Implement Vanilla's Version}
|
||||
*/
|
||||
@Deprecated(since = "1.19.4", forRemoval = true)
|
||||
default void onUsingTick(ItemStack stack, LivingEntity player, int count)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -249,7 +249,10 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundTag>
|
||||
* @param player The Player using the item
|
||||
* @param count The amount of time in tick the item has been used for
|
||||
* continuously
|
||||
*
|
||||
* @deprecated {@link net.minecraft.world.item.ItemStack#onUseTick(Level, LivingEntity, int) Use Vanilla's Version}
|
||||
*/
|
||||
@Deprecated(since = "1.19.4", forRemoval = true)
|
||||
default void onUsingTick(LivingEntity player, int count)
|
||||
{
|
||||
self().getItem().onUsingTick(self(), player, count);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class LivingEntityUseItemEvent extends LivingEvent
|
||||
/**
|
||||
* Fired every tick that a player is 'using' an item, see {@link Start} for info.
|
||||
*
|
||||
* Cancel the event, or set the duration or {@literal <=} 0 to cause the player to stop using the item.
|
||||
* Cancel the event, or set the duration to {@literal <=} 0 to cause the player to stop using the item.
|
||||
*
|
||||
*/
|
||||
@Cancelable
|
||||
|
||||
Reference in new issue
Block a user