Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/ItemTrident.java
+++ b/net/minecraft/world/item/ItemTrident.java
@@ -65,9 +65,12 @@
@@ -68,9 +68,12 @@
if (k <= 0 || entityhuman.isInWaterOrRain()) {
if (!world.isClientSide) {
@@ -13,8 +13,8 @@
if (k == 0) {
EntityThrownTrident entitythrowntrident = new EntityThrownTrident(world, entityhuman, itemstack);
@@ -76,16 +79,39 @@
entitythrowntrident.fromPlayer = EntityArrow.PickupStatus.CREATIVE_ONLY;
@@ -79,16 +82,39 @@
entitythrowntrident.pickup = EntityArrow.PickupStatus.CREATIVE_ONLY;
}
- world.addEntity(entitythrowntrident);
@@ -29,12 +29,12 @@
+ itemstack.damage(1, entityhuman, (entityhuman1) -> {
+ entityhuman1.broadcastItemBreak(entityliving.getRaisedHand());
+ });
+ entitythrowntrident.trident = itemstack.cloneItemStack(); // SPIGOT-4511 update since damage call moved
+ entitythrowntrident.tridentItem = itemstack.cloneItemStack(); // SPIGOT-4511 update since damage call moved
+ // CraftBukkit end
+
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.ITEM_TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
if (!entityhuman.abilities.canInstantlyBuild) {
entityhuman.inventory.f(itemstack);
world.playSound((EntityHuman) null, (Entity) entitythrowntrident, SoundEffects.TRIDENT_THROW, SoundCategory.PLAYERS, 1.0F, 1.0F);
if (!entityhuman.getAbilities().instabuild) {
entityhuman.getInventory().g(itemstack);
}
+ // CraftBukkit start - SPIGOT-5458 also need in this branch :(
+ } else {
@@ -51,6 +51,6 @@
+ org.bukkit.event.player.PlayerRiptideEvent event = new org.bukkit.event.player.PlayerRiptideEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
+ event.getPlayer().getServer().getPluginManager().callEvent(event);
+ // CraftBukkit end
float f = entityhuman.yaw;
float f1 = entityhuman.pitch;
float f = entityhuman.getYRot();
float f1 = entityhuman.getXRot();
float f2 = -MathHelper.sin(f * 0.017453292F) * MathHelper.cos(f1 * 0.017453292F);