Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -10,16 +10,16 @@
public ItemFishingRod(Item.Info item_info) {
@@ -34,12 +36,23 @@
world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
world.a((Entity) entityhuman, GameEvent.FISHING_ROD_REEL_IN, (Entity) entityhuman);
world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
world.gameEvent(entityhuman, GameEvent.FISHING_ROD_REEL_IN, (Entity) entityhuman);
} else {
- world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ // world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
- world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) {
i = EnchantmentManager.c(itemstack);
int j = EnchantmentManager.b(itemstack);
i = EnchantmentManager.getFishingSpeedBonus(itemstack);
int j = EnchantmentManager.getFishingLuckBonus(itemstack);
- world.addEntity(new EntityFishingHook(entityhuman, world, j, i));
- world.addFreshEntity(new EntityFishingHook(entityhuman, world, j, i));
+ // CraftBukkit start
+ EntityFishingHook entityfishinghook = new EntityFishingHook(entityhuman, world, j, i);
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.FishHook) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
@@ -29,9 +29,9 @@
+ entityhuman.fishing = null;
+ return InteractionResultWrapper.pass(itemstack);
+ }
+ world.playSound((EntityHuman) null, entityhuman.locX(), entityhuman.locY(), entityhuman.locZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ world.addEntity(entityfishinghook);
+ world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ world.addFreshEntity(entityfishinghook);
+ // CraftBukkit end
}
entityhuman.b(StatisticList.ITEM_USED.b(this));
entityhuman.awardStat(StatisticList.ITEM_USED.get(this));