Hopefully completly fixed decay this time
This commit is contained in:
parent
b35b71b020
commit
d437a88558
18 changed files with 143 additions and 79 deletions
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -93,22 +96,23 @@ public class BlockAcaciaLeaves extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.acaciaLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,7 +224,7 @@ public class BlockAcaciaLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -247,7 +251,7 @@ public class BlockAcaciaLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -55,22 +58,23 @@ public class BlockAppleLeaves extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.appleLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +124,7 @@ public class BlockAppleLeaves extends BlockLeavesBase
|
||||||
{
|
{
|
||||||
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
|
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
|
||||||
}
|
}
|
||||||
else if (var15 == mod_BiomesOPlenty.appleLeaves.blockID || var15 == mod_BiomesOPlenty.appleLeavesFruitless.blockID)
|
else if (var15 == mod_BiomesOPlenty.appleLeaves.blockID || var15 == mod_BiomesOPlenty.appleLeaves.blockID)
|
||||||
{
|
{
|
||||||
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
|
this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +186,7 @@ public class BlockAppleLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -209,7 +213,7 @@ public class BlockAppleLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -53,22 +56,23 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.appleLeavesFruitless.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,7 +184,7 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -207,7 +211,7 @@ public class BlockAppleLeavesFruitless extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -55,22 +58,23 @@ public class BlockAutumnLeaves extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.autumnLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +186,7 @@ public class BlockAutumnLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -209,7 +213,7 @@ public class BlockAutumnLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -49,24 +52,28 @@ public class BlockBlueLeaves extends BlockLeavesBase
|
||||||
return blockIcon[(!isOpaqueCube() ? 0 : 1)];
|
return blockIcon[(!isOpaqueCube() ? 0 : 1)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
|
||||||
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.blueLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,7 +185,7 @@ public class BlockBlueLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -205,7 +212,7 @@ public class BlockBlueLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -54,22 +57,23 @@ public class BlockDarkLeaves extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.darkLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +185,7 @@ public class BlockDarkLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -208,7 +212,7 @@ public class BlockDarkLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
|
@ -54,22 +57,23 @@ public class BlockDeadLeaves extends BlockLeavesBase
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
byte b0 = 1;
|
byte var7 = 1;
|
||||||
int j1 = b0 + 1;
|
int var8 = var7 + 1;
|
||||||
|
|
||||||
if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1))
|
if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8))
|
||||||
{
|
{
|
||||||
for (int k1 = -b0; k1 <= b0; ++k1)
|
for (int var9 = -var7; var9 <= var7; ++var9)
|
||||||
{
|
{
|
||||||
for (int l1 = -b0; l1 <= b0; ++l1)
|
for (int var10 = -var7; var10 <= var7; ++var10)
|
||||||
{
|
{
|
||||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
for (int var11 = -var7; var11 <= var7; ++var11)
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
|
||||||
if (Block.blocksList[j2] != null)
|
if (var12 == mod_BiomesOPlenty.deadLeaves.blockID)
|
||||||
{
|
{
|
||||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
int var13 = par1World.getBlockMetadata(par2 + var9, par3 + var10, par4 + var11);
|
||||||
|
par1World.setBlockMetadataWithNotify(par2 + var9, par3 + var10, par4 + var11, var13 | 8, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +185,7 @@ public class BlockDeadLeaves extends BlockLeavesBase
|
||||||
|
|
||||||
if (var12 >= 0)
|
if (var12 >= 0)
|
||||||
{
|
{
|
||||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 4);
|
par1World.setBlockMetadataWithNotify(par2, par3, par4, var6 & -9, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -208,7 +212,7 @@ public class BlockDeadLeaves extends BlockLeavesBase
|
||||||
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
private void removeLeaves(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlock(par2, par3, par4, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -48,7 +51,7 @@ public class BlockHolyLeaves extends BlockLeavesBase
|
||||||
{
|
{
|
||||||
return blockIcon[(!isOpaqueCube() ? 0 : 1)];
|
return blockIcon[(!isOpaqueCube() ? 0 : 1)];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
|
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
|
||||||
*/
|
*/
|
||||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
|
@ -2,6 +2,9 @@ package tdwp_ftw.biomesop.blocks;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
|
Loading…
Reference in a new issue