@@ -1,8 +1,8 @@
|
||||
--- 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.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
|
||||
@@ -16,7 +16,7 @@
|
||||
+ private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
+ public CraftPersistentDataContainer persistentDataContainer;
|
||||
+ // CraftBukkit end
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private final TileEntityTypes<?> type;
|
||||
@Nullable
|
||||
@@ -48,7 +58,16 @@
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBeacon.java
|
||||
@@ -39,6 +39,11 @@
|
||||
@@ -38,6 +38,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 {
|
||||
|
||||
private static final int MAX_LEVELS = 4;
|
||||
@@ -61,6 +66,15 @@
|
||||
@@ -60,6 +65,15 @@
|
||||
public IChatBaseComponent name;
|
||||
public ChestLock lockKey;
|
||||
private final IContainerProperties dataAccess;
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
public TileEntityBeacon(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.BEACON, blockposition, iblockdata);
|
||||
@@ -229,39 +243,78 @@
|
||||
@@ -228,39 +242,78 @@
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
public static void playSound(World world, BlockPosition blockposition, SoundEffect soundeffect) {
|
||||
world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -290,8 +343,11 @@
|
||||
@@ -289,8 +342,11 @@
|
||||
@Override
|
||||
public void load(NBTTagCompound nbttagcompound) {
|
||||
super.load(nbttagcompound);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBeehive.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBeehive.java
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
private final List<TileEntityBeehive.HiveBee> stored = Lists.newArrayList();
|
||||
@Nullable
|
||||
public BlockPosition savedFlowerPos;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public TileEntityBeehive(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.BEEHIVE, blockposition, iblockdata);
|
||||
@@ -82,7 +83,7 @@
|
||||
@@ -81,7 +82,7 @@
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
public void emptyAllLivingFromHive(@Nullable EntityHuman entityhuman, IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
|
||||
@@ -99,7 +100,7 @@
|
||||
@@ -98,7 +99,7 @@
|
||||
|
||||
if (entityhuman.position().distanceToSqr(entity.position()) <= 16.0D) {
|
||||
if (!this.isSedated()) {
|
||||
@@ -26,7 +26,7 @@
|
||||
} else {
|
||||
entitybee.setStayOutOfHiveCountdown(400);
|
||||
}
|
||||
@@ -111,10 +112,16 @@
|
||||
@@ -110,10 +111,16 @@
|
||||
}
|
||||
|
||||
private List<Entity> releaseAllOccupants(IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
|
||||
@@ -44,7 +44,7 @@
|
||||
});
|
||||
if (!list.isEmpty()) {
|
||||
super.setChanged();
|
||||
@@ -142,7 +149,19 @@
|
||||
@@ -141,7 +148,19 @@
|
||||
}
|
||||
|
||||
public void addOccupantWithPresetTicks(Entity entity, boolean flag, int i) {
|
||||
@@ -65,7 +65,7 @@
|
||||
entity.stopRiding();
|
||||
entity.ejectPassengers();
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
@@ -173,7 +192,13 @@
|
||||
@@ -172,7 +191,13 @@
|
||||
}
|
||||
|
||||
private static boolean releaseOccupant(World world, BlockPosition blockposition, IBlockData iblockdata, TileEntityBeehive.HiveBee tileentitybeehive_hivebee, @Nullable List<Entity> list, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus, @Nullable BlockPosition blockposition1) {
|
||||
@@ -80,7 +80,7 @@
|
||||
return false;
|
||||
} else {
|
||||
NBTTagCompound nbttagcompound = tileentitybeehive_hivebee.entityData.copy();
|
||||
@@ -196,6 +221,18 @@
|
||||
@@ -195,6 +220,18 @@
|
||||
if (!entity.getType().is(TagsEntity.BEEHIVE_INHABITORS)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -99,7 +99,7 @@
|
||||
if (entity instanceof EntityBee) {
|
||||
EntityBee entitybee = (EntityBee) entity;
|
||||
|
||||
@@ -225,6 +262,7 @@
|
||||
@@ -226,6 +263,7 @@
|
||||
list.add(entitybee);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
float f = entity.getBbWidth();
|
||||
double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
|
||||
double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
|
||||
@@ -232,10 +270,11 @@
|
||||
@@ -233,10 +271,11 @@
|
||||
double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
|
||||
|
||||
entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
@@ -284,6 +323,10 @@
|
||||
@@ -285,6 +324,10 @@
|
||||
if (releaseOccupant(world, blockposition, iblockdata, tileentitybeehive_hivebee, (List) null, tileentitybeehive_releasestatus, blockposition1)) {
|
||||
flag = true;
|
||||
iterator.remove();
|
||||
@@ -131,7 +131,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -325,6 +368,11 @@
|
||||
@@ -326,6 +369,11 @@
|
||||
this.savedFlowerPos = GameProfileSerializer.readBlockPos(nbttagcompound.getCompound("FlowerPos"));
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -334,6 +382,7 @@
|
||||
@@ -335,6 +383,7 @@
|
||||
if (this.hasSavedFlowerPos()) {
|
||||
nbttagcompound.put("FlowerPos", GameProfileSerializer.writeBlockPos(this.savedFlowerPos));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
@@ -29,6 +29,11 @@
|
||||
@@ -28,6 +28,11 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
public class TileEntityConduit extends TileEntity {
|
||||
|
||||
private static final int BLOCK_REFRESH_RATE = 2;
|
||||
@@ -203,7 +208,7 @@
|
||||
@@ -202,7 +207,7 @@
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
if (blockposition.closerThan((BaseBlockPosition) entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
|
||||
if (blockposition.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
|
||||
- entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true));
|
||||
+ entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONDUIT); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,8 +237,13 @@
|
||||
@@ -231,8 +236,13 @@
|
||||
}
|
||||
|
||||
if (tileentityconduit.destroyTarget != null) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
||||
@@ -31,6 +31,14 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -32,6 +32,14 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.level.dimension.WorldDimension;
|
||||
@@ -14,8 +14,8 @@
|
||||
+
|
||||
public class TileEntityEndGateway extends TileEntityEnderPortal {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -167,7 +175,7 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -168,7 +176,7 @@
|
||||
tileentityendgateway.teleportCooldown = 100;
|
||||
BlockPosition blockposition1;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
blockposition1 = findOrCreateValidTeleportPos(worldserver, blockposition);
|
||||
blockposition1 = blockposition1.above(10);
|
||||
TileEntityEndGateway.LOGGER.debug("Creating portal at {}", blockposition1);
|
||||
@@ -196,6 +204,27 @@
|
||||
@@ -197,6 +205,27 @@
|
||||
entity1 = entity.getRootVehicle();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
@@ -43,6 +43,20 @@
|
||||
@@ -45,6 +45,20 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput {
|
||||
|
||||
protected static final int SLOT_INPUT = 0;
|
||||
@@ -182,6 +196,40 @@
|
||||
@@ -184,6 +198,40 @@
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
private static boolean isNeverAFurnaceFuel(Item item) {
|
||||
return TagsItem.NON_FLAMMABLE_WOOD.contains(item);
|
||||
return item.builtInRegistryHolder().is(TagsItem.NON_FLAMMABLE_WOOD);
|
||||
}
|
||||
@@ -265,13 +313,24 @@
|
||||
@@ -267,13 +315,24 @@
|
||||
tileentityfurnace.cookingProgress = MathHelper.clamp(tileentityfurnace.cookingProgress - 2, (int) 0, tileentityfurnace.cookingTotalTime);
|
||||
}
|
||||
} else {
|
||||
@@ -90,7 +90,7 @@
|
||||
flag1 = true;
|
||||
if (!itemstack.isEmpty()) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -287,11 +346,23 @@
|
||||
@@ -289,11 +348,23 @@
|
||||
}
|
||||
|
||||
if (tileentityfurnace.isLit() && canBurn(irecipe, tileentityfurnace.items, i)) {
|
||||
@@ -115,7 +115,7 @@
|
||||
tileentityfurnace.setRecipeUsed(irecipe);
|
||||
}
|
||||
|
||||
@@ -330,17 +401,44 @@
|
||||
@@ -332,17 +403,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
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));
|
||||
@@ -364,7 +462,7 @@
|
||||
@@ -366,7 +464,7 @@
|
||||
}
|
||||
|
||||
private static int getTotalCookTime(World world, Recipes<? extends RecipeCooking> recipes, IInventory iinventory) {
|
||||
@@ -170,7 +170,7 @@
|
||||
}
|
||||
|
||||
public static boolean isFuel(ItemStack itemstack) {
|
||||
@@ -483,14 +581,20 @@
|
||||
@@ -485,14 +583,20 @@
|
||||
@Override
|
||||
public void awardUsedRecipes(EntityHuman entityhuman) {}
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
List<IRecipe<?>> list = Lists.newArrayList();
|
||||
ObjectIterator objectiterator = this.recipesUsed.object2IntEntrySet().iterator();
|
||||
|
||||
@@ -499,14 +603,14 @@
|
||||
@@ -501,14 +605,14 @@
|
||||
|
||||
worldserver.getRecipeManager().byKey((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
|
||||
list.add(irecipe);
|
||||
@@ -210,7 +210,7 @@
|
||||
int j = MathHelper.floor((float) i * f);
|
||||
float f1 = MathHelper.frac((float) i * f);
|
||||
|
||||
@@ -514,6 +618,17 @@
|
||||
@@ -516,6 +620,17 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user