@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||||
@@ -17,12 +17,54 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
|
||||
@@ -18,12 +18,54 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
public ChiseledBookShelfBlockEntity(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.CHISELED_BOOKSHELF, blockposition, iblockdata);
|
||||
@@ -50,6 +92,7 @@
|
||||
@@ -52,6 +94,7 @@
|
||||
|
||||
@Override
|
||||
public void load(NBTTagCompound nbttagcompound) {
|
||||
@@ -63,7 +63,7 @@
|
||||
this.items.clear();
|
||||
ContainerUtil.loadAllItems(nbttagcompound, this.items);
|
||||
this.lastInteractedSlot = nbttagcompound.getInt("last_interacted_slot");
|
||||
@@ -91,7 +134,7 @@
|
||||
@@ -93,7 +136,7 @@
|
||||
|
||||
this.items.set(i, ItemStack.EMPTY);
|
||||
if (!itemstack.isEmpty()) {
|
||||
@@ -72,16 +72,16 @@
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
@@ -106,7 +149,7 @@
|
||||
@@ -108,7 +151,7 @@
|
||||
public void setItem(int i, ItemStack itemstack) {
|
||||
if (itemstack.is(TagsItem.BOOKSHELF_BOOKS)) {
|
||||
this.items.set(i, itemstack);
|
||||
- this.updateState(i);
|
||||
+ if (level != null) this.updateState(i); // CraftBukkit - SPIGOT-7381: check for null world
|
||||
} else if (itemstack.isEmpty()) {
|
||||
this.removeItem(i, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -120,7 +163,7 @@
|
||||
@@ -124,7 +167,7 @@
|
||||
|
||||
@Override
|
||||
public int getMaxStackSize() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@@ -32,14 +32,18 @@
|
||||
public SculkCatalystBlockEntity(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.SCULK_CATALYST, blockposition, iblockdata);
|
||||
this.catalystListener = new SculkCatalystBlockEntity.a(iblockdata, new BlockPositionSource(blockposition));
|
||||
this.catalystListener = new SculkCatalystBlockEntity.CatalystListener(iblockdata, new BlockPositionSource(blockposition));
|
||||
+ catalystListener.level = level; // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -25,14 +25,5 @@
|
||||
private final PositionSource positionSource;
|
||||
+ private World level; // CraftBukkit
|
||||
|
||||
public a(IBlockData iblockdata, PositionSource positionsource) {
|
||||
public CatalystListener(IBlockData iblockdata, PositionSource positionsource) {
|
||||
this.blockState = iblockdata;
|
||||
@@ -116,7 +121,7 @@
|
||||
return this.sculkSpreader;
|
||||
}
|
||||
|
||||
- private void bloom(WorldServer worldserver, BlockPosition blockposition, IBlockData iblockdata, RandomSource randomsource) {
|
||||
+ public void bloom(WorldServer worldserver, BlockPosition blockposition, IBlockData iblockdata, RandomSource randomsource) {
|
||||
worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(SculkCatalystBlock.PULSE, true), 3);
|
||||
worldserver.scheduleTick(blockposition, iblockdata.getBlock(), 8);
|
||||
worldserver.sendParticles(Particles.SCULK_SOUL, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 1.15D, (double) blockposition.getZ() + 0.5D, 2, 0.2D, 0.0D, 0.2D, 0.0D);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
@@ -38,6 +38,11 @@
|
||||
@@ -40,6 +40,11 @@
|
||||
import net.minecraft.world.level.levelgen.HeightMap;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityBeacon extends TileEntity implements ITileInventory, INamableTileEntity {
|
||||
|
||||
private static final int MAX_LEVELS = 4;
|
||||
@@ -61,6 +66,15 @@
|
||||
@@ -65,6 +70,15 @@
|
||||
public IChatBaseComponent name;
|
||||
public ChestLock lockKey;
|
||||
private final IContainerProperties dataAccess;
|
||||
@@ -26,9 +26,9 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
public TileEntityBeacon(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.BEACON, blockposition, iblockdata);
|
||||
@@ -236,39 +250,78 @@
|
||||
@Nullable
|
||||
static MobEffectList filterEffect(@Nullable MobEffectList mobeffectlist) {
|
||||
@@ -245,39 +259,78 @@
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@@ -117,17 +117,20 @@
|
||||
public static void playSound(World world, BlockPosition blockposition, SoundEffect soundeffect) {
|
||||
world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -297,8 +350,11 @@
|
||||
@Override
|
||||
public void load(NBTTagCompound nbttagcompound) {
|
||||
@@ -312,7 +365,7 @@
|
||||
if (nbttagcompound.contains(s, 8)) {
|
||||
MinecraftKey minecraftkey = MinecraftKey.tryParse(nbttagcompound.getString(s));
|
||||
|
||||
- return filterEffect((MobEffectList) BuiltInRegistries.MOB_EFFECT.get(minecraftkey));
|
||||
+ return (MobEffectList) BuiltInRegistries.MOB_EFFECT.get(minecraftkey); // CraftBukkit - persist manually set non-default beacon effects (SPIGOT-3598)
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -323,6 +376,7 @@
|
||||
super.load(nbttagcompound);
|
||||
- this.primaryPower = getValidEffectById(nbttagcompound.getInt("Primary"));
|
||||
- this.secondaryPower = getValidEffectById(nbttagcompound.getInt("Secondary"));
|
||||
+ // CraftBukkit start - persist manually set non-default beacon effects (SPIGOT-3598)
|
||||
+ this.primaryPower = MobEffectList.byId(nbttagcompound.getInt("Primary"));
|
||||
+ this.secondaryPower = MobEffectList.byId(nbttagcompound.getInt("Secondary"));
|
||||
+ this.levels = nbttagcompound.getInt("Levels"); // SPIGOT-5053, use where available
|
||||
+ // CraftBukkit end
|
||||
this.primaryPower = loadEffect(nbttagcompound, "primary_effect");
|
||||
this.secondaryPower = loadEffect(nbttagcompound, "secondary_effect");
|
||||
+ this.levels = nbttagcompound.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available
|
||||
if (nbttagcompound.contains("CustomName", 8)) {
|
||||
this.name = IChatBaseComponent.ChatSerializer.fromJson(nbttagcompound.getString("CustomName"));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
||||
@@ -25,6 +25,14 @@
|
||||
@@ -26,6 +26,14 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class TileEntityCampfire extends TileEntity implements Clearable {
|
||||
|
||||
private static final int BURN_COOL_SPEED = 2;
|
||||
@@ -59,6 +67,20 @@
|
||||
@@ -60,6 +68,20 @@
|
||||
}).orElse(itemstack);
|
||||
|
||||
if (itemstack1.isItemEnabled(world.enabledFeatures())) {
|
||||
@@ -36,7 +36,7 @@
|
||||
InventoryUtils.dropItemStack(world, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack1);
|
||||
tileentitycampfire.items.set(i, ItemStack.EMPTY);
|
||||
world.sendBlockUpdated(blockposition, iblockdata, iblockdata, 3);
|
||||
@@ -171,7 +193,11 @@
|
||||
@@ -172,7 +194,11 @@
|
||||
ItemStack itemstack1 = (ItemStack) this.items.get(j);
|
||||
|
||||
if (itemstack1.isEmpty()) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
+import org.bukkit.inventory.CookingRecipe;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput {
|
||||
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeCraftingHolder, AutoRecipeOutput {
|
||||
|
||||
protected static final int SLOT_INPUT = 0;
|
||||
@@ -115,7 +129,7 @@
|
||||
@@ -72,18 +72,18 @@
|
||||
return item.builtInRegistryHolder().is(TagsItem.NON_FLAMMABLE_WOOD);
|
||||
}
|
||||
@@ -271,7 +319,7 @@
|
||||
IRecipe irecipe;
|
||||
RecipeHolder recipeholder;
|
||||
|
||||
if (flag2) {
|
||||
- irecipe = (IRecipe) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).orElse((Object) null);
|
||||
+ irecipe = (IRecipe) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).orElse(null); // CraftBukkit - decompile error
|
||||
- recipeholder = (RecipeHolder) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).orElse((Object) null);
|
||||
+ recipeholder = (RecipeHolder) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).orElse(null); // CraftBukkit - decompile error
|
||||
} else {
|
||||
irecipe = null;
|
||||
recipeholder = null;
|
||||
}
|
||||
@@ -279,9 +327,20 @@
|
||||
int i = tileentityfurnace.getMaxStackSize();
|
||||
|
||||
if (!tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
if (!tileentityfurnace.isLit() && canBurn(world.registryAccess(), recipeholder, tileentityfurnace.items, i)) {
|
||||
- tileentityfurnace.litTime = tileentityfurnace.getBurnDuration(itemstack);
|
||||
+ // CraftBukkit start
|
||||
+ CraftItemStack fuel = CraftItemStack.asCraftMirror(itemstack);
|
||||
@@ -106,11 +106,11 @@
|
||||
@@ -297,11 +356,23 @@
|
||||
}
|
||||
|
||||
if (tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
if (tileentityfurnace.isLit() && canBurn(world.registryAccess(), recipeholder, tileentityfurnace.items, i)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (irecipe != null && tileentityfurnace.cookingProgress == 0) {
|
||||
+ if (recipeholder != null && tileentityfurnace.cookingProgress == 0) {
|
||||
+ CraftItemStack source = CraftItemStack.asCraftMirror(tileentityfurnace.items.get(0));
|
||||
+ CookingRecipe<?> recipe = (CookingRecipe<?>) irecipe.toBukkitRecipe();
|
||||
+ CookingRecipe<?> recipe = (CookingRecipe<?>) recipeholder.toBukkitRecipe();
|
||||
+
|
||||
+ FurnaceStartSmeltEvent event = new FurnaceStartSmeltEvent(CraftBlock.at(world, blockposition), source, recipe);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||
@@ -123,20 +123,20 @@
|
||||
if (tileentityfurnace.cookingProgress == tileentityfurnace.cookingTotalTime) {
|
||||
tileentityfurnace.cookingProgress = 0;
|
||||
tileentityfurnace.cookingTotalTime = getTotalCookTime(world, tileentityfurnace);
|
||||
- if (burn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, world.registryAccess(), irecipe, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
tileentityfurnace.setRecipeUsed(irecipe);
|
||||
- if (burn(world.registryAccess(), recipeholder, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, world.registryAccess(), recipeholder, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
tileentityfurnace.setRecipeUsed(recipeholder);
|
||||
}
|
||||
|
||||
@@ -340,17 +411,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static boolean burn(IRegistryCustom iregistrycustom, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) {
|
||||
+ private static boolean burn(World world, BlockPosition blockposition, IRegistryCustom iregistrycustom, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
|
||||
if (irecipe != null && canBurn(iregistrycustom, irecipe, nonnulllist, i)) {
|
||||
- private static boolean burn(IRegistryCustom iregistrycustom, @Nullable RecipeHolder<?> recipeholder, NonNullList<ItemStack> nonnulllist, int i) {
|
||||
+ private static boolean burn(World world, BlockPosition blockposition, IRegistryCustom iregistrycustom, @Nullable RecipeHolder<?> recipeholder, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
|
||||
if (recipeholder != null && canBurn(iregistrycustom, recipeholder, nonnulllist, i)) {
|
||||
ItemStack itemstack = (ItemStack) nonnulllist.get(0);
|
||||
ItemStack itemstack1 = irecipe.getResultItem(iregistrycustom);
|
||||
ItemStack itemstack1 = recipeholder.value().getResultItem(iregistrycustom);
|
||||
ItemStack itemstack2 = (ItemStack) nonnulllist.get(2);
|
||||
|
||||
+ // CraftBukkit start - fire FurnaceSmeltEvent
|
||||
@@ -174,45 +174,44 @@
|
||||
|
||||
if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) nonnulllist.get(1)).isEmpty() && ((ItemStack) nonnulllist.get(1)).is(Items.BUCKET)) {
|
||||
nonnulllist.set(1, new ItemStack(Items.WATER_BUCKET));
|
||||
@@ -374,7 +472,7 @@
|
||||
@@ -374,6 +472,7 @@
|
||||
}
|
||||
|
||||
private static int getTotalCookTime(World world, TileEntityFurnace tileentityfurnace) {
|
||||
- return (Integer) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).map(RecipeCooking::getCookingTime).orElse(200);
|
||||
+ return (world != null) ? (Integer) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).map(RecipeCooking::getCookingTime).orElse(200) : 200; // CraftBukkit - SPIGOT-4302
|
||||
}
|
||||
|
||||
public static boolean isFuel(ItemStack itemstack) {
|
||||
@@ -493,8 +591,8 @@
|
||||
+ if (world == null) return 200; // CraftBukkit - SPIGOT-4302
|
||||
return (Integer) tileentityfurnace.quickCheck.getRecipeFor(tileentityfurnace, world).map((recipeholder) -> {
|
||||
return ((RecipeCooking) recipeholder.value()).getCookingTime();
|
||||
}).orElse(200);
|
||||
@@ -495,8 +594,8 @@
|
||||
@Override
|
||||
public void awardUsedRecipes(EntityHuman entityhuman, List<ItemStack> list) {}
|
||||
|
||||
- public void awardUsedRecipesAndPopExperience(EntityPlayer entityplayer) {
|
||||
- List<IRecipe<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position());
|
||||
- List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position());
|
||||
+ public void awardUsedRecipesAndPopExperience(EntityPlayer entityplayer, ItemStack itemstack, int amount) { // CraftBukkit
|
||||
+ List<IRecipe<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position(), this.worldPosition, entityplayer, itemstack, amount); // CraftBukkit
|
||||
+ List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position(), this.worldPosition, entityplayer, itemstack, amount); // CraftBukkit
|
||||
|
||||
entityplayer.awardRecipes(list);
|
||||
Iterator iterator = list.iterator();
|
||||
@@ -511,6 +609,12 @@
|
||||
@@ -513,6 +612,12 @@
|
||||
}
|
||||
|
||||
public List<IRecipe<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d) {
|
||||
public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d) {
|
||||
+ // CraftBukkit start
|
||||
+ return this.getRecipesToAwardAndPopExperience(worldserver, vec3d, this.worldPosition, null, null, 0);
|
||||
+ }
|
||||
+
|
||||
+ public List<IRecipe<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d, BlockPosition blockposition, EntityPlayer entityplayer, ItemStack itemstack, int amount) {
|
||||
+ public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d, BlockPosition blockposition, EntityPlayer entityplayer, ItemStack itemstack, int amount) {
|
||||
+ // CraftBukkit end
|
||||
List<IRecipe<?>> list = Lists.newArrayList();
|
||||
List<RecipeHolder<?>> list = Lists.newArrayList();
|
||||
ObjectIterator objectiterator = this.recipesUsed.object2IntEntrySet().iterator();
|
||||
|
||||
@@ -519,14 +623,14 @@
|
||||
@@ -521,14 +626,14 @@
|
||||
|
||||
worldserver.getRecipeManager().byKey((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
|
||||
list.add(irecipe);
|
||||
- createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) irecipe).getExperience());
|
||||
+ createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) irecipe).getExperience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
|
||||
worldserver.getRecipeManager().byKey((MinecraftKey) entry.getKey()).ifPresent((recipeholder) -> {
|
||||
list.add(recipeholder);
|
||||
- createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) recipeholder.value()).getExperience());
|
||||
+ createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) recipeholder.value()).getExperience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
|
||||
});
|
||||
}
|
||||
|
||||
@@ -224,7 +223,7 @@
|
||||
int j = MathHelper.floor((float) i * f);
|
||||
float f1 = MathHelper.frac((float) i * f);
|
||||
|
||||
@@ -534,6 +638,17 @@
|
||||
@@ -536,6 +641,17 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
ItemStack itemstack = entityitem.getItem().copy();
|
||||
ItemStack itemstack1 = addItem((IInventory) null, iinventory, itemstack, (EnumDirection) null);
|
||||
|
||||
@@ -366,16 +468,40 @@
|
||||
@@ -367,16 +469,40 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
public TileEntityJukeBox(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.JUKEBOX, blockposition, iblockdata);
|
||||
@@ -150,7 +193,7 @@
|
||||
@@ -152,7 +195,7 @@
|
||||
|
||||
@Override
|
||||
public int getMaxStackSize() {
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -203,7 +246,11 @@
|
||||
@@ -205,7 +248,11 @@
|
||||
@VisibleForTesting
|
||||
public void setRecordWithoutPlaying(ItemStack itemstack) {
|
||||
this.items.set(0, itemstack);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
|
||||
@@ -31,6 +31,11 @@
|
||||
@@ -32,6 +32,11 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory {
|
||||
|
||||
public static final int COLUMNS = 9;
|
||||
@@ -50,6 +55,37 @@
|
||||
@@ -51,6 +56,37 @@
|
||||
@Nullable
|
||||
private final EnumColor color;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
public TileEntityShulkerBox(@Nullable EnumColor enumcolor, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.SHULKER_BOX, blockposition, iblockdata);
|
||||
this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
@@ -162,6 +198,7 @@
|
||||
@@ -172,6 +208,7 @@
|
||||
}
|
||||
|
||||
++this.openCount;
|
||||
@@ -58,7 +58,7 @@
|
||||
this.level.blockEvent(this.worldPosition, this.getBlockState().getBlock(), 1, this.openCount);
|
||||
if (this.openCount == 1) {
|
||||
this.level.gameEvent((Entity) entityhuman, GameEvent.CONTAINER_OPEN, this.worldPosition);
|
||||
@@ -175,6 +212,7 @@
|
||||
@@ -185,6 +222,7 @@
|
||||
public void stopOpen(EntityHuman entityhuman) {
|
||||
if (!this.remove && !entityhuman.isSpectator()) {
|
||||
--this.openCount;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
@@ -173,6 +173,16 @@
|
||||
|
||||
if (!SystemUtils.isBlank(s)) {
|
||||
resolveGameProfile(nbttagcompound, s);
|
||||
+ // CraftBukkit start
|
||||
+ } else {
|
||||
+ net.minecraft.nbt.NBTTagList textures = nbttagcompound.getCompound("SkullOwner").getCompound("Properties").getList("textures", 10); // Safe due to method contracts
|
||||
+ for (int i = 0; i < textures.size(); i++) {
|
||||
+ if (textures.get(i) instanceof NBTTagCompound && !((NBTTagCompound) textures.get(i)).contains("Signature", 8) && ((NBTTagCompound) textures.get(i)).getString("Value").trim().isEmpty()) {
|
||||
+ nbttagcompound.remove("SkullOwner");
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user