Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
b62dfa0bf9
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
54 Zeilen
3.1 KiB
Diff
54 Zeilen
3.1 KiB
Diff
From 663011368c8066bd5156e59914507f351eb098b6 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Thu, 23 Aug 2018 09:25:30 -0500
|
|
Subject: [PATCH] Fix MC-124320
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
|
index d55b076f5d..297f674d08 100644
|
|
--- a/src/main/java/net/minecraft/server/Block.java
|
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
|
@@ -155,6 +155,7 @@ public class Block implements IMaterial {
|
|
return tag.isTagged(this);
|
|
}
|
|
|
|
+ public static IBlockData getValidBlockForPosition(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) { return Block.b(iblockdata, generatoraccess, blockposition); } // Paper - OBFHELPER
|
|
public static IBlockData b(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
|
IBlockData iblockdata1 = iblockdata;
|
|
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
|
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
index e5ccd29a08..9116e52911 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
|
@@ -313,8 +313,9 @@ public class EntityEnderman extends EntityMonster {
|
|
if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
|
// CraftBukkit start - Pickup event
|
|
if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
|
- this.enderman.setCarried(iblockdata);
|
|
+ //this.enderman.setCarried(iblockdata); // Paper - moved down
|
|
world.setAir(blockposition);
|
|
+ this.enderman.setCarried(Block.getValidBlockForPosition(iblockdata, this.enderman.world, blockposition)); // Paper - Fix MC-124320
|
|
}
|
|
// CraftBukkit end
|
|
}
|
|
@@ -324,6 +325,7 @@ public class EntityEnderman extends EntityMonster {
|
|
|
|
static class PathfinderGoalEndermanPlaceBlock extends PathfinderGoal {
|
|
|
|
+ private EntityEnderman getEnderman() { return this.a; } // Paper - OBFHELPER
|
|
private final EntityEnderman a;
|
|
|
|
public PathfinderGoalEndermanPlaceBlock(EntityEnderman entityenderman) {
|
|
@@ -343,7 +345,7 @@ public class EntityEnderman extends EntityMonster {
|
|
BlockPosition blockposition = new BlockPosition(i, j, k);
|
|
IBlockData iblockdata = world.getType(blockposition);
|
|
IBlockData iblockdata1 = world.getType(blockposition.down());
|
|
- IBlockData iblockdata2 = this.a.getCarried();
|
|
+ IBlockData iblockdata2 = Block.getValidBlockForPosition(getEnderman().getCarried(), getEnderman().world, blockposition); // Paper - Fix MC-124320
|
|
|
|
if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1)) {
|
|
// CraftBukkit start - Place event
|
|
--
|
|
2.19.0
|
|
|