aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/bop/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/bop/blocks')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java27
3 files changed, 8 insertions, 29 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
index 3fb8229b7f..3e7a6a0105 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
@@ -40,7 +40,7 @@ public class LeavesBase extends BlockLeaves {
Blocks.fire.setFireInfo(this, 80, 150);
}
- private final void setVanillaVariable(Object toSet, Object value) {
+ private void setVanillaVariable(Object toSet, Object value) {
toSet = value;
}
@@ -52,9 +52,9 @@ public class LeavesBase extends BlockLeaves {
@Override // Drops when Leaf is broken
protected void func_150124_c(World world, int x, int y, int z, int meta, int randomChance) {
Logger.INFO("Dropping Bonus Drops");
- for (int i = 0; i < this.bonusDrops.length; ++i) {
- if (this.bonusDrops[i] != null && world.rand.nextInt(randomChance) == 0) {
- this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(this.bonusDrops[i], 1));
+ for (ItemStack bonusDrop : this.bonusDrops) {
+ if (bonusDrop != null && world.rand.nextInt(randomChance) == 0) {
+ this.dropBlockAsItem(world, x, y, z, ItemUtils.getSimpleStack(bonusDrop, 1));
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
index 6c4ea6a556..3270fea55b 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/LogBase.java
@@ -40,7 +40,7 @@ public abstract class LogBase extends BlockLog {
Blocks.fire.setFireInfo(this, 20, 100);
}
- private final void setVanillaVariable(Object toSet, Object value) {
+ private void setVanillaVariable(Object toSet, Object value) {
toSet = value;
}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
index 1c1cd515bb..51dd580ab4 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
@@ -48,7 +48,7 @@ public class SaplingBase extends BlockSapling {
this.setCreativeTab(AddToCreativeTab.tabBOP);
}
- private final void setVanillaVariable(Object toSet, Object value) {
+ private void setVanillaVariable(Object toSet, Object value) {
toSet = value;
}
@@ -121,33 +121,12 @@ public class SaplingBase extends BlockSapling {
int j1 = 0;
boolean flag = false;
- switch (l) {
- case 0:
- default:
- Logger.WARNING("Case 0 - Grow Tree");
- break;
- }
-
Block block = Blocks.air;
- if (flag) {
- world.setBlock(x + i1, y, z + j1, block, 0, 4);
- world.setBlock(x + i1 + 1, y, z + j1, block, 0, 4);
- world.setBlock(x + i1, y, z + j1 + 1, block, 0, 4);
- world.setBlock(x + i1 + 1, y, z + j1 + 1, block, 0, 4);
- } else {
- world.setBlock(x, y, z, block, 0, 4);
- }
+ world.setBlock(x, y, z, block, 0, 4);
if (!((WorldGenerator) object).generate(world, rand, x + i1, y, z + j1)) {
- if (flag) {
- world.setBlock(x + i1, y, z + j1, this, l, 4);
- world.setBlock(x + i1 + 1, y, z + j1, this, l, 4);
- world.setBlock(x + i1, y, z + j1 + 1, this, l, 4);
- world.setBlock(x + i1 + 1, y, z + j1 + 1, this, l, 4);
- } else {
- world.setBlock(x, y, z, this, l, 4);
- }
+ world.setBlock(x, y, z, this, l, 4);
}
}