@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockBed.java
|
||||
+++ b/net/minecraft/world/level/block/BlockBed.java
|
||||
@@ -86,7 +86,8 @@
|
||||
@@ -85,7 +85,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
world.removeBlock(blockposition, false);
|
||||
BlockPosition blockposition1 = blockposition.relative(((EnumDirection) iblockdata.getValue(BlockBed.FACING)).getOpposite());
|
||||
|
||||
@@ -105,7 +106,16 @@
|
||||
@@ -104,7 +105,16 @@
|
||||
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else {
|
||||
@@ -27,7 +27,7 @@
|
||||
if (entityhuman_enumbedresult.getMessage() != null) {
|
||||
entityhuman.displayClientMessage(entityhuman_enumbedresult.getMessage(), true);
|
||||
}
|
||||
@@ -116,8 +126,29 @@
|
||||
@@ -115,8 +125,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
+
|
||||
+ Vec3D vec3d = blockposition.getCenter();
|
||||
+
|
||||
+ world.explode((Entity) null, DamageSource.badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, World.a.BLOCK);
|
||||
+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, World.a.BLOCK);
|
||||
+ return EnumInteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockButtonAbstract.java
|
||||
+++ b/net/minecraft/world/level/block/BlockButtonAbstract.java
|
||||
@@ -26,6 +26,11 @@
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class BlockButtonAbstract extends BlockAttachable {
|
||||
|
||||
public static final BlockStateBoolean POWERED = BlockProperties.POWERED;
|
||||
@@ -109,6 +114,19 @@
|
||||
@@ -108,6 +113,19 @@
|
||||
if ((Boolean) iblockdata.getValue(BlockButtonAbstract.POWERED)) {
|
||||
return EnumInteractionResult.CONSUME;
|
||||
} else {
|
||||
@@ -32,7 +32,7 @@
|
||||
this.press(iblockdata, world, blockposition);
|
||||
this.playSound(entityhuman, world, blockposition, true);
|
||||
world.gameEvent((Entity) entityhuman, GameEvent.BLOCK_ACTIVATE, blockposition);
|
||||
@@ -171,11 +189,36 @@
|
||||
@@ -170,11 +188,36 @@
|
||||
}
|
||||
|
||||
protected void checkPressed(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCactus.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCactus.java
|
||||
@@ -22,6 +22,8 @@
|
||||
@@ -21,6 +21,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockCactus extends Block {
|
||||
|
||||
public static final BlockStateInteger AGE = BlockProperties.AGE_15;
|
||||
@@ -58,7 +60,7 @@
|
||||
@@ -57,7 +59,7 @@
|
||||
int j = (Integer) iblockdata.getValue(BlockCactus.AGE);
|
||||
|
||||
if (j == 15) {
|
||||
@@ -18,12 +18,12 @@
|
||||
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockCactus.AGE, 0);
|
||||
|
||||
worldserver.setBlock(blockposition, iblockdata1, 4);
|
||||
@@ -115,7 +117,9 @@
|
||||
@@ -114,7 +116,9 @@
|
||||
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
+ CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit
|
||||
entity.hurt(DamageSource.CACTUS, 1.0F);
|
||||
entity.hurt(world.damageSources().cactus(), 1.0F);
|
||||
+ CraftEventFactory.blockDamage = null; // CraftBukkit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCampfire.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCampfire.java
|
||||
@@ -47,6 +47,10 @@
|
||||
@@ -46,6 +46,10 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged {
|
||||
|
||||
protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D);
|
||||
@@ -91,7 +95,9 @@
|
||||
@@ -90,7 +94,9 @@
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if ((Boolean) iblockdata.getValue(BlockCampfire.LIT) && entity instanceof EntityLiving && !EnchantmentManager.hasFrostWalker((EntityLiving) entity)) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
|
||||
entity.hurt(DamageSource.IN_FIRE, (float) this.fireDamage);
|
||||
entity.hurt(world.damageSources().inFire(), (float) this.fireDamage);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit
|
||||
}
|
||||
|
||||
super.entityInside(iblockdata, world, blockposition, entity);
|
||||
@@ -201,6 +207,11 @@
|
||||
@@ -200,6 +206,11 @@
|
||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPos();
|
||||
|
||||
if (!world.isClientSide && iprojectile.isOnFire() && iprojectile.mayInteract(world, blockposition) && !(Boolean) iblockdata.getValue(BlockCampfire.LIT) && !(Boolean) iblockdata.getValue(BlockCampfire.WATERLOGGED)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockComposter.java
|
||||
+++ b/net/minecraft/world/level/block/BlockComposter.java
|
||||
@@ -37,6 +37,12 @@
|
||||
@@ -40,6 +40,12 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -13,61 +13,46 @@
|
||||
public class BlockComposter extends Block implements IInventoryHolder {
|
||||
|
||||
public static final int READY = 8;
|
||||
@@ -227,18 +233,25 @@
|
||||
|
||||
return EnumInteractionResult.sidedSuccess(world.isClientSide);
|
||||
} else if (i == 8) {
|
||||
- extractProduce(iblockdata, world, blockposition);
|
||||
+ extractProduce(iblockdata, world, blockposition, (Entity) null); // CraftBukkit - no event for players
|
||||
return EnumInteractionResult.sidedSuccess(world.isClientSide);
|
||||
} else {
|
||||
return EnumInteractionResult.PASS;
|
||||
}
|
||||
}
|
||||
|
||||
- public static IBlockData insertItem(IBlockData iblockdata, WorldServer worldserver, ItemStack itemstack, BlockPosition blockposition) {
|
||||
+ public static IBlockData insertItem(IBlockData iblockdata, WorldServer worldserver, ItemStack itemstack, BlockPosition blockposition, Entity entity) { // CraftBukkit
|
||||
@@ -246,7 +252,14 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
|
||||
|
||||
if (i < 7 && BlockComposter.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||
- IBlockData iblockdata1 = addItem(iblockdata, worldserver, blockposition, itemstack);
|
||||
- IBlockData iblockdata1 = addItem(entity, iblockdata, worldserver, blockposition, itemstack);
|
||||
+ // CraftBukkit start
|
||||
+ double rand = worldserver.getRandom().nextDouble();
|
||||
+ IBlockData iblockdata1 = addItem(iblockdata, DummyGeneratorAccess.INSTANCE, blockposition, itemstack, rand);
|
||||
+ IBlockData iblockdata1 = addItem(entity, iblockdata, DummyGeneratorAccess.INSTANCE, blockposition, itemstack, rand);
|
||||
+ if (iblockdata == iblockdata1 || org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1).isCancelled()) {
|
||||
+ return iblockdata;
|
||||
+ }
|
||||
+ iblockdata1 = addItem(iblockdata, (GeneratorAccess) worldserver, blockposition, itemstack, rand);
|
||||
+ iblockdata1 = addItem(entity, iblockdata, worldserver, blockposition, itemstack, rand);
|
||||
+ // CraftBukkit end
|
||||
|
||||
itemstack.shrink(1);
|
||||
return iblockdata1;
|
||||
@@ -247,7 +260,15 @@
|
||||
}
|
||||
@@ -256,6 +269,14 @@
|
||||
}
|
||||
|
||||
- public static IBlockData extractProduce(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
+ // CraftBukkit start
|
||||
+ public static IBlockData extractProduce(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
+ if (entity != null) {
|
||||
+ IBlockData iblockdata1 = empty(iblockdata, DummyGeneratorAccess.INSTANCE, blockposition);
|
||||
public static IBlockData extractProduce(Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
+ // CraftBukkit start
|
||||
+ if (entity != null && !(entity instanceof EntityHuman)) {
|
||||
+ IBlockData iblockdata1 = empty(entity, iblockdata, DummyGeneratorAccess.INSTANCE, blockposition);
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1).isCancelled()) {
|
||||
+ return iblockdata;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (!world.isClientSide) {
|
||||
float f = 0.7F;
|
||||
double d0 = (double) (world.random.nextFloat() * 0.7F) + 0.15000000596046448D;
|
||||
@@ -273,10 +294,16 @@
|
||||
Vec3D vec3d = Vec3D.atLowerCornerWithOffset(blockposition, 0.5D, 1.01D, 0.5D).offsetRandom(world.random, 0.7F);
|
||||
EntityItem entityitem = new EntityItem(world, vec3d.x(), vec3d.y(), vec3d.z(), new ItemStack(Items.BONE_MEAL));
|
||||
@@ -279,10 +300,16 @@
|
||||
}
|
||||
|
||||
static IBlockData addItem(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack) {
|
||||
static IBlockData addItem(@Nullable Entity entity, IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack) {
|
||||
+ // CraftBukkit start
|
||||
+ return addItem(iblockdata, generatoraccess, blockposition, itemstack, generatoraccess.getRandom().nextDouble());
|
||||
+ return addItem(entity, iblockdata, generatoraccess, blockposition, itemstack, generatoraccess.getRandom().nextDouble());
|
||||
+ }
|
||||
+
|
||||
+ static IBlockData addItem(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack, double rand) {
|
||||
+ static IBlockData addItem(@Nullable Entity entity, IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack, double rand) {
|
||||
+ // CraftBukkit end
|
||||
int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
|
||||
float f = BlockComposter.COMPOSTABLES.getFloat(itemstack.getItem());
|
||||
@@ -77,7 +62,7 @@
|
||||
return iblockdata;
|
||||
} else {
|
||||
int j = i + 1;
|
||||
@@ -324,7 +351,8 @@
|
||||
@@ -331,7 +358,8 @@
|
||||
public IWorldInventory getContainer(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
||||
int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
|
||||
|
||||
@@ -87,7 +72,7 @@
|
||||
}
|
||||
|
||||
public static class ContainerOutput extends InventorySubcontainer implements IWorldInventory {
|
||||
@@ -339,6 +367,7 @@
|
||||
@@ -346,6 +374,7 @@
|
||||
this.state = iblockdata;
|
||||
this.level = generatoraccess;
|
||||
this.pos = blockposition;
|
||||
@@ -95,15 +80,15 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -363,8 +392,15 @@
|
||||
@@ -370,8 +399,15 @@
|
||||
|
||||
@Override
|
||||
public void setChanged() {
|
||||
- BlockComposter.empty(this.state, this.level, this.pos);
|
||||
- BlockComposter.empty((Entity) null, this.state, this.level, this.pos);
|
||||
- this.changed = true;
|
||||
+ // CraftBukkit start - allow putting items back (eg cancelled InventoryMoveItemEvent)
|
||||
+ if (this.isEmpty()) {
|
||||
+ BlockComposter.empty(this.state, this.level, this.pos);
|
||||
+ BlockComposter.empty((Entity) null, this.state, this.level, this.pos);
|
||||
+ this.changed = true;
|
||||
+ } else {
|
||||
+ this.level.setBlock(this.pos, this.state, 3);
|
||||
@@ -113,7 +98,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,6 +413,7 @@
|
||||
@@ -384,6 +420,7 @@
|
||||
|
||||
public ContainerInput(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
||||
super(1);
|
||||
@@ -121,7 +106,7 @@
|
||||
this.state = iblockdata;
|
||||
this.level = generatoraccess;
|
||||
this.pos = blockposition;
|
||||
@@ -419,8 +456,9 @@
|
||||
@@ -426,8 +463,9 @@
|
||||
|
||||
public static class ContainerEmpty extends InventorySubcontainer implements IWorldInventory {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/world/level/block/BlockDaylightDetector.java
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
i = MathHelper.clamp(i, (int) 0, (int) 15);
|
||||
i = MathHelper.clamp(i, 0, 15);
|
||||
if ((Integer) iblockdata.getValue(BlockDaylightDetector.POWER) != i) {
|
||||
+ i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition, ((Integer) iblockdata.getValue(POWER)), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockDaylightDetector.POWER, i), 3);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockDoor extends Block {
|
||||
|
||||
public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING;
|
||||
@@ -189,9 +191,24 @@
|
||||
@@ -187,9 +189,24 @@
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@@ -40,13 +47,22 @@
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (world instanceof WorldServer && !entity.isPassenger() && !entity.isVehicle() && entity.canChangeDimensions() && VoxelShapes.joinIsNotEmpty(VoxelShapes.create(entity.getBoundingBox().move((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) {
|
||||
if (world instanceof WorldServer && entity.canChangeDimensions() && VoxelShapes.joinIsNotEmpty(VoxelShapes.create(entity.getBoundingBox().move((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) {
|
||||
- ResourceKey<World> resourcekey = world.dimension() == World.END ? World.OVERWORLD : World.END;
|
||||
+ ResourceKey<World> resourcekey = world.getTypeKey() == WorldDimension.END ? World.OVERWORLD : World.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends
|
||||
WorldServer worldserver = ((WorldServer) world).getServer().getLevel(resourcekey);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
@@ -142,6 +142,17 @@
|
||||
@@ -140,6 +140,17 @@
|
||||
public void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
if (!world.isClientSide) {
|
||||
boolean flag1 = world.hasNeighborSignal(blockposition);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFire.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFire.java
|
||||
@@ -27,6 +27,14 @@
|
||||
@@ -28,6 +28,14 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class BlockFire extends BlockFireAbstract {
|
||||
|
||||
public static final int MAX_AGE = 15;
|
||||
@@ -92,7 +100,24 @@
|
||||
@@ -93,7 +101,24 @@
|
||||
|
||||
@Override
|
||||
public IBlockData updateShape(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,7 +166,7 @@
|
||||
@@ -142,7 +167,7 @@
|
||||
worldserver.scheduleTick(blockposition, (Block) this, getFireTickDelay(worldserver.random));
|
||||
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
|
||||
if (!iblockdata.canSurvive(worldserver, blockposition)) {
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
IBlockData iblockdata1 = worldserver.getBlockState(blockposition.below());
|
||||
@@ -149,7 +174,7 @@
|
||||
@@ -150,7 +175,7 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockFire.AGE);
|
||||
|
||||
if (!flag && worldserver.isRaining() && this.isNearRain(worldserver, blockposition) && randomsource.nextFloat() < 0.2F + (float) i * 0.03F) {
|
||||
@@ -59,7 +59,7 @@
|
||||
} else {
|
||||
int j = Math.min(15, i + randomsource.nextInt(3) / 2);
|
||||
|
||||
@@ -163,14 +188,14 @@
|
||||
@@ -164,14 +189,14 @@
|
||||
BlockPosition blockposition1 = blockposition.below();
|
||||
|
||||
if (!worldserver.getBlockState(blockposition1).isFaceSturdy(worldserver, blockposition1, EnumDirection.UP) || i > 3) {
|
||||
@@ -76,8 +76,8 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -178,12 +203,14 @@
|
||||
boolean flag1 = worldserver.isHumidAt(blockposition);
|
||||
@@ -179,12 +204,14 @@
|
||||
boolean flag1 = worldserver.getBiome(blockposition).is(BiomeTags.INCREASED_FIRE_BURNOUT);
|
||||
int k = flag1 ? -50 : 0;
|
||||
|
||||
- this.checkBurnOut(worldserver, blockposition.east(), 300 + k, randomsource, i);
|
||||
@@ -97,7 +97,7 @@
|
||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||
|
||||
for (int l = -1; l <= 1; ++l) {
|
||||
@@ -209,7 +236,15 @@
|
||||
@@ -210,7 +237,15 @@
|
||||
if (i2 > 0 && randomsource.nextInt(k1) <= i2 && (!worldserver.isRaining() || !this.isNearRain(worldserver, blockposition_mutableblockposition))) {
|
||||
int j2 = Math.min(15, i + randomsource.nextInt(5) / 4);
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,12 +268,24 @@
|
||||
@@ -234,12 +269,24 @@
|
||||
return iblockdata.hasProperty(BlockProperties.WATERLOGGED) && (Boolean) iblockdata.getValue(BlockProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(iblockdata.getBlock());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFireAbstract.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFireAbstract.java
|
||||
@@ -124,7 +124,14 @@
|
||||
@@ -123,7 +123,14 @@
|
||||
if (!entity.fireImmune()) {
|
||||
entity.setRemainingFireTicks(entity.getRemainingFireTicks() + 1);
|
||||
if (entity.getRemainingFireTicks() == 0) {
|
||||
@@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,14 +152,14 @@
|
||||
@@ -144,14 +151,14 @@
|
||||
}
|
||||
|
||||
if (!iblockdata.canSurvive(world, blockposition)) {
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,4 +207,12 @@
|
||||
@@ -199,4 +206,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockGrassPath.java
|
||||
+++ b/net/minecraft/world/level/block/BlockGrassPath.java
|
||||
@@ -43,6 +43,11 @@
|
||||
@@ -44,6 +44,11 @@
|
||||
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
|
||||
@@ -9,6 +9,6 @@
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
BlockSoil.turnToDirt(iblockdata, worldserver, blockposition);
|
||||
BlockSoil.turnToDirt((Entity) null, iblockdata, worldserver, blockposition);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/BlockJukeBox.java
|
||||
+++ b/net/minecraft/world/level/block/BlockJukeBox.java
|
||||
@@ -67,7 +67,13 @@
|
||||
if (tileentity instanceof TileEntityJukeBox) {
|
||||
TileEntityJukeBox tileentityjukebox = (TileEntityJukeBox) tileentity;
|
||||
|
||||
- tileentityjukebox.setRecord(itemstack.copy());
|
||||
+ // CraftBukkit start - There can only be one
|
||||
+ itemstack = itemstack.copy();
|
||||
+ if (!itemstack.isEmpty()) {
|
||||
+ itemstack.setCount(1);
|
||||
+ }
|
||||
+ tileentityjukebox.setRecord(itemstack);
|
||||
+ // CraftBukkit end
|
||||
tileentityjukebox.playRecord();
|
||||
generatoraccess.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockJukeBox.HAS_RECORD, true), 2);
|
||||
generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(entity, iblockdata));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockLeaves.java
|
||||
+++ b/net/minecraft/world/level/block/BlockLeaves.java
|
||||
@@ -22,6 +22,8 @@
|
||||
@@ -23,6 +23,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockLeaves extends Block implements IBlockWaterlogged {
|
||||
|
||||
public static final int DECAY_DISTANCE = 7;
|
||||
@@ -48,6 +50,14 @@
|
||||
@@ -49,6 +51,14 @@
|
||||
@Override
|
||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
|
||||
if (this.decaying(iblockdata)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockLectern.java
|
||||
+++ b/net/minecraft/world/level/block/BlockLectern.java
|
||||
@@ -198,12 +198,13 @@
|
||||
@@ -200,12 +200,13 @@
|
||||
}
|
||||
|
||||
private void popBook(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BlockMagma.java
|
||||
+++ b/net/minecraft/world/level/block/BlockMagma.java
|
||||
@@ -29,7 +29,9 @@
|
||||
@@ -28,7 +28,9 @@
|
||||
@Override
|
||||
public void stepOn(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
|
||||
if (!entity.isSteppingCarefully() && entity instanceof EntityLiving && !EnchantmentManager.hasFrostWalker((EntityLiving) entity)) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit
|
||||
entity.hurt(DamageSource.HOT_FLOOR, 1.0F);
|
||||
entity.hurt(world.damageSources().hotFloor(), 1.0F);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockNote.java
|
||||
+++ b/net/minecraft/world/level/block/BlockNote.java
|
||||
@@ -77,6 +77,7 @@
|
||||
@@ -79,6 +79,7 @@
|
||||
if (flag1 != (Boolean) iblockdata.getValue(BlockNote.POWERED)) {
|
||||
if (flag1) {
|
||||
this.playNote((Entity) null, iblockdata, world, blockposition);
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockNote.POWERED, flag1), 3);
|
||||
@@ -86,6 +87,12 @@
|
||||
@@ -88,6 +89,12 @@
|
||||
|
||||
private void playNote(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
if (!((BlockPropertyInstrument) iblockdata.getValue(BlockNote.INSTRUMENT)).requiresAirAbove() || world.getBlockState(blockposition.above()).isAir()) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
@@ -77,6 +82,10 @@
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (!entity.isPassenger() && !entity.isVehicle() && entity.canChangeDimensions()) {
|
||||
if (entity.canChangeDimensions()) {
|
||||
+ // CraftBukkit start - Entity in portal
|
||||
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockPressurePlateAbstract.java
|
||||
+++ b/net/minecraft/world/level/block/BlockPressurePlateAbstract.java
|
||||
@@ -18,6 +18,8 @@
|
||||
@@ -21,6 +21,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public abstract class BlockPressurePlateAbstract extends Block {
|
||||
|
||||
protected static final VoxelShape PRESSED_AABB = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 0.5D, 15.0D);
|
||||
@@ -81,6 +83,19 @@
|
||||
@@ -86,6 +88,19 @@
|
||||
boolean flag = i > 0;
|
||||
boolean flag1 = j > 0;
|
||||
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
--- a/net/minecraft/world/level/block/BlockPressurePlateBinary.java
|
||||
+++ b/net/minecraft/world/level/block/BlockPressurePlateBinary.java
|
||||
@@ -17,6 +17,8 @@
|
||||
@@ -14,6 +14,11 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
|
||||
+import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.player.EntityHuman;
|
||||
+import org.bukkit.event.entity.EntityInteractEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
|
||||
|
||||
public static final BlockStateBoolean POWERED = BlockProperties.POWERED;
|
||||
@@ -74,6 +76,26 @@
|
||||
@@ -57,6 +62,26 @@
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
--- a/net/minecraft/world/level/block/BlockPressurePlateWeighted.java
|
||||
+++ b/net/minecraft/world/level/block/BlockPressurePlateWeighted.java
|
||||
@@ -14,6 +14,8 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockProperties;
|
||||
@@ -11,6 +11,11 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockSetType;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateInteger;
|
||||
|
||||
+import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.player.EntityHuman;
|
||||
+import org.bukkit.event.entity.EntityInteractEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
|
||||
|
||||
public static final BlockStateInteger POWER = BlockProperties.POWER;
|
||||
@@ -31,7 +33,31 @@
|
||||
@@ -24,7 +29,31 @@
|
||||
|
||||
@Override
|
||||
protected int getSignalStrength(World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockPumpkinCarved.java
|
||||
+++ b/net/minecraft/world/level/block/BlockPumpkinCarved.java
|
||||
@@ -26,6 +26,10 @@
|
||||
@@ -27,6 +27,10 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateDirection;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class BlockPumpkinCarved extends BlockFacingHorizontal implements ItemWearable {
|
||||
public class BlockPumpkinCarved extends BlockFacingHorizontal implements Equipable {
|
||||
|
||||
public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING;
|
||||
@@ -82,9 +86,14 @@
|
||||
@@ -83,9 +87,14 @@
|
||||
}
|
||||
|
||||
private static void spawnGolemInWorld(World world, ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection, Entity entity, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSoil.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSoil.java
|
||||
@@ -25,6 +25,11 @@
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
public class BlockSoil extends Block {
|
||||
|
||||
public static final BlockStateInteger MOISTURE = BlockProperties.MOISTURE;
|
||||
@@ -81,26 +86,49 @@
|
||||
@@ -83,26 +88,49 @@
|
||||
|
||||
if (!isNearWater(worldserver, blockposition) && !worldserver.isRainingAt(blockposition.above())) {
|
||||
if (i > 0) {
|
||||
- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, i - 1), 2);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, i - 1), 2); // CraftBukkit
|
||||
} else if (!isUnderCrops(worldserver, blockposition)) {
|
||||
turnToDirt(iblockdata, worldserver, blockposition);
|
||||
turnToDirt((Entity) null, iblockdata, worldserver, blockposition);
|
||||
}
|
||||
} else if (i < 7) {
|
||||
- worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, 7), 2);
|
||||
@@ -49,19 +49,19 @@
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
turnToDirt(iblockdata, world, blockposition);
|
||||
turnToDirt(entity, iblockdata, world, blockposition);
|
||||
}
|
||||
|
||||
- super.fallOn(world, iblockdata, blockposition, entity, f);
|
||||
+ // super.fallOn(world, iblockdata, blockposition, entity, f); // CraftBukkit - moved up
|
||||
}
|
||||
|
||||
public static void turnToDirt(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
public static void turnToDirt(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setBlockAndUpdate(blockposition, pushEntitiesUp(iblockdata, Blocks.DIRT.defaultBlockState(), world, blockposition));
|
||||
}
|
||||
IBlockData iblockdata1 = pushEntitiesUp(iblockdata, Blocks.DIRT.defaultBlockState(), world, blockposition);
|
||||
|
||||
world.setBlockAndUpdate(blockposition, iblockdata1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSweetBerryBush.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSweetBerryBush.java
|
||||
@@ -28,6 +28,14 @@
|
||||
@@ -27,6 +27,14 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
||||
private static final float HURT_SPEED_THRESHOLD = 0.003F;
|
||||
@@ -63,7 +71,7 @@
|
||||
@@ -62,7 +70,7 @@
|
||||
if (i < 3 && randomsource.nextInt(5) == 0 && worldserver.getRawBrightness(blockposition.above(), 0) >= 9) {
|
||||
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockSweetBerryBush.AGE, i + 1);
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
worldserver.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
|
||||
}
|
||||
|
||||
@@ -78,7 +86,9 @@
|
||||
@@ -77,7 +85,9 @@
|
||||
double d1 = Math.abs(entity.getZ() - entity.zOld);
|
||||
|
||||
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
|
||||
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
|
||||
entity.hurt(DamageSource.SWEET_BERRY_BUSH, 1.0F);
|
||||
entity.hurt(world.damageSources().sweetBerryBush(), 1.0F);
|
||||
+ CraftEventFactory.blockDamage = null; // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +105,15 @@
|
||||
@@ -94,7 +104,15 @@
|
||||
} else if (i > 1) {
|
||||
int j = 1 + world.random.nextInt(2);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockTrapdoor extends BlockFacingHorizontal implements IBlockWaterlogged {
|
||||
|
||||
public static final BlockStateBoolean OPEN = BlockProperties.OPEN;
|
||||
@@ -113,6 +115,19 @@
|
||||
@@ -111,6 +113,19 @@
|
||||
boolean flag1 = world.hasNeighborSignal(blockposition);
|
||||
|
||||
if (flag1 != (Boolean) iblockdata.getValue(BlockTrapdoor.POWERED)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockVine.java
|
||||
+++ b/net/minecraft/world/level/block/BlockVine.java
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -24,6 +24,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -9,51 +9,51 @@
|
||||
public class BlockVine extends Block {
|
||||
|
||||
public static final BlockStateBoolean UP = BlockSprawling.UP;
|
||||
@@ -194,20 +196,24 @@
|
||||
BlockPosition blockposition3 = blockposition2.relative(enumdirection1);
|
||||
BlockPosition blockposition4 = blockposition2.relative(enumdirection2);
|
||||
@@ -196,20 +198,24 @@
|
||||
BlockPosition blockposition3 = blockposition2.relative(enumdirection1);
|
||||
BlockPosition blockposition4 = blockposition2.relative(enumdirection2);
|
||||
|
||||
+ // CraftBukkit start - Call BlockSpreadEvent
|
||||
+ BlockPosition source = blockposition;
|
||||
+ // CraftBukkit start - Call BlockSpreadEvent
|
||||
+ BlockPosition source = blockposition;
|
||||
+
|
||||
if (flag && isAcceptableNeighbour(worldserver, blockposition3, enumdirection1)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
|
||||
} else if (flag1 && isAcceptableNeighbour(worldserver, blockposition4, enumdirection2)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
|
||||
} else {
|
||||
EnumDirection enumdirection3 = enumdirection.getOpposite();
|
||||
if (flag && isAcceptableNeighbour(worldserver, blockposition3, enumdirection1)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
|
||||
} else if (flag1 && isAcceptableNeighbour(worldserver, blockposition4, enumdirection2)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
|
||||
} else {
|
||||
EnumDirection enumdirection3 = enumdirection.getOpposite();
|
||||
|
||||
if (flag && worldserver.isEmptyBlock(blockposition3) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection1), enumdirection3)) {
|
||||
- worldserver.setBlock(blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
} else if (flag1 && worldserver.isEmptyBlock(blockposition4) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection2), enumdirection3)) {
|
||||
- worldserver.setBlock(blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
} else if ((double) randomsource.nextFloat() < 0.05D && isAcceptableNeighbour(worldserver, blockposition2.above(), EnumDirection.UP)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
|
||||
if (flag && worldserver.isEmptyBlock(blockposition3) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection1), enumdirection3)) {
|
||||
- worldserver.setBlock(blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
} else if (flag1 && worldserver.isEmptyBlock(blockposition4) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection2), enumdirection3)) {
|
||||
- worldserver.setBlock(blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
|
||||
} else if ((double) randomsource.nextFloat() < 0.05D && isAcceptableNeighbour(worldserver, blockposition2.above(), EnumDirection.UP)) {
|
||||
- worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else if (isAcceptableNeighbour(worldserver, blockposition2, enumdirection)) {
|
||||
worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2);
|
||||
@@ -239,7 +245,7 @@
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else if (isAcceptableNeighbour(worldserver, blockposition2, enumdirection)) {
|
||||
worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2);
|
||||
@@ -237,7 +243,7 @@
|
||||
}
|
||||
|
||||
if (this.hasHorizontalConnection(iblockdata2)) {
|
||||
- worldserver.setBlock(blockposition1, iblockdata2, 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, iblockdata2, 2); // CraftBukkit
|
||||
}
|
||||
if (this.hasHorizontalConnection(iblockdata2)) {
|
||||
- worldserver.setBlock(blockposition1, iblockdata2, 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, iblockdata2, 2); // CraftBukkit
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -252,7 +258,7 @@
|
||||
IBlockData iblockdata4 = this.copyRandomFaces(iblockdata, iblockdata3, randomsource);
|
||||
return;
|
||||
@@ -254,7 +260,7 @@
|
||||
IBlockData iblockdata4 = this.copyRandomFaces(iblockdata, iblockdata3, randomsource);
|
||||
|
||||
if (iblockdata3 != iblockdata4 && this.hasHorizontalConnection(iblockdata4)) {
|
||||
- worldserver.setBlock(blockposition2, iblockdata4, 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata4, 2); // CraftBukkit
|
||||
if (iblockdata3 != iblockdata4 && this.hasHorizontalConnection(iblockdata4)) {
|
||||
- worldserver.setBlock(blockposition2, iblockdata4, 2);
|
||||
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata4, 2); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/world/level/block/BlockWitherRose.java
|
||||
+++ b/net/minecraft/world/level/block/BlockWitherRose.java
|
||||
@@ -51,7 +51,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
EntityLiving entityliving = (EntityLiving) entity;
|
||||
|
||||
if (!entityliving.isInvulnerableTo(DamageSource.WITHER)) {
|
||||
if (!entityliving.isInvulnerableTo(world.damageSources().wither())) {
|
||||
- entityliving.addEffect(new MobEffect(MobEffects.WITHER, 40));
|
||||
+ entityliving.addEffect(new MobEffect(MobEffects.WITHER, 40), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WITHER_ROSE); // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/level/block/CaveVines.java
|
||||
+++ b/net/minecraft/world/level/block/CaveVines.java
|
||||
@@ -15,14 +15,39 @@
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
|
||||
@@ -18,6 +18,14 @@
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -15,10 +15,9 @@
|
||||
public interface CaveVines {
|
||||
|
||||
VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
|
||||
BlockStateBoolean BERRIES = BlockProperties.BERRIES;
|
||||
@@ -25,7 +33,24 @@
|
||||
|
||||
- static EnumInteractionResult use(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
+ static EnumInteractionResult use(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
static EnumInteractionResult use(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
if ((Boolean) iblockdata.getValue(CaveVines.BERRIES)) {
|
||||
- Block.popResource(world, blockposition, new ItemStack(Items.GLOW_BERRIES, 1));
|
||||
+ // CraftBukkit start
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/CaveVinesBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CaveVinesBlock.java
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
@Override
|
||||
public EnumInteractionResult use(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
|
||||
- return CaveVines.use(iblockdata, world, blockposition);
|
||||
+ return CaveVines.use(iblockdata, world, blockposition, entityhuman); // CraftBukkit
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/CaveVinesPlantBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CaveVinesPlantBlock.java
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
@Override
|
||||
public EnumInteractionResult use(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
|
||||
- return CaveVines.use(iblockdata, world, blockposition);
|
||||
+ return CaveVines.use(iblockdata, world, blockposition, entityhuman); // CraftBukkit
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +29,7 @@
|
||||
public void fallOn(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, float f) {
|
||||
if (iblockdata.getValue(PointedDripstoneBlock.TIP_DIRECTION) == EnumDirection.UP && iblockdata.getValue(PointedDripstoneBlock.THICKNESS) == DripstoneThickness.TIP) {
|
||||
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
|
||||
entity.causeFallDamage(f + 2.0F, 2.0F, DamageSource.STALAGMITE);
|
||||
entity.causeFallDamage(f + 2.0F, 2.0F, world.damageSources().stalagmite());
|
||||
+ CraftEventFactory.blockDamage = null; // CraftBukkit
|
||||
} else {
|
||||
super.fallOn(world, iblockdata, blockposition, entity, f);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
@@ -24,6 +24,20 @@
|
||||
@@ -25,6 +25,20 @@
|
||||
import net.minecraft.world.level.block.BlockBrewingStand;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
public class TileEntityBrewingStand extends TileEntityContainer implements IWorldInventory {
|
||||
|
||||
private static final int INGREDIENT_SLOT = 3;
|
||||
@@ -41,6 +55,36 @@
|
||||
@@ -42,6 +56,36 @@
|
||||
private Item ingredient;
|
||||
public int fuel;
|
||||
protected final IContainerProperties dataAccess;
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
public TileEntityBrewingStand(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.BREWING_STAND, blockposition, iblockdata);
|
||||
@@ -108,8 +152,19 @@
|
||||
@@ -109,8 +153,19 @@
|
||||
ItemStack itemstack = (ItemStack) tileentitybrewingstand.items.get(4);
|
||||
|
||||
if (tileentitybrewingstand.fuel <= 0 && itemstack.is(Items.BLAZE_POWDER)) {
|
||||
@@ -80,7 +80,7 @@
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
}
|
||||
|
||||
@@ -117,12 +172,17 @@
|
||||
@@ -118,12 +173,17 @@
|
||||
boolean flag1 = tileentitybrewingstand.brewTime > 0;
|
||||
ItemStack itemstack1 = (ItemStack) tileentitybrewingstand.items.get(3);
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
} else if (!flag || !itemstack1.is(tileentitybrewingstand.ingredient)) {
|
||||
tileentitybrewingstand.brewTime = 0;
|
||||
@@ -130,7 +190,11 @@
|
||||
@@ -131,7 +191,11 @@
|
||||
}
|
||||
} else if (flag && tileentitybrewingstand.fuel > 0) {
|
||||
--tileentitybrewingstand.fuel;
|
||||
@@ -114,7 +114,7 @@
|
||||
tileentitybrewingstand.ingredient = itemstack1.getItem();
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
}
|
||||
@@ -186,11 +250,33 @@
|
||||
@@ -187,11 +251,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
@@ -28,6 +28,11 @@
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityConduit extends TileEntity {
|
||||
|
||||
private static final int BLOCK_REFRESH_RATE = 2;
|
||||
@@ -202,7 +207,7 @@
|
||||
@@ -201,7 +206,7 @@
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
if (blockposition.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
|
||||
@@ -21,15 +21,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,8 +236,13 @@
|
||||
@@ -230,8 +235,13 @@
|
||||
}
|
||||
|
||||
if (tileentityconduit.destroyTarget != null) {
|
||||
- world.playSound((EntityHuman) null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
- tileentityconduit.destroyTarget.hurt(DamageSource.MAGIC, 4.0F);
|
||||
- tileentityconduit.destroyTarget.hurt(world.damageSources().magic(), 4.0F);
|
||||
+ // CraftBukkit start
|
||||
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition);
|
||||
+ if (tileentityconduit.destroyTarget.hurt(DamageSource.MAGIC, 4.0F)) {
|
||||
+ if (tileentityconduit.destroyTarget.hurt(world.damageSources().magic(), 4.0F)) {
|
||||
+ world.playSound((EntityHuman) null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ CraftEventFactory.blockDamage = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
@@ -46,6 +46,20 @@
|
||||
@@ -47,6 +47,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;
|
||||
@@ -114,7 +128,7 @@
|
||||
@@ -115,7 +129,7 @@
|
||||
}
|
||||
};
|
||||
this.recipesUsed = new Object2IntOpenHashMap();
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
public static Map<Item, Integer> getFuel() {
|
||||
@@ -182,6 +196,40 @@
|
||||
@@ -183,6 +197,40 @@
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
private static boolean isNeverAFurnaceFuel(Item item) {
|
||||
return item.builtInRegistryHolder().is(TagsItem.NON_FLAMMABLE_WOOD);
|
||||
}
|
||||
@@ -270,7 +318,7 @@
|
||||
@@ -271,7 +319,7 @@
|
||||
IRecipe irecipe;
|
||||
|
||||
if (flag2) {
|
||||
@@ -80,10 +80,10 @@
|
||||
} else {
|
||||
irecipe = null;
|
||||
}
|
||||
@@ -278,9 +326,20 @@
|
||||
@@ -279,9 +327,20 @@
|
||||
int i = tileentityfurnace.getMaxStackSize();
|
||||
|
||||
if (!tileentityfurnace.isLit() && canBurn(irecipe, tileentityfurnace.items, i)) {
|
||||
if (!tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
- tileentityfurnace.litTime = tileentityfurnace.getBurnDuration(itemstack);
|
||||
+ // CraftBukkit start
|
||||
+ CraftItemStack fuel = CraftItemStack.asCraftMirror(itemstack);
|
||||
@@ -103,10 +103,10 @@
|
||||
flag1 = true;
|
||||
if (flag3) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -296,11 +355,23 @@
|
||||
@@ -297,11 +356,23 @@
|
||||
}
|
||||
|
||||
if (tileentityfurnace.isLit() && canBurn(irecipe, tileentityfurnace.items, i)) {
|
||||
if (tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (irecipe != null && tileentityfurnace.cookingProgress == 0) {
|
||||
+ CraftItemStack source = CraftItemStack.asCraftMirror(tileentityfurnace.items.get(0));
|
||||
@@ -123,20 +123,20 @@
|
||||
if (tileentityfurnace.cookingProgress == tileentityfurnace.cookingTotalTime) {
|
||||
tileentityfurnace.cookingProgress = 0;
|
||||
tileentityfurnace.cookingTotalTime = getTotalCookTime(world, tileentityfurnace);
|
||||
- if (burn(irecipe, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, irecipe, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
- if (burn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, world.registryAccess(), irecipe, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
tileentityfurnace.setRecipeUsed(irecipe);
|
||||
}
|
||||
|
||||
@@ -339,17 +410,44 @@
|
||||
@@ -340,17 +411,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static boolean burn(@Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) {
|
||||
+ private static boolean burn(World world, BlockPosition blockposition, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
|
||||
if (irecipe != null && canBurn(irecipe, nonnulllist, i)) {
|
||||
- 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)) {
|
||||
ItemStack itemstack = (ItemStack) nonnulllist.get(0);
|
||||
ItemStack itemstack1 = irecipe.getResultItem();
|
||||
ItemStack itemstack1 = irecipe.getResultItem(iregistrycustom);
|
||||
ItemStack itemstack2 = (ItemStack) nonnulllist.get(2);
|
||||
|
||||
+ // CraftBukkit start - fire FurnaceSmeltEvent
|
||||
@@ -174,7 +174,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));
|
||||
@@ -373,7 +471,7 @@
|
||||
@@ -374,7 +472,7 @@
|
||||
}
|
||||
|
||||
private static int getTotalCookTime(World world, TileEntityFurnace tileentityfurnace) {
|
||||
@@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
public static boolean isFuel(ItemStack itemstack) {
|
||||
@@ -492,14 +590,20 @@
|
||||
@@ -493,14 +591,20 @@
|
||||
@Override
|
||||
public void awardUsedRecipes(EntityHuman entityhuman) {}
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
List<IRecipe<?>> list = Lists.newArrayList();
|
||||
ObjectIterator objectiterator = this.recipesUsed.object2IntEntrySet().iterator();
|
||||
|
||||
@@ -508,14 +612,14 @@
|
||||
@@ -509,14 +613,14 @@
|
||||
|
||||
worldserver.getRecipeManager().byKey((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
|
||||
list.add(irecipe);
|
||||
@@ -223,7 +223,7 @@
|
||||
int j = MathHelper.floor((float) i * f);
|
||||
float f1 = MathHelper.frac((float) i * f);
|
||||
|
||||
@@ -523,6 +627,17 @@
|
||||
@@ -524,6 +628,17 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
|
||||
if (itemstack1.isEmpty()) {
|
||||
iinventory1.setChanged();
|
||||
@@ -226,7 +294,36 @@
|
||||
@@ -226,7 +294,34 @@
|
||||
|
||||
if (!itemstack.isEmpty() && canTakeItemFromContainer(iinventory, itemstack, i, enumdirection)) {
|
||||
if (!itemstack.isEmpty() && canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) {
|
||||
ItemStack itemstack1 = itemstack.copy();
|
||||
- ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.removeItem(i, 1), (EnumDirection) null);
|
||||
+ // ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.removeItem(i, 1), (EnumDirection) null);
|
||||
@@ -136,8 +136,6 @@
|
||||
+
|
||||
+ if (ihopper instanceof TileEntityHopper) {
|
||||
+ ((TileEntityHopper) ihopper).setCooldown(8); // Delay hopper checks
|
||||
+ } else if (ihopper instanceof EntityMinecartHopper) {
|
||||
+ ((EntityMinecartHopper) ihopper).setCooldown(4); // Delay hopper minecart checks
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
@@ -147,7 +145,7 @@
|
||||
|
||||
if (itemstack2.isEmpty()) {
|
||||
iinventory.setChanged();
|
||||
@@ -241,6 +338,13 @@
|
||||
@@ -241,6 +336,13 @@
|
||||
|
||||
public static boolean addItem(IInventory iinventory, EntityItem entityitem) {
|
||||
boolean flag = false;
|
||||
@@ -161,7 +159,7 @@
|
||||
ItemStack itemstack = entityitem.getItem().copy();
|
||||
ItemStack itemstack1 = addItem((IInventory) null, iinventory, itemstack, (EnumDirection) null);
|
||||
|
||||
@@ -327,16 +431,40 @@
|
||||
@@ -366,16 +468,40 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -196,7 +194,7 @@
|
||||
+ // CraftBukkit start
|
||||
+ IInventory inventory = getContainerAt(world, ihopper.getLevelX(), ihopper.getLevelY() + 1.0D, ihopper.getLevelZ());
|
||||
+
|
||||
+ BlockPosition blockPosition = new BlockPosition(ihopper.getLevelX(), ihopper.getLevelY(), ihopper.getLevelZ());
|
||||
+ BlockPosition blockPosition = BlockPosition.containing(ihopper.getLevelX(), ihopper.getLevelY(), ihopper.getLevelZ());
|
||||
+ CraftBlock hopper = CraftBlock.at(world, blockPosition);
|
||||
+ CraftBlock container = CraftBlock.at(world, blockPosition.above());
|
||||
+ return runHopperInventorySearchEvent(inventory, hopper, container, HopperInventorySearchEvent.ContainerType.SOURCE);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
@@ -24,13 +24,71 @@
|
||||
@@ -25,13 +25,71 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
return 1;
|
||||
@@ -75,11 +133,20 @@
|
||||
@@ -76,11 +134,20 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,7 +84,7 @@
|
||||
+ if (i == 0) {
|
||||
+ TileEntityLectern.this.setBook(itemstack);
|
||||
+ if (TileEntityLectern.this.getLevel() != null) {
|
||||
+ BlockLectern.resetBookState(TileEntityLectern.this.getLevel(), TileEntityLectern.this.getBlockPos(), TileEntityLectern.this.getBlockState(), TileEntityLectern.this.hasBook());
|
||||
+ BlockLectern.resetBookState(null, TileEntityLectern.this.getLevel(), TileEntityLectern.this.getBlockPos(), TileEntityLectern.this.getBlockState(), TileEntityLectern.this.hasBook());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +226,7 @@
|
||||
@@ -160,7 +227,7 @@
|
||||
if (j != this.page) {
|
||||
this.page = j;
|
||||
this.setChanged();
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -182,6 +249,32 @@
|
||||
@@ -183,6 +250,32 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
private CommandListenerWrapper createCommandSourceStack(@Nullable EntityHuman entityhuman) {
|
||||
String s;
|
||||
Object object;
|
||||
@@ -196,7 +289,8 @@
|
||||
@@ -197,7 +290,8 @@
|
||||
|
||||
Vec3D vec3d = Vec3D.atCenterOf(this.worldPosition);
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -234,7 +328,7 @@
|
||||
@@ -235,7 +329,7 @@
|
||||
|
||||
@Override
|
||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
@@ -33,7 +33,7 @@
|
||||
@Nullable
|
||||
public GameProfile owner;
|
||||
@Nullable
|
||||
- private MinecraftKey noteBlockSound;
|
||||
+ public MinecraftKey noteBlockSound; // PAIL private->public
|
||||
private int animationTickCount;
|
||||
private boolean isAnimating;
|
||||
|
||||
@@ -148,9 +148,12 @@
|
||||
gameprofile1 = TileEntitySkull.sessionService.fillProfileProperties(gameprofile1, true);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - decompile error
|
||||
+ final GameProfile finalgameprofile1 = gameprofile1;
|
||||
TileEntitySkull.mainThreadExecutor.execute(() -> {
|
||||
- TileEntitySkull.profileCache.add(gameprofile1);
|
||||
- consumer.accept(gameprofile1);
|
||||
+ TileEntitySkull.profileCache.add(finalgameprofile1);
|
||||
+ consumer.accept(finalgameprofile1);
|
||||
+ // CraftBukkit end
|
||||
});
|
||||
}, () -> {
|
||||
TileEntitySkull.mainThreadExecutor.execute(() -> {
|
||||
@@ -27,7 +27,7 @@
|
||||
WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured = (WorldGenFeatureConfigured) holder.value();
|
||||
IBlockData iblockdata1 = worldserver.getFluidState(blockposition).createLegacyBlock();
|
||||
|
||||
@@ -65,4 +72,53 @@
|
||||
@@ -65,4 +72,55 @@
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -75,6 +75,8 @@
|
||||
+ BlockSapling.treeType = TreeType.MANGROVE;
|
||||
+ } else if (worldgentreeabstract == TreeFeatures.TALL_MANGROVE) {
|
||||
+ BlockSapling.treeType = TreeType.TALL_MANGROVE;
|
||||
+ } else if (worldgentreeabstract == TreeFeatures.CHERRY || worldgentreeabstract == TreeFeatures.CHERRY_BEES_005) {
|
||||
+ BlockSapling.treeType = TreeType.CHERRY;
|
||||
+ } else {
|
||||
+ throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract);
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user