@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/AbstractCandleBlock.java
|
||||
+++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
|
||||
@@ -38,6 +38,11 @@
|
||||
@@ -37,6 +37,11 @@
|
||||
@Override
|
||||
public void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
|
||||
if (!world.isClientSide && iprojectile.isOnFire() && this.canBeLit(iblockdata)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
@@ -42,6 +42,11 @@
|
||||
@@ -41,6 +41,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class BigDripleafBlock extends BlockFacingHorizontal implements IBlockFragilePlantElement, IBlockWaterlogged {
|
||||
|
||||
private static final BlockStateBoolean WATERLOGGED = BlockProperties.WATERLOGGED;
|
||||
@@ -110,7 +115,7 @@
|
||||
@@ -109,7 +114,7 @@
|
||||
|
||||
@Override
|
||||
public void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,7 +174,20 @@
|
||||
@@ -168,7 +173,20 @@
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (!world.isClientSide) {
|
||||
if (iblockdata.getValue(BigDripleafBlock.TILT) == Tilt.NONE && canEntityTilt(blockposition, entity) && !world.hasNeighborSignal(blockposition)) {
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,9 +201,9 @@
|
||||
@@ -182,9 +200,9 @@
|
||||
Tilt tilt = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
|
||||
|
||||
if (tilt == Tilt.UNSTABLE) {
|
||||
@@ -55,7 +55,7 @@
|
||||
} else if (tilt == Tilt.FULL) {
|
||||
resetTilt(iblockdata, worldserver, blockposition);
|
||||
}
|
||||
@@ -211,8 +229,10 @@
|
||||
@@ -210,8 +228,10 @@
|
||||
return entity.isOnGround() && entity.position().y > (double) ((float) blockposition.getY() + 0.6875F);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if (soundeffect != null) {
|
||||
playTiltSound(world, blockposition, soundeffect);
|
||||
}
|
||||
@@ -226,19 +246,27 @@
|
||||
@@ -225,19 +245,27 @@
|
||||
}
|
||||
|
||||
private static void resetTilt(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/Block.java
|
||||
+++ b/net/minecraft/world/level/block/Block.java
|
||||
@@ -352,7 +352,13 @@
|
||||
@@ -354,7 +354,13 @@
|
||||
EntityItem entityitem = (EntityItem) supplier.get();
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
@@ -15,7 +15,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,7 +384,7 @@
|
||||
@@ -380,7 +386,7 @@
|
||||
|
||||
public void playerDestroy(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, ItemStack itemstack) {
|
||||
entityhuman.awardStat(StatisticList.BLOCK_MINED.get(this));
|
||||
@@ -24,8 +24,8 @@
|
||||
dropResources(iblockdata, world, blockposition, tileentity, entityhuman, itemstack);
|
||||
}
|
||||
|
||||
@@ -512,6 +518,12 @@
|
||||
return (ImmutableMap) this.stateDefinition.getPossibleStates().stream().collect(ImmutableMap.toImmutableMap(Function.identity(), function));
|
||||
@@ -520,6 +526,12 @@
|
||||
return this.builtInRegistryHolder;
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockBamboo.java
|
||||
+++ b/net/minecraft/world/level/block/BlockBamboo.java
|
||||
@@ -186,7 +186,7 @@
|
||||
@@ -185,7 +185,7 @@
|
||||
BlockPosition blockposition1 = blockposition.above(i);
|
||||
IBlockData iblockdata1 = worldserver.getBlockState(blockposition1);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,14 +207,18 @@
|
||||
@@ -206,14 +206,18 @@
|
||||
BlockPosition blockposition1 = blockposition.below(2);
|
||||
IBlockData iblockdata2 = world.getBlockState(blockposition1);
|
||||
BlockPropertyBambooSize blockpropertybamboosize = BlockPropertyBambooSize.NONE;
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -225,7 +229,14 @@
|
||||
@@ -224,7 +228,14 @@
|
||||
int j = (Integer) iblockdata.getValue(BlockBamboo.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
|
||||
int k = (i < 11 || random.nextFloat() >= 0.25F) && i != 15 ? 0 : 1;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockBambooSapling.java
|
||||
+++ b/net/minecraft/world/level/block/BlockBambooSapling.java
|
||||
@@ -94,6 +94,6 @@
|
||||
@@ -93,6 +93,6 @@
|
||||
}
|
||||
|
||||
protected void growBamboo(World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockBeehive.java
|
||||
+++ b/net/minecraft/world/level/block/BlockBeehive.java
|
||||
@@ -108,7 +108,7 @@
|
||||
@@ -105,7 +105,7 @@
|
||||
EntityBee entitybee = (EntityBee) iterator.next();
|
||||
|
||||
if (entitybee.getTarget() == null) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCactus.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCactus.java
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -22,6 +22,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;
|
||||
@@ -59,7 +61,7 @@
|
||||
@@ -58,7 +60,7 @@
|
||||
int j = (Integer) iblockdata.getValue(BlockCactus.AGE);
|
||||
|
||||
if (j == 15) {
|
||||
@@ -18,7 +18,7 @@
|
||||
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockCactus.AGE, 0);
|
||||
|
||||
worldserver.setBlock(blockposition, iblockdata1, 4);
|
||||
@@ -116,7 +118,9 @@
|
||||
@@ -115,7 +117,9 @@
|
||||
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCake.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCake.java
|
||||
@@ -85,7 +85,18 @@
|
||||
@@ -84,7 +84,18 @@
|
||||
return EnumInteractionResult.PASS;
|
||||
} else {
|
||||
entityhuman.awardStat(StatisticList.EAT_CAKE_SLICE);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCampfire.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCampfire.java
|
||||
@@ -48,6 +48,10 @@
|
||||
@@ -47,6 +47,10 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
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);
|
||||
@@ -92,7 +96,9 @@
|
||||
@@ -91,7 +95,9 @@
|
||||
@Override
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (!entity.fireImmune() && (Boolean) iblockdata.getValue(BlockCampfire.LIT) && entity instanceof EntityLiving && !EnchantmentManager.hasFrostWalker((EntityLiving) entity)) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
super.entityInside(iblockdata, world, blockposition, entity);
|
||||
@@ -202,6 +208,11 @@
|
||||
@@ -201,6 +207,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/BlockCocoa.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCocoa.java
|
||||
@@ -21,6 +21,8 @@
|
||||
@@ -20,6 +20,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
||||
|
||||
public static final int MAX_AGE = 2;
|
||||
@@ -55,7 +57,7 @@
|
||||
@@ -54,7 +56,7 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockCocoa.AGE);
|
||||
|
||||
if (i < 2) {
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +127,7 @@
|
||||
@@ -124,7 +126,7 @@
|
||||
|
||||
@Override
|
||||
public void performBonemeal(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCommand.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCommand.java
|
||||
@@ -27,6 +27,8 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
||||
+
|
||||
public class BlockCommand extends BlockTileEntity implements GameMasterBlock {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -57,6 +59,15 @@
|
||||
TileEntityCommand tileentitycommand = (TileEntityCommand) tileentity;
|
||||
boolean flag1 = world.hasNeighborSignal(blockposition);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockConcretePowder.java
|
||||
+++ b/net/minecraft/world/level/block/BlockConcretePowder.java
|
||||
@@ -12,6 +12,12 @@
|
||||
@@ -11,6 +11,12 @@
|
||||
import net.minecraft.world.level.block.state.BlockBase;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class BlockConcretePowder extends BlockFalling {
|
||||
|
||||
private final IBlockData concrete;
|
||||
@@ -24,7 +30,7 @@
|
||||
@@ -23,7 +29,7 @@
|
||||
@Override
|
||||
public void onLand(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, EntityFallingBlock entityfallingblock) {
|
||||
if (shouldSolidify(world, blockposition, iblockdata1)) {
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,7 +41,24 @@
|
||||
@@ -34,7 +40,24 @@
|
||||
BlockPosition blockposition = blockactioncontext.getClickedPos();
|
||||
IBlockData iblockdata = world.getBlockState(blockposition);
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
private static boolean shouldSolidify(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
@@ -71,7 +94,25 @@
|
||||
@@ -70,7 +93,25 @@
|
||||
|
||||
@Override
|
||||
public IBlockData updateShape(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCoral.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCoral.java
|
||||
@@ -26,6 +26,11 @@
|
||||
@@ -25,6 +25,11 @@
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (!this.scanForWater(worldserver, blockposition)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
|
||||
+++ b/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
|
||||
@@ -41,6 +41,11 @@
|
||||
@@ -40,6 +40,11 @@
|
||||
@Override
|
||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (!canBeGrass(iblockdata, worldserver, blockposition)) {
|
||||
@@ -12,7 +12,7 @@
|
||||
worldserver.setBlockAndUpdate(blockposition, Blocks.DIRT.defaultBlockState());
|
||||
} else {
|
||||
if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9) {
|
||||
@@ -50,7 +55,7 @@
|
||||
@@ -49,7 +54,7 @@
|
||||
BlockPosition blockposition1 = blockposition.offset(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
|
||||
if (worldserver.getBlockState(blockposition1).is(Blocks.DIRT) && canPropagate(iblockdata1, worldserver, blockposition1)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
@@ -129,6 +129,17 @@
|
||||
@@ -128,6 +128,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,7 +1,7 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFluids.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFluids.java
|
||||
@@ -141,14 +141,20 @@
|
||||
if (world.getFluidState(blockposition1).is((Tag) TagsFluid.WATER)) {
|
||||
@@ -140,14 +140,20 @@
|
||||
if (world.getFluidState(blockposition1).is(TagsFluid.WATER)) {
|
||||
Block block = world.getFluidState(blockposition).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
|
||||
|
||||
- world.setBlockAndUpdate(blockposition, block.defaultBlockState());
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
+ BlockSapling.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
((WorldGenFeatureConfigured) this.feature.get()).place(worldserver, worldserver.getChunkSource().getGenerator(), random, blockposition);
|
||||
((WorldGenFeatureConfigured) ((Holder) this.feature.get()).value()).place(worldserver, worldserver.getChunkSource().getGenerator(), random, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockLeaves.java
|
||||
+++ b/net/minecraft/world/level/block/BlockLeaves.java
|
||||
@@ -20,6 +20,8 @@
|
||||
@@ -19,6 +19,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockLeaves extends Block {
|
||||
|
||||
public static final int DECAY_DISTANCE = 7;
|
||||
@@ -45,6 +47,14 @@
|
||||
@@ -44,6 +46,14 @@
|
||||
@Override
|
||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (!(Boolean) iblockdata.getValue(BlockLeaves.PERSISTENT) && (Integer) iblockdata.getValue(BlockLeaves.DISTANCE) == 7) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockLectern.java
|
||||
+++ b/net/minecraft/world/level/block/BlockLectern.java
|
||||
@@ -198,12 +198,13 @@
|
||||
@@ -197,12 +197,13 @@
|
||||
}
|
||||
|
||||
private void popBook(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockMagma.java
|
||||
+++ b/net/minecraft/world/level/block/BlockMagma.java
|
||||
@@ -30,7 +30,9 @@
|
||||
@@ -29,7 +29,9 @@
|
||||
@Override
|
||||
public void stepOn(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
|
||||
if (!entity.fireImmune() && entity instanceof EntityLiving && !EnchantmentManager.hasFrostWalker((EntityLiving) entity)) {
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
public boolean growMushroom(WorldServer worldserver, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
||||
worldserver.removeBlock(blockposition, false);
|
||||
+ BlockSapling.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit
|
||||
if (((WorldGenFeatureConfigured) this.featureSupplier.get()).place(worldserver, worldserver.getChunkSource().getGenerator(), random, blockposition)) {
|
||||
if (((WorldGenFeatureConfigured) ((Holder) this.featureSupplier.get()).value()).place(worldserver, worldserver.getChunkSource().getGenerator(), random, blockposition)) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockNylium.java
|
||||
+++ b/net/minecraft/world/level/block/BlockNylium.java
|
||||
@@ -30,6 +30,11 @@
|
||||
@@ -31,6 +31,11 @@
|
||||
@Override
|
||||
public void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
if (!canBeNylium(iblockdata, worldserver, blockposition)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockPlant.java
|
||||
+++ b/net/minecraft/world/level/block/BlockPlant.java
|
||||
@@ -23,7 +23,14 @@
|
||||
@@ -22,7 +22,14 @@
|
||||
|
||||
@Override
|
||||
public IBlockData updateShape(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockReed.java
|
||||
+++ b/net/minecraft/world/level/block/BlockReed.java
|
||||
@@ -57,7 +57,7 @@
|
||||
@@ -56,7 +56,7 @@
|
||||
int j = (Integer) iblockdata.getValue(BlockReed.AGE);
|
||||
|
||||
if (j == 15) {
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
- if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7) {
|
||||
+ if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit - BlockFadeEvent
|
||||
if ((Integer) iblockdata.getValue(BlockScaffolding.DISTANCE) == 7) {
|
||||
worldserver.addFreshEntity(new EntityFallingBlock(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.setValue(BlockScaffolding.WATERLOGGED, false)));
|
||||
EntityFallingBlock.fall(worldserver, blockposition, iblockdata1);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSoil.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSoil.java
|
||||
@@ -26,6 +26,11 @@
|
||||
@@ -25,6 +25,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class BlockSoil extends Block {
|
||||
|
||||
public static final BlockStateInteger MOISTURE = BlockProperties.MOISTURE;
|
||||
@@ -82,26 +87,49 @@
|
||||
@@ -81,26 +86,49 @@
|
||||
|
||||
if (!isNearWater(worldserver, blockposition) && !worldserver.isRainingAt(blockposition.above())) {
|
||||
if (i > 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSponge.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSponge.java
|
||||
@@ -14,6 +14,13 @@
|
||||
@@ -13,6 +13,13 @@
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
public class BlockSponge extends Block {
|
||||
|
||||
public static final int MAX_DEPTH = 6;
|
||||
@@ -49,6 +56,7 @@
|
||||
@@ -48,6 +55,7 @@
|
||||
|
||||
queue.add(new Tuple<>(blockposition, 0));
|
||||
int i = 0;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
while (!queue.isEmpty()) {
|
||||
Tuple<BlockPosition, Integer> tuple = (Tuple) queue.poll();
|
||||
@@ -60,27 +68,31 @@
|
||||
@@ -59,27 +67,31 @@
|
||||
for (int l = 0; l < k; ++l) {
|
||||
EnumDirection enumdirection = aenumdirection[l];
|
||||
BlockPosition blockposition2 = blockposition1.relative(enumdirection);
|
||||
@@ -34,7 +34,7 @@
|
||||
+ // CraftBukkit end
|
||||
Material material = iblockdata.getMaterial();
|
||||
|
||||
if (fluid.is((Tag) TagsFluid.WATER)) {
|
||||
if (fluid.is(TagsFluid.WATER)) {
|
||||
- if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).pickupBlock(world, blockposition2, iblockdata).isEmpty()) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).pickupBlock(blockList, blockposition2, iblockdata).isEmpty()) { // CraftBukkit
|
||||
++i;
|
||||
@@ -61,7 +61,7 @@
|
||||
++i;
|
||||
if (j < 6) {
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
@@ -93,6 +105,39 @@
|
||||
@@ -92,6 +104,39 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockStem.java
|
||||
+++ b/net/minecraft/world/level/block/BlockStem.java
|
||||
@@ -21,6 +21,8 @@
|
||||
@@ -20,6 +20,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
||||
public static final int MAX_AGE = 7;
|
||||
@@ -57,14 +59,18 @@
|
||||
@@ -56,14 +58,18 @@
|
||||
|
||||
if (i < 7) {
|
||||
iblockdata = (IBlockData) iblockdata.setValue(BlockStem.AGE, i + 1);
|
||||
@@ -20,7 +20,7 @@
|
||||
BlockPosition blockposition1 = blockposition.relative(enumdirection);
|
||||
IBlockData iblockdata1 = worldserver.getBlockState(blockposition1.below());
|
||||
|
||||
if (worldserver.getBlockState(blockposition1).isAir() && (iblockdata1.is(Blocks.FARMLAND) || iblockdata1.is((Tag) TagsBlock.DIRT))) {
|
||||
if (worldserver.getBlockState(blockposition1).isAir() && (iblockdata1.is(Blocks.FARMLAND) || iblockdata1.is(TagsBlock.DIRT))) {
|
||||
- worldserver.setBlockAndUpdate(blockposition1, this.fruit.defaultBlockState());
|
||||
+ // CraftBukkit start
|
||||
+ if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.fruit.defaultBlockState())) {
|
||||
@@ -30,7 +30,7 @@
|
||||
worldserver.setBlockAndUpdate(blockposition, (IBlockData) this.fruit.getAttachedStem().defaultBlockState().setValue(BlockFacingHorizontal.FACING, enumdirection));
|
||||
}
|
||||
}
|
||||
@@ -93,7 +99,7 @@
|
||||
@@ -92,7 +98,7 @@
|
||||
int i = Math.min(7, (Integer) iblockdata.getValue(BlockStem.AGE) + MathHelper.nextInt(worldserver.random, 2, 5));
|
||||
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockStem.AGE, i);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockTurtleEgg.java
|
||||
+++ b/net/minecraft/world/level/block/BlockTurtleEgg.java
|
||||
@@ -29,6 +29,12 @@
|
||||
@@ -28,6 +28,12 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public class BlockTurtleEgg extends Block {
|
||||
|
||||
public static final int MAX_HATCH_LEVEL = 2;
|
||||
@@ -62,6 +68,19 @@
|
||||
@@ -61,6 +67,19 @@
|
||||
private void destroyEgg(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, int i) {
|
||||
if (this.canDestroyEgg(world, entity)) {
|
||||
if (!world.isClientSide && world.random.nextInt(i) == 0 && iblockdata.is(Blocks.TURTLE_EGG)) {
|
||||
@@ -33,7 +33,7 @@
|
||||
this.decreaseEggs(world, blockposition, iblockdata);
|
||||
}
|
||||
|
||||
@@ -87,9 +106,19 @@
|
||||
@@ -86,9 +105,19 @@
|
||||
int i = (Integer) iblockdata.getValue(BlockTurtleEgg.HATCH);
|
||||
|
||||
if (i < 2) {
|
||||
@@ -54,7 +54,7 @@
|
||||
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
|
||||
worldserver.removeBlock(blockposition, false);
|
||||
|
||||
@@ -100,7 +129,7 @@
|
||||
@@ -99,7 +128,7 @@
|
||||
entityturtle.setAge(-24000);
|
||||
entityturtle.setHomePos(blockposition);
|
||||
entityturtle.moveTo((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockWitherSkull.java
|
||||
+++ b/net/minecraft/world/level/block/BlockWitherSkull.java
|
||||
@@ -27,6 +27,11 @@
|
||||
@@ -26,6 +26,11 @@
|
||||
import net.minecraft.world.level.block.state.predicate.MaterialPredicate;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class BlockWitherSkull extends BlockSkull {
|
||||
|
||||
@Nullable
|
||||
@@ -50,6 +55,7 @@
|
||||
@@ -49,6 +54,7 @@
|
||||
}
|
||||
|
||||
public static void checkSpawn(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) {
|
||||
@@ -20,7 +20,7 @@
|
||||
if (!world.isClientSide) {
|
||||
IBlockData iblockdata = tileentityskull.getBlockState();
|
||||
boolean flag = iblockdata.is(Blocks.WITHER_SKELETON_SKULL) || iblockdata.is(Blocks.WITHER_SKELETON_WALL_SKULL);
|
||||
@@ -59,12 +65,14 @@
|
||||
@@ -58,12 +64,14 @@
|
||||
ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = shapedetector.find(world, blockposition);
|
||||
|
||||
if (shapedetector_shapedetectorcollection != null) {
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +82,15 @@
|
||||
@@ -73,6 +81,15 @@
|
||||
entitywither.moveTo((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getForwards().getAxis() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
|
||||
entitywither.yBodyRot = shapedetector_shapedetectorcollection.getForwards().getAxis() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
|
||||
entitywither.makeInvulnerable();
|
||||
@@ -53,7 +53,7 @@
|
||||
Iterator iterator = world.getEntitiesOfClass(EntityPlayer.class, entitywither.getBoundingBox().inflate(50.0D)).iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -82,7 +99,7 @@
|
||||
@@ -81,7 +98,7 @@
|
||||
CriterionTriggers.SUMMONED_ENTITY.trigger(entityplayer, (Entity) entitywither);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
+++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
@@ -41,6 +41,11 @@
|
||||
@@ -43,6 +43,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class PointedDripstoneBlock extends Block implements Fallable, IBlockWaterlogged {
|
||||
|
||||
public static final BlockStateDirection TIP_DIRECTION = BlockProperties.VERTICAL_DIRECTION;
|
||||
@@ -123,6 +128,11 @@
|
||||
@@ -125,6 +130,11 @@
|
||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPos();
|
||||
|
||||
if (!world.isClientSide && iprojectile.mayInteract(world, blockposition) && iprojectile instanceof EntityThrownTrident && iprojectile.getDeltaMovement().length() > 0.6D) {
|
||||
@@ -24,7 +24,7 @@
|
||||
world.destroyBlock(blockposition, true);
|
||||
}
|
||||
|
||||
@@ -131,7 +141,9 @@
|
||||
@@ -133,7 +143,9 @@
|
||||
@Override
|
||||
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) {
|
||||
@@ -34,7 +34,7 @@
|
||||
} else {
|
||||
super.fallOn(world, iblockdata, blockposition, entity, f);
|
||||
}
|
||||
@@ -405,15 +417,15 @@
|
||||
@@ -380,15 +392,15 @@
|
||||
if (isUnmergedTipWithDirection(iblockdata, enumdirection.getOpposite())) {
|
||||
createMergedTips(iblockdata, worldserver, blockposition1);
|
||||
} else if (iblockdata.isAir() || iblockdata.is(Blocks.WATER)) {
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
|
||||
private static void createMergedTips(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
||||
@@ -428,8 +440,8 @@
|
||||
@@ -403,8 +415,8 @@
|
||||
blockposition1 = blockposition.below();
|
||||
}
|
||||
|
||||
@@ -64,27 +64,30 @@
|
||||
}
|
||||
|
||||
public static void spawnDripParticle(World world, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
@@ -462,7 +474,7 @@
|
||||
@@ -437,7 +449,7 @@
|
||||
|
||||
return (BlockPosition) findBlockVertical(generatoraccess, blockposition, enumdirection.getAxisDirection(), predicate, (iblockdata1) -> {
|
||||
return (BlockPosition) findBlockVertical(generatoraccess, blockposition, enumdirection.getAxisDirection(), bipredicate, (iblockdata1) -> {
|
||||
return isTip(iblockdata1, flag);
|
||||
- }, i).orElse((Object) null);
|
||||
+ }, i).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,12 +587,12 @@
|
||||
return iblockdata.getBlock() instanceof AbstractCauldronBlock && ((AbstractCauldronBlock) iblockdata.getBlock()).canReceiveStalactiteDrip(fluidtype);
|
||||
@@ -553,7 +565,7 @@
|
||||
return canDripThrough(world, blockposition1, iblockdata);
|
||||
};
|
||||
|
||||
- return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), BlockBase.BlockData::isAir, predicate, 11).orElse((Object) null);
|
||||
+ return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), BlockBase.BlockData::isAir, predicate, 11).orElse(null); // CraftBukkit - decompile error
|
||||
- return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse((Object) null);
|
||||
+ return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static BlockPosition findStalactiteTipAboveCauldron(World world, BlockPosition blockposition) {
|
||||
- return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), BlockBase.BlockData::isAir, PointedDripstoneBlock::canDrip, 11).orElse((Object) null);
|
||||
+ return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), BlockBase.BlockData::isAir, PointedDripstoneBlock::canDrip, 11).orElse(null); // CraftBukkit - decompile error
|
||||
@@ -562,7 +574,7 @@
|
||||
return canDripThrough(world, blockposition1, iblockdata);
|
||||
};
|
||||
|
||||
- return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse((Object) null);
|
||||
+ return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
public static FluidType getCauldronFillFluidType(World world, BlockPosition blockposition) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.java
|
||||
+++ b/net/minecraft/world/level/block/grower/WorldGenMegaTreeProvider.java
|
||||
@@ -37,6 +37,7 @@
|
||||
if (worldgenfeatureconfigured == null) {
|
||||
@@ -38,6 +38,7 @@
|
||||
if (holder == null) {
|
||||
return false;
|
||||
} else {
|
||||
+ setTreeType(worldgenfeatureconfigured); // CraftBukkit
|
||||
+ setTreeType(holder); // CraftBukkit
|
||||
WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured = (WorldGenFeatureConfigured) holder.value();
|
||||
IBlockData iblockdata1 = Blocks.AIR.defaultBlockState();
|
||||
|
||||
worldserver.setBlock(blockposition.offset(i, 0, j), iblockdata1, 4);
|
||||
|
||||
@@ -14,20 +14,20 @@
|
||||
|
||||
public WorldGenTreeProvider() {}
|
||||
@@ -26,6 +32,7 @@
|
||||
if (worldgenfeatureconfigured == null) {
|
||||
if (holder == null) {
|
||||
return false;
|
||||
} else {
|
||||
+ setTreeType(worldgenfeatureconfigured); // CraftBukkit
|
||||
+ setTreeType(holder); // CraftBukkit
|
||||
WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured = (WorldGenFeatureConfigured) holder.value();
|
||||
|
||||
worldserver.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 4);
|
||||
if (worldgenfeatureconfigured.place(worldserver, chunkgenerator, random, blockposition)) {
|
||||
return true;
|
||||
@@ -51,4 +58,48 @@
|
||||
@@ -53,4 +60,48 @@
|
||||
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ protected void setTreeType(WorldGenFeatureConfigured<?, ?> worldgentreeabstract) {
|
||||
+ protected void setTreeType(Holder<? extends WorldGenFeatureConfigured<?, ?>> worldgentreeabstract) {
|
||||
+ if (worldgentreeabstract == TreeFeatures.OAK || worldgentreeabstract == TreeFeatures.OAK_BEES_005) {
|
||||
+ BlockSapling.treeType = TreeType.TREE;
|
||||
+ } else if (worldgentreeabstract == TreeFeatures.HUGE_RED_MUSHROOM) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/piston/BlockPiston.java
|
||||
+++ b/net/minecraft/world/level/block/piston/BlockPiston.java
|
||||
@@ -38,6 +38,14 @@
|
||||
@@ -37,6 +37,14 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
public class BlockPiston extends BlockDirectional {
|
||||
|
||||
public static final BlockStateBoolean EXTENDED = BlockProperties.EXTENDED;
|
||||
@@ -138,6 +146,18 @@
|
||||
@@ -137,6 +145,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
world.blockEvent(blockposition, this, b0, enumdirection.get3DDataValue());
|
||||
}
|
||||
|
||||
@@ -316,6 +336,48 @@
|
||||
@@ -315,6 +335,48 @@
|
||||
IBlockData[] aiblockdata = new IBlockData[list.size() + list2.size()];
|
||||
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.getOpposite();
|
||||
int j = 0;
|
||||
|
||||
Reference in New Issue
Block a user