Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/monster/EntityEnderman.java
+++ b/net/minecraft/world/entity/monster/EntityEnderman.java
@@ -71,6 +71,11 @@
@@ -68,6 +68,11 @@
import net.minecraft.world.phys.MovingObjectPositionBlock;
import net.minecraft.world.phys.Vec3D;
import org.joml.Vector3f;
+// CraftBukkit start;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
@@ -12,7 +12,7 @@
public class EntityEnderman extends EntityMonster implements IEntityAngerable {
private static final UUID SPEED_MODIFIER_ATTACKING_UUID = UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0");
@@ -115,7 +120,17 @@
@@ -111,7 +116,17 @@
@Override
public void setTarget(@Nullable EntityLiving entityliving) {
@@ -31,7 +31,7 @@
AttributeModifiable attributemodifiable = this.getAttribute(GenericAttributes.MOVEMENT_SPEED);
if (entityliving == null) {
@@ -130,6 +145,7 @@
@@ -126,6 +141,7 @@
attributemodifiable.addTransientModifier(EntityEnderman.SPEED_MODIFIER_ATTACKING);
}
}
@@ -39,25 +39,25 @@
}
@@ -493,9 +509,11 @@
@@ -477,9 +493,11 @@
if (iblockdata2 != null) {
iblockdata2 = Block.updateFromNeighbourShapes(iblockdata2, this.enderman.level(), blockposition);
if (this.canPlaceBlock(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
+ if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, iblockdata2)) { // CraftBukkit - Place event
world.setBlock(blockposition, iblockdata2, 3);
world.gameEvent(GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this.enderman, iblockdata2));
world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this.enderman, iblockdata2));
this.enderman.setCarriedBlock((IBlockData) null);
+ } // CraftBukkit
}
}
@@ -534,9 +552,11 @@
@@ -518,9 +536,11 @@
boolean flag = movingobjectpositionblock.getBlockPos().equals(blockposition);
if (iblockdata.is(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
+ if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.defaultBlockState())) { // CraftBukkit - Place event
world.removeBlock(blockposition, false);
world.gameEvent(GameEvent.BLOCK_DESTROY, blockposition, GameEvent.a.of(this.enderman, iblockdata));
world.gameEvent((Holder) GameEvent.BLOCK_DESTROY, blockposition, GameEvent.a.of(this.enderman, iblockdata));
this.enderman.setCarriedBlock(iblockdata.getBlock().defaultBlockState());
+ } // CraftBukkit
}