diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch new file mode 100644 index 0000000000..f8e7e4b1eb --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/item/MilkBucketItem.java.patch @@ -0,0 +1,74 @@ +--- a/net/minecraft/world/item/MilkBucketItem.java ++++ b/net/minecraft/world/item/MilkBucketItem.java +@@ -3,7 +3,7 @@ + import net.minecraft.advancements.CriteriaTriggers; + import net.minecraft.server.level.ServerPlayer; + import net.minecraft.stats.Stats; +-import net.minecraft.world.InteractionHand; ++import net.minecraft.world.EnumHand; + import net.minecraft.world.InteractionResultHolder; + import net.minecraft.world.entity.LivingEntity; + import net.minecraft.world.entity.player.Player; +@@ -13,46 +13,42 @@ + + private static final int DRINK_DURATION = 32; + +- public MilkBucketItem(Item.Properties item_properties) { +- super(item_properties); ++ public MilkBucketItem(Item.Properties properties) { ++ super(properties); + } + + @Override +- @Override +- public ItemStack finishUsingItem(ItemStack itemstack, Level level, LivingEntity livingentity) { +- if (livingentity instanceof ServerPlayer) { +- ServerPlayer serverplayer = (ServerPlayer) livingentity; ++ public ItemStack finishUsingItem(ItemStack stack, Level level, LivingEntity entityLiving) { ++ if (entityLiving instanceof ServerPlayer) { ++ ServerPlayer entityplayer = (ServerPlayer) entityLiving; + +- CriteriaTriggers.CONSUME_ITEM.trigger(serverplayer, itemstack); +- serverplayer.awardStat(Stats.ITEM_USED.get(this)); ++ CriteriaTriggers.CONSUME_ITEM.trigger(entityplayer, stack); ++ entityplayer.awardStat(Stats.ITEM_USED.get(this)); + } + +- if (livingentity instanceof Player && !((Player) livingentity).getAbilities().instabuild) { +- itemstack.shrink(1); ++ if (entityLiving instanceof Player && !((Player) entityLiving).getAbilities().instabuild) { ++ stack.shrink(1); + } + + if (!level.isClientSide) { +- livingentity.removeAllEffects(); ++ entityLiving.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.MILK); // CraftBukkit + } + +- return itemstack.isEmpty() ? new ItemStack(Items.BUCKET) : itemstack; ++ return stack.isEmpty() ? new ItemStack(Items.BUCKET) : stack; + } + + @Override +- @Override +- public int getUseDuration(ItemStack itemstack) { ++ public int getUseDuration(ItemStack stack) { + return 32; + } + + @Override +- @Override +- public UseAnim getUseAnimation(ItemStack itemstack) { +- return UseAnim.DRINK; ++ public EnumAnimation getUseAnimation(ItemStack stack) { ++ return EnumAnimation.DRINK; + } + + @Override +- @Override +- public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionhand) { +- return ItemUtils.startUsingInstantly(level, player, interactionhand); ++ public InteractionResultHolder<ItemStack> use(Level level, Player player, EnumHand hand) { ++ return ItemUtils.startUsingInstantly(level, player, hand); + } + } |