Archiviert
13
0

Fix StructureGrowEvent originating from dispensers

Dieser Commit ist enthalten in:
md_5 2018-08-15 18:05:04 +10:00
Ursprung 452a173807
Commit 7c341e9beb

Datei anzeigen

@ -295,7 +295,7 @@
} else {
Block block = world.getType(blockposition).getBlock();
@@ -255,12 +449,55 @@
@@ -255,12 +449,57 @@
this.a = true;
World world = isourceblock.getWorld();
BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.e().get(BlockDispenser.FACING));
@ -321,6 +321,8 @@
+ return itemstack;
+ }
+ }
+
+ world.captureTreeGeneration = true;
+ // CraftBukkit end
if (!ItemBoneMeal.a(itemstack, world, blockposition) && !ItemBoneMeal.b(itemstack, world, blockposition)) {
@ -351,7 +353,7 @@
return itemstack;
}
@@ -269,11 +506,40 @@
@@ -269,11 +508,40 @@
protected ItemStack a(ISourceBlock isourceblock, ItemStack itemstack) {
World world = isourceblock.getWorld();
BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.e().get(BlockDispenser.FACING));
@ -394,7 +396,7 @@
return itemstack;
}
}));
@@ -295,6 +561,30 @@
@@ -295,6 +563,30 @@
EnumDirection enumdirection = (EnumDirection) isourceblock.e().get(BlockDispenser.FACING);
BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection);
@ -425,7 +427,7 @@
this.a = true;
if (world.isEmpty(blockposition) && BlockWitherSkull.b(world, blockposition, itemstack)) {
world.setTypeAndData(blockposition, (IBlockData) Blocks.WITHER_SKELETON_SKULL.getBlockData().set(BlockSkull.a, Integer.valueOf(enumdirection.opposite().get2DRotationValue() * 4)), 3);
@@ -318,6 +608,30 @@
@@ -318,6 +610,30 @@
BlockPosition blockposition = isourceblock.getBlockPosition().shift((EnumDirection) isourceblock.e().get(BlockDispenser.FACING));
BlockPumpkinCarved blockpumpkincarved = (BlockPumpkinCarved) Blocks.CARVED_PUMPKIN;
@ -456,7 +458,7 @@
this.a = true;
if (world.isEmpty(blockposition) && blockpumpkincarved.a((IWorldReader) world, blockposition)) {
if (!world.isClientSide) {
@@ -379,6 +693,51 @@
@@ -379,6 +695,51 @@
}
d();
@ -508,7 +510,7 @@
}
}
}
@@ -387,7 +746,7 @@
@@ -387,7 +748,7 @@
LocaleLanguage localelanguage = LocaleLanguage.a();
registrymaterials.iterator().forEachRemaining((object) -> {
@ -517,7 +519,7 @@
if (!localelanguage.b(s)) {
DispenserRegistry.c.warn("Missing translation for {}: {} (key: \'{}\')", s1, registrymaterials.b(object), s);
@@ -481,6 +840,30 @@
@@ -481,6 +842,30 @@
BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection);
EnumDirection enumdirection1 = isourceblock.getWorld().isEmpty(blockposition.down()) ? enumdirection : EnumDirection.UP;
@ -548,7 +550,7 @@
this.a = ((ItemBlock) item).a((BlockActionContext) (new DispenserRegistry.b(isourceblock.getWorld(), blockposition, enumdirection, itemstack, enumdirection1))) == EnumInteractionResult.SUCCESS;
if (this.a) {
itemstack.subtract(1);
@@ -534,12 +917,40 @@
@@ -534,12 +919,40 @@
d3 = 0.0D;
}