@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/TileEntity.java
|
||||
+++ b/net/minecraft/server/TileEntity.java
|
||||
@@ -5,8 +5,18 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntity.java
|
||||
@@ -15,8 +15,18 @@
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.util.Supplier;
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private final TileEntityTypes<?> tileType;
|
||||
@Nullable
|
||||
@@ -38,6 +48,14 @@
|
||||
@@ -48,6 +58,14 @@
|
||||
|
||||
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
|
||||
this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z"));
|
||||
+ // CraftBukkit start - read container
|
||||
+ this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
|
||||
+
|
||||
+ NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues");
|
||||
+ net.minecraft.nbt.NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues");
|
||||
+ if (persistentDataTag instanceof NBTTagCompound) {
|
||||
+ this.persistentDataContainer.putAll((NBTTagCompound) persistentDataTag);
|
||||
+ }
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
public NBTTagCompound save(NBTTagCompound nbttagcompound) {
|
||||
@@ -54,6 +72,11 @@
|
||||
@@ -64,6 +82,11 @@
|
||||
nbttagcompound.setInt("x", this.position.getX());
|
||||
nbttagcompound.setInt("y", this.position.getY());
|
||||
nbttagcompound.setInt("z", this.position.getZ());
|
||||
@@ -46,7 +46,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
}
|
||||
@@ -169,4 +192,13 @@
|
||||
@@ -179,4 +202,13 @@
|
||||
}, this::getPosition});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/TileEntityBanner.java
|
||||
+++ b/net/minecraft/server/TileEntityBanner.java
|
||||
@@ -70,6 +70,11 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBanner.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBanner.java
|
||||
@@ -80,6 +80,11 @@
|
||||
}
|
||||
|
||||
this.patterns = nbttagcompound.getList("Patterns", 10);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityBarrel.java
|
||||
+++ b/net/minecraft/server/TileEntityBarrel.java
|
||||
@@ -1,7 +1,49 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBarrel.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBarrel.java
|
||||
@@ -19,8 +19,50 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.ArrayList;
|
||||
@@ -50,7 +51,7 @@
|
||||
private NonNullList<ItemStack> items;
|
||||
private int b;
|
||||
|
||||
@@ -100,7 +142,7 @@
|
||||
@@ -119,7 +161,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityBeacon.java
|
||||
+++ b/net/minecraft/server/TileEntityBeacon.java
|
||||
@@ -8,6 +8,11 @@
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
@@ -38,6 +38,11 @@
|
||||
import net.minecraft.world.level.levelgen.HeightMap;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable {
|
||||
|
||||
public static final MobEffectList[][] a = new MobEffectList[][]{{MobEffects.FASTER_MOVEMENT, MobEffects.FASTER_DIG}, {MobEffects.RESISTANCE, MobEffects.JUMP}, {MobEffects.INCREASE_DAMAGE}, {MobEffects.REGENERATION}};
|
||||
@@ -24,6 +29,15 @@
|
||||
@@ -54,6 +59,15 @@
|
||||
public IChatBaseComponent customName;
|
||||
public ChestLock chestLock;
|
||||
private final IContainerProperties containerProperties;
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
public TileEntityBeacon() {
|
||||
super(TileEntityTypes.BEACON);
|
||||
@@ -192,39 +206,78 @@
|
||||
@@ -222,39 +236,78 @@
|
||||
super.al_();
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
public void a(SoundEffect soundeffect) {
|
||||
this.world.playSound((EntityHuman) null, this.position, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -254,8 +307,11 @@
|
||||
@@ -284,8 +337,11 @@
|
||||
@Override
|
||||
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
|
||||
super.load(iblockdata, nbttagcompound);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/TileEntityBeehive.java
|
||||
+++ b/net/minecraft/server/TileEntityBeehive.java
|
||||
@@ -10,6 +10,7 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBeehive.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBeehive.java
|
||||
@@ -29,6 +29,7 @@
|
||||
private final List<TileEntityBeehive.HiveBee> bees = Lists.newArrayList();
|
||||
@Nullable
|
||||
public BlockPosition flowerPos = null;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public TileEntityBeehive() {
|
||||
super(TileEntityTypes.BEEHIVE);
|
||||
@@ -49,7 +50,7 @@
|
||||
@@ -68,7 +69,7 @@
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
public void a(@Nullable EntityHuman entityhuman, IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
|
||||
@@ -66,7 +67,7 @@
|
||||
@@ -85,7 +86,7 @@
|
||||
|
||||
if (entityhuman.getPositionVector().distanceSquared(entity.getPositionVector()) <= 16.0D) {
|
||||
if (!this.isSedated()) {
|
||||
@@ -26,7 +26,7 @@
|
||||
} else {
|
||||
entitybee.setCannotEnterHiveTicks(400);
|
||||
}
|
||||
@@ -78,10 +79,16 @@
|
||||
@@ -97,10 +98,16 @@
|
||||
}
|
||||
|
||||
private List<Entity> releaseBees(IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
|
||||
@@ -44,7 +44,7 @@
|
||||
});
|
||||
return list;
|
||||
}
|
||||
@@ -107,7 +114,19 @@
|
||||
@@ -126,7 +133,19 @@
|
||||
}
|
||||
|
||||
public void a(Entity entity, boolean flag, int i) {
|
||||
@@ -65,7 +65,7 @@
|
||||
entity.stopRiding();
|
||||
entity.ejectPassengers();
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
@@ -133,7 +152,13 @@
|
||||
@@ -152,7 +171,13 @@
|
||||
}
|
||||
|
||||
private boolean releaseBee(IBlockData iblockdata, TileEntityBeehive.HiveBee tileentitybeehive_hivebee, @Nullable List<Entity> list, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
|
||||
@@ -80,7 +80,7 @@
|
||||
return false;
|
||||
} else {
|
||||
BlockPosition blockposition = this.getPosition();
|
||||
@@ -157,6 +182,18 @@
|
||||
@@ -176,6 +201,18 @@
|
||||
if (!entity.getEntityType().a((Tag) TagsEntity.BEEHIVE_INHABITORS)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -99,7 +99,7 @@
|
||||
if (entity instanceof EntityBee) {
|
||||
EntityBee entitybee = (EntityBee) entity;
|
||||
|
||||
@@ -186,6 +223,7 @@
|
||||
@@ -205,6 +242,7 @@
|
||||
list.add(entitybee);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
float f = entity.getWidth();
|
||||
double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
|
||||
double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getAdjacentX();
|
||||
@@ -193,10 +231,11 @@
|
||||
@@ -212,10 +250,11 @@
|
||||
double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getAdjacentZ();
|
||||
|
||||
entity.setPositionRotation(d1, d2, d3, entity.yaw, entity.pitch);
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@@ -234,6 +273,10 @@
|
||||
@@ -253,6 +292,10 @@
|
||||
|
||||
if (this.releaseBee(iblockdata, tileentitybeehive_hivebee, (List) null, tileentitybeehive_releasestatus)) {
|
||||
iterator.remove();
|
||||
@@ -131,7 +131,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -276,6 +319,11 @@
|
||||
@@ -295,6 +338,11 @@
|
||||
this.flowerPos = GameProfileSerializer.b(nbttagcompound.getCompound("FlowerPos"));
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -285,6 +333,7 @@
|
||||
@@ -304,6 +352,7 @@
|
||||
if (this.x()) {
|
||||
nbttagcompound.set("FlowerPos", GameProfileSerializer.a(this.flowerPos));
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
--- a/net/minecraft/server/TileEntityBrewingStand.java
|
||||
+++ b/net/minecraft/server/TileEntityBrewingStand.java
|
||||
@@ -4,6 +4,16 @@
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
@@ -24,6 +24,17 @@
|
||||
import net.minecraft.world.level.block.BlockBrewingStand;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
@@ -17,7 +18,7 @@
|
||||
public class TileEntityBrewingStand extends TileEntityContainer implements IWorldInventory, ITickable {
|
||||
|
||||
private static final int[] b = new int[]{3};
|
||||
@@ -15,6 +25,36 @@
|
||||
@@ -35,6 +46,36 @@
|
||||
private Item k;
|
||||
public int fuelLevel;
|
||||
protected final IContainerProperties a;
|
||||
@@ -54,7 +55,7 @@
|
||||
|
||||
public TileEntityBrewingStand() {
|
||||
super(TileEntityTypes.BREWING_STAND);
|
||||
@@ -83,8 +123,19 @@
|
||||
@@ -103,8 +144,19 @@
|
||||
ItemStack itemstack = (ItemStack) this.items.get(4);
|
||||
|
||||
if (this.fuelLevel <= 0 && itemstack.getItem() == Items.BLAZE_POWDER) {
|
||||
@@ -76,7 +77,7 @@
|
||||
this.update();
|
||||
}
|
||||
|
||||
@@ -92,9 +143,14 @@
|
||||
@@ -112,9 +164,14 @@
|
||||
boolean flag1 = this.brewTime > 0;
|
||||
ItemStack itemstack1 = (ItemStack) this.items.get(3);
|
||||
|
||||
@@ -93,7 +94,7 @@
|
||||
|
||||
if (flag2 && flag) {
|
||||
this.j();
|
||||
@@ -168,6 +224,16 @@
|
||||
@@ -188,6 +245,16 @@
|
||||
|
||||
private void j() {
|
||||
ItemStack itemstack = (ItemStack) this.items.get(3);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityCampfire.java
|
||||
+++ b/net/minecraft/server/TileEntityCampfire.java
|
||||
@@ -4,6 +4,12 @@
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityCampfire.java
|
||||
@@ -21,6 +21,12 @@
|
||||
import net.minecraft.world.level.block.BlockCampfire;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
@@ -13,7 +13,7 @@
|
||||
public class TileEntityCampfire extends TileEntity implements Clearable, ITickable {
|
||||
|
||||
private final NonNullList<ItemStack> items;
|
||||
@@ -55,6 +61,20 @@
|
||||
@@ -72,6 +78,20 @@
|
||||
}).orElse(itemstack);
|
||||
BlockPosition blockposition = this.getPosition();
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/TileEntityChest.java
|
||||
+++ b/net/minecraft/server/TileEntityChest.java
|
||||
@@ -3,6 +3,11 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityChest.java
|
||||
@@ -27,6 +27,12 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockPropertyChestType;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.level.block.Blocks;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+// CraftBukkit end
|
||||
@@ -12,7 +13,7 @@
|
||||
public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
|
||||
private NonNullList<ItemStack> items;
|
||||
@@ -11,6 +16,37 @@
|
||||
@@ -35,6 +41,37 @@
|
||||
public int viewingCount;
|
||||
private int j;
|
||||
|
||||
@@ -50,7 +51,7 @@
|
||||
protected TileEntityChest(TileEntityTypes<?> tileentitytypes) {
|
||||
super(tileentitytypes);
|
||||
this.items = NonNullList.a(27, ItemStack.b);
|
||||
@@ -61,6 +97,13 @@
|
||||
@@ -85,6 +122,13 @@
|
||||
this.b = this.a;
|
||||
float f = 0.1F;
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
if (this.viewingCount > 0 && this.a == 0.0F) {
|
||||
this.playOpenSound(SoundEffects.BLOCK_CHEST_OPEN);
|
||||
}
|
||||
@@ -155,8 +198,20 @@
|
||||
@@ -179,8 +223,20 @@
|
||||
if (this.viewingCount < 0) {
|
||||
this.viewingCount = 0;
|
||||
}
|
||||
@@ -85,7 +86,7 @@
|
||||
this.onOpen();
|
||||
}
|
||||
|
||||
@@ -165,7 +220,18 @@
|
||||
@@ -189,7 +245,18 @@
|
||||
@Override
|
||||
public void closeContainer(EntityHuman entityhuman) {
|
||||
if (!entityhuman.isSpectator()) {
|
||||
@@ -104,7 +105,7 @@
|
||||
this.onOpen();
|
||||
}
|
||||
|
||||
@@ -175,7 +241,7 @@
|
||||
@@ -199,7 +266,7 @@
|
||||
Block block = this.getBlock().getBlock();
|
||||
|
||||
if (block instanceof BlockChest) {
|
||||
@@ -113,7 +114,7 @@
|
||||
this.world.applyPhysics(this.position, block);
|
||||
}
|
||||
|
||||
@@ -216,4 +282,11 @@
|
||||
@@ -240,4 +307,11 @@
|
||||
protected Container createContainer(int i, PlayerInventory playerinventory) {
|
||||
return ContainerChest.a(i, playerinventory, this);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/TileEntityCommand.java
|
||||
+++ b/net/minecraft/server/TileEntityCommand.java
|
||||
@@ -9,6 +9,13 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityCommand.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityCommand.java
|
||||
@@ -24,6 +24,13 @@
|
||||
private boolean c;
|
||||
private boolean g;
|
||||
private final CommandBlockListenerAbstract h = new CommandBlockListenerAbstract() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityConduit.java
|
||||
+++ b/net/minecraft/server/TileEntityConduit.java
|
||||
@@ -7,6 +7,11 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityConduit extends TileEntity implements ITickable {
|
||||
|
||||
private static final Block[] b = new Block[]{Blocks.PRISMARINE, Blocks.PRISMARINE_BRICKS, Blocks.SEA_LANTERN, Blocks.DARK_PRISMARINE};
|
||||
@@ -158,7 +163,7 @@
|
||||
@@ -178,7 +183,7 @@
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
if (this.position.a((BaseBlockPosition) entityhuman.getChunkCoordinates(), (double) j) && entityhuman.isInWaterOrRain()) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +180,7 @@
|
||||
@@ -195,7 +200,7 @@
|
||||
this.target = this.x();
|
||||
this.k = null;
|
||||
} else if (this.target == null) {
|
||||
@@ -30,7 +30,7 @@
|
||||
return entityliving1 instanceof IMonster && entityliving1.isInWaterOrRain();
|
||||
});
|
||||
|
||||
@@ -187,8 +192,13 @@
|
||||
@@ -207,8 +212,13 @@
|
||||
}
|
||||
|
||||
if (this.target != null) {
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
|
||||
if (entityliving != this.target) {
|
||||
@@ -221,7 +231,7 @@
|
||||
@@ -241,7 +251,7 @@
|
||||
|
||||
@Nullable
|
||||
private EntityLiving x() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/TileEntityContainer.java
|
||||
+++ b/net/minecraft/server/TileEntityContainer.java
|
||||
@@ -76,4 +76,12 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityContainer.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityContainer.java
|
||||
@@ -89,4 +89,12 @@
|
||||
}
|
||||
|
||||
protected abstract Container createContainer(int i, PlayerInventory playerinventory);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityDispenser.java
|
||||
+++ b/net/minecraft/server/TileEntityDispenser.java
|
||||
@@ -2,11 +2,48 @@
|
||||
|
||||
import java.util.Random;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityDispenser.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityDispenser.java
|
||||
@@ -13,11 +13,48 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/TileEntityEndGateway.java
|
||||
+++ b/net/minecraft/server/TileEntityEndGateway.java
|
||||
@@ -7,6 +7,13 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
@@ -30,6 +30,14 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.level.dimension.DimensionManager;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||
@@ -14,7 +15,7 @@
|
||||
public class TileEntityEndGateway extends TileEntityEnderPortal implements ITickable {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -117,7 +124,7 @@
|
||||
@@ -140,7 +148,7 @@
|
||||
public void b(Entity entity) {
|
||||
if (this.world instanceof WorldServer && !this.f()) {
|
||||
this.c = 100;
|
||||
@@ -23,7 +24,7 @@
|
||||
this.a((WorldServer) this.world);
|
||||
}
|
||||
|
||||
@@ -142,6 +149,27 @@
|
||||
@@ -165,6 +173,27 @@
|
||||
entity1 = entity.getRootVehicle();
|
||||
}
|
||||
|
||||
@@ -51,7 +52,7 @@
|
||||
entity1.resetPortalCooldown();
|
||||
entity1.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D);
|
||||
}
|
||||
@@ -246,7 +274,7 @@
|
||||
@@ -269,7 +298,7 @@
|
||||
}
|
||||
|
||||
private void a(WorldServer worldserver, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/server/TileEntityFurnace.java
|
||||
@@ -10,6 +10,17 @@
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
@@ -39,6 +39,17 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
@@ -18,7 +18,7 @@
|
||||
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput, ITickable {
|
||||
|
||||
private static final int[] g = new int[]{0};
|
||||
@@ -137,6 +148,36 @@
|
||||
@@ -166,6 +177,36 @@
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
private static boolean b(Item item) {
|
||||
return TagsItem.NON_FLAMMABLE_WOOD.isTagged(item);
|
||||
}
|
||||
@@ -223,12 +264,23 @@
|
||||
@@ -252,12 +293,23 @@
|
||||
this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.cookTimeTotal);
|
||||
}
|
||||
} else {
|
||||
@@ -82,7 +82,7 @@
|
||||
flag1 = true;
|
||||
if (!itemstack.isEmpty()) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -290,11 +342,38 @@
|
||||
@@ -319,11 +371,38 @@
|
||||
ItemStack itemstack1 = irecipe.getResult();
|
||||
ItemStack itemstack2 = (ItemStack) this.items.get(2);
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
this.a(irecipe);
|
||||
@@ -319,7 +398,7 @@
|
||||
@@ -348,7 +427,7 @@
|
||||
}
|
||||
|
||||
protected int getRecipeCookingTime() {
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
|
||||
public static boolean isFuel(ItemStack itemstack) {
|
||||
@@ -446,14 +525,20 @@
|
||||
@@ -475,14 +554,20 @@
|
||||
@Override
|
||||
public void b(EntityHuman entityhuman) {}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
List<IRecipe<?>> list = Lists.newArrayList();
|
||||
ObjectIterator objectiterator = this.n.object2IntEntrySet().iterator();
|
||||
|
||||
@@ -462,14 +547,14 @@
|
||||
@@ -491,14 +576,14 @@
|
||||
|
||||
world.getCraftingManager().getRecipe((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
|
||||
list.add(irecipe);
|
||||
@@ -170,7 +170,7 @@
|
||||
int j = MathHelper.d((float) i * f);
|
||||
float f1 = MathHelper.h((float) i * f);
|
||||
|
||||
@@ -477,6 +562,14 @@
|
||||
@@ -506,6 +591,14 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
--- a/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -7,12 +7,51 @@
|
||||
import java.util.stream.IntStream;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityHopper.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityHopper.java
|
||||
@@ -33,12 +33,53 @@
|
||||
import net.minecraft.world.phys.shapes.OperatorBoolean;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.InventoryLargeChest;
|
||||
+import net.minecraft.world.entity.vehicle.EntityMinecartHopper;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
@@ -52,7 +54,7 @@
|
||||
public TileEntityHopper() {
|
||||
super(TileEntityTypes.HOPPER);
|
||||
this.items = NonNullList.a(5, ItemStack.b);
|
||||
@@ -138,7 +177,28 @@
|
||||
@@ -164,7 +205,28 @@
|
||||
for (int i = 0; i < this.getSize(); ++i) {
|
||||
if (!this.getItem(i).isEmpty()) {
|
||||
ItemStack itemstack = this.getItem(i).cloneItemStack();
|
||||
@@ -82,7 +84,7 @@
|
||||
|
||||
if (itemstack1.isEmpty()) {
|
||||
iinventory.update();
|
||||
@@ -203,7 +263,34 @@
|
||||
@@ -229,7 +291,34 @@
|
||||
|
||||
if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) {
|
||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||
@@ -118,7 +120,7 @@
|
||||
|
||||
if (itemstack2.isEmpty()) {
|
||||
iinventory.update();
|
||||
@@ -218,6 +305,13 @@
|
||||
@@ -244,6 +333,13 @@
|
||||
|
||||
public static boolean a(IInventory iinventory, EntityItem entityitem) {
|
||||
boolean flag = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityLectern.java
|
||||
+++ b/net/minecraft/server/TileEntityLectern.java
|
||||
@@ -2,9 +2,63 @@
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
@@ -27,9 +27,63 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
-public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory {
|
||||
+// CraftBukkit start
|
||||
@@ -66,7 +66,7 @@
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 1;
|
||||
@@ -49,11 +103,20 @@
|
||||
@@ -74,11 +128,20 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,7 +198,7 @@
|
||||
@@ -160,7 +223,7 @@
|
||||
if (j != this.page) {
|
||||
this.page = j;
|
||||
this.update();
|
||||
@@ -98,7 +98,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -158,6 +221,32 @@
|
||||
@@ -183,6 +246,32 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) {
|
||||
String s;
|
||||
Object object;
|
||||
@@ -172,7 +261,8 @@
|
||||
@@ -197,7 +286,8 @@
|
||||
|
||||
Vec3D vec3d = Vec3D.a((BaseBlockPosition) this.position);
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,7 +301,7 @@
|
||||
@@ -236,7 +326,7 @@
|
||||
|
||||
@Override
|
||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/TileEntityShulkerBox.java
|
||||
+++ b/net/minecraft/server/TileEntityShulkerBox.java
|
||||
@@ -4,6 +4,11 @@
|
||||
import java.util.stream.IntStream;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
|
||||
@@ -29,6 +29,11 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable {
|
||||
|
||||
private static final int[] a = IntStream.range(0, 27).toArray();
|
||||
@@ -16,6 +21,37 @@
|
||||
@@ -41,6 +46,37 @@
|
||||
private EnumColor l;
|
||||
private boolean m;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
public TileEntityShulkerBox(@Nullable EnumColor enumcolor) {
|
||||
super(TileEntityTypes.SHULKER_BOX);
|
||||
this.contents = NonNullList.a(27, ItemStack.b);
|
||||
@@ -178,6 +214,7 @@
|
||||
@@ -203,6 +239,7 @@
|
||||
}
|
||||
|
||||
++this.viewingCount;
|
||||
@@ -58,7 +58,7 @@
|
||||
this.world.playBlockAction(this.position, this.getBlock().getBlock(), 1, this.viewingCount);
|
||||
if (this.viewingCount == 1) {
|
||||
this.world.playSound((EntityHuman) null, this.position, SoundEffects.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||
@@ -190,6 +227,7 @@
|
||||
@@ -215,6 +252,7 @@
|
||||
public void closeContainer(EntityHuman entityhuman) {
|
||||
if (!entityhuman.isSpectator()) {
|
||||
--this.viewingCount;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/net/minecraft/server/TileEntitySign.java
|
||||
@@ -3,7 +3,7 @@
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntitySign.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntitySign.java
|
||||
@@ -23,7 +23,7 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
-public class TileEntitySign extends TileEntity {
|
||||
+public class TileEntitySign extends TileEntity implements ICommandListener { // CraftBukkit - implements
|
||||
|
||||
public final IChatBaseComponent[] lines;
|
||||
public boolean isEditable;
|
||||
@@ -29,6 +29,12 @@
|
||||
@@ -49,6 +49,12 @@
|
||||
nbttagcompound.setString("Text" + (i + 1), s);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
nbttagcompound.setString("Color", this.color.c());
|
||||
return nbttagcompound;
|
||||
}
|
||||
@@ -39,18 +45,38 @@
|
||||
@@ -59,18 +65,38 @@
|
||||
super.load(iblockdata, nbttagcompound);
|
||||
this.color = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK);
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
|
||||
this.g[i] = null;
|
||||
@@ -111,11 +137,37 @@
|
||||
@@ -131,11 +157,37 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
public EnumColor getColor() {
|
||||
@@ -126,7 +178,7 @@
|
||||
@@ -146,7 +198,7 @@
|
||||
if (enumcolor != this.getColor()) {
|
||||
this.color = enumcolor;
|
||||
this.update();
|
||||
|
||||
Reference in New Issue
Block a user