Update to Minecraft 1.15
Dieser Commit ist enthalten in:
Ursprung
656701746a
Commit
de42aa13f3
@ -15,10 +15,10 @@
|
|||||||
Block block1 = worldserver.getType(this.a.down()).getBlock();
|
Block block1 = worldserver.getType(this.a.down()).getBlock();
|
||||||
|
|
||||||
if (block instanceof BlockCrops && ((BlockCrops) block).isRipe(iblockdata) && this.c) {
|
if (block instanceof BlockCrops && ((BlockCrops) block).isRipe(iblockdata) && this.c) {
|
||||||
- worldserver.b(this.a, true);
|
- worldserver.a(this.a, true, entityvillager);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityvillager, this.a, Blocks.AIR.getBlockData()).isCancelled()) {
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityvillager, this.a, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||||
+ worldserver.b(this.a, true);
|
+ worldserver.a(this.a, true, entityvillager);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BehaviorMakeLove.java
|
--- a/net/minecraft/server/BehaviorMakeLove.java
|
||||||
+++ b/net/minecraft/server/BehaviorMakeLove.java
|
+++ b/net/minecraft/server/BehaviorMakeLove.java
|
||||||
@@ -99,6 +99,11 @@
|
@@ -100,6 +100,11 @@
|
||||||
|
|
||||||
private Optional<EntityVillager> a(EntityVillager entityvillager, EntityVillager entityvillager1) {
|
private Optional<EntityVillager> a(EntityVillager entityvillager, EntityVillager entityvillager1) {
|
||||||
EntityVillager entityvillager2 = entityvillager.createChild(entityvillager1);
|
EntityVillager entityvillager2 = entityvillager.createChild(entityvillager1);
|
||||||
@ -12,16 +12,16 @@
|
|||||||
|
|
||||||
if (entityvillager2 == null) {
|
if (entityvillager2 == null) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
@@ -107,7 +112,7 @@
|
@@ -108,7 +113,7 @@
|
||||||
entityvillager1.setAgeRaw(6000);
|
entityvillager1.setAgeRaw(6000);
|
||||||
entityvillager2.setAgeRaw(-24000);
|
entityvillager2.setAgeRaw(-24000);
|
||||||
entityvillager2.setPositionRotation(entityvillager.locX, entityvillager.locY, entityvillager.locZ, 0.0F, 0.0F);
|
entityvillager2.setPositionRotation(entityvillager.locX(), entityvillager.locY(), entityvillager.locZ(), 0.0F, 0.0F);
|
||||||
- entityvillager.world.addEntity(entityvillager2);
|
- entityvillager.world.addEntity(entityvillager2);
|
||||||
+ entityvillager.world.addEntity(entityvillager2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
+ entityvillager.world.addEntity(entityvillager2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
||||||
entityvillager.world.broadcastEntityEffect(entityvillager2, (byte) 12);
|
entityvillager.world.broadcastEntityEffect(entityvillager2, (byte) 12);
|
||||||
return Optional.of(entityvillager2);
|
return Optional.of(entityvillager2);
|
||||||
}
|
}
|
||||||
@@ -116,6 +121,6 @@
|
@@ -117,6 +122,6 @@
|
||||||
private void a(WorldServer worldserver, EntityVillager entityvillager, BlockPosition blockposition) {
|
private void a(WorldServer worldserver, EntityVillager entityvillager, BlockPosition blockposition) {
|
||||||
GlobalPos globalpos = GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition);
|
GlobalPos globalpos = GlobalPos.create(worldserver.getWorldProvider().getDimensionManager(), blockposition);
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
public static void a(EntityLiving entityliving, ItemStack itemstack, EntityLiving entityliving1) {
|
public static void a(EntityLiving entityliving, ItemStack itemstack, EntityLiving entityliving1) {
|
||||||
+ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-4940: no empty loot
|
+ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-4940: no empty loot
|
||||||
double d0 = entityliving.locY - 0.30000001192092896D + (double) entityliving.getHeadHeight();
|
double d0 = entityliving.getHeadY() - 0.30000001192092896D;
|
||||||
EntityItem entityitem = new EntityItem(entityliving.world, entityliving.locX, d0, entityliving.locZ, itemstack);
|
EntityItem entityitem = new EntityItem(entityliving.world, entityliving.locX(), d0, entityliving.locZ(), itemstack);
|
||||||
BlockPosition blockposition = new BlockPosition(entityliving1);
|
BlockPosition blockposition = new BlockPosition(entityliving1);
|
||||||
@@ -66,7 +67,7 @@
|
@@ -66,7 +67,7 @@
|
||||||
|
|
||||||
|
35
nms-patches/BiomeStorage.patch
Normale Datei
35
nms-patches/BiomeStorage.patch
Normale Datei
@ -0,0 +1,35 @@
|
|||||||
|
--- a/net/minecraft/server/BiomeStorage.java
|
||||||
|
+++ b/net/minecraft/server/BiomeStorage.java
|
||||||
|
@@ -77,7 +77,7 @@
|
||||||
|
int[] aint = new int[this.f.length];
|
||||||
|
|
||||||
|
for (int i = 0; i < this.f.length; ++i) {
|
||||||
|
- aint[i] = IRegistry.BIOME.a((Object) this.f[i]);
|
||||||
|
+ aint[i] = IRegistry.BIOME.a(this.f[i]); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
return aint;
|
||||||
|
@@ -90,7 +90,7 @@
|
||||||
|
for (int j = 0; j < i; ++j) {
|
||||||
|
BiomeBase biomebase = abiomebase[j];
|
||||||
|
|
||||||
|
- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) biomebase));
|
||||||
|
+ packetdataserializer.writeInt(IRegistry.BIOME.a(biomebase)); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@@ -107,4 +107,14 @@
|
||||||
|
|
||||||
|
return this.f[i1 << BiomeStorage.d + BiomeStorage.d | j1 << BiomeStorage.d | l];
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ public void setBiome(int i, int j, int k, BiomeBase biome) {
|
||||||
|
+ int l = i & BiomeStorage.b;
|
||||||
|
+ int i1 = MathHelper.clamp(j, 0, BiomeStorage.c);
|
||||||
|
+ int j1 = k & BiomeStorage.b;
|
||||||
|
+
|
||||||
|
+ this.f[i1 << BiomeStorage.d + BiomeStorage.d | j1 << BiomeStorage.d | l] = biome;
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
}
|
@ -1,16 +1,6 @@
|
|||||||
--- a/net/minecraft/server/Block.java
|
--- a/net/minecraft/server/Block.java
|
||||||
+++ b/net/minecraft/server/Block.java
|
+++ b/net/minecraft/server/Block.java
|
||||||
@@ -434,7 +434,8 @@
|
@@ -489,7 +489,13 @@
|
||||||
}
|
|
||||||
|
|
||||||
public static List<ItemStack> getDrops(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, @Nullable TileEntity tileentity, Entity entity, ItemStack itemstack) {
|
|
||||||
- LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder(worldserver)).a(worldserver.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, itemstack).set(LootContextParameters.THIS_ENTITY, entity).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
|
||||||
+ // CraftBukkit - make entity optional
|
|
||||||
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder(worldserver)).a(worldserver.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, itemstack).setOptional(LootContextParameters.THIS_ENTITY, entity).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
|
||||||
|
|
||||||
return iblockdata.a(loottableinfo_builder);
|
|
||||||
}
|
|
||||||
@@ -488,7 +489,13 @@
|
|
||||||
EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + d0, (double) blockposition.getY() + d1, (double) blockposition.getZ() + d2, itemstack);
|
EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + d0, (double) blockposition.getY() + d1, (double) blockposition.getZ() + d2, itemstack);
|
||||||
|
|
||||||
entityitem.defaultPickupDelay();
|
entityitem.defaultPickupDelay();
|
||||||
@ -25,8 +15,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -685,6 +692,12 @@
|
@@ -682,6 +688,12 @@
|
||||||
return block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL;
|
return "Block{" + IRegistry.BLOCK.getKey(this) + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BlockBamboo.java
|
--- a/net/minecraft/server/BlockBamboo.java
|
||||||
+++ b/net/minecraft/server/BlockBamboo.java
|
+++ b/net/minecraft/server/BlockBamboo.java
|
||||||
@@ -164,14 +164,18 @@
|
@@ -159,14 +159,18 @@
|
||||||
BlockPosition blockposition1 = blockposition.down(2);
|
BlockPosition blockposition1 = blockposition.down(2);
|
||||||
IBlockData iblockdata2 = world.getType(blockposition1);
|
IBlockData iblockdata2 = world.getType(blockposition1);
|
||||||
BlockPropertyBambooSize blockpropertybamboosize = BlockPropertyBambooSize.NONE;
|
BlockPropertyBambooSize blockpropertybamboosize = BlockPropertyBambooSize.NONE;
|
||||||
@ -21,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -182,7 +186,14 @@
|
@@ -177,7 +181,14 @@
|
||||||
int j = (Integer) iblockdata.get(BlockBamboo.d) != 1 && iblockdata2.getBlock() != Blocks.BAMBOO ? 0 : 1;
|
int j = (Integer) iblockdata.get(BlockBamboo.d) != 1 && iblockdata2.getBlock() != Blocks.BAMBOO ? 0 : 1;
|
||||||
int k = (i < 11 || random.nextFloat() >= 0.25F) && i != 15 ? 0 : 1;
|
int k = (i < 11 || random.nextFloat() >= 0.25F) && i != 15 ? 0 : 1;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BlockBambooSapling.java
|
--- a/net/minecraft/server/BlockBambooSapling.java
|
||||||
+++ b/net/minecraft/server/BlockBambooSapling.java
|
+++ b/net/minecraft/server/BlockBambooSapling.java
|
||||||
@@ -74,6 +74,6 @@
|
@@ -69,6 +69,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a(World world, BlockPosition blockposition) {
|
protected void a(World world, BlockPosition blockposition) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BlockBed.java
|
--- a/net/minecraft/server/BlockBed.java
|
||||||
+++ b/net/minecraft/server/BlockBed.java
|
+++ b/net/minecraft/server/BlockBed.java
|
||||||
@@ -42,12 +42,22 @@
|
@@ -43,7 +43,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8,8 +8,11 @@
|
|||||||
+ // CraftBukkit - moved world and biome check into EntityHuman
|
+ // CraftBukkit - moved world and biome check into EntityHuman
|
||||||
+ if (true || world.worldProvider.canRespawn() && world.getBiome(blockposition) != Biomes.NETHER) {
|
+ if (true || world.worldProvider.canRespawn() && world.getBiome(blockposition) != Biomes.NETHER) {
|
||||||
if ((Boolean) iblockdata.get(BlockBed.OCCUPIED)) {
|
if ((Boolean) iblockdata.get(BlockBed.OCCUPIED)) {
|
||||||
|
if (!this.a(world, blockposition)) {
|
||||||
entityhuman.a((IChatBaseComponent) (new ChatMessage("block.minecraft.bed.occupied", new Object[0])), true);
|
entityhuman.a((IChatBaseComponent) (new ChatMessage("block.minecraft.bed.occupied", new Object[0])), true);
|
||||||
return true;
|
@@ -51,7 +52,16 @@
|
||||||
|
|
||||||
|
return EnumInteractionResult.SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ IBlockData finaliblockdata = iblockdata;
|
+ IBlockData finaliblockdata = iblockdata;
|
||||||
@ -24,28 +27,28 @@
|
|||||||
if (entityhuman_enumbedresult != null) {
|
if (entityhuman_enumbedresult != null) {
|
||||||
entityhuman.a(entityhuman_enumbedresult.a(), true);
|
entityhuman.a(entityhuman_enumbedresult.a(), true);
|
||||||
}
|
}
|
||||||
@@ -55,7 +65,14 @@
|
@@ -59,7 +69,14 @@
|
||||||
});
|
});
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
+ // CraftBukkit start - moved bed explosion into separate method
|
+ // CraftBukkit start - moved bed explosion into separate method
|
||||||
} else {
|
} else {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private boolean explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
+ private EnumInteractionResult explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||||
world.a(blockposition, false);
|
world.a(blockposition, false);
|
||||||
BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite());
|
BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite());
|
||||||
|
|
||||||
@@ -65,8 +82,7 @@
|
@@ -69,8 +86,7 @@
|
||||||
|
|
||||||
world.createExplosion((Entity) null, DamageSource.a(), (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.Effect.DESTROY);
|
world.createExplosion((Entity) null, DamageSource.a(), (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.Effect.DESTROY);
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private boolean a(World world, BlockPosition blockposition) {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||||
@@ -71,6 +76,19 @@
|
@@ -71,6 +76,19 @@
|
||||||
if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) {
|
if ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) {
|
||||||
return true;
|
return EnumInteractionResult.CONSUME;
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ boolean powered = ((Boolean) iblockdata.get(POWERED));
|
+ boolean powered = ((Boolean) iblockdata.get(POWERED));
|
||||||
@ -26,30 +26,30 @@
|
|||||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||||
+
|
+
|
||||||
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, true), 3);
|
|
||||||
this.a(entityhuman, world, blockposition, true);
|
|
||||||
this.e(iblockdata, world, blockposition);
|
|
||||||
@@ -117,6 +135,16 @@
|
|
||||||
if (this.D) {
|
|
||||||
this.d(iblockdata, world, blockposition);
|
this.d(iblockdata, world, blockposition);
|
||||||
|
this.a(entityhuman, world, blockposition, true);
|
||||||
|
return EnumInteractionResult.SUCCESS;
|
||||||
|
@@ -121,6 +139,16 @@
|
||||||
|
if (this.D) {
|
||||||
|
this.e(iblockdata, (World) worldserver, blockposition);
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
+ org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||||
+
|
+
|
||||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 15, 0);
|
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 15, 0);
|
||||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
+ worldserver.getServer().getPluginManager().callEvent(eventRedstone);
|
||||||
+
|
+
|
||||||
+ if (eventRedstone.getNewCurrent() > 0) {
|
+ if (eventRedstone.getNewCurrent() > 0) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, false), 3);
|
||||||
this.e(iblockdata, world, blockposition);
|
this.f(iblockdata, worldserver, blockposition);
|
||||||
this.a((EntityHuman) null, world, blockposition, false);
|
this.a((EntityHuman) null, worldserver, blockposition, false);
|
||||||
@@ -137,7 +165,44 @@
|
@@ -141,7 +169,44 @@
|
||||||
boolean flag = !list.isEmpty();
|
boolean flag = !list.isEmpty();
|
||||||
boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED);
|
boolean flag1 = (Boolean) iblockdata.get(BlockButtonAbstract.POWERED);
|
||||||
|
|
||||||
@ -92,5 +92,5 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, flag), 3);
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockButtonAbstract.POWERED, flag), 3);
|
||||||
this.e(iblockdata, world, blockposition);
|
this.f(iblockdata, world, blockposition);
|
||||||
this.a((EntityHuman) null, world, blockposition, flag);
|
this.a((EntityHuman) null, world, blockposition, flag);
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
||||||
|
|
||||||
if (j == 15) {
|
if (j == 15) {
|
||||||
- world.setTypeUpdate(blockposition1, this.getBlockData());
|
- worldserver.setTypeUpdate(blockposition1, this.getBlockData());
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition1, this.getBlockData()); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.getBlockData()); // CraftBukkit
|
||||||
IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockCactus.AGE, 0);
|
IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockCactus.AGE, 0);
|
||||||
|
|
||||||
world.setTypeAndData(blockposition, iblockdata1, 4);
|
worldserver.setTypeAndData(blockposition, iblockdata1, 4);
|
||||||
@@ -95,7 +97,9 @@
|
@@ -90,7 +92,9 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- a/net/minecraft/server/BlockCake.java
|
--- a/net/minecraft/server/BlockCake.java
|
||||||
+++ b/net/minecraft/server/BlockCake.java
|
+++ b/net/minecraft/server/BlockCake.java
|
||||||
@@ -31,7 +31,18 @@
|
@@ -37,7 +37,18 @@
|
||||||
return false;
|
return EnumInteractionResult.PASS;
|
||||||
} else {
|
} else {
|
||||||
entityhuman.a(StatisticList.EAT_CAKE_SLICE);
|
entityhuman.a(StatisticList.EAT_CAKE_SLICE);
|
||||||
- entityhuman.getFoodData().eat(2, 0.1F);
|
- entityhuman.getFoodData().eat(2, 0.1F);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- a/net/minecraft/server/BlockCampfire.java
|
--- a/net/minecraft/server/BlockCampfire.java
|
||||||
+++ b/net/minecraft/server/BlockCampfire.java
|
+++ b/net/minecraft/server/BlockCampfire.java
|
||||||
@@ -142,6 +142,11 @@
|
@@ -148,6 +148,11 @@
|
||||||
if (entityarrow.isBurning() && !(Boolean) iblockdata.get(BlockCampfire.b) && !(Boolean) iblockdata.get(BlockCampfire.d)) {
|
if (flag1 && !(Boolean) iblockdata.get(BlockCampfire.b) && !(Boolean) iblockdata.get(BlockCampfire.d)) {
|
||||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, entityarrow).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, entity).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
public class BlockCauldron extends Block {
|
public class BlockCauldron extends Block {
|
||||||
|
|
||||||
public static final BlockStateInteger LEVEL = BlockProperties.al;
|
public static final BlockStateInteger LEVEL = BlockProperties.al;
|
||||||
@@ -32,8 +34,13 @@
|
@@ -27,8 +29,13 @@
|
||||||
float f = (float) blockposition.getY() + (6.0F + (float) (3 * i)) / 16.0F;
|
float f = (float) blockposition.getY() + (6.0F + (float) (3 * i)) / 16.0F;
|
||||||
|
|
||||||
if (!world.isClientSide && entity.isBurning() && i > 0 && entity.getBoundingBox().minY <= (double) f) {
|
if (!world.isClientSide && entity.isBurning() && i > 0 && entity.locY() <= (double) f) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH)) {
|
||||||
+ return;
|
+ return;
|
||||||
@ -23,13 +23,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -50,18 +57,27 @@
|
@@ -45,18 +52,27 @@
|
||||||
|
|
||||||
if (item == Items.WATER_BUCKET) {
|
if (item == Items.WATER_BUCKET) {
|
||||||
if (i < 3 && !world.isClientSide) {
|
if (i < 3 && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, 3, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, 3, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
entityhuman.a(enumhand, new ItemStack(Items.BUCKET));
|
entityhuman.a(enumhand, new ItemStack(Items.BUCKET));
|
||||||
@ -42,17 +42,17 @@
|
|||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
} else if (item == Items.BUCKET) {
|
} else if (item == Items.BUCKET) {
|
||||||
if (i == 3 && !world.isClientSide) {
|
if (i == 3 && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, 0, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, 0, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
itemstack.subtract(1);
|
itemstack.subtract(1);
|
||||||
if (itemstack.isEmpty()) {
|
if (itemstack.isEmpty()) {
|
||||||
@@ -72,7 +88,8 @@
|
@@ -67,7 +83,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||||
@ -62,18 +62,18 @@
|
|||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,6 +99,10 @@
|
@@ -77,6 +94,10 @@
|
||||||
|
|
||||||
if (item == Items.GLASS_BOTTLE) {
|
if (item == Items.GLASS_BOTTLE) {
|
||||||
if (i > 0 && !world.isClientSide) {
|
if (i > 0 && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.WATER);
|
itemstack1 = PotionUtil.a(new ItemStack(Items.POTION), Potions.WATER);
|
||||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||||
@@ -96,12 +117,17 @@
|
@@ -91,12 +112,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
@ -82,17 +82,17 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
} else if (item == Items.POTION && PotionUtil.d(itemstack) == Potions.WATER) {
|
} else if (item == Items.POTION && PotionUtil.d(itemstack) == Potions.WATER) {
|
||||||
if (i < 3 && !world.isClientSide) {
|
if (i < 3 && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i + 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, i + 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
itemstack1 = new ItemStack(Items.GLASS_BOTTLE);
|
itemstack1 = new ItemStack(Items.GLASS_BOTTLE);
|
||||||
entityhuman.a(StatisticList.USE_CAULDRON);
|
entityhuman.a(StatisticList.USE_CAULDRON);
|
||||||
@@ -112,7 +138,8 @@
|
@@ -107,7 +133,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
world.playSound((EntityHuman) null, blockposition, SoundEffects.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
@ -101,29 +101,29 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
@@ -121,8 +148,13 @@
|
@@ -116,8 +143,13 @@
|
||||||
IDyeable idyeable = (IDyeable) item;
|
IDyeable idyeable = (IDyeable) item;
|
||||||
|
|
||||||
if (idyeable.a(itemstack) && !world.isClientSide) {
|
if (idyeable.a(itemstack) && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
idyeable.c(itemstack);
|
idyeable.c(itemstack);
|
||||||
- this.a(world, blockposition, iblockdata, i - 1);
|
- this.a(world, blockposition, iblockdata, i - 1);
|
||||||
+ // this.a(world, blockposition, iblockdata, i - 1);
|
+ // this.a(world, blockposition, iblockdata, i - 1);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
entityhuman.a(StatisticList.CLEAN_ARMOR);
|
entityhuman.a(StatisticList.CLEAN_ARMOR);
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -130,13 +162,18 @@
|
@@ -125,13 +157,18 @@
|
||||||
|
|
||||||
if (i > 0 && item instanceof ItemBanner) {
|
if (i > 0 && item instanceof ItemBanner) {
|
||||||
if (TileEntityBanner.a(itemstack) > 0 && !world.isClientSide) {
|
if (TileEntityBanner.a(itemstack) > 0 && !world.isClientSide) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {
|
+ if (!this.changeLevel(world, blockposition, iblockdata, i - 1, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
itemstack1 = itemstack.cloneItemStack();
|
itemstack1 = itemstack.cloneItemStack();
|
||||||
itemstack1.setCount(1);
|
itemstack1.setCount(1);
|
||||||
@ -137,7 +137,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (itemstack.isEmpty()) {
|
if (itemstack.isEmpty()) {
|
||||||
@@ -173,9 +210,25 @@
|
@@ -169,9 +206,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -187,7 +240,7 @@
|
@@ -183,7 +236,7 @@
|
||||||
IBlockData iblockdata = world.getType(blockposition);
|
IBlockData iblockdata = world.getType(blockposition);
|
||||||
|
|
||||||
if ((Integer) iblockdata.get(BlockCauldron.LEVEL) < 3) {
|
if ((Integer) iblockdata.get(BlockCauldron.LEVEL) < 3) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
--- a/net/minecraft/server/BlockChest.java
|
--- a/net/minecraft/server/BlockChest.java
|
||||||
+++ b/net/minecraft/server/BlockChest.java
|
+++ b/net/minecraft/server/BlockChest.java
|
||||||
@@ -30,24 +30,7 @@
|
@@ -35,24 +35,7 @@
|
||||||
public ITileInventory b(final TileEntityChest tileentitychest, final TileEntityChest tileentitychest1) {
|
public Optional<ITileInventory> a(final TileEntityChest tileentitychest, final TileEntityChest tileentitychest1) {
|
||||||
final InventoryLargeChest inventorylargechest = new InventoryLargeChest(tileentitychest, tileentitychest1);
|
final InventoryLargeChest inventorylargechest = new InventoryLargeChest(tileentitychest, tileentitychest1);
|
||||||
|
|
||||||
- return new ITileInventory() {
|
- return Optional.of(new ITileInventory() {
|
||||||
- @Nullable
|
- @Nullable
|
||||||
- @Override
|
- @Override
|
||||||
- public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
- public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||||
@ -21,12 +21,12 @@
|
|||||||
- public IChatBaseComponent getScoreboardDisplayName() {
|
- public IChatBaseComponent getScoreboardDisplayName() {
|
||||||
- return (IChatBaseComponent) (tileentitychest.hasCustomName() ? tileentitychest.getScoreboardDisplayName() : (tileentitychest1.hasCustomName() ? tileentitychest1.getScoreboardDisplayName() : new ChatMessage("container.chestDouble", new Object[0])));
|
- return (IChatBaseComponent) (tileentitychest.hasCustomName() ? tileentitychest.getScoreboardDisplayName() : (tileentitychest1.hasCustomName() ? tileentitychest1.getScoreboardDisplayName() : new ChatMessage("container.chestDouble", new Object[0])));
|
||||||
- }
|
- }
|
||||||
- };
|
- });
|
||||||
+ return new DoubleInventory(tileentitychest, tileentitychest1, inventorylargechest); // CraftBukkit
|
+ return Optional.of(new DoubleInventory(tileentitychest, tileentitychest1, inventorylargechest)); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public Optional<ITileInventory> a(TileEntityChest tileentitychest) {
|
||||||
@@ -56,6 +39,38 @@
|
@@ -65,6 +48,38 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,6 +62,15 @@
|
|||||||
+ };
|
+ };
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
protected BlockChest(Block.Info block_info) {
|
protected BlockChest(Block.Info block_info, Supplier<TileEntityTypes<? extends TileEntityChest>> supplier) {
|
||||||
super(block_info);
|
super(block_info, supplier);
|
||||||
this.o((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.blockStateList.getBlockData()).set(BlockChest.FACING, EnumDirection.NORTH)).set(BlockChest.b, BlockPropertyChestType.SINGLE)).set(BlockChest.c, false));
|
this.p((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.blockStateList.getBlockData()).set(BlockChest.FACING, EnumDirection.NORTH)).set(BlockChest.c, BlockPropertyChestType.SINGLE)).set(BlockChest.d, false));
|
||||||
|
@@ -217,7 +232,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
public DoubleBlockFinder.Result<? extends TileEntityChest> a(IBlockData iblockdata, World world, BlockPosition blockposition, boolean flag) {
|
||||||
|
- BiPredicate bipredicate;
|
||||||
|
+ BiPredicate<GeneratorAccess, BlockPosition> bipredicate; // CraftBukkit - decompile error
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
bipredicate = (generatoraccess, blockposition1) -> {
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
@@ -58,8 +60,12 @@
|
@@ -58,8 +60,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag && b((IWorldReader) world, blockposition1, (EnumDirection) null) && world.isEmpty(blockposition.up(2))) {
|
if (flag && b((IWorldReader) worldserver, blockposition1, (EnumDirection) null) && worldserver.isEmpty(blockposition.up(2))) {
|
||||||
- world.setTypeAndData(blockposition, this.b.a((IBlockAccess) world, blockposition), 2);
|
- worldserver.setTypeAndData(blockposition, this.b.a((IBlockAccess) worldserver, blockposition), 2);
|
||||||
- this.b(world, blockposition1, i);
|
- this.b(worldserver, blockposition1, i);
|
||||||
+ // CraftBukkit start - add event
|
+ // CraftBukkit start - add event
|
||||||
+ if (CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition1, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(i)), 2)) {
|
+ if (CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(i)), 2)) {
|
||||||
+ world.setTypeAndData(blockposition, this.b.a((IBlockAccess) world, blockposition), 2);
|
+ worldserver.setTypeAndData(blockposition, this.b.a((IBlockAccess) worldserver, blockposition), 2);
|
||||||
+ this.b(world, blockposition1, i);
|
+ this.b(worldserver, blockposition1, i);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
} else if (i < 4) {
|
} else if (i < 4) {
|
||||||
@ -27,12 +27,12 @@
|
|||||||
@@ -73,18 +79,30 @@
|
@@ -73,18 +79,30 @@
|
||||||
BlockPosition blockposition2 = blockposition.shift(enumdirection);
|
BlockPosition blockposition2 = blockposition.shift(enumdirection);
|
||||||
|
|
||||||
if (world.isEmpty(blockposition2) && world.isEmpty(blockposition2.down()) && b((IWorldReader) world, blockposition2, enumdirection.opposite())) {
|
if (worldserver.isEmpty(blockposition2) && worldserver.isEmpty(blockposition2.down()) && b((IWorldReader) worldserver, blockposition2, enumdirection.opposite())) {
|
||||||
- this.b(world, blockposition2, i + 1);
|
- this.b(worldserver, blockposition2, i + 1);
|
||||||
- flag2 = true;
|
- flag2 = true;
|
||||||
+ // CraftBukkit start - add event
|
+ // CraftBukkit start - add event
|
||||||
+ if (CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition2, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(i + 1)), 2)) {
|
+ if (CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(i + 1)), 2)) {
|
||||||
+ this.b(world, blockposition2, i + 1);
|
+ this.b(worldserver, blockposition2, i + 1);
|
||||||
+ flag2 = true;
|
+ flag2 = true;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
@ -40,20 +40,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
world.setTypeAndData(blockposition, this.b.a((IBlockAccess) world, blockposition), 2);
|
worldserver.setTypeAndData(blockposition, this.b.a((IBlockAccess) worldserver, blockposition), 2);
|
||||||
} else {
|
} else {
|
||||||
- this.a(world, blockposition);
|
- this.a((World) worldserver, blockposition);
|
||||||
+ // CraftBukkit - add event
|
+ // CraftBukkit - add event
|
||||||
+ if (CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
|
+ if (CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
|
||||||
+ this.a(world, blockposition);
|
+ this.a((World) worldserver, blockposition);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
- this.a(world, blockposition);
|
- this.a((World) worldserver, blockposition);
|
||||||
+ // CraftBukkit - add event
|
+ // CraftBukkit - add event
|
||||||
+ if (CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
|
+ if (CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.getBlockData().set(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
|
||||||
+ this.a(world, blockposition);
|
+ this.a((World) worldserver, blockposition);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
@ -13,17 +13,17 @@
|
|||||||
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
|
int i = (Integer) iblockdata.get(BlockCocoa.AGE);
|
||||||
|
|
||||||
if (i < 2) {
|
if (i < 2) {
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +94,7 @@
|
@@ -92,7 +94,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, (Integer) iblockdata.get(BlockCocoa.AGE) + 1), 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,4 +24,4 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
tileentitycommand.a(flag1);
|
tileentitycommand.a(flag1);
|
||||||
if (!flag2 && !tileentitycommand.g() && tileentitycommand.u() != TileEntityCommand.Type.SEQUENCE) {
|
if (!flag2 && !tileentitycommand.g() && tileentitycommand.m() != TileEntityCommand.Type.SEQUENCE) {
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
+++ b/net/minecraft/server/BlockCoral.java
|
+++ b/net/minecraft/server/BlockCoral.java
|
||||||
@@ -15,6 +15,11 @@
|
@@ -15,6 +15,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!this.a((IBlockAccess) world, blockposition)) {
|
if (!this.a((IBlockAccess) worldserver, blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, this.a.getBlockData()).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.a.getBlockData()).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, this.a.getBlockData(), 2);
|
worldserver.setTypeAndData(blockposition, this.a.getBlockData(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
+++ b/net/minecraft/server/BlockCoralFan.java
|
+++ b/net/minecraft/server/BlockCoralFan.java
|
||||||
@@ -19,6 +19,11 @@
|
@@ -19,6 +19,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!b_(iblockdata, world, blockposition)) {
|
if (!b_(iblockdata, worldserver, blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, this.a.getBlockData().set(BlockCoralFan.b, false)).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.a.getBlockData().set(BlockCoralFan.b, false)).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) this.a.getBlockData().set(BlockCoralFan.b, false), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) this.a.getBlockData().set(BlockCoralFan.b, false), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
+++ b/net/minecraft/server/BlockCoralFanWall.java
|
+++ b/net/minecraft/server/BlockCoralFanWall.java
|
||||||
@@ -19,6 +19,11 @@
|
@@ -19,6 +19,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!b_(iblockdata, world, blockposition)) {
|
if (!b_(iblockdata, worldserver, blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, this.c.getBlockData().set(BlockCoralFanWall.b, false).set(BlockCoralFanWall.a, iblockdata.get(BlockCoralFanWall.a))).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.c.getBlockData().set(BlockCoralFanWall.b, false).set(BlockCoralFanWall.a, iblockdata.get(BlockCoralFanWall.a))).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) ((IBlockData) this.c.getBlockData().set(BlockCoralFanWall.b, false)).set(BlockCoralFanWall.a, iblockdata.get(BlockCoralFanWall.a)), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) ((IBlockData) this.c.getBlockData().set(BlockCoralFanWall.b, false)).set(BlockCoralFanWall.a, iblockdata.get(BlockCoralFanWall.a)), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
+++ b/net/minecraft/server/BlockCoralPlant.java
|
+++ b/net/minecraft/server/BlockCoralPlant.java
|
||||||
@@ -20,6 +20,11 @@
|
@@ -20,6 +20,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!b_(iblockdata, world, blockposition)) {
|
if (!b_(iblockdata, worldserver, blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, this.c.getBlockData().set(BlockCoralPlant.b, false)).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.c.getBlockData().set(BlockCoralPlant.b, false)).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) this.c.getBlockData().set(BlockCoralPlant.b, false), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) this.c.getBlockData().set(BlockCoralPlant.b, false), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
public static final BlockStateInteger AGE = BlockProperties.ac;
|
public static final BlockStateInteger AGE = BlockProperties.ac;
|
||||||
@@ -52,7 +54,7 @@
|
@@ -52,7 +54,7 @@
|
||||||
float f = a((Block) this, (IBlockAccess) world, blockposition);
|
float f = a((Block) this, (IBlockAccess) worldserver, blockposition);
|
||||||
|
|
||||||
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
|
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
|
||||||
- world.setTypeAndData(blockposition, this.setAge(i + 1), 2);
|
- worldserver.setTypeAndData(blockposition, this.setAge(i + 1), 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.setAge(i + 1), 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.setAge(i + 1), 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,6 +33,6 @@
|
|||||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||||
- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||||
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
|
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
|
||||||
world.b(blockposition, true);
|
world.a(blockposition, true, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,21 +10,21 @@
|
|||||||
|
|
||||||
protected static final VoxelShape b = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
|
protected static final VoxelShape b = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
|
||||||
@@ -28,8 +30,18 @@
|
@@ -28,8 +30,18 @@
|
||||||
boolean flag1 = this.a(world, blockposition, iblockdata);
|
boolean flag1 = this.a((World) worldserver, blockposition, iblockdata);
|
||||||
|
|
||||||
if (flag && !flag1) {
|
if (flag && !flag1) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 15, 0).getNewCurrent() != 0) {
|
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, false), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, false), 2);
|
||||||
} else if (!flag) {
|
} else if (!flag) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) {
|
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 0, 15).getNewCurrent() != 15) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, true), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, true), 2);
|
||||||
if (!flag1) {
|
if (!flag1) {
|
||||||
world.getBlockTickList().a(blockposition, this, this.j(iblockdata), TickListPriority.HIGH);
|
worldserver.getBlockTickList().a(blockposition, this, this.h(iblockdata), TickListPriority.VERY_HIGH);
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
--- a/net/minecraft/server/BlockDirtSnowSpreadable.java
|
--- a/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||||
+++ b/net/minecraft/server/BlockDirtSnowSpreadable.java
|
+++ b/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||||
@@ -31,6 +31,11 @@
|
@@ -30,6 +30,11 @@
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
@Override
|
||||||
if (!world.isClientSide) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!b(iblockdata, (IWorldReader) world, blockposition)) {
|
if (!b(iblockdata, (IWorldReader) worldserver, blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
|
worldserver.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
|
||||||
} else {
|
} else {
|
||||||
if (world.getLightLevel(blockposition.up()) >= 9) {
|
if (worldserver.getLightLevel(blockposition.up()) >= 9) {
|
||||||
@@ -40,7 +45,7 @@
|
@@ -39,7 +44,7 @@
|
||||||
BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||||
|
|
||||||
if (world.getType(blockposition1).getBlock() == Blocks.DIRT && c(iblockdata1, (IWorldReader) world, blockposition1)) {
|
if (worldserver.getType(blockposition1).getBlock() == Blocks.DIRT && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) {
|
||||||
- world.setTypeUpdate(blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, world.getType(blockposition1.up()).getBlock() == Blocks.SNOW));
|
- worldserver.setTypeUpdate(blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).getBlock() == Blocks.SNOW));
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, world.getType(blockposition1.up()).getBlock() == Blocks.SNOW)); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).getBlock() == Blocks.SNOW)); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,73 +39,73 @@
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -82,7 +104,7 @@
|
@@ -82,7 +104,7 @@
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (world.getGameRules().getBoolean(GameRules.DO_FIRE_TICK)) {
|
if (worldserver.getGameRules().getBoolean(GameRules.DO_FIRE_TICK)) {
|
||||||
if (!iblockdata.canPlace(world, blockposition)) {
|
if (!iblockdata.canPlace(worldserver, blockposition)) {
|
||||||
- world.a(blockposition, false);
|
- worldserver.a(blockposition, false);
|
||||||
+ fireExtinguished(world, blockposition); // CraftBukkit - invalid place location
|
+ fireExtinguished(worldserver, blockposition); // CraftBukkit - invalid place location
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block = world.getType(blockposition.down()).getBlock();
|
Block block = worldserver.getType(blockposition.down()).getBlock();
|
||||||
@@ -90,7 +112,7 @@
|
@@ -90,7 +112,7 @@
|
||||||
int i = (Integer) iblockdata.get(BlockFire.AGE);
|
int i = (Integer) iblockdata.get(BlockFire.AGE);
|
||||||
|
|
||||||
if (!flag && world.isRaining() && this.a(world, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) {
|
if (!flag && worldserver.isRaining() && this.a((World) worldserver, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) {
|
||||||
- world.a(blockposition, false);
|
- worldserver.a(blockposition, false);
|
||||||
+ fireExtinguished(world, blockposition); // CraftBukkit - extinguished by rain
|
+ fireExtinguished(worldserver, blockposition); // CraftBukkit - extinguished by rain
|
||||||
} else {
|
} else {
|
||||||
int j = Math.min(15, i + random.nextInt(3) / 2);
|
int j = Math.min(15, i + random.nextInt(3) / 2);
|
||||||
|
|
||||||
@@ -105,14 +127,14 @@
|
@@ -105,14 +127,14 @@
|
||||||
BlockPosition blockposition1 = blockposition.down();
|
BlockPosition blockposition1 = blockposition.down();
|
||||||
|
|
||||||
if (!world.getType(blockposition1).d(world, blockposition1, EnumDirection.UP) || i > 3) {
|
if (!worldserver.getType(blockposition1).d(worldserver, blockposition1, EnumDirection.UP) || i > 3) {
|
||||||
- world.a(blockposition, false);
|
- worldserver.a(blockposition, false);
|
||||||
+ fireExtinguished(world, blockposition); // CraftBukkit
|
+ fireExtinguished(worldserver, blockposition); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 15 && random.nextInt(4) == 0 && !this.j(world.getType(blockposition.down()))) {
|
if (i == 15 && random.nextInt(4) == 0 && !this.h(worldserver.getType(blockposition.down()))) {
|
||||||
- world.a(blockposition, false);
|
- worldserver.a(blockposition, false);
|
||||||
+ fireExtinguished(world, blockposition); // CraftBukkit
|
+ fireExtinguished(worldserver, blockposition); // CraftBukkit
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,12 +142,14 @@
|
@@ -120,12 +142,14 @@
|
||||||
boolean flag1 = world.s(blockposition);
|
boolean flag1 = worldserver.s(blockposition);
|
||||||
int k = flag1 ? -50 : 0;
|
int k = flag1 ? -50 : 0;
|
||||||
|
|
||||||
- this.a(world, blockposition.east(), 300 + k, random, i);
|
- this.a(worldserver, blockposition.east(), 300 + k, random, i);
|
||||||
- this.a(world, blockposition.west(), 300 + k, random, i);
|
- this.a(worldserver, blockposition.west(), 300 + k, random, i);
|
||||||
- this.a(world, blockposition.down(), 250 + k, random, i);
|
- this.a(worldserver, blockposition.down(), 250 + k, random, i);
|
||||||
- this.a(world, blockposition.up(), 250 + k, random, i);
|
- this.a(worldserver, blockposition.up(), 250 + k, random, i);
|
||||||
- this.a(world, blockposition.north(), 300 + k, random, i);
|
- this.a(worldserver, blockposition.north(), 300 + k, random, i);
|
||||||
- this.a(world, blockposition.south(), 300 + k, random, i);
|
- this.a(worldserver, blockposition.south(), 300 + k, random, i);
|
||||||
+ // CraftBukkit start - add source blockposition to burn calls
|
+ // CraftBukkit start - add source blockposition to burn calls
|
||||||
+ this.a(world, blockposition.east(), 300 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.east(), 300 + k, random, i, blockposition);
|
||||||
+ this.a(world, blockposition.west(), 300 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.west(), 300 + k, random, i, blockposition);
|
||||||
+ this.a(world, blockposition.down(), 250 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.down(), 250 + k, random, i, blockposition);
|
||||||
+ this.a(world, blockposition.up(), 250 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.up(), 250 + k, random, i, blockposition);
|
||||||
+ this.a(world, blockposition.north(), 300 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.north(), 300 + k, random, i, blockposition);
|
||||||
+ this.a(world, blockposition.south(), 300 + k, random, i, blockposition);
|
+ this.a(worldserver, blockposition.south(), 300 + k, random, i, blockposition);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||||
|
|
||||||
for (int l = -1; l <= 1; ++l) {
|
for (int l = -1; l <= 1; ++l) {
|
||||||
@@ -151,7 +175,15 @@
|
@@ -151,7 +175,15 @@
|
||||||
if (i2 > 0 && random.nextInt(k1) <= i2 && (!world.isRaining() || !this.a(world, (BlockPosition) blockposition_mutableblockposition))) {
|
if (i2 > 0 && random.nextInt(k1) <= i2 && (!worldserver.isRaining() || !this.a((World) worldserver, (BlockPosition) blockposition_mutableblockposition))) {
|
||||||
int j2 = Math.min(15, i + random.nextInt(5) / 4);
|
int j2 = Math.min(15, i + random.nextInt(5) / 4);
|
||||||
|
|
||||||
- world.setTypeAndData(blockposition_mutableblockposition, (IBlockData) this.a((IBlockAccess) world, (BlockPosition) blockposition_mutableblockposition).set(BlockFire.AGE, j2), 3);
|
- worldserver.setTypeAndData(blockposition_mutableblockposition, (IBlockData) this.a((IBlockAccess) worldserver, (BlockPosition) blockposition_mutableblockposition).set(BlockFire.AGE, j2), 3);
|
||||||
+ // CraftBukkit start - Call to stop spread of fire
|
+ // CraftBukkit start - Call to stop spread of fire
|
||||||
+ if (world.getType(blockposition_mutableblockposition).getBlock() != Blocks.FIRE) {
|
+ if (worldserver.getType(blockposition_mutableblockposition).getBlock() != Blocks.FIRE) {
|
||||||
+ if (CraftEventFactory.callBlockIgniteEvent(world, blockposition_mutableblockposition, blockposition).isCancelled()) {
|
+ if (CraftEventFactory.callBlockIgniteEvent(worldserver, blockposition_mutableblockposition, blockposition).isCancelled()) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition_mutableblockposition, (IBlockData) this.a((IBlockAccess) world, (BlockPosition) blockposition_mutableblockposition).set(BlockFire.AGE, j2), 3); // CraftBukkit
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition_mutableblockposition, (IBlockData) this.a((IBlockAccess) worldserver, (BlockPosition) blockposition_mutableblockposition).set(BlockFire.AGE, j2), 3); // CraftBukkit
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
- private void a(World world, BlockPosition blockposition, int i, Random random, int j) {
|
- private void a(World world, BlockPosition blockposition, int i, Random random, int j) {
|
||||||
+ private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
|
+ private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
|
||||||
int k = this.q(world.getType(blockposition));
|
int k = this.i(world.getType(blockposition));
|
||||||
|
|
||||||
if (random.nextInt(i) < k) {
|
if (random.nextInt(i) < k) {
|
||||||
IBlockData iblockdata = world.getType(blockposition);
|
IBlockData iblockdata = world.getType(blockposition);
|
||||||
@ -150,9 +150,9 @@
|
|||||||
} else {
|
} else {
|
||||||
world.getBlockTickList().a(blockposition, this, this.a((IWorldReader) world) + world.random.nextInt(10));
|
world.getBlockTickList().a(blockposition, this, this.a((IWorldReader) world) + world.random.nextInt(10));
|
||||||
}
|
}
|
||||||
@@ -395,4 +440,12 @@
|
@@ -392,4 +437,12 @@
|
||||||
blockfire.a(Blocks.COMPOSTER, 5, 20);
|
blockfire.a(Blocks.BEEHIVE, 5, 20);
|
||||||
blockfire.a(Blocks.SWEET_BERRY_BUSH, 60, 100);
|
blockfire.a(Blocks.BEE_NEST, 30, 20);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- a/net/minecraft/server/BlockGrass.java
|
--- a/net/minecraft/server/BlockGrass.java
|
||||||
+++ b/net/minecraft/server/BlockGrass.java
|
+++ b/net/minecraft/server/BlockGrass.java
|
||||||
@@ -61,7 +61,7 @@
|
@@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iblockdata3.canPlace(world, blockposition2)) {
|
if (iblockdata3.canPlace(worldserver, blockposition2)) {
|
||||||
- world.setTypeAndData(blockposition2, iblockdata3, 3);
|
- worldserver.setTypeAndData(blockposition2, iblockdata3, 3);
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition2, iblockdata3, 3); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition2, iblockdata3, 3); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BlockIce.java
|
--- a/net/minecraft/server/BlockIce.java
|
||||||
+++ b/net/minecraft/server/BlockIce.java
|
+++ b/net/minecraft/server/BlockIce.java
|
||||||
@@ -41,6 +41,11 @@
|
@@ -36,6 +36,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void melt(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
protected void melt(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- a/net/minecraft/server/BlockKelp.java
|
--- a/net/minecraft/server/BlockKelp.java
|
||||||
+++ b/net/minecraft/server/BlockKelp.java
|
+++ b/net/minecraft/server/BlockKelp.java
|
||||||
@@ -49,7 +49,7 @@
|
@@ -44,7 +44,7 @@
|
||||||
IBlockData iblockdata1 = world.getType(blockposition1);
|
IBlockData iblockdata1 = worldserver.getType(blockposition1);
|
||||||
|
|
||||||
if (iblockdata1.getBlock() == Blocks.WATER && (Integer) iblockdata.get(BlockKelp.a) < 25 && random.nextDouble() < 0.14D) {
|
if (iblockdata1.getBlock() == Blocks.WATER && (Integer) iblockdata.get(BlockKelp.a) < 25 && random.nextDouble() < 0.14D) {
|
||||||
- world.setTypeUpdate(blockposition1, (IBlockData) iblockdata.a((IBlockState) BlockKelp.a));
|
- worldserver.setTypeUpdate(blockposition1, (IBlockData) iblockdata.a((IBlockState) BlockKelp.a));
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition1, (IBlockData) iblockdata.a((IBlockState) BlockKelp.a)); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata.a((IBlockState) BlockKelp.a)); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,18 @@
|
|||||||
public class BlockLeaves extends Block {
|
public class BlockLeaves extends Block {
|
||||||
|
|
||||||
public static final BlockStateInteger DISTANCE = BlockProperties.ah;
|
public static final BlockStateInteger DISTANCE = BlockProperties.ah;
|
||||||
@@ -21,6 +23,14 @@
|
@@ -20,6 +22,14 @@
|
||||||
@Override
|
@Override
|
||||||
public void c(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void b(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (!(Boolean) iblockdata.get(BlockLeaves.PERSISTENT) && (Integer) iblockdata.get(BlockLeaves.DISTANCE) == 7) {
|
if (!(Boolean) iblockdata.get(BlockLeaves.PERSISTENT) && (Integer) iblockdata.get(BlockLeaves.DISTANCE) == 7) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
+ LeavesDecayEvent event = new LeavesDecayEvent(worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||||
+ world.getServer().getPluginManager().callEvent(event);
|
+ worldserver.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (event.isCancelled() || world.getType(blockposition).getBlock() != this) {
|
+ if (event.isCancelled() || worldserver.getType(blockposition).getBlock() != this) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
c(iblockdata, world, blockposition);
|
c(iblockdata, (World) worldserver, blockposition);
|
||||||
world.a(blockposition, false);
|
worldserver.a(blockposition, false);
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||||
@@ -64,6 +66,20 @@
|
@@ -64,6 +66,20 @@
|
||||||
|
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start - Interact Lever
|
+ // CraftBukkit start - Interact Lever
|
||||||
+ boolean powered = !flag; // Old powered state
|
+ boolean powered = iblockdata.get(BlockLever.POWERED); // Old powered state
|
||||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||||
+ int old = (powered) ? 15 : 0;
|
+ int old = (powered) ? 15 : 0;
|
||||||
+ int current = (!powered) ? 15 : 0;
|
+ int current = (!powered) ? 15 : 0;
|
||||||
@ -22,10 +22,10 @@
|
|||||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||||
+
|
+
|
||||||
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
+ if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
|
||||||
+ return true;
|
+ return EnumInteractionResult.SUCCESS;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
world.setTypeAndData(blockposition, iblockdata, 3);
|
iblockdata1 = this.d(iblockdata, world, blockposition);
|
||||||
float f = flag ? 0.6F : 0.5F;
|
float f = (Boolean) iblockdata1.get(BlockLever.POWERED) ? 0.6F : 0.5F;
|
||||||
|
|
||||||
|
@ -14,20 +14,28 @@
|
|||||||
@@ -45,7 +49,7 @@
|
@@ -45,7 +49,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.isEmpty(blockposition2) && iblockdata.canPlace(world, blockposition2)) {
|
if (worldserver.isEmpty(blockposition2) && iblockdata.canPlace(worldserver, blockposition2)) {
|
||||||
- world.setTypeAndData(blockposition2, iblockdata, 2);
|
- worldserver.setTypeAndData(blockposition2, iblockdata, 2);
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition2, iblockdata, 2); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata, 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +74,10 @@
|
@@ -70,14 +74,16 @@
|
||||||
WorldGenerator<WorldGenHugeMushroomConfiguration> worldgenerator = null;
|
WorldGenFeatureConfigured worldgenfeatureconfigured;
|
||||||
|
|
||||||
if (this == Blocks.BROWN_MUSHROOM) {
|
if (this == Blocks.BROWN_MUSHROOM) {
|
||||||
|
- worldgenfeatureconfigured = WorldGenerator.HUGE_BROWN_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM);
|
||||||
+ BlockSapling.treeType = TreeType.BROWN_MUSHROOM; // CraftBukkit
|
+ BlockSapling.treeType = TreeType.BROWN_MUSHROOM; // CraftBukkit
|
||||||
worldgenerator = WorldGenerator.HUGE_BROWN_MUSHROOM;
|
+ worldgenfeatureconfigured = WorldGenerator.HUGE_BROWN_MUSHROOM.b(BiomeDecoratorGroups.HUGE_BROWN_MUSHROOM); // CraftBukkit - decompile error
|
||||||
} else if (this == Blocks.RED_MUSHROOM) {
|
} else {
|
||||||
+ BlockSapling.treeType = TreeType.RED_MUSHROOM; // CraftBukkit
|
if (this != Blocks.RED_MUSHROOM) {
|
||||||
worldgenerator = WorldGenerator.HUGE_RED_MUSHROOM;
|
worldserver.setTypeAndData(blockposition, iblockdata, 3);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- worldgenfeatureconfigured = WorldGenerator.HUGE_RED_MUSHROOM.b((WorldGenFeatureConfiguration) BiomeDecoratorGroups.HUGE_RED_MUSHROOM);
|
||||||
|
+ BlockSapling.treeType = TreeType.RED_MUSHROOM; // CraftBukkit
|
||||||
|
+ worldgenfeatureconfigured = WorldGenerator.HUGE_RED_MUSHROOM.b(BiomeDecoratorGroups.HUGE_RED_MUSHROOM); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
if (worldgenfeatureconfigured.a(worldserver, worldserver.getChunkProvider().getChunkGenerator(), random, blockposition)) {
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
if (i < 3 && random.nextInt(10) == 0) {
|
if (i < 3 && random.nextInt(10) == 0) {
|
||||||
iblockdata = (IBlockData) iblockdata.set(BlockNetherWart.AGE, i + 1);
|
iblockdata = (IBlockData) iblockdata.set(BlockNetherWart.AGE, i + 1);
|
||||||
- world.setTypeAndData(blockposition, iblockdata, 2);
|
- worldserver.setTypeAndData(blockposition, iblockdata, 2);
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition, iblockdata, 2); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata, 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
super.tick(iblockdata, world, blockposition, random);
|
super.tick(iblockdata, worldserver, blockposition, random);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
- this.play(world, blockposition);
|
- this.play(world, blockposition);
|
||||||
+ this.play(world, blockposition, iblockdata); // CraftBukkit
|
+ this.play(world, blockposition, iblockdata); // CraftBukkit
|
||||||
entityhuman.a(StatisticList.TUNE_NOTEBLOCK);
|
entityhuman.a(StatisticList.TUNE_NOTEBLOCK);
|
||||||
return true;
|
return EnumInteractionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -58,7 +63,7 @@
|
@@ -58,7 +63,7 @@
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,20 +11,20 @@
|
|||||||
public static final BlockStateBoolean b = BlockProperties.w;
|
public static final BlockStateBoolean b = BlockProperties.w;
|
||||||
@@ -29,8 +31,18 @@
|
@@ -29,8 +31,18 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if ((Boolean) iblockdata.get(BlockObserver.b)) {
|
if ((Boolean) iblockdata.get(BlockObserver.b)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 15, 0).getNewCurrent() != 0) {
|
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockObserver.b, false), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockObserver.b, false), 2);
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) {
|
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 0, 15).getNewCurrent() != 15) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockObserver.b, true), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockObserver.b, true), 2);
|
||||||
world.getBlockTickList().a(blockposition, this, 2);
|
worldserver.getBlockTickList().a(blockposition, this, 2);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
--- a/net/minecraft/server/BlockPiston.java
|
--- a/net/minecraft/server/BlockPiston.java
|
||||||
+++ b/net/minecraft/server/BlockPiston.java
|
+++ b/net/minecraft/server/BlockPiston.java
|
||||||
@@ -6,6 +6,14 @@
|
@@ -7,6 +7,14 @@
|
||||||
import java.util.List;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
+import com.google.common.collect.ImmutableList;
|
+import com.google.common.collect.ImmutableList;
|
||||||
@ -15,7 +15,7 @@
|
|||||||
public class BlockPiston extends BlockDirectional {
|
public class BlockPiston extends BlockDirectional {
|
||||||
|
|
||||||
public static final BlockStateBoolean EXTENDED = BlockProperties.g;
|
public static final BlockStateBoolean EXTENDED = BlockProperties.g;
|
||||||
@@ -112,6 +120,18 @@
|
@@ -113,6 +121,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,13 +31,13 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // PAIL: checkME - what happened to setTypeAndData?
|
+ // PAIL: checkME - what happened to setTypeAndData?
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.playBlockAction(blockposition, this, b0, enumdirection.a());
|
world.playBlockAction(blockposition, this, b0, enumdirection.b());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,6 +301,48 @@
|
@@ -284,6 +304,48 @@
|
||||||
|
int j = list.size() + list2.size();
|
||||||
IBlockData[] aiblockdata = new IBlockData[j];
|
IBlockData[] aiblockdata = new IBlockData[j];
|
||||||
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
|
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
|
||||||
Set<BlockPosition> set = Sets.newHashSet(list);
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
+ final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||||
+
|
+
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
@@ -34,7 +41,8 @@
|
@@ -34,7 +41,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.getType(blockposition).a((IBlockAccess) world, blockposition, EntityTypes.ZOMBIE_PIGMAN)) {
|
if (worldserver.getType(blockposition).a((IBlockAccess) worldserver, blockposition, EntityTypes.ZOMBIE_PIGMAN)) {
|
||||||
- Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(world, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false);
|
- Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false);
|
||||||
+ // CraftBukkit - set spawn reason to NETHER_PORTAL
|
+ // CraftBukkit - set spawn reason to NETHER_PORTAL
|
||||||
+ Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(world, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
|
+ Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
entity.portalCooldown = entity.aX();
|
entity.portalCooldown = entity.ba();
|
||||||
@@ -48,8 +56,10 @@
|
@@ -48,8 +56,10 @@
|
||||||
BlockPortal.Shape blockportal_shape = this.b(generatoraccess, blockposition);
|
BlockPortal.Shape blockportal_shape = this.b(generatoraccess, blockposition);
|
||||||
|
|
||||||
@ -37,7 +37,7 @@
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -85,6 +95,10 @@
|
@@ -80,6 +90,10 @@
|
||||||
@Override
|
@Override
|
||||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||||
if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) {
|
if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) {
|
||||||
@ -48,7 +48,7 @@
|
|||||||
entity.c(blockposition);
|
entity.c(blockposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,6 +191,7 @@
|
@@ -172,6 +186,7 @@
|
||||||
private BlockPosition position;
|
private BlockPosition position;
|
||||||
private int height;
|
private int height;
|
||||||
private int width;
|
private int width;
|
||||||
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
public Shape(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
|
public Shape(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
|
||||||
this.a = generatoraccess;
|
this.a = generatoraccess;
|
||||||
@@ -235,6 +250,9 @@
|
@@ -230,6 +245,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int c() {
|
protected int c() {
|
||||||
@ -66,7 +66,7 @@
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
label56:
|
label56:
|
||||||
@@ -257,11 +275,21 @@
|
@@ -252,11 +270,21 @@
|
||||||
block = this.a.getType(blockposition.shift(this.d)).getBlock();
|
block = this.a.getType(blockposition.shift(this.d)).getBlock();
|
||||||
if (block != Blocks.OBSIDIAN) {
|
if (block != Blocks.OBSIDIAN) {
|
||||||
break label56;
|
break label56;
|
||||||
@ -88,7 +88,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,6 +299,11 @@
|
@@ -266,6 +294,11 @@
|
||||||
if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) {
|
if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) {
|
||||||
this.height = 0;
|
this.height = 0;
|
||||||
break;
|
break;
|
||||||
@ -100,7 +100,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +327,29 @@
|
@@ -289,7 +322,29 @@
|
||||||
return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@
|
|||||||
for (int i = 0; i < this.width; ++i) {
|
for (int i = 0; i < this.width; ++i) {
|
||||||
BlockPosition blockposition = this.position.shift(this.c, i);
|
BlockPosition blockposition = this.position.shift(this.c, i);
|
||||||
|
|
||||||
@@ -303,6 +358,7 @@
|
@@ -298,6 +353,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,4 +21,4 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockPoweredRail.POWERED, flag1), 3);
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockPoweredRail.POWERED, flag1), 3);
|
||||||
world.applyPhysics(blockposition.down(), this);
|
world.applyPhysics(blockposition.down(), this);
|
||||||
if (((BlockPropertyTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE)).c()) {
|
if (((BlockPropertyTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE)).b()) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
public abstract class BlockPressurePlateAbstract extends Block {
|
public abstract class BlockPressurePlateAbstract extends Block {
|
||||||
|
|
||||||
protected static final VoxelShape a = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 0.5D, 15.0D);
|
protected static final VoxelShape a = Block.a(1.0D, 0.0D, 1.0D, 15.0D, 0.5D, 15.0D);
|
||||||
@@ -68,6 +70,19 @@
|
@@ -66,6 +68,19 @@
|
||||||
boolean flag = i > 0;
|
boolean flag = i > 0;
|
||||||
boolean flag1 = j > 0;
|
boolean flag1 = j > 0;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
+
|
+
|
||||||
public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
|
public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
|
||||||
|
|
||||||
public static final BlockStateInteger POWER = BlockProperties.as;
|
public static final BlockStateInteger POWER = BlockProperties.at;
|
||||||
@@ -13,7 +15,31 @@
|
@@ -13,7 +15,31 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
+
|
+
|
||||||
public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity {
|
public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity {
|
||||||
|
|
||||||
public static final BlockStateEnum<BlockPropertyComparatorMode> MODE = BlockProperties.ay;
|
public static final BlockStateEnum<BlockPropertyComparatorMode> MODE = BlockProperties.az;
|
||||||
@@ -64,7 +66,8 @@
|
@@ -70,7 +72,8 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private EntityItemFrame a(World world, EnumDirection enumdirection, BlockPosition blockposition) {
|
private EntityItemFrame a(World world, EnumDirection enumdirection, BlockPosition blockposition) {
|
||||||
@ -19,7 +19,7 @@
|
|||||||
return entityitemframe != null && entityitemframe.getDirection() == enumdirection;
|
return entityitemframe != null && entityitemframe.getDirection() == enumdirection;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -119,8 +122,18 @@
|
@@ -125,8 +128,18 @@
|
||||||
boolean flag1 = (Boolean) iblockdata.get(BlockRedstoneComparator.c);
|
boolean flag1 = (Boolean) iblockdata.get(BlockRedstoneComparator.c);
|
||||||
|
|
||||||
if (flag1 && !flag) {
|
if (flag1 && !flag) {
|
||||||
|
@ -21,15 +21,15 @@
|
|||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,6 +55,11 @@
|
@@ -47,6 +54,11 @@
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
@Override
|
||||||
if (!world.isClientSide) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if ((Boolean) iblockdata.get(BlockRedstoneLamp.a) && !world.isBlockIndirectlyPowered(blockposition)) {
|
if ((Boolean) iblockdata.get(BlockRedstoneLamp.a) && !worldserver.isBlockIndirectlyPowered(blockposition)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 15, 0).getNewCurrent() != 0) {
|
+ if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockRedstoneLamp.a), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
public class BlockRedstoneOre extends Block {
|
public class BlockRedstoneOre extends Block {
|
||||||
|
|
||||||
public static final BlockStateBoolean a = BlockRedstoneTorch.LIT;
|
public static final BlockStateBoolean a = BlockRedstoneTorch.LIT;
|
||||||
@@ -18,25 +23,46 @@
|
@@ -18,14 +23,30 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
public void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||||
@ -46,10 +46,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean interact(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
|
@@ -34,14 +55,19 @@
|
||||||
|
playEffect(world, blockposition);
|
||||||
|
return EnumInteractionResult.SUCCESS;
|
||||||
|
} else {
|
||||||
- interact(iblockdata, world, blockposition);
|
- interact(iblockdata, world, blockposition);
|
||||||
+ interact(iblockdata, world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
+ interact(iblockdata, world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||||
return super.interact(iblockdata, world, blockposition, entityhuman, enumhand, movingobjectpositionblock);
|
return EnumInteractionResult.PASS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- private static void interact(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
- private static void interact(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||||
@ -64,19 +68,19 @@
|
|||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, true), 3);
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, true), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +71,11 @@
|
@@ -50,6 +76,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if ((Boolean) iblockdata.get(BlockRedstoneOre.a)) {
|
if ((Boolean) iblockdata.get(BlockRedstoneOre.a)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (CraftEventFactory.callBlockFadeEvent(world, blockposition, iblockdata.set(BlockRedstoneOre.a, false)).isCancelled()) {
|
+ if (CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, iblockdata.set(BlockRedstoneOre.a, false)).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, false), 3);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockRedstoneOre.a, false), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,14 +84,27 @@
|
@@ -58,12 +89,25 @@
|
||||||
@Override
|
@Override
|
||||||
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||||
super.dropNaturally(iblockdata, world, blockposition, itemstack);
|
super.dropNaturally(iblockdata, world, blockposition, itemstack);
|
||||||
@ -87,8 +91,8 @@
|
|||||||
this.dropExperience(world, blockposition, i);
|
this.dropExperience(world, blockposition, i);
|
||||||
}
|
}
|
||||||
+ // */
|
+ // */
|
||||||
|
+
|
||||||
}
|
+ }
|
||||||
|
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||||
@ -99,8 +103,6 @@
|
|||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+ }
|
}
|
||||||
+
|
|
||||||
private static void playEffect(World world, BlockPosition blockposition) {
|
private static void playEffect(World world, BlockPosition blockposition) {
|
||||||
double d0 = 0.5625D;
|
|
||||||
Random random = world.random;
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
int j = (Integer) iblockdata.get(BlockReed.AGE);
|
int j = (Integer) iblockdata.get(BlockReed.AGE);
|
||||||
|
|
||||||
if (j == 15) {
|
if (j == 15) {
|
||||||
- world.setTypeUpdate(blockposition.up(), this.getBlockData());
|
- worldserver.setTypeUpdate(blockposition.up(), this.getBlockData());
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition.up(), this.getBlockData()); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition.up(), this.getBlockData()); // CraftBukkit
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockReed.AGE, 0), 4);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockReed.AGE, 0), 4);
|
||||||
} else {
|
} else {
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockReed.AGE, j + 1), 4);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockReed.AGE, j + 1), 4);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
+
|
+
|
||||||
public class BlockSapling extends BlockPlant implements IBlockFragilePlantElement {
|
public class BlockSapling extends BlockPlant implements IBlockFragilePlantElement {
|
||||||
|
|
||||||
public static final BlockStateInteger STAGE = BlockProperties.at;
|
public static final BlockStateInteger STAGE = BlockProperties.au;
|
||||||
protected static final VoxelShape b = Block.a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
protected static final VoxelShape b = Block.a(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
|
||||||
private final WorldGenTreeProvider c;
|
private final WorldGenTreeProvider c;
|
||||||
+ public static TreeType treeType; // CraftBukkit
|
+ public static TreeType treeType; // CraftBukkit
|
||||||
@ -23,21 +23,21 @@
|
|||||||
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, Block.Info block_info) {
|
protected BlockSapling(WorldGenTreeProvider worldgentreeprovider, Block.Info block_info) {
|
||||||
super(block_info);
|
super(block_info);
|
||||||
@@ -23,7 +33,30 @@
|
@@ -23,7 +33,30 @@
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
super.tick(iblockdata, world, blockposition, random);
|
super.tick(iblockdata, worldserver, blockposition, random);
|
||||||
if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
if (worldserver.getLightLevel(blockposition.up()) >= 9 && random.nextInt(7) == 0) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ world.captureTreeGeneration = true;
|
+ worldserver.captureTreeGeneration = true;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.grow(world, blockposition, iblockdata, random);
|
this.grow(worldserver, blockposition, iblockdata, random);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ world.captureTreeGeneration = false;
|
+ worldserver.captureTreeGeneration = false;
|
||||||
+ if (world.capturedBlockStates.size() > 0) {
|
+ if (worldserver.capturedBlockStates.size() > 0) {
|
||||||
+ TreeType treeType = BlockSapling.treeType;
|
+ TreeType treeType = BlockSapling.treeType;
|
||||||
+ BlockSapling.treeType = null;
|
+ BlockSapling.treeType = null;
|
||||||
+ Location location = new Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
+ Location location = new Location(worldserver.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||||
+ List<BlockState> blocks = (List<BlockState>) world.capturedBlockStates.clone();
|
+ List<BlockState> blocks = (List<BlockState>) worldserver.capturedBlockStates.clone();
|
||||||
+ world.capturedBlockStates.clear();
|
+ worldserver.capturedBlockStates.clear();
|
||||||
+ StructureGrowEvent event = null;
|
+ StructureGrowEvent event = null;
|
||||||
+ if (treeType != null) {
|
+ if (treeType != null) {
|
||||||
+ event = new StructureGrowEvent(location, treeType, false, null, blocks);
|
+ event = new StructureGrowEvent(location, treeType, false, null, blocks);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- a/net/minecraft/server/BlockScaffolding.java
|
--- a/net/minecraft/server/BlockScaffolding.java
|
||||||
+++ b/net/minecraft/server/BlockScaffolding.java
|
+++ b/net/minecraft/server/BlockScaffolding.java
|
||||||
@@ -78,7 +78,7 @@
|
@@ -73,7 +73,7 @@
|
||||||
int i = a((IBlockAccess) world, blockposition);
|
int i = a((IBlockAccess) worldserver, blockposition);
|
||||||
IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.set(BlockScaffolding.a, i)).set(BlockScaffolding.c, this.a(world, blockposition, i));
|
IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.set(BlockScaffolding.a, i)).set(BlockScaffolding.c, this.a(worldserver, blockposition, i));
|
||||||
|
|
||||||
- if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7) {
|
- if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7) {
|
||||||
+ if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit - BlockFadeEvent
|
+ if ((Integer) iblockdata1.get(BlockScaffolding.a) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit - BlockFadeEvent
|
||||||
if ((Integer) iblockdata.get(BlockScaffolding.a) == 7) {
|
if ((Integer) iblockdata.get(BlockScaffolding.a) == 7) {
|
||||||
world.addEntity(new EntityFallingBlock(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.set(BlockScaffolding.b, false)));
|
worldserver.addEntity(new EntityFallingBlock(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (IBlockData) iblockdata1.set(BlockScaffolding.b, false)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
+++ b/net/minecraft/server/BlockSnow.java
|
+++ b/net/minecraft/server/BlockSnow.java
|
||||||
@@ -58,6 +58,11 @@
|
@@ -58,6 +58,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void tick(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||||
if (world.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
|
if (worldserver.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
c(iblockdata, world, blockposition);
|
c(iblockdata, (World) worldserver, blockposition);
|
||||||
world.a(blockposition, false);
|
worldserver.a(blockposition, false);
|
||||||
}
|
}
|
||||||
|
@ -11,19 +11,19 @@
|
|||||||
+
|
+
|
||||||
public class BlockSoil extends Block {
|
public class BlockSoil extends Block {
|
||||||
|
|
||||||
public static final BlockStateInteger MOISTURE = BlockProperties.ap;
|
public static final BlockStateInteger MOISTURE = BlockProperties.aq;
|
||||||
@@ -53,12 +58,12 @@
|
@@ -53,12 +58,12 @@
|
||||||
|
|
||||||
if (!a((IWorldReader) world, blockposition) && !world.isRainingAt(blockposition.up())) {
|
if (!a((IWorldReader) worldserver, blockposition) && !worldserver.isRainingAt(blockposition.up())) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, i - 1), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, i - 1), 2);
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, i - 1), 2); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, i - 1), 2); // CraftBukkit
|
||||||
} else if (!a((IBlockAccess) world, blockposition)) {
|
} else if (!a((IBlockAccess) worldserver, blockposition)) {
|
||||||
fade(iblockdata, world, blockposition);
|
fade(iblockdata, worldserver, blockposition);
|
||||||
}
|
}
|
||||||
} else if (i < 7) {
|
} else if (i < 7) {
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, 7), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, 7), 2);
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, 7), 2); // CraftBukkit
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockSoil.MOISTURE, 7), 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,29 +13,29 @@
|
|||||||
|
|
||||||
if (i < 7) {
|
if (i < 7) {
|
||||||
iblockdata = (IBlockData) iblockdata.set(BlockStem.AGE, i + 1);
|
iblockdata = (IBlockData) iblockdata.set(BlockStem.AGE, i + 1);
|
||||||
- world.setTypeAndData(blockposition, iblockdata, 2);
|
- worldserver.setTypeAndData(blockposition, iblockdata, 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, iblockdata, 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata, 2); // CraftBukkit
|
||||||
} else {
|
} else {
|
||||||
EnumDirection enumdirection = EnumDirection.EnumDirectionLimit.HORIZONTAL.a(random);
|
EnumDirection enumdirection = EnumDirection.EnumDirectionLimit.HORIZONTAL.a(random);
|
||||||
BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
||||||
Block block = world.getType(blockposition1.down()).getBlock();
|
Block block = worldserver.getType(blockposition1.down()).getBlock();
|
||||||
|
|
||||||
if (world.getType(blockposition1).isAir() && (block == Blocks.FARMLAND || block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL || block == Blocks.GRASS_BLOCK)) {
|
if (worldserver.getType(blockposition1).isAir() && (block == Blocks.FARMLAND || block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL || block == Blocks.GRASS_BLOCK)) {
|
||||||
- world.setTypeUpdate(blockposition1, this.blockFruit.getBlockData());
|
- worldserver.setTypeUpdate(blockposition1, this.blockFruit.getBlockData());
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!CraftEventFactory.handleBlockGrowEvent(world, blockposition1, this.blockFruit.getBlockData())) {
|
+ if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.blockFruit.getBlockData())) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.setTypeUpdate(blockposition, (IBlockData) this.blockFruit.e().getBlockData().set(BlockFacingHorizontal.FACING, enumdirection));
|
worldserver.setTypeUpdate(blockposition, (IBlockData) this.blockFruit.d().getBlockData().set(BlockFacingHorizontal.FACING, enumdirection));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +72,7 @@
|
@@ -66,7 +72,7 @@
|
||||||
int i = Math.min(7, (Integer) iblockdata.get(BlockStem.AGE) + MathHelper.nextInt(world.random, 2, 5));
|
int i = Math.min(7, (Integer) iblockdata.get(BlockStem.AGE) + MathHelper.nextInt(worldserver.random, 2, 5));
|
||||||
IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockStem.AGE, i);
|
IBlockData iblockdata1 = (IBlockData) iblockdata.set(BlockStem.AGE, i);
|
||||||
|
|
||||||
- world.setTypeAndData(blockposition, iblockdata1, 2);
|
- worldserver.setTypeAndData(blockposition, iblockdata1, 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, iblockdata1, 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata1, 2); // CraftBukkit
|
||||||
if (i == 7) {
|
if (i == 7) {
|
||||||
iblockdata1.a(world, blockposition, world.random);
|
iblockdata1.a(worldserver, blockposition, worldserver.random);
|
||||||
}
|
}
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
@@ -24,7 +28,7 @@
|
@@ -24,7 +28,7 @@
|
||||||
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
|
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
|
||||||
|
|
||||||
if (i < 3 && random.nextInt(5) == 0 && world.getLightLevel(blockposition.up(), 0) >= 9) {
|
if (i < 3 && random.nextInt(5) == 0 && worldserver.getLightLevel(blockposition.up(), 0) >= 9) {
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2);
|
||||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.set(BlockSweetBerryBush.a, i + 1), 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,7 +42,9 @@
|
@@ -38,7 +42,9 @@
|
||||||
double d1 = Math.abs(entity.locZ - entity.J);
|
double d1 = Math.abs(entity.locZ() - entity.G);
|
||||||
|
|
||||||
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
|
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
|
||||||
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
|
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition); // CraftBukkit
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/BlockTNT.java
|
--- a/net/minecraft/server/BlockTNT.java
|
||||||
+++ b/net/minecraft/server/BlockTNT.java
|
+++ b/net/minecraft/server/BlockTNT.java
|
||||||
@@ -93,6 +93,11 @@
|
@@ -95,6 +95,11 @@
|
||||||
|
|
||||||
if (entityarrow.isBurning()) {
|
if (entityarrow.isBurning()) {
|
||||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
public class BlockTripwire extends Block {
|
public class BlockTripwire extends Block {
|
||||||
|
|
||||||
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
public static final BlockStateBoolean POWERED = BlockProperties.w;
|
||||||
@@ -139,6 +141,40 @@
|
@@ -132,6 +134,40 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,28 +38,28 @@
|
|||||||
|
|
||||||
if (i < 2) {
|
if (i < 2) {
|
||||||
+ // CraftBukkit start - Call BlockGrowEvent
|
+ // CraftBukkit start - Call BlockGrowEvent
|
||||||
+ if (!CraftEventFactory.handleBlockGrowEvent(world, blockposition, iblockdata.set(BlockTurtleEgg.a, i + 1), 2)) {
|
+ if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata.set(BlockTurtleEgg.a, i + 1), 2)) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_EGG_CRACK, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
|
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_EGG_CRACK, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
|
||||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockTurtleEgg.a, i + 1), 2);
|
- worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockTurtleEgg.a, i + 1), 2);
|
||||||
+ // world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockTurtleEgg.a, i + 1), 2); // CraftBukkit - handled above
|
+ // worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockTurtleEgg.a, i + 1), 2); // CraftBukkit - handled above
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start - Call BlockFadeEvent
|
+ // CraftBukkit start - Call BlockFadeEvent
|
||||||
+ if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
+ if (CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
world.playSound((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
|
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
|
||||||
world.a(blockposition, false);
|
worldserver.a(blockposition, false);
|
||||||
if (!world.isClientSide) {
|
|
||||||
@@ -73,7 +102,7 @@
|
@@ -73,7 +102,7 @@
|
||||||
entityturtle.setAgeRaw(-24000);
|
entityturtle.setAgeRaw(-24000);
|
||||||
entityturtle.g(blockposition);
|
entityturtle.g(blockposition);
|
||||||
entityturtle.setPositionRotation((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F);
|
entityturtle.setPositionRotation((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F);
|
||||||
- world.addEntity(entityturtle);
|
- worldserver.addEntity(entityturtle);
|
||||||
+ world.addEntity(entityturtle, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit
|
+ worldserver.addEntity(entityturtle, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,51 +9,51 @@
|
|||||||
public class BlockVine extends Block {
|
public class BlockVine extends Block {
|
||||||
|
|
||||||
public static final BlockStateBoolean UP = BlockSprawling.e;
|
public static final BlockStateBoolean UP = BlockSprawling.e;
|
||||||
@@ -178,20 +180,24 @@
|
@@ -177,20 +179,24 @@
|
||||||
BlockPosition blockposition3 = blockposition2.shift(enumdirection1);
|
BlockPosition blockposition3 = blockposition2.shift(enumdirection1);
|
||||||
BlockPosition blockposition4 = blockposition2.shift(enumdirection2);
|
BlockPosition blockposition4 = blockposition2.shift(enumdirection2);
|
||||||
|
|
||||||
+ // CraftBukkit start - Call BlockSpreadEvent
|
+ // CraftBukkit start - Call BlockSpreadEvent
|
||||||
+ BlockPosition source = blockposition;
|
+ BlockPosition source = blockposition;
|
||||||
+
|
+
|
||||||
if (flag && a((IBlockAccess) world, blockposition3, enumdirection1)) {
|
if (flag && a((IBlockAccess) worldserver, blockposition3, enumdirection1)) {
|
||||||
- world.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection1), true), 2);
|
- worldserver.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection1), true), 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection1), true), 2);
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection1), true), 2);
|
||||||
} else if (flag1 && a((IBlockAccess) world, blockposition4, enumdirection2)) {
|
} else if (flag1 && a((IBlockAccess) worldserver, blockposition4, enumdirection2)) {
|
||||||
- world.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection2), true), 2);
|
- worldserver.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection2), true), 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection2), true), 2);
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.getBlockData().set(getDirection(enumdirection2), true), 2);
|
||||||
} else {
|
} else {
|
||||||
EnumDirection enumdirection3 = enumdirection.opposite();
|
EnumDirection enumdirection3 = enumdirection.opposite();
|
||||||
|
|
||||||
if (flag && world.isEmpty(blockposition3) && a((IBlockAccess) world, blockposition.shift(enumdirection1), enumdirection3)) {
|
if (flag && worldserver.isEmpty(blockposition3) && a((IBlockAccess) worldserver, blockposition.shift(enumdirection1), enumdirection3)) {
|
||||||
- world.setTypeAndData(blockposition3, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
- worldserver.setTypeAndData(blockposition3, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition3, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition3, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
||||||
} else if (flag1 && world.isEmpty(blockposition4) && a((IBlockAccess) world, blockposition.shift(enumdirection2), enumdirection3)) {
|
} else if (flag1 && worldserver.isEmpty(blockposition4) && a((IBlockAccess) worldserver, blockposition.shift(enumdirection2), enumdirection3)) {
|
||||||
- world.setTypeAndData(blockposition4, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
- worldserver.setTypeAndData(blockposition4, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition4, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition4, (IBlockData) this.getBlockData().set(getDirection(enumdirection3), true), 2);
|
||||||
} else if ((double) world.random.nextFloat() < 0.05D && a((IBlockAccess) world, blockposition2.up(), EnumDirection.UP)) {
|
} else if ((double) worldserver.random.nextFloat() < 0.05D && a((IBlockAccess) worldserver, blockposition2.up(), EnumDirection.UP)) {
|
||||||
- world.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(BlockVine.UP, true), 2);
|
- worldserver.setTypeAndData(blockposition2, (IBlockData) this.getBlockData().set(BlockVine.UP, true), 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (IBlockData) this.getBlockData().set(BlockVine.UP, true), 2);
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.getBlockData().set(BlockVine.UP, true), 2);
|
||||||
}
|
}
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
} else if (a((IBlockAccess) world, blockposition2, enumdirection)) {
|
} else if (a((IBlockAccess) worldserver, blockposition2, enumdirection)) {
|
||||||
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(getDirection(enumdirection), true), 2);
|
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.set(getDirection(enumdirection), true), 2);
|
||||||
@@ -221,7 +227,7 @@
|
@@ -220,7 +226,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.canSpread(iblockdata3)) {
|
if (this.canSpread(iblockdata3)) {
|
||||||
- world.setTypeAndData(blockposition1, iblockdata3, 2);
|
- worldserver.setTypeAndData(blockposition1, iblockdata3, 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition1, iblockdata3, 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, iblockdata3, 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -236,7 +242,7 @@
|
@@ -235,7 +241,7 @@
|
||||||
IBlockData iblockdata5 = this.a(iblockdata, iblockdata4, random);
|
IBlockData iblockdata5 = this.a(iblockdata, iblockdata4, random);
|
||||||
|
|
||||||
if (iblockdata4 != iblockdata5 && this.canSpread(iblockdata5)) {
|
if (iblockdata4 != iblockdata5 && this.canSpread(iblockdata5)) {
|
||||||
- world.setTypeAndData(blockposition2, iblockdata5, 2);
|
- worldserver.setTypeAndData(blockposition2, iblockdata5, 2);
|
||||||
+ CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition2, iblockdata5, 2); // CraftBukkit
|
+ CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata5, 2); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
@Override
|
@Override
|
||||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||||
super.a(iblockdata, world, blockposition, entity);
|
super.a(iblockdata, world, blockposition, entity);
|
||||||
- if (entity instanceof EntityBoat) {
|
- if (world instanceof WorldServer && entity instanceof EntityBoat) {
|
||||||
+ if (entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit
|
+ if (world instanceof WorldServer && entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit
|
||||||
world.b(new BlockPosition(blockposition), true);
|
world.a(new BlockPosition(blockposition), true, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +58,15 @@
|
@@ -50,6 +58,15 @@
|
||||||
entitywither.setPositionRotation((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
|
entitywither.setPositionRotation((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().m() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
|
||||||
entitywither.aK = shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
|
entitywither.aI = shapedetector_shapedetectorcollection.getFacing().m() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
|
||||||
entitywither.l();
|
entitywither.l();
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
|
+ if (!world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
public Chunk(World world, ProtoChunk protochunk) {
|
public Chunk(World world, ProtoChunk protochunk) {
|
||||||
this(world, protochunk.getPos(), protochunk.getBiomeIndex(), protochunk.p(), protochunk.n(), protochunk.o(), protochunk.q(), protochunk.getSections(), (Consumer) null);
|
this(world, protochunk.getPos(), protochunk.getBiomeIndex(), protochunk.p(), protochunk.n(), protochunk.o(), protochunk.getInhabitedTime(), protochunk.getSections(), (Consumer) null);
|
||||||
Iterator iterator = protochunk.y().iterator();
|
Iterator iterator = protochunk.y().iterator();
|
||||||
@@ -138,6 +149,7 @@
|
@@ -138,6 +149,7 @@
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
iblockdata.onPlace(this.world, blockposition, iblockdata1, flag);
|
iblockdata.onPlace(this.world, blockposition, iblockdata1, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -382,7 +402,12 @@
|
@@ -377,7 +397,12 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||||
@ -69,8 +69,8 @@
|
|||||||
|
|
||||||
if (tileentity == null) {
|
if (tileentity == null) {
|
||||||
NBTTagCompound nbttagcompound = (NBTTagCompound) this.e.remove(blockposition);
|
NBTTagCompound nbttagcompound = (NBTTagCompound) this.e.remove(blockposition);
|
||||||
@@ -429,6 +454,13 @@
|
@@ -423,6 +448,13 @@
|
||||||
tileentity1.V_();
|
tileentity1.ab_();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
@ -83,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,6 +510,50 @@
|
@@ -472,6 +504,50 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,16 @@
|
|||||||
public void markDirty() {
|
public void markDirty() {
|
||||||
this.s = true;
|
this.s = true;
|
||||||
}
|
}
|
||||||
@@ -552,7 +628,7 @@
|
@@ -525,7 +601,7 @@
|
||||||
|
Iterator iterator = this.entitySlices[k].a(Entity.class).iterator();
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
- Entity entity = (Entity) iterator.next();
|
||||||
|
+ T entity = (T) iterator.next(); // CraftBukkit - decompile error
|
||||||
|
|
||||||
|
if ((entitytypes == null || entity.getEntityType() == entitytypes) && entity.getBoundingBox().c(axisalignedbb) && predicate.test(entity)) {
|
||||||
|
list.add(entity);
|
||||||
|
@@ -546,7 +622,7 @@
|
||||||
Iterator iterator = this.entitySlices[k].a(oclass).iterator();
|
Iterator iterator = this.entitySlices[k].a(oclass).iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@ -143,7 +152,7 @@
|
|||||||
|
|
||||||
if (t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) {
|
if (t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) {
|
||||||
list.add(t0);
|
list.add(t0);
|
||||||
@@ -626,7 +702,7 @@
|
@@ -620,7 +696,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNeedsSaving() {
|
public boolean isNeedsSaving() {
|
||||||
@ -152,7 +161,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void d(boolean flag) {
|
public void d(boolean flag) {
|
||||||
@@ -767,7 +843,7 @@
|
@@ -761,7 +837,7 @@
|
||||||
|
|
||||||
public void B() {
|
public void B() {
|
||||||
if (this.o instanceof ProtoChunkTickList) {
|
if (this.o instanceof ProtoChunkTickList) {
|
||||||
@ -161,7 +170,7 @@
|
|||||||
return this.getType(blockposition).getBlock();
|
return this.getType(blockposition).getBlock();
|
||||||
});
|
});
|
||||||
this.o = TickListEmpty.b();
|
this.o = TickListEmpty.b();
|
||||||
@@ -777,7 +853,7 @@
|
@@ -771,7 +847,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.p instanceof ProtoChunkTickList) {
|
if (this.p instanceof ProtoChunkTickList) {
|
||||||
@ -170,7 +179,7 @@
|
|||||||
return this.getFluid(blockposition).getType();
|
return this.getFluid(blockposition).getType();
|
||||||
});
|
});
|
||||||
this.p = TickListEmpty.b();
|
this.p = TickListEmpty.b();
|
||||||
@@ -789,12 +865,12 @@
|
@@ -783,12 +859,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(WorldServer worldserver) {
|
public void a(WorldServer worldserver) {
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
--- a/net/minecraft/server/ChunkGenerator.java
|
--- a/net/minecraft/server/ChunkGenerator.java
|
||||||
+++ b/net/minecraft/server/ChunkGenerator.java
|
+++ b/net/minecraft/server/ChunkGenerator.java
|
||||||
@@ -148,6 +148,19 @@
|
@@ -147,6 +147,18 @@
|
||||||
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
|
StructureStart structurestart1 = StructureStart.a;
|
||||||
StructureStart structurestart = StructureStart.a;
|
BiomeBase biomebase = biomemanager.a(new BlockPosition(chunkcoordintpair.d() + 9, 0, chunkcoordintpair.e() + 9));
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (structuregenerator == WorldGenerator.STRONGHOLD) {
|
+ if (structuregenerator == WorldGenerator.STRONGHOLD) {
|
||||||
+ synchronized (structuregenerator) {
|
+ synchronized (structuregenerator) {
|
||||||
+ if (structuregenerator.a(chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z)) {
|
+ if (structuregenerator.a(biomemanager, chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z, biomebase)) {
|
||||||
+ BiomeBase biomebase = this.getWorldChunkManager().getBiome(new BlockPosition(chunkcoordintpair.d() + 9, 0, chunkcoordintpair.e() + 9));
|
+ StructureStart structurestart2 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, StructureBoundingBox.a(), i, chunkgenerator.getSeed());
|
||||||
+ StructureStart structurestart1 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, biomebase, StructureBoundingBox.a(), 0, chunkgenerator.getSeed());
|
|
||||||
+
|
+
|
||||||
+ structurestart1.a(this, definedstructuremanager, chunkcoordintpair.x, chunkcoordintpair.z, biomebase);
|
+ structurestart2.a(this, definedstructuremanager, chunkcoordintpair.x, chunkcoordintpair.z, biomebase);
|
||||||
+ structurestart = structurestart1.e() ? structurestart1 : StructureStart.a;
|
+ structurestart1 = structurestart2.e() ? structurestart2 : StructureStart.a;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ } else
|
+ } else
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
if (structuregenerator.a(chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z)) {
|
if (structuregenerator.a(biomemanager, chunkgenerator, seededrandom, chunkcoordintpair.x, chunkcoordintpair.z, biomebase)) {
|
||||||
BiomeBase biomebase = this.getWorldChunkManager().getBiome(new BlockPosition(chunkcoordintpair.d() + 9, 0, chunkcoordintpair.e() + 9));
|
StructureStart structurestart2 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, StructureBoundingBox.a(), i, chunkgenerator.getSeed());
|
||||||
StructureStart structurestart1 = structuregenerator.a().create(structuregenerator, chunkcoordintpair.x, chunkcoordintpair.z, biomebase, StructureBoundingBox.a(), 0, chunkgenerator.getSeed());
|
|
||||||
|
@ -1,24 +1,15 @@
|
|||||||
--- a/net/minecraft/server/ChunkMapDistance.java
|
--- a/net/minecraft/server/ChunkMapDistance.java
|
||||||
+++ b/net/minecraft/server/ChunkMapDistance.java
|
+++ b/net/minecraft/server/ChunkMapDistance.java
|
||||||
@@ -32,7 +32,7 @@
|
@@ -59,7 +59,7 @@
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
|
||||||
private static final int b = 33 + ChunkStatus.a(ChunkStatus.FULL) - 2;
|
|
||||||
private final Long2ObjectMap<ObjectSet<EntityPlayer>> c = new Long2ObjectOpenHashMap();
|
|
||||||
- private final Long2ObjectOpenHashMap<ObjectSortedSet<Ticket<?>>> tickets = new Long2ObjectOpenHashMap();
|
|
||||||
+ public final Long2ObjectOpenHashMap<ObjectSortedSet<Ticket<?>>> tickets = new Long2ObjectOpenHashMap(); // CraftBukkit - private -> public
|
|
||||||
private final ChunkMapDistance.a e = new ChunkMapDistance.a();
|
|
||||||
private final ChunkMapDistance.b f = new ChunkMapDistance.b(8);
|
|
||||||
private final ChunkMapDistance.c g = new ChunkMapDistance.c(33);
|
|
||||||
@@ -62,7 +62,7 @@
|
|
||||||
while (objectiterator.hasNext()) {
|
while (objectiterator.hasNext()) {
|
||||||
Entry<ObjectSortedSet<Ticket<?>>> entry = (Entry) objectiterator.next();
|
Entry<ArraySetSorted<Ticket<?>>> entry = (Entry) objectiterator.next();
|
||||||
|
|
||||||
- if (((ObjectSortedSet) entry.getValue()).removeIf((ticket) -> {
|
- if (((ArraySetSorted) entry.getValue()).removeIf((ticket) -> {
|
||||||
+ if ((entry.getValue()).removeIf((ticket) -> { // Craftbukkit - decompile error
|
+ if ((entry.getValue()).removeIf((ticket) -> { // CraftBukkit - decompile error
|
||||||
return ticket.a(this.currentTick);
|
return ticket.b(this.currentTick);
|
||||||
})) {
|
})) {
|
||||||
this.e.b(entry.getLongKey(), this.a((ObjectSortedSet) entry.getValue()), false);
|
this.e.b(entry.getLongKey(), a((ArraySetSorted) entry.getValue()), false);
|
||||||
@@ -100,10 +100,25 @@
|
@@ -95,10 +95,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.pendingChunkUpdates.isEmpty()) {
|
if (!this.pendingChunkUpdates.isEmpty()) {
|
||||||
@ -47,7 +38,7 @@
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (!this.l.isEmpty()) {
|
if (!this.l.isEmpty()) {
|
||||||
@@ -125,7 +140,7 @@
|
@@ -120,7 +135,7 @@
|
||||||
|
|
||||||
completablefuture.thenAccept((either) -> {
|
completablefuture.thenAccept((either) -> {
|
||||||
this.m.execute(() -> {
|
this.m.execute(() -> {
|
||||||
@ -56,86 +47,79 @@
|
|||||||
}, j, false));
|
}, j, false));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -139,7 +154,7 @@
|
@@ -134,23 +149,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void addTicket(long i, Ticket<?> ticket) {
|
- private void addTicket(long i, Ticket<?> ticket) {
|
||||||
+ private boolean addTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
|
+ private boolean addTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
|
||||||
ObjectSortedSet<Ticket<?>> objectsortedset = this.e(i);
|
ArraySetSorted<Ticket<?>> arraysetsorted = this.e(i);
|
||||||
ObjectBidirectionalIterator<Ticket<?>> objectbidirectionaliterator = objectsortedset.iterator();
|
int j = a(arraysetsorted);
|
||||||
int j;
|
- Ticket<?> ticket1 = (Ticket) arraysetsorted.a((Object) ticket);
|
||||||
@@ -150,21 +165,24 @@
|
+ Ticket<?> ticket1 = (Ticket) arraysetsorted.a(ticket); // CraftBukkit - decompile error
|
||||||
j = PlayerChunkMap.GOLDEN_TICKET + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ boolean ret = false; // CraftBukkit
|
|
||||||
if (objectsortedset.add(ticket)) {
|
|
||||||
- ;
|
|
||||||
+ ret = true; // CraftBukkit
|
|
||||||
}
|
|
||||||
|
|
||||||
|
ticket1.a(this.currentTick);
|
||||||
if (ticket.b() < j) {
|
if (ticket.b() < j) {
|
||||||
this.e.b(i, ticket.b(), true);
|
this.e.b(i, ticket.b(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ return ret; // CraftBukkit
|
+ return ticket == ticket1; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void removeTicket(long i, Ticket<?> ticket) {
|
- private void removeTicket(long i, Ticket<?> ticket) {
|
||||||
+ private boolean removeTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
|
+ private boolean removeTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
|
||||||
ObjectSortedSet<Ticket<?>> objectsortedset = this.e(i);
|
ArraySetSorted<Ticket<?>> arraysetsorted = this.e(i);
|
||||||
|
|
||||||
+ boolean removed = false; // CraftBukkit
|
+ boolean removed = false; // CraftBukkit
|
||||||
if (objectsortedset.remove(ticket)) {
|
if (arraysetsorted.remove(ticket)) {
|
||||||
- ;
|
- ;
|
||||||
+ removed = true; // CraftBukkit
|
+ removed = true; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
if (objectsortedset.isEmpty()) {
|
if (arraysetsorted.isEmpty()) {
|
||||||
@@ -172,16 +190,29 @@
|
@@ -158,16 +175,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e.b(i, this.a(objectsortedset), false);
|
this.e.b(i, a(arraysetsorted), false);
|
||||||
+ return removed; // CraftBukkit
|
+ return removed; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> void a(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
public <T> void a(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
||||||
- this.addTicket(chunkcoordintpair.pair(), new Ticket<>(tickettype, i, t0, this.currentTick));
|
- this.addTicket(chunkcoordintpair.pair(), new Ticket<>(tickettype, i, t0));
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ this.addTicketAtLevel(tickettype, chunkcoordintpair, i, t0);
|
+ this.addTicketAtLevel(tickettype, chunkcoordintpair, i, t0);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public <T> boolean addTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) {
|
+ public <T> boolean addTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) {
|
||||||
+ return this.addTicket(chunkcoordintpair.pair(), new Ticket<>(ticketType, level, identifier, this.currentTick));
|
+ return this.addTicket(chunkcoordintpair.pair(), new Ticket<>(ticketType, level, identifier));
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> void b(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
public <T> void b(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
||||||
- Ticket<T> ticket = new Ticket<>(tickettype, i, t0, this.currentTick);
|
- Ticket<T> ticket = new Ticket<>(tickettype, i, t0);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ this.removeTicketAtLevel(tickettype, chunkcoordintpair, i, t0);
|
+ this.removeTicketAtLevel(tickettype, chunkcoordintpair, i, t0);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
- this.removeTicket(chunkcoordintpair.pair(), ticket);
|
- this.removeTicket(chunkcoordintpair.pair(), ticket);
|
||||||
+ public <T> boolean removeTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) {
|
+ public <T> boolean removeTicketAtLevel(TicketType<T> ticketType, ChunkCoordIntPair chunkcoordintpair, int level, T identifier) {
|
||||||
+ Ticket<T> ticket = new Ticket<>(ticketType, level, identifier, this.currentTick);
|
+ Ticket<T> ticket = new Ticket<>(ticketType, level, identifier);
|
||||||
+
|
+
|
||||||
+ return this.removeTicket(chunkcoordintpair.pair(), ticket);
|
+ return this.removeTicket(chunkcoordintpair.pair(), ticket);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> void addTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
public <T> void addTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
|
||||||
@@ -265,6 +296,21 @@
|
@@ -251,6 +281,21 @@
|
||||||
return this.i.a();
|
return this.i.a();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
|
+ public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
|
||||||
+ Ticket<T> target = new Ticket<>(ticketType, ticketLevel, ticketIdentifier, this.currentTick);
|
+ Ticket<T> target = new Ticket<>(ticketType, ticketLevel, ticketIdentifier);
|
||||||
+
|
+
|
||||||
+ for (java.util.Iterator<ObjectSortedSet<Ticket<?>>> iterator = this.tickets.values().iterator(); iterator.hasNext();) {
|
+ for (java.util.Iterator<ArraySetSorted<Ticket<?>>> iterator = this.tickets.values().iterator(); iterator.hasNext();) {
|
||||||
+ ObjectSortedSet<Ticket<?>> tickets = iterator.next();
|
+ ArraySetSorted<Ticket<?>> tickets = iterator.next();
|
||||||
+ tickets.remove(target);
|
+ tickets.remove(target);
|
||||||
+
|
+
|
||||||
+ if (tickets.isEmpty()) {
|
+ if (tickets.isEmpty()) {
|
||||||
@ -148,8 +132,8 @@
|
|||||||
class a extends ChunkMap {
|
class a extends ChunkMap {
|
||||||
|
|
||||||
public a() {
|
public a() {
|
||||||
@@ -351,13 +397,13 @@
|
@@ -331,13 +376,13 @@
|
||||||
Ticket<?> ticket = new Ticket<>(TicketType.PLAYER, ChunkMapDistance.b, new ChunkCoordIntPair(i), ChunkMapDistance.this.currentTick);
|
Ticket<?> ticket = new Ticket<>(TicketType.PLAYER, ChunkMapDistance.b, new ChunkCoordIntPair(i));
|
||||||
|
|
||||||
if (flag1) {
|
if (flag1) {
|
||||||
- ChunkMapDistance.this.j.a((Object) ChunkTaskQueueSorter.a(() -> {
|
- ChunkMapDistance.this.j.a((Object) ChunkTaskQueueSorter.a(() -> {
|
||||||
@ -164,7 +148,7 @@
|
|||||||
}, i, false));
|
}, i, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,7 +412,7 @@
|
@@ -346,7 +391,7 @@
|
||||||
return j;
|
return j;
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
for (int i = -2; i <= 2; ++i) {
|
for (int i = -2; i <= 2; ++i) {
|
||||||
for (int j = -2; j <= 2; ++j) {
|
for (int j = -2; j <= 2; ++j) {
|
||||||
float f = 10.0F / MathHelper.c((float) (i * i + j * j) + 0.2F);
|
float f = 10.0F / MathHelper.c((float) (i * i + j * j) + 0.2F);
|
||||||
@@ -82,6 +82,11 @@
|
@@ -83,6 +83,11 @@
|
||||||
f4 = 1.0F + f4 * 2.0F;
|
f4 = 1.0F + f4 * 2.0F;
|
||||||
f5 = 1.0F + f5 * 4.0F;
|
f5 = 1.0F + f5 * 4.0F;
|
||||||
}
|
}
|
||||||
@ -19,5 +19,5 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
float f6 = ChunkProviderGenerate.h[k + 2 + (l + 2) * 5] / (f4 + 2.0F);
|
float f6 = ChunkProviderGenerate.h[l + 2 + (i1 + 2) * 5] / (f4 + 2.0F);
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@
|
|||||||
+ int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits
|
+ int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits
|
||||||
|
|
||||||
if (object2intmap.getInt(enumcreaturetype) <= k1) {
|
if (object2intmap.getInt(enumcreaturetype) <= k1) {
|
||||||
SpawnerCreature.a(enumcreaturetype, (World) this.world, chunk, blockposition);
|
SpawnerCreature.a(enumcreaturetype, this.world, chunk, blockposition);
|
||||||
@@ -497,12 +547,18 @@
|
@@ -496,12 +546,18 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean executeNext() {
|
protected boolean executeNext() {
|
||||||
|
@ -8,19 +8,19 @@
|
|||||||
|
|
||||||
public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||||
|
|
||||||
@@ -15,6 +16,10 @@
|
@@ -16,6 +17,10 @@
|
||||||
private IChatBaseComponent lastOutput;
|
private IChatBaseComponent lastOutput;
|
||||||
private String command = "";
|
private String command = "";
|
||||||
private IChatBaseComponent customName = new ChatComponentText("@");
|
private IChatBaseComponent customName;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper);
|
+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
public CommandBlockListenerAbstract() {}
|
public CommandBlockListenerAbstract() {
|
||||||
|
this.customName = CommandBlockListenerAbstract.c;
|
||||||
@@ -102,14 +107,7 @@
|
@@ -105,14 +110,7 @@
|
||||||
if (minecraftserver != null && minecraftserver.F() && minecraftserver.getEnableCommandBlock() && !UtilColor.b(this.command)) {
|
if (minecraftserver != null && minecraftserver.J() && minecraftserver.getEnableCommandBlock() && !UtilColor.b(this.command)) {
|
||||||
try {
|
try {
|
||||||
this.lastOutput = null;
|
this.lastOutput = null;
|
||||||
- CommandListenerWrapper commandlistenerwrapper = this.getWrapper().a((commandcontext, flag, i) -> {
|
- CommandListenerWrapper commandlistenerwrapper = this.getWrapper().a((commandcontext, flag, i) -> {
|
||||||
@ -35,15 +35,3 @@
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||||
@@ -140,6 +138,11 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(IChatBaseComponent ichatbasecomponent) {
|
|
||||||
+ // CraftBukkit start
|
|
||||||
+ if (ichatbasecomponent == null) {
|
|
||||||
+ ichatbasecomponent = new ChatComponentText("@");
|
|
||||||
+ }
|
|
||||||
+ // CraftBukkit end
|
|
||||||
this.customName = ichatbasecomponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/CommandDispatcher.java
|
--- a/net/minecraft/server/CommandDispatcher.java
|
||||||
+++ b/net/minecraft/server/CommandDispatcher.java
|
+++ b/net/minecraft/server/CommandDispatcher.java
|
||||||
@@ -17,12 +17,21 @@
|
@@ -19,12 +19,21 @@
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
CommandAdvancement.a(this.b);
|
CommandAdvancement.a(this.b);
|
||||||
CommandExecute.a(this.b);
|
CommandExecute.a(this.b);
|
||||||
CommandBossBar.a(this.b);
|
CommandBossBar.a(this.b);
|
||||||
@@ -93,14 +102,59 @@
|
@@ -100,14 +109,59 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
|
this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
|
||||||
@ -84,7 +84,7 @@
|
|||||||
StringReader stringreader = new StringReader(s);
|
StringReader stringreader = new StringReader(s);
|
||||||
|
|
||||||
if (stringreader.canRead() && stringreader.peek() == '/') {
|
if (stringreader.canRead() && stringreader.peek() == '/') {
|
||||||
@@ -112,7 +166,6 @@
|
@@ -119,7 +173,6 @@
|
||||||
byte b0;
|
byte b0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -92,7 +92,7 @@
|
|||||||
ChatComponentText chatcomponenttext;
|
ChatComponentText chatcomponenttext;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -121,52 +174,56 @@
|
@@ -128,58 +181,62 @@
|
||||||
return i;
|
return i;
|
||||||
} catch (CommandException commandexception) {
|
} catch (CommandException commandexception) {
|
||||||
commandlistenerwrapper.sendFailureMessage(commandexception.a());
|
commandlistenerwrapper.sendFailureMessage(commandexception.a());
|
||||||
@ -144,39 +144,49 @@
|
|||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
- chatcomponenttext = new ChatComponentText;
|
- chatcomponenttext = new ChatComponentText;
|
||||||
- }
|
- }
|
||||||
-
|
|
||||||
- chatcomponenttext.<init>(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
|
||||||
- ChatComponentText chatcomponenttext1 = chatcomponenttext;
|
|
||||||
+ ChatMessage chatmessage1 = new ChatMessage("command.failed", new Object[0]);
|
+ ChatMessage chatmessage1 = new ChatMessage("command.failed", new Object[0]);
|
||||||
|
|
||||||
- if (CommandDispatcher.LOGGER.isDebugEnabled()) {
|
- chatcomponenttext.<init>(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||||
- StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
- ChatComponentText chatcomponenttext1 = chatcomponenttext;
|
||||||
+ chatcomponenttext = new ChatComponentText(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
+ chatcomponenttext = new ChatComponentText(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
|
||||||
+ if (CommandDispatcher.LOGGER.isDebugEnabled()) {
|
+ if (CommandDispatcher.LOGGER.isDebugEnabled()) {
|
||||||
|
+ CommandDispatcher.LOGGER.error("Command exception: {}", s, exception);
|
||||||
+ StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
+ StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||||
|
|
||||||
- for(int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
- if (CommandDispatcher.LOGGER.isDebugEnabled()) {
|
||||||
- chatcomponenttext1.a("\n\n").a(astacktraceelement[k].getMethodName()).a("\n ").a(astacktraceelement[k].getFileName()).a(":").a(String.valueOf(astacktraceelement[k].getLineNumber()));
|
- CommandDispatcher.LOGGER.error("Command exception: {}", s, exception);
|
||||||
|
- StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||||
+ for (int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
+ for (int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
||||||
+ chatcomponenttext.a("\n\n" + astacktraceelement[k].getMethodName() + "\n " + astacktraceelement[k].getFileName() + ":" + astacktraceelement[k].getLineNumber());
|
+ chatcomponenttext.a("\n\n" + astacktraceelement[k].getMethodName() + "\n " + astacktraceelement[k].getFileName() + ":" + astacktraceelement[k].getLineNumber());
|
||||||
+ }
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- for(int k = 0; k < Math.min(astacktraceelement.length, 3); ++k) {
|
||||||
|
- chatcomponenttext1.a("\n\n").a(astacktraceelement[k].getMethodName()).a("\n ").a(astacktraceelement[k].getFileName()).a(":").a(String.valueOf(astacktraceelement[k].getLineNumber()));
|
||||||
|
+ chatmessage1.getChatModifier().setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, chatcomponenttext));
|
||||||
|
+ commandlistenerwrapper.sendFailureMessage(chatmessage1);
|
||||||
|
+ if (SharedConstants.b) {
|
||||||
|
+ commandlistenerwrapper.sendFailureMessage(new ChatComponentText(SystemUtils.d(exception)));
|
||||||
|
+ CommandDispatcher.LOGGER.error("'" + s + "' threw an exception", exception);
|
||||||
}
|
}
|
||||||
- }
|
- }
|
||||||
|
|
||||||
- commandlistenerwrapper.sendFailureMessage((new ChatMessage("command.failed", new Object[0])).a((chatmodifier) -> {
|
- commandlistenerwrapper.sendFailureMessage((new ChatMessage("command.failed", new Object[0])).a((chatmodifier) -> {
|
||||||
- chatmodifier.setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, chatcomponenttext1));
|
- chatmodifier.setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, chatcomponenttext1));
|
||||||
- }));
|
- }));
|
||||||
- b0 = 0;
|
- if (SharedConstants.b) {
|
||||||
+ chatmessage1.getChatModifier().setChatHoverable(new ChatHoverable(ChatHoverable.EnumHoverAction.SHOW_TEXT, chatcomponenttext));
|
- commandlistenerwrapper.sendFailureMessage(new ChatComponentText(SystemUtils.d(exception)));
|
||||||
+ commandlistenerwrapper.sendFailureMessage(chatmessage1);
|
- CommandDispatcher.LOGGER.error("'" + s + "' threw an exception", exception);
|
||||||
|
- }
|
||||||
+ byte b1 = 0;
|
+ byte b1 = 0;
|
||||||
+
|
|
||||||
|
- b0 = 0;
|
||||||
+ return b1;
|
+ return b1;
|
||||||
+ }
|
+ }
|
||||||
} finally {
|
} finally {
|
||||||
commandlistenerwrapper.getServer().getMethodProfiler().exit();
|
commandlistenerwrapper.getServer().getMethodProfiler().exit();
|
||||||
}
|
}
|
||||||
@@ -175,11 +232,36 @@
|
@@ -188,11 +245,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(EntityPlayer entityplayer) {
|
public void a(EntityPlayer entityplayer) {
|
||||||
@ -214,7 +224,7 @@
|
|||||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(rootcommandnode));
|
entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(rootcommandnode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +272,7 @@
|
@@ -203,7 +285,7 @@
|
||||||
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
|
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
|
||||||
|
|
||||||
if (commandnode2.canUse(commandlistenerwrapper)) {
|
if (commandnode2.canUse(commandlistenerwrapper)) {
|
||||||
@ -223,7 +233,7 @@
|
|||||||
|
|
||||||
argumentbuilder.requires((icompletionprovider) -> {
|
argumentbuilder.requires((icompletionprovider) -> {
|
||||||
return true;
|
return true;
|
||||||
@@ -213,7 +295,7 @@
|
@@ -226,7 +308,7 @@
|
||||||
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/CommandEffect.java
|
--- a/net/minecraft/server/CommandEffect.java
|
||||||
+++ b/net/minecraft/server/CommandEffect.java
|
+++ b/net/minecraft/server/CommandEffect.java
|
||||||
@@ -60,7 +60,7 @@
|
@@ -63,7 +63,7 @@
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving) {
|
||||||
MobEffect mobeffect = new MobEffect(mobeffectlist, k, i, false, flag);
|
MobEffect mobeffect = new MobEffect(mobeffectlist, k, i, false, flag);
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
++j;
|
++j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@
|
@@ -89,7 +89,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@
|
@@ -114,7 +114,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
public boolean canUse(EntityHuman entityhuman) {
|
public boolean canUse(EntityHuman entityhuman) {
|
||||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||||
return (Boolean) this.containerAccess.a((world, blockposition) -> {
|
return (Boolean) this.containerAccess.a((world, blockposition) -> {
|
||||||
return !world.getType(blockposition).a(TagsBlock.ANVIL) ? false : entityhuman.e((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) <= 64.0D;
|
return !world.getType(blockposition).a(TagsBlock.ANVIL) ? false : entityhuman.g((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) <= 64.0D;
|
||||||
}, true);
|
}, true);
|
||||||
@@ -370,4 +382,18 @@
|
@@ -370,4 +382,18 @@
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
private final ContainerAccess containerAccess;
|
private final ContainerAccess containerAccess;
|
||||||
private boolean e;
|
private boolean e;
|
||||||
public final IInventory inventory;
|
private long f;
|
||||||
@@ -26,6 +48,13 @@
|
@@ -27,6 +49,13 @@
|
||||||
ContainerCartography.this.a((IInventory) this);
|
ContainerCartography.this.a((IInventory) this);
|
||||||
super.update();
|
super.update();
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@
|
|||||||
};
|
};
|
||||||
this.containerAccess = containeraccess;
|
this.containerAccess = containeraccess;
|
||||||
this.a(new Slot(this.inventory, 0, 15, 15) {
|
this.a(new Slot(this.inventory, 0, 15, 15) {
|
||||||
@@ -97,10 +126,12 @@
|
@@ -104,10 +133,12 @@
|
||||||
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
private final ContainerAccess containerAccess;
|
private final ContainerAccess containerAccess;
|
||||||
private final ContainerProperty d;
|
private final ContainerProperty d;
|
||||||
private Runnable e;
|
private Runnable e;
|
||||||
@@ -28,6 +50,13 @@
|
@@ -29,6 +51,13 @@
|
||||||
ContainerLoom.this.a((IInventory) this);
|
ContainerLoom.this.a((IInventory) this);
|
||||||
ContainerLoom.this.e.run();
|
ContainerLoom.this.e.run();
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@
|
|||||||
};
|
};
|
||||||
this.resultInventory = new InventorySubcontainer(1) {
|
this.resultInventory = new InventorySubcontainer(1) {
|
||||||
@Override
|
@Override
|
||||||
@@ -35,6 +64,13 @@
|
@@ -36,6 +65,13 @@
|
||||||
super.update();
|
super.update();
|
||||||
ContainerLoom.this.e.run();
|
ContainerLoom.this.e.run();
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@
|
|||||||
};
|
};
|
||||||
this.containerAccess = containeraccess;
|
this.containerAccess = containeraccess;
|
||||||
this.f = this.a(new Slot(this.craftInventory, 0, 13, 26) {
|
this.f = this.a(new Slot(this.craftInventory, 0, 13, 26) {
|
||||||
@@ -89,10 +125,12 @@
|
@@ -96,10 +132,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(this.d);
|
this.a(this.d);
|
||||||
@ -71,7 +71,7 @@
|
|||||||
return a(this.containerAccess, entityhuman, Blocks.LOOM);
|
return a(this.containerAccess, entityhuman, Blocks.LOOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,6 +249,11 @@
|
@@ -218,6 +256,11 @@
|
||||||
|
|
||||||
if (nbttagcompound.hasKeyOfType("Patterns", 9)) {
|
if (nbttagcompound.hasKeyOfType("Patterns", 9)) {
|
||||||
nbttaglist = nbttagcompound.getList("Patterns", 10);
|
nbttaglist = nbttagcompound.getList("Patterns", 10);
|
||||||
|
@ -42,4 +42,4 @@
|
|||||||
+ if (!this.merchant.getWorld().isClientSide && this.merchant instanceof Entity) { // CraftBukkit - SPIGOT-5035
|
+ if (!this.merchant.getWorld().isClientSide && this.merchant instanceof Entity) { // CraftBukkit - SPIGOT-5035
|
||||||
Entity entity = (Entity) this.merchant;
|
Entity entity = (Entity) this.merchant;
|
||||||
|
|
||||||
this.merchant.getWorld().a(entity.locX, entity.locY, entity.locZ, this.merchant.eb(), SoundCategory.NEUTRAL, 1.0F, 1.0F, false);
|
this.merchant.getWorld().a(entity.locX(), entity.locY(), entity.locZ(), this.merchant.getTradeSound(), SoundCategory.NEUTRAL, 1.0F, 1.0F, false);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/ContainerPlayer.java
|
--- a/net/minecraft/server/ContainerPlayer.java
|
||||||
+++ b/net/minecraft/server/ContainerPlayer.java
|
+++ b/net/minecraft/server/ContainerPlayer.java
|
||||||
@@ -1,18 +1,36 @@
|
@@ -1,5 +1,10 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
@ -10,15 +10,18 @@
|
|||||||
+
|
+
|
||||||
public class ContainerPlayer extends ContainerRecipeBook<InventoryCrafting> {
|
public class ContainerPlayer extends ContainerRecipeBook<InventoryCrafting> {
|
||||||
|
|
||||||
private static final String[] d = new String[]{"item/empty_armor_slot_boots", "item/empty_armor_slot_leggings", "item/empty_armor_slot_chestplate", "item/empty_armor_slot_helmet"};
|
public static final MinecraftKey c = new MinecraftKey("textures/atlas/blocks.png");
|
||||||
private static final EnumItemSlot[] e = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET};
|
@@ -10,15 +15,28 @@
|
||||||
|
public static final MinecraftKey h = new MinecraftKey("item/empty_armor_slot_shield");
|
||||||
|
private static final MinecraftKey[] j = new MinecraftKey[]{ContainerPlayer.g, ContainerPlayer.f, ContainerPlayer.e, ContainerPlayer.d};
|
||||||
|
private static final EnumItemSlot[] k = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET};
|
||||||
- private final InventoryCrafting craftInventory = new InventoryCrafting(this, 2, 2);
|
- private final InventoryCrafting craftInventory = new InventoryCrafting(this, 2, 2);
|
||||||
- private final InventoryCraftResult resultInventory = new InventoryCraftResult();
|
- private final InventoryCraftResult resultInventory = new InventoryCraftResult();
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ private final InventoryCrafting craftInventory;
|
+ private final InventoryCrafting craftInventory;
|
||||||
+ private final InventoryCraftResult resultInventory;
|
+ private final InventoryCraftResult resultInventory;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
public final boolean c;
|
public final boolean i;
|
||||||
private final EntityHuman owner;
|
private final EntityHuman owner;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ private CraftInventoryView bukkitEntity = null;
|
+ private CraftInventoryView bukkitEntity = null;
|
||||||
@ -27,7 +30,7 @@
|
|||||||
|
|
||||||
public ContainerPlayer(PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) {
|
public ContainerPlayer(PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) {
|
||||||
super((Containers) null, 0);
|
super((Containers) null, 0);
|
||||||
this.c = flag;
|
this.i = flag;
|
||||||
this.owner = entityhuman;
|
this.owner = entityhuman;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ this.resultInventory = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction
|
+ this.resultInventory = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction
|
||||||
@ -39,7 +42,7 @@
|
|||||||
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 154, 28)));
|
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 154, 28)));
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@@ -79,7 +97,7 @@
|
@@ -85,7 +103,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void a(IInventory iinventory) {
|
public void a(IInventory iinventory) {
|
||||||
@ -48,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -182,4 +200,17 @@
|
@@ -188,4 +206,17 @@
|
||||||
public int h() {
|
public int h() {
|
||||||
return this.craftInventory.f();
|
return this.craftInventory.f();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- a/net/minecraft/server/ContainerStonecutter.java
|
--- a/net/minecraft/server/ContainerStonecutter.java
|
||||||
+++ b/net/minecraft/server/ContainerStonecutter.java
|
+++ b/net/minecraft/server/ContainerStonecutter.java
|
||||||
@@ -3,6 +3,11 @@
|
@@ -2,6 +2,11 @@
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
public class ContainerStonecutter extends Container {
|
public class ContainerStonecutter extends Container {
|
||||||
|
|
||||||
@@ -18,6 +23,21 @@
|
@@ -16,6 +21,21 @@
|
||||||
private Runnable m;
|
private Runnable l;
|
||||||
public final IInventory inventory;
|
public final IInventory inventory;
|
||||||
private final InventoryCraftResult resultInventory;
|
private final InventoryCraftResult resultInventory;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
||||||
this(i, playerinventory, ContainerAccess.a);
|
this(i, playerinventory, ContainerAccess.a);
|
||||||
@@ -83,10 +103,12 @@
|
@@ -81,10 +101,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(this.containerProperty);
|
this.a(this.containerProperty);
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE);
|
return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,4 +180,17 @@
|
@@ -168,4 +182,17 @@
|
||||||
public int h() {
|
public int h() {
|
||||||
return this.craftInventory.f();
|
return this.craftInventory.f();
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
+ ParseResults<CommandListenerWrapper> parseresults = customfunctiondata.d().parse(stringreader, customfunctiondata.g()); // CraftBukkit
|
+ ParseResults<CommandListenerWrapper> parseresults = customfunctiondata.d().parse(stringreader, customfunctiondata.g()); // CraftBukkit
|
||||||
|
|
||||||
if (parseresults.getReader().canRead()) {
|
if (parseresults.getReader().canRead()) {
|
||||||
if (parseresults.getExceptions().size() == 1) {
|
throw CommandDispatcher.a(parseresults);
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
public static DamageSource mobAttack(EntityLiving entityliving) {
|
public static DamageSource a(EntityLiving entityliving) {
|
||||||
return new EntityDamageSource("mob", entityliving);
|
return new EntityDamageSource("sting", entityliving);
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
return this.remoteControlCommandListener.getMessages();
|
return this.remoteControlCommandListener.getMessages();
|
||||||
}
|
}
|
||||||
@@ -562,4 +673,16 @@
|
@@ -562,4 +673,16 @@
|
||||||
public boolean b(GameProfile gameprofile) {
|
public boolean a(GameProfile gameprofile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -4,34 +4,35 @@
|
|||||||
|
|
||||||
public class DimensionManager implements MinecraftSerializable {
|
public class DimensionManager implements MinecraftSerializable {
|
||||||
|
|
||||||
- public static final DimensionManager OVERWORLD = register("overworld", new DimensionManager(1, "", "", WorldProviderNormal::new, true));
|
- public static final DimensionManager OVERWORLD = register("overworld", new DimensionManager(1, "", "", WorldProviderNormal::new, true, GenLayerZoomVoronoiFixed.INSTANCE));
|
||||||
- public static final DimensionManager NETHER = register("the_nether", new DimensionManager(0, "_nether", "DIM-1", WorldProviderHell::new, false));
|
- public static final DimensionManager NETHER = register("the_nether", new DimensionManager(0, "_nether", "DIM-1", WorldProviderHell::new, false, GenLayerZoomVoronoi.INSTANCE));
|
||||||
- public static final DimensionManager THE_END = register("the_end", new DimensionManager(2, "_end", "DIM1", WorldProviderTheEnd::new, false));
|
- public static final DimensionManager THE_END = register("the_end", new DimensionManager(2, "_end", "DIM1", WorldProviderTheEnd::new, false, GenLayerZoomVoronoi.INSTANCE));
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ public static final DimensionManager OVERWORLD = register("overworld", new DimensionManager(1, "", "", WorldProviderNormal::new, true, null));
|
+ public static final DimensionManager OVERWORLD = register("overworld", new DimensionManager(1, "", "", WorldProviderNormal::new, true, GenLayerZoomVoronoiFixed.INSTANCE, null));
|
||||||
+ public static final DimensionManager NETHER = register("the_nether", new DimensionManager(0, "_nether", "DIM-1", WorldProviderHell::new, false, null));
|
+ public static final DimensionManager NETHER = register("the_nether", new DimensionManager(0, "_nether", "DIM-1", WorldProviderHell::new, false, GenLayerZoomVoronoiFixed.INSTANCE, null));
|
||||||
+ public static final DimensionManager THE_END = register("the_end", new DimensionManager(2, "_end", "DIM1", WorldProviderTheEnd::new, false, null));
|
+ public static final DimensionManager THE_END = register("the_end", new DimensionManager(2, "_end", "DIM1", WorldProviderTheEnd::new, false, GenLayerZoomVoronoiFixed.INSTANCE, null));
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
private final int id;
|
private final int id;
|
||||||
private final String suffix;
|
private final String suffix;
|
||||||
public final String folder;
|
public final String folder;
|
||||||
@@ -21,12 +23,14 @@
|
@@ -22,13 +24,15 @@
|
||||||
return (DimensionManager) IRegistry.a(IRegistry.DIMENSION_TYPE, dimensionmanager.id, s, dimensionmanager);
|
return (DimensionManager) IRegistry.a(IRegistry.DIMENSION_TYPE, dimensionmanager.id, s, dimensionmanager);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public DimensionManager(int i, String s, String s1, BiFunction<World, DimensionManager, ? extends WorldProvider> bifunction, boolean flag) {
|
- public DimensionManager(int i, String s, String s1, BiFunction<World, DimensionManager, ? extends WorldProvider> bifunction, boolean flag, GenLayerZoomer genlayerzoomer) {
|
||||||
+ // CraftBukkit - add type
|
+ // CraftBukkit - add type
|
||||||
+ public DimensionManager(int i, String s, String s1, BiFunction<World, DimensionManager, ? extends WorldProvider> bifunction, boolean flag, DimensionManager type) {
|
+ public DimensionManager(int i, String s, String s1, BiFunction<World, DimensionManager, ? extends WorldProvider> bifunction, boolean flag, GenLayerZoomer genlayerzoomer, DimensionManager type) {
|
||||||
this.id = i;
|
this.id = i;
|
||||||
this.suffix = s;
|
this.suffix = s;
|
||||||
this.folder = s1;
|
this.folder = s1;
|
||||||
this.providerFactory = bifunction;
|
this.providerFactory = bifunction;
|
||||||
this.hasSkyLight = flag;
|
this.hasSkyLight = flag;
|
||||||
|
this.genLayerZoomer = genlayerzoomer;
|
||||||
+ this.type = type; // CraftBukkit
|
+ this.type = type; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DimensionManager a(Dynamic<?> dynamic) {
|
public static DimensionManager a(Dynamic<?> dynamic) {
|
||||||
@@ -80,4 +84,12 @@
|
@@ -86,4 +90,12 @@
|
||||||
public <T> T a(DynamicOps<T> dynamicops) {
|
public <T> T a(DynamicOps<T> dynamicops) {
|
||||||
return dynamicops.createString(IRegistry.DIMENSION_TYPE.getKey(this).toString());
|
return dynamicops.createString(IRegistry.DIMENSION_TYPE.getKey(this).toString());
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
entityboat.setType(this.c);
|
entityboat.setType(this.c);
|
||||||
entityboat.yaw = enumdirection.l();
|
entityboat.yaw = enumdirection.n();
|
||||||
- world.addEntity(entityboat);
|
- world.addEntity(entityboat);
|
||||||
- itemstack.subtract(1);
|
- itemstack.subtract(1);
|
||||||
+ if (!world.addEntity(entityboat)) itemstack.add(1); // CraftBukkit
|
+ if (!world.addEntity(entityboat)) itemstack.add(1); // CraftBukkit
|
||||||
|
@ -22,25 +22,25 @@
|
|||||||
d();
|
d();
|
||||||
}
|
}
|
||||||
+ // CraftBukkit start - easier than fixing the decompile
|
+ // CraftBukkit start - easier than fixing the decompile
|
||||||
+ DataConverterFlattenData.a(1008, "{Name:'minecraft:oak_sign',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'0'}}");
|
+ DataConverterFlattenData.map(1008, "{Name:'minecraft:oak_sign',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'0'}}");
|
||||||
+ DataConverterFlattenData.a(1009, "{Name:'minecraft:oak_sign',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'1'}}");
|
+ DataConverterFlattenData.map(1009, "{Name:'minecraft:oak_sign',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'1'}}");
|
||||||
+ DataConverterFlattenData.a(1010, "{Name:'minecraft:oak_sign',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'2'}}");
|
+ DataConverterFlattenData.map(1010, "{Name:'minecraft:oak_sign',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'2'}}");
|
||||||
+ DataConverterFlattenData.a(1011, "{Name:'minecraft:oak_sign',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'3'}}");
|
+ DataConverterFlattenData.map(1011, "{Name:'minecraft:oak_sign',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'3'}}");
|
||||||
+ DataConverterFlattenData.a(1012, "{Name:'minecraft:oak_sign',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'4'}}");
|
+ DataConverterFlattenData.map(1012, "{Name:'minecraft:oak_sign',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'4'}}");
|
||||||
+ DataConverterFlattenData.a(1013, "{Name:'minecraft:oak_sign',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'5'}}");
|
+ DataConverterFlattenData.map(1013, "{Name:'minecraft:oak_sign',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'5'}}");
|
||||||
+ DataConverterFlattenData.a(1014, "{Name:'minecraft:oak_sign',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'6'}}");
|
+ DataConverterFlattenData.map(1014, "{Name:'minecraft:oak_sign',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'6'}}");
|
||||||
+ DataConverterFlattenData.a(1015, "{Name:'minecraft:oak_sign',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'7'}}");
|
+ DataConverterFlattenData.map(1015, "{Name:'minecraft:oak_sign',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'7'}}");
|
||||||
+ DataConverterFlattenData.a(1016, "{Name:'minecraft:oak_sign',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'8'}}");
|
+ DataConverterFlattenData.map(1016, "{Name:'minecraft:oak_sign',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'8'}}");
|
||||||
+ DataConverterFlattenData.a(1017, "{Name:'minecraft:oak_sign',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'9'}}");
|
+ DataConverterFlattenData.map(1017, "{Name:'minecraft:oak_sign',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'9'}}");
|
||||||
+ DataConverterFlattenData.a(1018, "{Name:'minecraft:oak_sign',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'10'}}");
|
+ DataConverterFlattenData.map(1018, "{Name:'minecraft:oak_sign',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'10'}}");
|
||||||
+ DataConverterFlattenData.a(1019, "{Name:'minecraft:oak_sign',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'11'}}");
|
+ DataConverterFlattenData.map(1019, "{Name:'minecraft:oak_sign',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'11'}}");
|
||||||
+ DataConverterFlattenData.a(1020, "{Name:'minecraft:oak_sign',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'12'}}");
|
+ DataConverterFlattenData.map(1020, "{Name:'minecraft:oak_sign',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'12'}}");
|
||||||
+ DataConverterFlattenData.a(1021, "{Name:'minecraft:oak_sign',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'13'}}");
|
+ DataConverterFlattenData.map(1021, "{Name:'minecraft:oak_sign',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'13'}}");
|
||||||
+ DataConverterFlattenData.a(1022, "{Name:'minecraft:oak_sign',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'14'}}");
|
+ DataConverterFlattenData.map(1022, "{Name:'minecraft:oak_sign',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'14'}}");
|
||||||
+ DataConverterFlattenData.a(1023, "{Name:'minecraft:oak_sign',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'15'}}");
|
+ DataConverterFlattenData.map(1023, "{Name:'minecraft:oak_sign',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'15'}}");
|
||||||
+ DataConverterMaterialId.ID_MAPPING.put(323, "minecraft:oak_sign");
|
+ DataConverterMaterialId.ID_MAPPING.put(323, "minecraft:oak_sign");
|
||||||
+
|
+
|
||||||
+ DataConverterFlattenData.a(1440, "{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}", new String[]{"{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}"});
|
+ DataConverterFlattenData.map(1440, "{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}", new String[]{"{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}"});
|
||||||
+
|
+
|
||||||
+ DataConverterMaterialId.ID_MAPPING.put(409, "minecraft:prismarine_shard");
|
+ DataConverterMaterialId.ID_MAPPING.put(409, "minecraft:prismarine_shard");
|
||||||
+ DataConverterMaterialId.ID_MAPPING.put(410, "minecraft:prismarine_crystals");
|
+ DataConverterMaterialId.ID_MAPPING.put(410, "minecraft:prismarine_crystals");
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- a/net/minecraft/server/EnchantmentThorns.java
|
|
||||||
+++ b/net/minecraft/server/EnchantmentThorns.java
|
|
||||||
@@ -34,7 +34,7 @@
|
|
||||||
Random random = entityliving.getRandom();
|
|
||||||
Entry<EnumItemSlot, ItemStack> entry = EnchantmentManager.b(Enchantments.THORNS, entityliving);
|
|
||||||
|
|
||||||
- if (a(i, random)) {
|
|
||||||
+ if (entity != null && a(i, random)) { // CraftBukkit
|
|
||||||
if (entity != null) {
|
|
||||||
entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
|
|
||||||
}
|
|
@ -58,7 +58,7 @@
|
|||||||
protected static final Logger LOGGER = LogManager.getLogger();
|
protected static final Logger LOGGER = LogManager.getLogger();
|
||||||
private static final AtomicInteger entityCount = new AtomicInteger();
|
private static final AtomicInteger entityCount = new AtomicInteger();
|
||||||
private static final List<ItemStack> c = Collections.emptyList();
|
private static final List<ItemStack> c = Collections.emptyList();
|
||||||
@@ -106,6 +155,20 @@
|
@@ -110,6 +159,20 @@
|
||||||
private long aH;
|
private long aH;
|
||||||
private EntitySize size;
|
private EntitySize size;
|
||||||
private float headHeight;
|
private float headHeight;
|
||||||
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
public Entity(EntityTypes<?> entitytypes, World world) {
|
public Entity(EntityTypes<?> entitytypes, World world) {
|
||||||
this.id = Entity.entityCount.incrementAndGet();
|
this.id = Entity.entityCount.incrementAndGet();
|
||||||
@@ -204,6 +267,12 @@
|
@@ -214,6 +277,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setPose(EntityPose entitypose) {
|
protected void setPose(EntityPose entitypose) {
|
||||||
@ -92,7 +92,7 @@
|
|||||||
this.datawatcher.set(Entity.POSE, entitypose);
|
this.datawatcher.set(Entity.POSE, entitypose);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +281,33 @@
|
@@ -222,6 +291,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setYawPitch(float f, float f1) {
|
protected void setYawPitch(float f, float f1) {
|
||||||
@ -126,15 +126,15 @@
|
|||||||
this.yaw = f % 360.0F;
|
this.yaw = f % 360.0F;
|
||||||
this.pitch = f1 % 360.0F;
|
this.pitch = f1 % 360.0F;
|
||||||
}
|
}
|
||||||
@@ -224,6 +320,7 @@
|
@@ -232,6 +328,7 @@
|
||||||
float f1 = this.size.height;
|
float f1 = this.size.height;
|
||||||
|
|
||||||
this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f));
|
this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f));
|
||||||
+ if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
|
+ if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick() {
|
protected void Z() {
|
||||||
@@ -234,6 +331,15 @@
|
@@ -246,6 +343,15 @@
|
||||||
this.entityBaseTick();
|
this.entityBaseTick();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,16 +150,16 @@
|
|||||||
public void entityBaseTick() {
|
public void entityBaseTick() {
|
||||||
this.world.getMethodProfiler().enter("entityBaseTick");
|
this.world.getMethodProfiler().enter("entityBaseTick");
|
||||||
if (this.isPassenger() && this.getVehicle().dead) {
|
if (this.isPassenger() && this.getVehicle().dead) {
|
||||||
@@ -250,7 +356,7 @@
|
@@ -259,7 +365,7 @@
|
||||||
this.lastZ = this.locZ;
|
this.A = this.B;
|
||||||
this.lastPitch = this.pitch;
|
this.lastPitch = this.pitch;
|
||||||
this.lastYaw = this.yaw;
|
this.lastYaw = this.yaw;
|
||||||
- this.doPortalTick();
|
- this.doPortalTick();
|
||||||
+ if (this instanceof EntityPlayer) this.doPortalTick(); // CraftBukkit - // Moved up to postTick
|
+ if (this instanceof EntityPlayer) this.doPortalTick(); // CraftBukkit - // Moved up to postTick
|
||||||
this.aA();
|
this.aE();
|
||||||
this.m();
|
this.m();
|
||||||
if (this.world.isClientSide) {
|
if (this.world.isClientSide) {
|
||||||
@@ -300,12 +406,44 @@
|
@@ -309,12 +415,44 @@
|
||||||
|
|
||||||
protected void burnFromLava() {
|
protected void burnFromLava() {
|
||||||
if (!this.isFireProof()) {
|
if (!this.isFireProof()) {
|
||||||
@ -205,8 +205,8 @@
|
|||||||
int j = i * 20;
|
int j = i * 20;
|
||||||
|
|
||||||
if (this instanceof EntityLiving) {
|
if (this instanceof EntityLiving) {
|
||||||
@@ -409,6 +547,28 @@
|
@@ -404,6 +542,28 @@
|
||||||
block1.a((IBlockAccess) this.world, this);
|
block.a((IBlockAccess) this.world, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
@ -231,10 +231,10 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
if (this.playStepSound() && (!this.onGround || !this.isSneaking() || !(this instanceof EntityHuman)) && !this.isPassenger()) {
|
if (this.onGround && !this.bk()) {
|
||||||
double d0 = vec3d1.x;
|
block.stepOn(this.world, blockposition, this);
|
||||||
double d1 = vec3d1.y;
|
}
|
||||||
@@ -462,7 +622,14 @@
|
@@ -458,7 +618,14 @@
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
++this.fireTicks;
|
++this.fireTicks;
|
||||||
if (this.fireTicks == 0) {
|
if (this.fireTicks == 0) {
|
||||||
@ -250,15 +250,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -698,6 +865,7 @@
|
@@ -683,6 +850,7 @@
|
||||||
this.locX = (axisalignedbb.minX + axisalignedbb.maxX) / 2.0D;
|
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||||
this.locY = axisalignedbb.minY;
|
|
||||||
this.locZ = (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D;
|
this.setPositionRaw((axisalignedbb.minX + axisalignedbb.maxX) / 2.0D, axisalignedbb.minY, (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D);
|
||||||
+ if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
|
+ if (valid) ((WorldServer) world).chunkCheck(this); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SoundEffect getSoundSwim() {
|
protected SoundEffect getSoundSwim() {
|
||||||
@@ -869,7 +1037,7 @@
|
@@ -854,7 +1022,7 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@
|
|||||||
if (!this.isFireProof()) {
|
if (!this.isFireProof()) {
|
||||||
this.damageEntity(DamageSource.FIRE, (float) i);
|
this.damageEntity(DamageSource.FIRE, (float) i);
|
||||||
}
|
}
|
||||||
@@ -1102,6 +1270,13 @@
|
@@ -1088,6 +1256,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spawnIn(World world) {
|
public void spawnIn(World world) {
|
||||||
@ -281,15 +281,15 @@
|
|||||||
this.world = world;
|
this.world = world;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1127,6 +1302,7 @@
|
@@ -1103,6 +1278,7 @@
|
||||||
this.lastYaw -= 360.0F;
|
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
|
||||||
|
this.lastYaw = this.yaw;
|
||||||
|
this.lastPitch = this.pitch;
|
||||||
|
+ world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
+ world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // CraftBukkit
|
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
|
||||||
this.setPosition(this.locX, this.locY, this.locZ);
|
@@ -1279,7 +1455,7 @@
|
||||||
this.setYawPitch(f, f1);
|
|
||||||
}
|
|
||||||
@@ -1295,7 +1471,7 @@
|
|
||||||
public boolean c(NBTTagCompound nbttagcompound) {
|
public boolean c(NBTTagCompound nbttagcompound) {
|
||||||
String s = this.getSaveID();
|
String s = this.getSaveID();
|
||||||
|
|
||||||
@ -298,7 +298,7 @@
|
|||||||
nbttagcompound.setString("id", s);
|
nbttagcompound.setString("id", s);
|
||||||
this.save(nbttagcompound);
|
this.save(nbttagcompound);
|
||||||
return true;
|
return true;
|
||||||
@@ -1314,15 +1490,33 @@
|
@@ -1298,15 +1474,33 @@
|
||||||
Vec3D vec3d = this.getMot();
|
Vec3D vec3d = this.getMot();
|
||||||
|
|
||||||
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
||||||
@ -333,7 +333,7 @@
|
|||||||
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
||||||
|
|
||||||
if (ichatbasecomponent != null) {
|
if (ichatbasecomponent != null) {
|
||||||
@@ -1380,6 +1574,11 @@
|
@@ -1364,6 +1558,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +345,7 @@
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||||
@@ -1420,7 +1619,7 @@
|
@@ -1396,7 +1595,7 @@
|
||||||
this.setAirTicks(nbttagcompound.getShort("Air"));
|
this.setAirTicks(nbttagcompound.getShort("Air"));
|
||||||
this.onGround = nbttagcompound.getBoolean("OnGround");
|
this.onGround = nbttagcompound.getBoolean("OnGround");
|
||||||
if (nbttagcompound.hasKey("Dimension")) {
|
if (nbttagcompound.hasKey("Dimension")) {
|
||||||
@ -354,7 +354,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.invulnerable = nbttagcompound.getBoolean("Invulnerable");
|
this.invulnerable = nbttagcompound.getBoolean("Invulnerable");
|
||||||
@@ -1463,6 +1662,43 @@
|
@@ -1439,6 +1638,43 @@
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Entity has invalid position");
|
throw new IllegalStateException("Entity has invalid position");
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||||
@@ -1538,9 +1774,22 @@
|
@@ -1514,9 +1750,22 @@
|
||||||
} else if (this.world.isClientSide) {
|
} else if (this.world.isClientSide) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
@ -408,7 +408,7 @@
|
|||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack);
|
EntityItem entityitem = new EntityItem(this.world, this.locX(), this.locY() + (double) f, this.locZ(), itemstack);
|
||||||
|
|
||||||
entityitem.defaultPickupDelay();
|
entityitem.defaultPickupDelay();
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
@ -421,7 +421,7 @@
|
|||||||
this.world.addEntity(entityitem);
|
this.world.addEntity(entityitem);
|
||||||
return entityitem;
|
return entityitem;
|
||||||
}
|
}
|
||||||
@@ -1644,7 +1893,7 @@
|
@@ -1624,7 +1873,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.vehicle = entity;
|
this.vehicle = entity;
|
||||||
@ -430,7 +430,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1669,15 +1918,36 @@
|
@@ -1649,15 +1898,36 @@
|
||||||
Entity entity = this.vehicle;
|
Entity entity = this.vehicle;
|
||||||
|
|
||||||
this.vehicle = null;
|
this.vehicle = null;
|
||||||
@ -469,7 +469,7 @@
|
|||||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) {
|
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) {
|
||||||
this.passengers.add(0, entity);
|
this.passengers.add(0, entity);
|
||||||
} else {
|
} else {
|
||||||
@@ -1685,15 +1955,33 @@
|
@@ -1665,15 +1935,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -504,15 +504,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean q(Entity entity) {
|
protected boolean q(Entity entity) {
|
||||||
@@ -1736,11 +2024,17 @@
|
@@ -1717,11 +2005,17 @@
|
||||||
int i = this.ab();
|
int i = this.ab();
|
||||||
|
|
||||||
if (this.ai) {
|
if (this.af) {
|
||||||
- if (this.world.getMinecraftServer().getAllowNether() && !this.isPassenger() && this.aj++ >= i) {
|
- if (this.world.getMinecraftServer().getAllowNether() && !this.isPassenger() && this.ag++ >= i) {
|
||||||
+ if ((true || this.world.getMinecraftServer().getAllowNether()) && !this.isPassenger() && this.aj++ >= i) { // CraftBukkit
|
+ if ((true || this.world.getMinecraftServer().getAllowNether()) && !this.isPassenger() && this.ag++ >= i) { // CraftBukkit
|
||||||
this.world.getMethodProfiler().enter("portal");
|
this.world.getMethodProfiler().enter("portal");
|
||||||
this.aj = i;
|
this.ag = i;
|
||||||
this.portalCooldown = this.aX();
|
this.portalCooldown = this.ba();
|
||||||
- this.a(this.world.worldProvider.getDimensionManager() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER);
|
- this.a(this.world.worldProvider.getDimensionManager() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (this instanceof EntityPlayer) {
|
+ if (this instanceof EntityPlayer) {
|
||||||
@ -524,7 +524,7 @@
|
|||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1820,6 +2114,13 @@
|
@@ -1821,6 +2115,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSwimming(boolean flag) {
|
public void setSwimming(boolean flag) {
|
||||||
@ -538,7 +538,7 @@
|
|||||||
this.setFlag(4, flag);
|
this.setFlag(4, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1880,16 +2181,56 @@
|
@@ -1881,16 +2182,56 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAirTicks(int i) {
|
public void setAirTicks(int i) {
|
||||||
@ -598,7 +598,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void j(boolean flag) {
|
public void j(boolean flag) {
|
||||||
@@ -2037,33 +2378,46 @@
|
@@ -2042,33 +2383,46 @@
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Entity a(DimensionManager dimensionmanager) {
|
public Entity a(DimensionManager dimensionmanager) {
|
||||||
@ -639,8 +639,8 @@
|
|||||||
+ } else if (dimensionmanager.getType() == DimensionManager.THE_END) { // CraftBukkit
|
+ } else if (dimensionmanager.getType() == DimensionManager.THE_END) { // CraftBukkit
|
||||||
blockposition = worldserver1.getDimensionSpawn();
|
blockposition = worldserver1.getDimensionSpawn();
|
||||||
} else {
|
} else {
|
||||||
double d0 = this.locX;
|
double d0 = this.locX();
|
||||||
double d1 = this.locZ;
|
double d1 = this.locZ();
|
||||||
double d2 = 8.0D;
|
double d2 = 8.0D;
|
||||||
|
|
||||||
- if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) {
|
- if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) {
|
||||||
@ -652,7 +652,7 @@
|
|||||||
d0 *= 8.0D;
|
d0 *= 8.0D;
|
||||||
d1 *= 8.0D;
|
d1 *= 8.0D;
|
||||||
}
|
}
|
||||||
@@ -2088,6 +2442,28 @@
|
@@ -2093,6 +2447,28 @@
|
||||||
vec3d = shapedetector_shape.velocity;
|
vec3d = shapedetector_shape.velocity;
|
||||||
f = (float) shapedetector_shape.yaw;
|
f = (float) shapedetector_shape.yaw;
|
||||||
}
|
}
|
||||||
@ -681,7 +681,7 @@
|
|||||||
|
|
||||||
this.world.getMethodProfiler().exitEnter("reloading");
|
this.world.getMethodProfiler().exitEnter("reloading");
|
||||||
Entity entity = this.getEntityType().a((World) worldserver1);
|
Entity entity = this.getEntityType().a((World) worldserver1);
|
||||||
@@ -2097,6 +2473,14 @@
|
@@ -2102,6 +2478,14 @@
|
||||||
entity.setPositionRotation(blockposition, entity.yaw + f, entity.pitch);
|
entity.setPositionRotation(blockposition, entity.yaw + f, entity.pitch);
|
||||||
entity.setMot(vec3d);
|
entity.setMot(vec3d);
|
||||||
worldserver1.addEntityTeleport(entity);
|
worldserver1.addEntityTeleport(entity);
|
||||||
@ -696,7 +696,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.dead = true;
|
this.dead = true;
|
||||||
@@ -2298,7 +2682,26 @@
|
@@ -2308,7 +2692,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(AxisAlignedBB axisalignedbb) {
|
public void a(AxisAlignedBB axisalignedbb) {
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
|
|
||||||
protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
|
protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
@@ -30,7 +31,7 @@
|
@@ -46,7 +47,7 @@
|
||||||
if (entityageable != null) {
|
if (entityageable != null) {
|
||||||
entityageable.setAgeRaw(-24000);
|
entityageable.setAgeRaw(-24000);
|
||||||
entityageable.setPositionRotation(this.locX, this.locY, this.locZ, 0.0F, 0.0F);
|
entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F);
|
||||||
- this.world.addEntity(entityageable);
|
- this.world.addEntity(entityageable);
|
||||||
+ this.world.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
|
+ this.world.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
|
||||||
if (itemstack.hasName()) {
|
if (itemstack.hasName()) {
|
||||||
entityageable.setCustomName(itemstack.getName());
|
entityageable.setCustomName(itemstack.getName());
|
||||||
}
|
}
|
||||||
@@ -103,6 +104,7 @@
|
@@ -119,6 +120,7 @@
|
||||||
super.b(nbttagcompound);
|
super.b(nbttagcompound);
|
||||||
nbttagcompound.setInt("Age", this.getAge());
|
nbttagcompound.setInt("Age", this.getAge());
|
||||||
nbttagcompound.setInt("ForcedAge", this.c);
|
nbttagcompound.setInt("ForcedAge", this.c);
|
||||||
@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -110,6 +112,7 @@
|
@@ -126,6 +128,7 @@
|
||||||
super.a(nbttagcompound);
|
super.a(nbttagcompound);
|
||||||
this.setAgeRaw(nbttagcompound.getInt("Age"));
|
this.setAgeRaw(nbttagcompound.getInt("Age"));
|
||||||
this.c = nbttagcompound.getInt("ForcedAge");
|
this.c = nbttagcompound.getInt("ForcedAge");
|
||||||
@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -124,7 +127,7 @@
|
@@ -140,7 +143,7 @@
|
||||||
@Override
|
@Override
|
||||||
public void movementTick() {
|
public void movementTick() {
|
||||||
super.movementTick();
|
super.movementTick();
|
||||||
@ -41,4 +41,4 @@
|
|||||||
+ if (this.world.isClientSide || ageLocked) { // CraftBukkit
|
+ if (this.world.isClientSide || ageLocked) { // CraftBukkit
|
||||||
if (this.d > 0) {
|
if (this.d > 0) {
|
||||||
if (this.d % 4 == 0) {
|
if (this.d % 4 == 0) {
|
||||||
this.world.addParticle(Particles.HAPPY_VILLAGER, this.locX + (double) (this.random.nextFloat() * this.getWidth() * 2.0F) - (double) this.getWidth(), this.locY + 0.5D + (double) (this.random.nextFloat() * this.getHeight()), this.locZ + (double) (this.random.nextFloat() * this.getWidth() * 2.0F) - (double) this.getWidth(), 0.0D, 0.0D, 0.0D);
|
this.world.addParticle(Particles.HAPPY_VILLAGER, this.d(1.0D), this.cv() + 0.5D, this.g(1.0D), 0.0D, 0.0D, 0.0D);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
|
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
|
||||||
@@ -139,6 +144,7 @@
|
@@ -140,6 +145,7 @@
|
||||||
if (entityhuman != null) {
|
if (entityhuman != null) {
|
||||||
this.breedCause = entityhuman.getUniqueID();
|
this.breedCause = entityhuman.getUniqueID();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
+
|
+
|
||||||
public class EntityArmorStand extends EntityLiving {
|
public class EntityArmorStand extends EntityLiving {
|
||||||
|
|
||||||
private static final Vector3f bu = new Vector3f(0.0F, 0.0F, 0.0F);
|
private static final Vector3f br = new Vector3f(0.0F, 0.0F, 0.0F);
|
||||||
@@ -53,6 +62,13 @@
|
@@ -53,6 +62,13 @@
|
||||||
this.setPosition(d0, d1, d2);
|
this.setPosition(d0, d1, d2);
|
||||||
}
|
}
|
||||||
@ -28,11 +28,11 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public void updateSize() {
|
public boolean bt() {
|
||||||
double d0 = this.locX;
|
return !this.isMarker() && super.bt();
|
||||||
@@ -374,6 +390,21 @@
|
@@ -386,6 +402,21 @@
|
||||||
if (itemstack1.isEmpty() || (this.bE & 1 << enumitemslot.c() + 8) == 0) {
|
return false;
|
||||||
if (!itemstack1.isEmpty() || (this.bE & 1 << enumitemslot.c() + 16) == 0) {
|
} else {
|
||||||
ItemStack itemstack2;
|
ItemStack itemstack2;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
|
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||||
@ -46,13 +46,13 @@
|
|||||||
+ this.world.getServer().getPluginManager().callEvent(armorStandManipulateEvent);
|
+ this.world.getServer().getPluginManager().callEvent(armorStandManipulateEvent);
|
||||||
+
|
+
|
||||||
+ if (armorStandManipulateEvent.isCancelled()) {
|
+ if (armorStandManipulateEvent.isCancelled()) {
|
||||||
+ return;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
if (entityhuman.abilities.canInstantlyBuild && itemstack1.isEmpty() && !itemstack.isEmpty()) {
|
if (entityhuman.abilities.canInstantlyBuild && itemstack1.isEmpty() && !itemstack.isEmpty()) {
|
||||||
itemstack2 = itemstack.cloneItemStack();
|
itemstack2 = itemstack.cloneItemStack();
|
||||||
@@ -398,12 +429,22 @@
|
@@ -414,12 +445,22 @@
|
||||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||||
if (!this.world.isClientSide && !this.dead) {
|
if (!this.world.isClientSide && !this.dead) {
|
||||||
if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
|
if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
|
||||||
@ -64,10 +64,10 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
|
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
|
||||||
return false;
|
return false;
|
||||||
- } else if (!this.isInvulnerable(damagesource) && !this.bD && !this.isMarker()) {
|
- } else if (!this.isInvulnerable(damagesource) && !this.armorStandInvisible && !this.isMarker()) {
|
||||||
+ } else if (!this.isInvulnerable(damagesource) && (true || !this.bD) && !this.isMarker()) { // CraftBukkit
|
+ } else if (!this.isInvulnerable(damagesource) && (true || !this.armorStandInvisible) && !this.isMarker()) { // CraftBukkit
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, true, this.bD)) { // PAIL: armorStandInvisible
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, true, this.armorStandInvisible)) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
@ -78,7 +78,7 @@
|
|||||||
return false;
|
return false;
|
||||||
} else if (DamageSource.FIRE.equals(damagesource)) {
|
} else if (DamageSource.FIRE.equals(damagesource)) {
|
||||||
if (this.isBurning()) {
|
if (this.isBurning()) {
|
||||||
@@ -428,7 +469,7 @@
|
@@ -444,7 +485,7 @@
|
||||||
} else if (damagesource.v()) {
|
} else if (damagesource.v()) {
|
||||||
this.F();
|
this.F();
|
||||||
this.D();
|
this.D();
|
||||||
@ -87,7 +87,7 @@
|
|||||||
return flag1;
|
return flag1;
|
||||||
} else {
|
} else {
|
||||||
long i = this.world.getTime();
|
long i = this.world.getTime();
|
||||||
@@ -439,7 +480,7 @@
|
@@ -455,7 +496,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.f(damagesource);
|
this.f(damagesource);
|
||||||
this.D();
|
this.D();
|
||||||
@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -466,7 +507,7 @@
|
@@ -482,7 +523,7 @@
|
||||||
f1 -= f;
|
f1 -= f;
|
||||||
if (f1 <= 0.5F) {
|
if (f1 <= 0.5F) {
|
||||||
this.g(damagesource);
|
this.g(damagesource);
|
||||||
@ -105,7 +105,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.setHealth(f1);
|
this.setHealth(f1);
|
||||||
}
|
}
|
||||||
@@ -474,13 +515,13 @@
|
@@ -490,13 +531,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
private void f(DamageSource damagesource) {
|
private void f(DamageSource damagesource) {
|
||||||
@ -121,7 +121,7 @@
|
|||||||
|
|
||||||
ItemStack itemstack;
|
ItemStack itemstack;
|
||||||
int i;
|
int i;
|
||||||
@@ -488,7 +529,7 @@
|
@@ -504,7 +545,7 @@
|
||||||
for (i = 0; i < this.handItems.size(); ++i) {
|
for (i = 0; i < this.handItems.size(); ++i) {
|
||||||
itemstack = (ItemStack) this.handItems.get(i);
|
itemstack = (ItemStack) this.handItems.get(i);
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
@ -130,7 +130,7 @@
|
|||||||
this.handItems.set(i, ItemStack.a);
|
this.handItems.set(i, ItemStack.a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -496,10 +537,11 @@
|
@@ -512,10 +553,11 @@
|
||||||
for (i = 0; i < this.armorItems.size(); ++i) {
|
for (i = 0; i < this.armorItems.size(); ++i) {
|
||||||
itemstack = (ItemStack) this.armorItems.get(i);
|
itemstack = (ItemStack) this.armorItems.get(i);
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
@ -143,7 +143,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,8 +642,16 @@
|
@@ -616,8 +658,16 @@
|
||||||
return this.isSmall();
|
return this.isSmall();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
+
|
+
|
||||||
public abstract class EntityArrow extends Entity implements IProjectile {
|
public abstract class EntityArrow extends Entity implements IProjectile {
|
||||||
|
|
||||||
private static final DataWatcherObject<Byte> ar = DataWatcher.a(EntityArrow.class, DataWatcherRegistry.a);
|
private static final DataWatcherObject<Byte> ao = DataWatcher.a(EntityArrow.class, DataWatcherRegistry.a);
|
||||||
@@ -252,6 +258,7 @@
|
@@ -255,6 +261,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a(MovingObjectPosition movingobjectposition) {
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||||||
@ -21,10 +21,10 @@
|
|||||||
MovingObjectPosition.EnumMovingObjectType movingobjectposition_enummovingobjecttype = movingobjectposition.getType();
|
MovingObjectPosition.EnumMovingObjectType movingobjectposition_enummovingobjecttype = movingobjectposition.getType();
|
||||||
|
|
||||||
if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
if (movingobjectposition_enummovingobjecttype == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
||||||
@@ -334,7 +341,13 @@
|
@@ -336,7 +343,13 @@
|
||||||
int j = entity.ad();
|
int j = entity.ad();
|
||||||
|
|
||||||
if (this.isBurning() && !(entity instanceof EntityEnderman)) {
|
if (this.isBurning() && !flag) {
|
||||||
- entity.setOnFire(5);
|
- entity.setOnFire(5);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
+ EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5);
|
||||||
@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entity.damageEntity(damagesource, (float) i)) {
|
if (entity.damageEntity(damagesource, (float) i)) {
|
||||||
@@ -471,6 +484,7 @@
|
@@ -477,6 +490,7 @@
|
||||||
|
|
||||||
public void setShooter(@Nullable Entity entity) {
|
public void setShooter(@Nullable Entity entity) {
|
||||||
this.shooter = entity == null ? null : entity.getUniqueID();
|
this.shooter = entity == null ? null : entity.getUniqueID();
|
||||||
@ -44,14 +44,14 @@
|
|||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
this.fromPlayer = ((EntityHuman) entity).abilities.canInstantlyBuild ? EntityArrow.PickupStatus.CREATIVE_ONLY : EntityArrow.PickupStatus.ALLOWED;
|
this.fromPlayer = ((EntityHuman) entity).abilities.canInstantlyBuild ? EntityArrow.PickupStatus.CREATIVE_ONLY : EntityArrow.PickupStatus.ALLOWED;
|
||||||
}
|
}
|
||||||
@@ -485,9 +499,23 @@
|
@@ -491,9 +505,23 @@
|
||||||
@Override
|
@Override
|
||||||
public void pickup(EntityHuman entityhuman) {
|
public void pickup(EntityHuman entityhuman) {
|
||||||
if (!this.world.isClientSide && (this.inGround || this.v()) && this.shake <= 0) {
|
if (!this.world.isClientSide && (this.inGround || this.v()) && this.shake <= 0) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ ItemStack itemstack = this.getItemStack();
|
+ ItemStack itemstack = this.getItemStack();
|
||||||
+ if (this.fromPlayer == PickupStatus.ALLOWED && !itemstack.isEmpty() && entityhuman.inventory.canHold(itemstack) > 0) {
|
+ if (this.fromPlayer == PickupStatus.ALLOWED && !itemstack.isEmpty() && entityhuman.inventory.canHold(itemstack) > 0) {
|
||||||
+ EntityItem item = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack);
|
+ EntityItem item = new EntityItem(this.world, this.locX(), this.locY(), this.locZ(), itemstack);
|
||||||
+ PlayerPickupArrowEvent event = new PlayerPickupArrowEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.world.getServer(), this, item), (org.bukkit.entity.AbstractArrow) this.getBukkitEntity());
|
+ PlayerPickupArrowEvent event = new PlayerPickupArrowEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.world.getServer(), this, item), (org.bukkit.entity.AbstractArrow) this.getBukkitEntity());
|
||||||
+ // event.setCancelled(!entityhuman.canPickUpLoot); TODO
|
+ // event.setCancelled(!entityhuman.canPickUpLoot); TODO
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
} else {
|
} else {
|
||||||
if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) {
|
if (this.d != null && (!this.world.isEmpty(this.d) || this.d.getY() < 1)) {
|
||||||
@@ -134,7 +143,11 @@
|
@@ -134,7 +143,11 @@
|
||||||
this.bd = 0.5F;
|
this.bb = 0.5F;
|
||||||
this.yaw += f1;
|
this.yaw += f1;
|
||||||
if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) {
|
if (this.random.nextInt(100) == 0 && this.world.getType(blockposition1).isOccluding(this.world, blockposition1)) {
|
||||||
- this.setAsleep(true);
|
- this.setAsleep(true);
|
||||||
@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +175,11 @@
|
@@ -164,7 +177,11 @@
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!this.world.isClientSide && this.isAsleep()) {
|
if (!this.world.isClientSide && this.isAsleep()) {
|
||||||
|
74
nms-patches/EntityBee.patch
Normale Datei
74
nms-patches/EntityBee.patch
Normale Datei
@ -0,0 +1,74 @@
|
|||||||
|
--- a/net/minecraft/server/EntityBee.java
|
||||||
|
+++ b/net/minecraft/server/EntityBee.java
|
||||||
|
@@ -157,7 +157,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setHasStung(true);
|
||||||
|
- this.setGoalTarget((EntityLiving) null);
|
||||||
|
+ this.setGoalTarget((EntityLiving) null, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
|
||||||
|
this.a(SoundEffects.ENTITY_BEE_STING, 1.0F, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -572,7 +572,7 @@
|
||||||
|
class d extends EntityBee.a {
|
||||||
|
|
||||||
|
private d() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -632,7 +632,7 @@
|
||||||
|
class g extends EntityBee.a {
|
||||||
|
|
||||||
|
private g() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -696,7 +696,7 @@
|
||||||
|
class i extends EntityBee.a {
|
||||||
|
|
||||||
|
private i() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@@ -760,7 +760,7 @@
|
||||||
|
private int h = 0;
|
||||||
|
|
||||||
|
k() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
this.a(EnumSet.of(PathfinderGoal.Type.MOVE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -944,7 +944,7 @@
|
||||||
|
private int c;
|
||||||
|
|
||||||
|
f() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
this.c = EntityBee.this.world.random.nextInt(10);
|
||||||
|
this.a(EnumSet.of(PathfinderGoal.Type.MOVE));
|
||||||
|
}
|
||||||
|
@@ -1001,7 +1001,7 @@
|
||||||
|
private PathEntity e;
|
||||||
|
|
||||||
|
e() {
|
||||||
|
- super(null);
|
||||||
|
+ super(); // CraftBukkit - decompile error
|
||||||
|
this.c = EntityBee.this.world.random.nextInt(10);
|
||||||
|
this.d = Lists.newArrayList();
|
||||||
|
this.e = null;
|
||||||
|
@@ -1210,7 +1210,7 @@
|
||||||
|
@Override
|
||||||
|
protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) {
|
||||||
|
if (entityinsentient instanceof EntityBee && this.e.hasLineOfSight(entityliving) && ((EntityBee) entityinsentient).a((Entity) entityliving)) {
|
||||||
|
- entityinsentient.setGoalTarget(entityliving);
|
||||||
|
+ entityinsentient.setGoalTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit - reason
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
|
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityBoat.class, DataWatcherRegistry.b);
|
||||||
@@ -37,6 +46,14 @@
|
@@ -37,6 +46,14 @@
|
||||||
private float aO;
|
private float aL;
|
||||||
private float aP;
|
private float aM;
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ // PAIL: Some of these haven't worked since a few updates, and since 1.9 they are less and less applicable.
|
+ // PAIL: Some of these haven't worked since a few updates, and since 1.9 they are less and less applicable.
|
||||||
@ -30,7 +30,7 @@
|
|||||||
+
|
+
|
||||||
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
public EntityBoat(EntityTypes<? extends EntityBoat> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.as = new float[2];
|
this.ap = new float[2];
|
||||||
@@ -98,6 +115,19 @@
|
@@ -98,6 +115,19 @@
|
||||||
if (damagesource instanceof EntityDamageSourceIndirect && damagesource.getEntity() != null && this.w(damagesource.getEntity())) {
|
if (damagesource instanceof EntityDamageSourceIndirect && damagesource.getEntity() != null && this.w(damagesource.getEntity())) {
|
||||||
return false;
|
return false;
|
||||||
@ -94,14 +94,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,6 +231,7 @@
|
@@ -176,6 +231,7 @@
|
||||||
return this.getDirection().e();
|
return this.getDirection().f();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ private Location lastLocation; // CraftBukkit
|
+ private Location lastLocation; // CraftBukkit
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
this.aJ = this.aI;
|
this.aG = this.aF;
|
||||||
@@ -219,6 +275,22 @@
|
@@ -216,6 +272,22 @@
|
||||||
this.setMot(Vec3D.a);
|
this.setMot(Vec3D.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +109,7 @@
|
|||||||
+ org.bukkit.Server server = this.world.getServer();
|
+ org.bukkit.Server server = this.world.getServer();
|
||||||
+ org.bukkit.World bworld = this.world.getWorld();
|
+ org.bukkit.World bworld = this.world.getWorld();
|
||||||
+
|
+
|
||||||
+ Location to = new Location(bworld, this.locX, this.locY, this.locZ, this.yaw, this.pitch);
|
+ Location to = new Location(bworld, this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
|
||||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||||
+
|
+
|
||||||
+ server.getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleUpdateEvent(vehicle));
|
+ server.getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleUpdateEvent(vehicle));
|
||||||
@ -124,7 +124,7 @@
|
|||||||
this.q();
|
this.q();
|
||||||
|
|
||||||
for (int i = 0; i <= 1; ++i) {
|
for (int i = 0; i <= 1; ++i) {
|
||||||
@@ -740,6 +812,11 @@
|
@@ -734,6 +806,11 @@
|
||||||
|
|
||||||
this.b(this.fallDistance, 1.0F);
|
this.b(this.fallDistance, 1.0F);
|
||||||
if (!this.world.isClientSide && !this.dead) {
|
if (!this.world.isClientSide && !this.dead) {
|
||||||
@ -136,7 +136,7 @@
|
|||||||
this.die();
|
this.die();
|
||||||
if (this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
if (this.world.getGameRules().getBoolean(GameRules.DO_ENTITY_DROPS)) {
|
||||||
int i;
|
int i;
|
||||||
@@ -753,6 +830,7 @@
|
@@ -747,6 +824,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
--- a/net/minecraft/server/EntityCat.java
|
--- a/net/minecraft/server/EntityCat.java
|
||||||
+++ b/net/minecraft/server/EntityCat.java
|
+++ b/net/minecraft/server/EntityCat.java
|
||||||
@@ -16,7 +16,7 @@
|
@@ -16,7 +16,7 @@
|
||||||
private static final DataWatcherObject<Boolean> bF = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
|
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
|
||||||
private static final DataWatcherObject<Boolean> bG = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
|
private static final DataWatcherObject<Boolean> bD = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
|
||||||
private static final DataWatcherObject<Integer> bH = DataWatcher.a(EntityCat.class, DataWatcherRegistry.b);
|
private static final DataWatcherObject<Integer> bE = DataWatcher.a(EntityCat.class, DataWatcherRegistry.b);
|
||||||
- public static final Map<Integer, MinecraftKey> bC = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
|
- public static final Map<Integer, MinecraftKey> bz = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
|
||||||
+ public static final Map<Integer, MinecraftKey> bC = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
|
+ public static final Map<Integer, MinecraftKey> bz = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
|
||||||
hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png"));
|
hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png"));
|
||||||
hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png"));
|
hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png"));
|
||||||
hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png"));
|
hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png"));
|
||||||
@@ -329,7 +329,7 @@
|
@@ -347,7 +347,7 @@
|
||||||
|
}
|
||||||
} else if (this.i(itemstack)) {
|
} else if (this.i(itemstack)) {
|
||||||
this.a(entityhuman, itemstack);
|
this.a(entityhuman, itemstack);
|
||||||
if (!this.world.isClientSide) {
|
|
||||||
- if (this.random.nextInt(3) == 0) {
|
- if (this.random.nextInt(3) == 0) {
|
||||||
+ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
|
+ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
|
||||||
this.tame(entityhuman);
|
this.tame(entityhuman);
|
||||||
this.r(true);
|
|
||||||
this.goalSit.setSitting(true);
|
this.goalSit.setSitting(true);
|
||||||
@@ -518,7 +518,7 @@
|
this.world.broadcastEntityEffect(this, (byte) 7);
|
||||||
|
@@ -533,7 +533,7 @@
|
||||||
static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
|
static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -27,7 +27,7 @@
|
|||||||
private final EntityCat d;
|
private final EntityCat d;
|
||||||
|
|
||||||
public PathfinderGoalTemptChance(EntityCat entitycat, double d0, RecipeItemStack recipeitemstack, boolean flag) {
|
public PathfinderGoalTemptChance(EntityCat entitycat, double d0, RecipeItemStack recipeitemstack, boolean flag) {
|
||||||
@@ -553,9 +553,9 @@
|
@@ -568,9 +568,9 @@
|
||||||
private final EntityCat i;
|
private final EntityCat i;
|
||||||
|
|
||||||
public a(EntityCat entitycat, Class<T> oclass, float f, double d0, double d1) {
|
public a(EntityCat entitycat, Class<T> oclass, float f, double d0, double d1) {
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
super.movementTick();
|
super.movementTick();
|
||||||
this.bC = this.bz;
|
this.bz = this.bw;
|
||||||
this.bB = this.bA;
|
this.by = this.bx;
|
||||||
@@ -62,7 +67,9 @@
|
@@ -62,7 +67,9 @@
|
||||||
this.bz += this.bD * 2.0F;
|
this.bw += this.bA * 2.0F;
|
||||||
if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) {
|
if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) {
|
||||||
this.a(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
this.a(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||||
+ this.forceDrops = true; // CraftBukkit
|
+ this.forceDrops = true; // CraftBukkit
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
public class EntityCreeper extends EntityMonster {
|
public class EntityCreeper extends EntityMonster {
|
||||||
|
|
||||||
@@ -165,9 +170,19 @@
|
@@ -167,9 +172,19 @@
|
||||||
@Override
|
@Override
|
||||||
public void onLightningStrike(EntityLightning entitylightning) {
|
public void onLightningStrike(EntityLightning entitylightning) {
|
||||||
super.onLightningStrike(entitylightning);
|
super.onLightningStrike(entitylightning);
|
||||||
@ -33,12 +33,12 @@
|
|||||||
@Override
|
@Override
|
||||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
protected boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||||
ItemStack itemstack = entityhuman.b(enumhand);
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
@@ -192,10 +207,18 @@
|
@@ -194,10 +209,18 @@
|
||||||
Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
||||||
float f = this.isPowered() ? 2.0F : 1.0F;
|
float f = this.isPowered() ? 2.0F : 1.0F;
|
||||||
|
|
||||||
- this.killed = true;
|
- this.killed = true;
|
||||||
- this.world.explode(this, this.locX, this.locY, this.locZ, (float) this.explosionRadius * f, explosion_effect);
|
- this.world.explode(this, this.locX(), this.locY(), this.locZ(), (float) this.explosionRadius * f, explosion_effect);
|
||||||
- this.die();
|
- this.die();
|
||||||
- this.createEffectCloud();
|
- this.createEffectCloud();
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
@ -46,7 +46,7 @@
|
|||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
+ if (!event.isCancelled()) {
|
+ if (!event.isCancelled()) {
|
||||||
+ this.killed = true;
|
+ this.killed = true;
|
||||||
+ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), explosion_effect);
|
+ this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), event.getRadius(), event.getFire(), explosion_effect);
|
||||||
+ this.die();
|
+ this.die();
|
||||||
+ this.createEffectCloud();
|
+ this.createEffectCloud();
|
||||||
+ } else {
|
+ } else {
|
||||||
@ -56,15 +56,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -206,6 +229,7 @@
|
@@ -208,6 +231,7 @@
|
||||||
if (!collection.isEmpty()) {
|
if (!collection.isEmpty()) {
|
||||||
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ);
|
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX(), this.locY(), this.locZ());
|
||||||
|
|
||||||
+ entityareaeffectcloud.setSource(this); // CraftBukkit
|
+ entityareaeffectcloud.setSource(this); // CraftBukkit
|
||||||
entityareaeffectcloud.setRadius(2.5F);
|
entityareaeffectcloud.setRadius(2.5F);
|
||||||
entityareaeffectcloud.setRadiusOnUse(-0.5F);
|
entityareaeffectcloud.setRadiusOnUse(-0.5F);
|
||||||
entityareaeffectcloud.setWaitTime(10);
|
entityareaeffectcloud.setWaitTime(10);
|
||||||
@@ -219,7 +243,7 @@
|
@@ -221,7 +245,7 @@
|
||||||
entityareaeffectcloud.addEffect(new MobEffect(mobeffect));
|
entityareaeffectcloud.addEffect(new MobEffect(mobeffect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
|
||||||
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
|
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
|
||||||
this.receive(entityitem, itemstack.getCount());
|
this.receive(entityitem, itemstack.getCount());
|
||||||
@@ -422,7 +427,7 @@
|
@@ -425,7 +430,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void c() {
|
public void c() {
|
||||||
@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -441,7 +446,7 @@
|
@@ -444,7 +449,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) {
|
if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) {
|
||||||
|
@ -45,11 +45,11 @@
|
|||||||
+ }
|
+ }
|
||||||
|
|
||||||
- entitychicken.setAgeRaw(-24000);
|
- entitychicken.setAgeRaw(-24000);
|
||||||
- entitychicken.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
- entitychicken.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, 0.0F);
|
||||||
- this.world.addEntity(entitychicken);
|
- this.world.addEntity(entitychicken);
|
||||||
+ if (hatching) {
|
+ if (hatching) {
|
||||||
+ for (int i = 0; i < b0; ++i) {
|
+ for (int i = 0; i < b0; ++i) {
|
||||||
+ Entity entity = world.getWorld().createEntity(new org.bukkit.Location(world.getWorld(), this.locX, this.locY, this.locZ, this.yaw, 0.0F), hatchingType.getEntityClass());
|
+ Entity entity = world.getWorld().createEntity(new org.bukkit.Location(world.getWorld(), this.locX(), this.locY(), this.locZ(), this.yaw, 0.0F), hatchingType.getEntityClass());
|
||||||
+ if (entity.getBukkitEntity() instanceof Ageable) {
|
+ if (entity.getBukkitEntity() instanceof Ageable) {
|
||||||
+ ((Ageable) entity.getBukkitEntity()).setBaby();
|
+ ((Ageable) entity.getBukkitEntity()).setBaby();
|
||||||
+ }
|
+ }
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
public class EntityEnderCrystal extends Entity {
|
public class EntityEnderCrystal extends Entity {
|
||||||
|
|
||||||
private static final DataWatcherObject<Optional<BlockPosition>> c = DataWatcher.a(EntityEnderCrystal.class, DataWatcherRegistry.m);
|
private static final DataWatcherObject<Optional<BlockPosition>> c = DataWatcher.a(EntityEnderCrystal.class, DataWatcherRegistry.m);
|
||||||
@@ -41,7 +46,11 @@
|
@@ -38,7 +43,11 @@
|
||||||
BlockPosition blockposition = new BlockPosition(this);
|
BlockPosition blockposition = new BlockPosition(this);
|
||||||
|
|
||||||
if (this.world.worldProvider instanceof WorldProviderTheEnd && this.world.getType(blockposition).isAir()) {
|
if (this.world.worldProvider instanceof WorldProviderTheEnd && this.world.getType(blockposition).isAir()) {
|
||||||
@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,9 +90,22 @@
|
@@ -78,9 +87,22 @@
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!this.dead && !this.world.isClientSide) {
|
if (!this.dead && !this.world.isClientSide) {
|
||||||
@ -36,7 +36,7 @@
|
|||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
this.die();
|
this.die();
|
||||||
if (!damagesource.isExplosion()) {
|
if (!damagesource.isExplosion()) {
|
||||||
- this.world.explode((Entity) null, this.locX, this.locY, this.locZ, 6.0F, Explosion.Effect.DESTROY);
|
- this.world.explode((Entity) null, this.locX(), this.locY(), this.locZ(), 6.0F, Explosion.Effect.DESTROY);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
|
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
@ -44,7 +44,7 @@
|
|||||||
+ this.dead = false;
|
+ this.dead = false;
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
|
+ this.world.createExplosion(this, this.locX(), this.locY(), this.locZ(), event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,23 +14,23 @@
|
|||||||
public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
private static final Logger LOGGER = LogManager.getLogger();
|
||||||
@@ -35,6 +41,7 @@
|
@@ -38,6 +44,7 @@
|
||||||
private final PathPoint[] bT = new PathPoint[24];
|
private final PathPoint[] bR = new PathPoint[24];
|
||||||
private final int[] bU = new int[24];
|
private final int[] bS = new int[24];
|
||||||
private final Path bV = new Path();
|
private final Path bT = new Path();
|
||||||
+ private Explosion explosionSource = new Explosion(null, this, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
+ private Explosion explosionSource = new Explosion(null, this, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||||
|
|
||||||
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
|
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
|
||||||
super(EntityTypes.ENDER_DRAGON, world);
|
super(EntityTypes.ENDER_DRAGON, world);
|
||||||
@@ -173,7 +180,7 @@
|
@@ -177,7 +184,7 @@
|
||||||
|
|
||||||
Vec3D vec3d1 = idragoncontroller.g();
|
Vec3D vec3d1 = idragoncontroller.g();
|
||||||
|
|
||||||
- if (vec3d1 != null) {
|
- if (vec3d1 != null) {
|
||||||
+ if (vec3d1 != null && idragoncontroller.getControllerPhase() != DragonControllerPhase.HOVER) { // CraftBukkit - Don't move when hovering
|
+ if (vec3d1 != null && idragoncontroller.getControllerPhase() != DragonControllerPhase.HOVER) { // CraftBukkit - Don't move when hovering
|
||||||
d0 = vec3d1.x - this.locX;
|
d0 = vec3d1.x - this.locX();
|
||||||
d1 = vec3d1.y - this.locY;
|
d1 = vec3d1.y - this.locY();
|
||||||
d2 = vec3d1.z - this.locZ;
|
d2 = vec3d1.z - this.locZ();
|
||||||
@@ -315,7 +322,14 @@
|
@@ -315,7 +322,14 @@
|
||||||
if (this.currentEnderCrystal.dead) {
|
if (this.currentEnderCrystal.dead) {
|
||||||
this.currentEnderCrystal = null;
|
this.currentEnderCrystal = null;
|
||||||
@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,6 +402,9 @@
|
@@ -390,6 +404,9 @@
|
||||||
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
boolean flag1 = false;
|
boolean flag1 = false;
|
||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
for (int k1 = i; k1 <= l; ++k1) {
|
for (int k1 = i; k1 <= l; ++k1) {
|
||||||
for (int l1 = j; l1 <= i1; ++l1) {
|
for (int l1 = j; l1 <= i1; ++l1) {
|
||||||
@@ -398,7 +415,11 @@
|
@@ -400,7 +417,11 @@
|
||||||
|
|
||||||
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
|
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
|
||||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
|
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
|
||||||
@ -70,7 +70,7 @@
|
|||||||
} else {
|
} else {
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
@@ -407,6 +428,48 @@
|
@@ -409,6 +430,51 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +107,10 @@
|
|||||||
+ TileEntity tileentity = nmsBlock.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
|
+ TileEntity tileentity = nmsBlock.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
|
||||||
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
||||||
+
|
+
|
||||||
+ Block.b(craftBlock.getNMS(), loottableinfo_builder);
|
+ craftBlock.getNMS().a(loottableinfo_builder).forEach((itemstack) -> {
|
||||||
|
+ Block.a(world, blockposition, itemstack);
|
||||||
|
+ });
|
||||||
|
+ craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.a);
|
||||||
+ }
|
+ }
|
||||||
+ nmsBlock.wasExploded(world, blockposition, explosionSource);
|
+ nmsBlock.wasExploded(world, blockposition, explosionSource);
|
||||||
+
|
+
|
||||||
|
@ -19,14 +19,6 @@
|
|||||||
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
||||||
- if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
|
- if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
|
||||||
- EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
|
- EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
|
||||||
-
|
|
||||||
- entityendermite.setPlayerSpawned(true);
|
|
||||||
- entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
|
|
||||||
- this.world.addEntity(entityendermite);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (entityliving.isPassenger()) {
|
|
||||||
- entityliving.stopRiding();
|
|
||||||
+ // CraftBukkit start - Fire PlayerTeleportEvent
|
+ // CraftBukkit start - Fire PlayerTeleportEvent
|
||||||
+ org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
|
+ org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
|
||||||
+ org.bukkit.Location location = getBukkitEntity().getLocation();
|
+ org.bukkit.Location location = getBukkitEntity().getLocation();
|
||||||
@ -39,12 +31,17 @@
|
|||||||
+ if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
|
+ if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
|
||||||
+ if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
|
+ if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
|
||||||
+ EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
|
+ EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.a(this.world);
|
||||||
+
|
|
||||||
|
- entityendermite.setPlayerSpawned(true);
|
||||||
+ entityendermite.setPlayerSpawned(true);
|
+ entityendermite.setPlayerSpawned(true);
|
||||||
+ entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
|
entityendermite.setPositionRotation(entityliving.locX(), entityliving.locY(), entityliving.locZ(), entityliving.yaw, entityliving.pitch);
|
||||||
|
- this.world.addEntity(entityendermite);
|
||||||
|
- }
|
||||||
+ this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
|
+ this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
|
- if (entityliving.isPassenger()) {
|
||||||
|
- entityliving.stopRiding();
|
||||||
+ if (entityliving.isPassenger()) {
|
+ if (entityliving.isPassenger()) {
|
||||||
+ entityliving.stopRiding();
|
+ entityliving.stopRiding();
|
||||||
+ }
|
+ }
|
||||||
@ -56,10 +53,10 @@
|
|||||||
+ CraftEventFactory.entityDamage = null;
|
+ CraftEventFactory.entityDamage = null;
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
- entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
|
- entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||||
- entityliving.fallDistance = 0.0F;
|
- entityliving.fallDistance = 0.0F;
|
||||||
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
} else if (entityliving != null) {
|
} else if (entityliving != null) {
|
||||||
entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
|
entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/EntityEnderman.java
|
--- a/net/minecraft/server/EntityEnderman.java
|
||||||
+++ b/net/minecraft/server/EntityEnderman.java
|
+++ b/net/minecraft/server/EntityEnderman.java
|
||||||
@@ -51,7 +51,17 @@
|
@@ -52,7 +52,17 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setGoalTarget(@Nullable EntityLiving entityliving) {
|
public void setGoalTarget(@Nullable EntityLiving entityliving) {
|
||||||
@ -19,7 +19,7 @@
|
|||||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||||
|
|
||||||
if (entityliving == null) {
|
if (entityliving == null) {
|
||||||
@@ -65,6 +75,7 @@
|
@@ -67,6 +77,7 @@
|
||||||
attributeinstance.addModifier(EntityEnderman.c);
|
attributeinstance.addModifier(EntityEnderman.c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,8 +315,12 @@
|
@@ -323,8 +334,12 @@
|
||||||
boolean flag = movingobjectpositionblock.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && movingobjectpositionblock.getBlockPosition().equals(blockposition);
|
boolean flag = movingobjectpositionblock.getBlockPosition().equals(blockposition);
|
||||||
|
|
||||||
if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
if (block.a(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
||||||
- this.enderman.setCarried(iblockdata);
|
- this.enderman.setCarried(iblockdata);
|
||||||
@ -42,7 +42,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -338,8 +353,12 @@
|
@@ -357,8 +372,12 @@
|
||||||
IBlockData iblockdata2 = this.a.getCarried();
|
IBlockData iblockdata2 = this.a.getCarried();
|
||||||
|
|
||||||
if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
|
if (iblockdata2 != null && this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
|
||||||
|
@ -41,11 +41,11 @@
|
|||||||
+
|
+
|
||||||
+ if (this.targetPlayer != null && !cancelled) {
|
+ if (this.targetPlayer != null && !cancelled) {
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
Vec3D vec3d = new Vec3D(this.targetPlayer.locX - this.locX, this.targetPlayer.locY + (double) this.targetPlayer.getHeadHeight() / 2.0D - this.locY, this.targetPlayer.locZ - this.locZ);
|
Vec3D vec3d = new Vec3D(this.targetPlayer.locX() - this.locX(), this.targetPlayer.locY() + (double) this.targetPlayer.getHeadHeight() / 2.0D - this.locY(), this.targetPlayer.locZ() - this.locZ());
|
||||||
double d1 = vec3d.g();
|
double d1 = vec3d.g();
|
||||||
|
|
||||||
@@ -113,7 +134,7 @@
|
@@ -113,7 +134,7 @@
|
||||||
protected void az() {}
|
protected void aD() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
- protected void burn(int i) {
|
- protected void burn(int i) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
public class EntityFallingBlock extends Entity {
|
public class EntityFallingBlock extends Entity {
|
||||||
|
|
||||||
private IBlockData block;
|
private IBlockData block;
|
||||||
@@ -73,7 +75,7 @@
|
@@ -70,7 +72,7 @@
|
||||||
|
|
||||||
if (this.ticksLived++ == 0) {
|
if (this.ticksLived++ == 0) {
|
||||||
blockposition = new BlockPosition(this);
|
blockposition = new BlockPosition(this);
|
||||||
@ -18,7 +18,7 @@
|
|||||||
this.world.a(blockposition, false);
|
this.world.a(blockposition, false);
|
||||||
} else if (!this.world.isClientSide) {
|
} else if (!this.world.isClientSide) {
|
||||||
this.die();
|
this.die();
|
||||||
@@ -124,6 +126,11 @@
|
@@ -121,6 +123,11 @@
|
||||||
this.block = (IBlockData) this.block.set(BlockProperties.C, true);
|
this.block = (IBlockData) this.block.set(BlockProperties.C, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
if (this.world.setTypeAndData(blockposition, this.block, 3)) {
|
if (this.world.setTypeAndData(blockposition, this.block, 3)) {
|
||||||
if (block instanceof BlockFalling) {
|
if (block instanceof BlockFalling) {
|
||||||
((BlockFalling) block).a(this.world, blockposition, this.block, iblockdata);
|
((BlockFalling) block).a(this.world, blockposition, this.block, iblockdata);
|
||||||
@@ -180,7 +187,9 @@
|
@@ -177,7 +184,9 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
this(entitytypes, world);
|
this(entitytypes, world);
|
||||||
this.shooter = entityliving;
|
this.shooter = entityliving;
|
||||||
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
||||||
this.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
|
this.setPositionRotation(entityliving.locX(), entityliving.locY(), entityliving.locZ(), entityliving.yaw, entityliving.pitch);
|
||||||
this.setPosition(this.locX, this.locY, this.locZ);
|
this.Z();
|
||||||
this.setMot(Vec3D.a);
|
this.setMot(Vec3D.a);
|
||||||
+ // CraftBukkit start - Added setDirection method
|
+ // CraftBukkit start - Added setDirection method
|
||||||
+ this.setDirection(d0, d1, d2);
|
+ this.setDirection(d0, d1, d2);
|
||||||
@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Vec3D vec3d = this.getMot();
|
Vec3D vec3d = this.getMot();
|
||||||
@@ -147,6 +164,11 @@
|
@@ -157,6 +174,11 @@
|
||||||
} else {
|
} else {
|
||||||
this.velocityChanged();
|
this.velocityChanged();
|
||||||
if (damagesource.getEntity() != null) {
|
if (damagesource.getEntity() != null) {
|
||||||
@ -59,7 +59,7 @@
|
|||||||
Vec3D vec3d = damagesource.getEntity().getLookDirection();
|
Vec3D vec3d = damagesource.getEntity().getLookDirection();
|
||||||
|
|
||||||
this.setMot(vec3d);
|
this.setMot(vec3d);
|
||||||
@@ -155,6 +177,7 @@
|
@@ -165,6 +187,7 @@
|
||||||
this.dirZ = vec3d.z * 0.1D;
|
this.dirZ = vec3d.z * 0.1D;
|
||||||
if (damagesource.getEntity() instanceof EntityLiving) {
|
if (damagesource.getEntity() instanceof EntityLiving) {
|
||||||
this.shooter = (EntityLiving) damagesource.getEntity();
|
this.shooter = (EntityLiving) damagesource.getEntity();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/server/EntityFireworks.java
|
--- a/net/minecraft/server/EntityFireworks.java
|
||||||
+++ b/net/minecraft/server/EntityFireworks.java
|
+++ b/net/minecraft/server/EntityFireworks.java
|
||||||
@@ -3,12 +3,13 @@
|
@@ -3,6 +3,7 @@
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.OptionalInt;
|
import java.util.OptionalInt;
|
||||||
@ -8,14 +8,7 @@
|
|||||||
|
|
||||||
public class EntityFireworks extends Entity implements IProjectile {
|
public class EntityFireworks extends Entity implements IProjectile {
|
||||||
|
|
||||||
public static final DataWatcherObject<ItemStack> FIREWORK_ITEM = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.g);
|
@@ -130,7 +131,11 @@
|
||||||
private static final DataWatcherObject<OptionalInt> c = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.r);
|
|
||||||
- private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i);
|
|
||||||
+ public static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); // PAIL
|
|
||||||
private int ticksFlown;
|
|
||||||
public int expectedLifespan;
|
|
||||||
private EntityLiving ridingEntity;
|
|
||||||
@@ -133,7 +134,11 @@
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
||||||
@ -28,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -146,7 +151,11 @@
|
@@ -143,7 +148,11 @@
|
||||||
|
|
||||||
protected void a(MovingObjectPosition movingobjectposition) {
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||||||
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY && !this.world.isClientSide) {
|
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY && !this.world.isClientSide) {
|
||||||
@ -38,13 +31,13 @@
|
|||||||
+ this.explode();
|
+ this.explode();
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
} else if (this.z) {
|
} else if (this.w) {
|
||||||
BlockPosition blockposition;
|
BlockPosition blockposition;
|
||||||
|
|
||||||
@@ -158,7 +167,11 @@
|
@@ -155,7 +164,11 @@
|
||||||
|
|
||||||
this.world.getType(blockposition).a(this.world, blockposition, (Entity) this);
|
this.world.getType(blockposition).a(this.world, blockposition, (Entity) this);
|
||||||
if (this.l()) {
|
if (this.hasExplosions()) {
|
||||||
- this.explode();
|
- this.explode();
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
|
||||||
@ -54,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +197,9 @@
|
@@ -181,7 +194,9 @@
|
||||||
|
|
||||||
if (f > 0.0F) {
|
if (f > 0.0F) {
|
||||||
if (this.ridingEntity != null) {
|
if (this.ridingEntity != null) {
|
||||||
@ -64,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
double d0 = 5.0D;
|
double d0 = 5.0D;
|
||||||
@@ -211,7 +226,9 @@
|
@@ -208,7 +223,9 @@
|
||||||
if (flag) {
|
if (flag) {
|
||||||
float f1 = f * (float) Math.sqrt((5.0D - (double) this.g(entityliving)) / 5.0D);
|
float f1 = f * (float) Math.sqrt((5.0D - (double) this.g(entityliving)) / 5.0D);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
public class EntityFishingHook extends Entity {
|
public class EntityFishingHook extends Entity {
|
||||||
|
|
||||||
@@ -207,6 +212,7 @@
|
@@ -204,6 +209,7 @@
|
||||||
}, RayTrace.BlockCollisionOption.COLLIDER, true);
|
}, RayTrace.BlockCollisionOption.COLLIDER, true);
|
||||||
|
|
||||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||||
@ -20,10 +20,10 @@
|
|||||||
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
||||||
this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
|
this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
|
||||||
this.n();
|
this.n();
|
||||||
@@ -239,6 +245,10 @@
|
@@ -236,6 +242,10 @@
|
||||||
if (this.ar <= 0) {
|
if (this.ao <= 0) {
|
||||||
this.as = 0;
|
this.ap = 0;
|
||||||
this.at = 0;
|
this.aq = 0;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT);
|
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT);
|
||||||
+ this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
+ this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||||
@ -31,7 +31,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.setMot(this.getMot().add(0.0D, -0.2D * (double) this.random.nextFloat() * (double) this.random.nextFloat(), 0.0D));
|
this.setMot(this.getMot().add(0.0D, -0.2D * (double) this.random.nextFloat() * (double) this.random.nextFloat(), 0.0D));
|
||||||
}
|
}
|
||||||
@@ -274,6 +284,13 @@
|
@@ -271,6 +281,13 @@
|
||||||
worldserver.a(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
|
worldserver.a(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -45,7 +45,7 @@
|
|||||||
Vec3D vec3d = this.getMot();
|
Vec3D vec3d = this.getMot();
|
||||||
|
|
||||||
this.setMot(vec3d.x, (double) (-0.4F * MathHelper.a(this.random, 0.6F, 1.0F)), vec3d.z);
|
this.setMot(vec3d.x, (double) (-0.4F * MathHelper.a(this.random, 0.6F, 1.0F)), vec3d.z);
|
||||||
@@ -330,6 +347,14 @@
|
@@ -327,6 +344,14 @@
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (this.hooked != null) {
|
if (this.hooked != null) {
|
||||||
@ -60,10 +60,10 @@
|
|||||||
this.reel();
|
this.reel();
|
||||||
CriterionTriggers.D.a((EntityPlayer) this.owner, itemstack, this, Collections.emptyList());
|
CriterionTriggers.D.a((EntityPlayer) this.owner, itemstack, this, Collections.emptyList());
|
||||||
this.world.broadcastEntityEffect(this, (byte) 31);
|
this.world.broadcastEntityEffect(this, (byte) 31);
|
||||||
@@ -345,6 +370,15 @@
|
@@ -342,6 +367,15 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack1);
|
EntityItem entityitem = new EntityItem(this.world, this.locX(), this.locY(), this.locZ(), itemstack1);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH);
|
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH);
|
||||||
+ playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
|
+ playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
|
||||||
@ -73,23 +73,23 @@
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
double d0 = this.owner.locX - this.locX;
|
double d0 = this.owner.locX() - this.locX();
|
||||||
double d1 = this.owner.locY - this.locY;
|
double d1 = this.owner.locY() - this.locY();
|
||||||
double d2 = this.owner.locZ - this.locZ;
|
double d2 = this.owner.locZ() - this.locZ();
|
||||||
@@ -352,7 +386,11 @@
|
@@ -349,7 +383,11 @@
|
||||||
|
|
||||||
entityitem.setMot(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
|
entityitem.setMot(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
|
||||||
this.world.addEntity(entityitem);
|
this.world.addEntity(entityitem);
|
||||||
- this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, this.random.nextInt(6) + 1));
|
- this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, this.random.nextInt(6) + 1));
|
||||||
+ // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
+ // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||||
+ if (playerFishEvent.getExpToDrop() > 0) {
|
+ if (playerFishEvent.getExpToDrop() > 0) {
|
||||||
+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop()));
|
+ this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX(), this.owner.locY() + 0.5D, this.owner.locZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
if (itemstack1.getItem().a(TagsItem.FISHES)) {
|
if (itemstack1.getItem().a(TagsItem.FISHES)) {
|
||||||
this.owner.a(StatisticList.FISH_CAUGHT, 1);
|
this.owner.a(StatisticList.FISH_CAUGHT, 1);
|
||||||
}
|
}
|
||||||
@@ -362,8 +400,25 @@
|
@@ -359,8 +397,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isInGround) {
|
if (this.isInGround) {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
--- a/net/minecraft/server/EntityFox.java
|
--- a/net/minecraft/server/EntityFox.java
|
||||||
+++ b/net/minecraft/server/EntityFox.java
|
+++ b/net/minecraft/server/EntityFox.java
|
||||||
@@ -267,8 +267,8 @@
|
@@ -263,8 +263,8 @@
|
||||||
private List<UUID> ek() {
|
private List<UUID> eE() {
|
||||||
List<UUID> list = Lists.newArrayList();
|
List<UUID> list = Lists.newArrayList();
|
||||||
|
|
||||||
- list.add(((Optional) this.datawatcher.get(EntityFox.bB)).orElse((Object) null));
|
- list.add(((Optional) this.datawatcher.get(EntityFox.by)).orElse((Object) null));
|
||||||
- list.add(((Optional) this.datawatcher.get(EntityFox.bC)).orElse((Object) null));
|
- list.add(((Optional) this.datawatcher.get(EntityFox.bz)).orElse((Object) null));
|
||||||
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bB)).orElse(null)); // CraftBukkit - decompile error
|
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.by)).orElse(null)); // CraftBukkit - decompile error
|
||||||
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bC)).orElse(null)); // CraftBukkit - decompile error
|
+ list.add(((Optional<UUID>) this.datawatcher.get(EntityFox.bz)).orElse(null)); // CraftBukkit - decompile error
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@
|
@@ -397,7 +397,7 @@
|
||||||
protected void a(EntityItem entityitem) {
|
protected void a(EntityItem entityitem) {
|
||||||
ItemStack itemstack = entityitem.getItemStack();
|
ItemStack itemstack = entityitem.getItemStack();
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
int i = itemstack.getCount();
|
int i = itemstack.getCount();
|
||||||
|
|
||||||
if (i > 1) {
|
if (i > 1) {
|
||||||
@@ -944,6 +944,11 @@
|
@@ -918,6 +918,11 @@
|
||||||
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
|
int i = (Integer) iblockdata.get(BlockSweetBerryBush.a);
|
||||||
|
|
||||||
iblockdata.set(BlockSweetBerryBush.a, 1);
|
iblockdata.set(BlockSweetBerryBush.a, 1);
|
||||||
@ -32,7 +32,7 @@
|
|||||||
int j = 1 + EntityFox.this.world.random.nextInt(2) + (i == 3 ? 1 : 0);
|
int j = 1 + EntityFox.this.world.random.nextInt(2) + (i == 3 ? 1 : 0);
|
||||||
ItemStack itemstack = EntityFox.this.getEquipment(EnumItemSlot.MAINHAND);
|
ItemStack itemstack = EntityFox.this.getEquipment(EnumItemSlot.MAINHAND);
|
||||||
|
|
||||||
@@ -983,7 +988,7 @@
|
@@ -957,7 +962,7 @@
|
||||||
private int f;
|
private int f;
|
||||||
|
|
||||||
public r() {
|
public r() {
|
||||||
@ -41,7 +41,7 @@
|
|||||||
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
|
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1035,7 +1040,7 @@
|
@@ -1009,7 +1014,7 @@
|
||||||
private int c;
|
private int c;
|
||||||
|
|
||||||
public t() {
|
public t() {
|
||||||
@ -50,7 +50,7 @@
|
|||||||
this.c = EntityFox.this.random.nextInt(140);
|
this.c = EntityFox.this.random.nextInt(140);
|
||||||
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK, PathfinderGoal.Type.JUMP));
|
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK, PathfinderGoal.Type.JUMP));
|
||||||
}
|
}
|
||||||
@@ -1146,7 +1151,7 @@
|
@@ -1120,7 +1125,7 @@
|
||||||
private EntityLiving k;
|
private EntityLiving k;
|
||||||
private int l;
|
private int l;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@
|
|||||||
super(EntityFox.this, oclass, 10, flag, flag1, predicate);
|
super(EntityFox.this, oclass, 10, flag, flag1, predicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1181,7 +1186,7 @@
|
@@ -1155,7 +1160,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void c() {
|
public void c() {
|
||||||
@ -67,8 +67,8 @@
|
|||||||
+ EntityFox.this.setGoalTarget(this.j, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true); // CraftBukkit
|
+ EntityFox.this.setGoalTarget(this.j, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true); // CraftBukkit
|
||||||
this.c = this.j;
|
this.c = this.j;
|
||||||
if (this.k != null) {
|
if (this.k != null) {
|
||||||
this.l = this.k.ct();
|
this.l = this.k.cI();
|
||||||
@@ -1225,6 +1230,14 @@
|
@@ -1199,6 +1204,14 @@
|
||||||
if (entityplayer1 != null && entityplayer != entityplayer1) {
|
if (entityplayer1 != null && entityplayer != entityplayer1) {
|
||||||
entityfox.b(entityplayer1.getUniqueID());
|
entityfox.b(entityplayer1.getUniqueID());
|
||||||
}
|
}
|
||||||
@ -83,18 +83,18 @@
|
|||||||
|
|
||||||
if (entityplayer2 != null) {
|
if (entityplayer2 != null) {
|
||||||
entityplayer2.a(StatisticList.ANIMALS_BRED);
|
entityplayer2.a(StatisticList.ANIMALS_BRED);
|
||||||
@@ -1239,10 +1252,14 @@
|
@@ -1213,10 +1226,14 @@
|
||||||
this.partner.resetLove();
|
this.partner.resetLove();
|
||||||
entityfox.setAgeRaw(-24000);
|
entityfox.setAgeRaw(-24000);
|
||||||
entityfox.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F);
|
entityfox.setPositionRotation(this.animal.locX(), this.animal.locY(), this.animal.locZ(), 0.0F, 0.0F);
|
||||||
- this.b.addEntity(entityfox);
|
- this.b.addEntity(entityfox);
|
||||||
+ this.b.addEntity(entityfox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
+ this.b.addEntity(entityfox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
||||||
this.b.broadcastEntityEffect(this.animal, (byte) 18);
|
this.b.broadcastEntityEffect(this.animal, (byte) 18);
|
||||||
if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
if (this.b.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
||||||
- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, this.animal.getRandom().nextInt(7) + 1));
|
- this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), this.animal.getRandom().nextInt(7) + 1));
|
||||||
+ // CraftBukkit start - use event experience
|
+ // CraftBukkit start - use event experience
|
||||||
+ if (experience > 0) {
|
+ if (experience > 0) {
|
||||||
+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX, this.animal.locY, this.animal.locZ, experience));
|
+ this.b.addEntity(new EntityExperienceOrb(this.b, this.animal.locX(), this.animal.locY(), this.animal.locZ(), experience));
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren