Apply fixes from binary patches.
This commit is contained in:
@ -8,24 +8,6 @@
|
||||
private static final String __OBFID = "CL_00000199";
|
||||
|
||||
public final cpw.mods.fml.common.registry.RegistryDelegate<Block> delegate =
|
||||
@@ -650,7 +651,7 @@
|
||||
|
||||
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
|
||||
{
|
||||
- if (!p_149690_1_.isRemote && !p_149690_1_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||
+ if (!p_149690_1_.isRemote && (!p_149690_1_.restoringBlockSnapshots || !p_149690_1_.restoringBlockStates)) // do not drop items while restoring blockstates, prevents item dupe
|
||||
{
|
||||
ArrayList<ItemStack> items = getDrops(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_7_);
|
||||
p_149690_6_ = ForgeEventFactory.fireBlockHarvesting(items, p_149690_1_, this, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_7_, p_149690_6_, false, harvesters.get());
|
||||
@@ -667,7 +668,7 @@
|
||||
|
||||
protected void dropBlockAsItem(World p_149642_1_, int p_149642_2_, int p_149642_3_, int p_149642_4_, ItemStack p_149642_5_)
|
||||
{
|
||||
- if (!p_149642_1_.isRemote && p_149642_1_.getGameRules().getGameRuleBooleanValue("doTileDrops") && !p_149642_1_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||
+ if (!p_149642_1_.isRemote && p_149642_1_.getGameRules().getGameRuleBooleanValue("doTileDrops") && (!p_149642_1_.restoringBlockSnapshots || !p_149642_1_.restoringBlockStates)) // do not drop items while restoring blockstates, prevents item dupe
|
||||
{
|
||||
if (captureDrops.get())
|
||||
{
|
||||
@@ -1131,6 +1132,23 @@
|
||||
return this;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
private static final String __OBFID = "CL_00000305";
|
||||
|
||||
protected BlockSapling()
|
||||
@@ -41,9 +49,31 @@
|
||||
@@ -41,9 +49,39 @@
|
||||
{
|
||||
super.updateTick(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
|
||||
|
||||
@ -30,29 +30,37 @@
|
||||
+ p_149674_1_.captureTreeGeneration = true;
|
||||
this.func_149879_c(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_5_);
|
||||
+ p_149674_1_.captureTreeGeneration = false;
|
||||
+ if (p_149674_1_.capturedBlockStates.size() > 0)
|
||||
+ if (p_149674_1_.capturedBlockSnapshots.size() > 0)
|
||||
+ {
|
||||
+ TreeType treeType = BlockSapling.treeType;
|
||||
+ BlockSapling.treeType = null;
|
||||
+ Location location = new Location(p_149674_1_.getWorld(), p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
+ List<BlockState> blocks = (List<BlockState>) p_149674_1_.capturedBlockStates.clone();
|
||||
+ p_149674_1_.capturedBlockStates.clear();
|
||||
+ List<net.minecraftforge.common.util.BlockSnapshot> blocks = (List) p_149674_1_.capturedBlockSnapshots.clone();
|
||||
+ List<BlockState> blockstates = new java.util.ArrayList();
|
||||
+ for (net.minecraftforge.common.util.BlockSnapshot snapshot : blocks)
|
||||
+ {
|
||||
+ blockstates.add(new org.bukkit.craftbukkit.block.CraftBlockState(snapshot));
|
||||
+ }
|
||||
+ p_149674_1_.capturedBlockSnapshots.clear();
|
||||
+ StructureGrowEvent event = null;
|
||||
+ if (treeType != null) {
|
||||
+ event = new StructureGrowEvent(location, treeType, false, null, blocks);
|
||||
+ if (treeType != null)
|
||||
+ {
|
||||
+ event = new StructureGrowEvent(location, treeType, false, null, blockstates);
|
||||
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
|
||||
+ }
|
||||
+ if (event == null || !event.isCancelled()) {
|
||||
+ for (BlockState blockstate : blocks) {
|
||||
+ if (event == null || !event.isCancelled())
|
||||
+ {
|
||||
+ for (BlockState blockstate : blockstates)
|
||||
+ {
|
||||
+ blockstate.update(true);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ //Cauldron end
|
||||
+ // Cauldron end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +103,20 @@
|
||||
@@ -73,7 +111,20 @@
|
||||
{
|
||||
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(p_149878_1_, p_149878_5_, p_149878_2_, p_149878_3_, p_149878_4_)) return;
|
||||
int l = p_149878_1_.getBlockMetadata(p_149878_2_, p_149878_3_, p_149878_4_) & 7;
|
||||
@ -74,7 +82,7 @@
|
||||
int i1 = 0;
|
||||
int j1 = 0;
|
||||
boolean flag = false;
|
||||
@@ -84,6 +127,7 @@
|
||||
@@ -84,6 +135,7 @@
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
@ -82,7 +90,7 @@
|
||||
label78:
|
||||
|
||||
for (i1 = 0; i1 >= -1; --i1)
|
||||
@@ -108,6 +152,7 @@
|
||||
@@ -108,6 +160,7 @@
|
||||
|
||||
break;
|
||||
case 2:
|
||||
@ -90,7 +98,7 @@
|
||||
object = new WorldGenForest(true, false);
|
||||
break;
|
||||
case 3:
|
||||
@@ -119,6 +164,7 @@
|
||||
@@ -119,6 +172,7 @@
|
||||
{
|
||||
if (this.func_149880_a(p_149878_1_, p_149878_2_ + i1, p_149878_3_, p_149878_4_ + j1, 3) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1 + 1, p_149878_3_, p_149878_4_ + j1, 3) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1, p_149878_3_, p_149878_4_ + j1 + 1, 3) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1 + 1, p_149878_3_, p_149878_4_ + j1 + 1, 3))
|
||||
{
|
||||
@ -98,7 +106,7 @@
|
||||
object = new WorldGenMegaJungle(true, 10, 20, 3, 3);
|
||||
flag = true;
|
||||
break label93;
|
||||
@@ -130,11 +176,13 @@
|
||||
@@ -130,11 +184,13 @@
|
||||
{
|
||||
j1 = 0;
|
||||
i1 = 0;
|
||||
@ -112,7 +120,7 @@
|
||||
object = new WorldGenSavannaTree(true);
|
||||
break;
|
||||
case 5:
|
||||
@@ -147,6 +195,7 @@
|
||||
@@ -147,6 +203,7 @@
|
||||
if (this.func_149880_a(p_149878_1_, p_149878_2_ + i1, p_149878_3_, p_149878_4_ + j1, 5) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1 + 1, p_149878_3_, p_149878_4_ + j1, 5) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1, p_149878_3_, p_149878_4_ + j1 + 1, 5) && this.func_149880_a(p_149878_1_, p_149878_2_ + i1 + 1, p_149878_3_, p_149878_4_ + j1 + 1, 5))
|
||||
{
|
||||
object = new WorldGenCanopyTree(true);
|
||||
|
Reference in New Issue
Block a user