aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/block')
-rw-r--r--src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java8
-rw-r--r--src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java17
2 files changed, 15 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java
index a021a39ac8..65d89c0577 100644
--- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java
+++ b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstone.java
@@ -92,17 +92,19 @@ public abstract class BlockGenericRedstone extends BlockContainer {
final TileEntityRedstoneHandler tile = (TileEntityRedstoneHandler) world.getTileEntity(x, y, z);
if (tile != null) {
- if (tile.isScrewdriverable() || player.capabilities.isCreativeMode) {
+ if (tile.isScrewdriverable()) {
if (ItemUtils.isToolScrewdriver(mHandStack)){
mDidTool = tile.onScrewdriverRMB();
+ PlayerUtils.messagePlayer(player, "Adjusted Light level by 0.0625f. "+tile.getLightBrightness());
}
}
- if (tile.isMalletable() || player.capabilities.isCreativeMode) {
+ if (tile.isMalletable()) {
if (ItemUtils.isToolMallet(mHandStack)){
mDidTool = tile.onMalletRMB();
+ PlayerUtils.messagePlayer(player, "Light Mode active: "+mDidTool);
}
}
- if (tile.isWrenchable() || player.capabilities.isCreativeMode) {
+ if (tile.isWrenchable()) {
if (ItemUtils.isToolWrench(mHandStack)){
mDidTool = tile.onWrenchRMB();
}
diff --git a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java
index f2a5c3f36a..ad59a83d0c 100644
--- a/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java
+++ b/src/Java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneTest.java
@@ -10,6 +10,7 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.general.redstone.TileEntityRedstoneHandler;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.world.explosions.ExplosionHandler;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
@@ -50,15 +51,14 @@ public class BlockGenericRedstoneTest extends BlockGenericRedstone {
@Override
public boolean onScrewdriverRMB() {
- if (this.mLightValue + 1 <= 1) {
- this.mLightValue += 1;
+ if (this.mLightValue + 0.0625f <= 1) {
+ this.mLightValue += 0.0625f;
}
else {
this.mLightValue = 0;
}
- Logger.INFO("Screwdriver | "+this.getLightBrightness());
this.markForUpdate();
- return super.onScrewdriverRMB();
+ return true;
}
@Override
@@ -75,7 +75,8 @@ public class BlockGenericRedstoneTest extends BlockGenericRedstone {
@Override
public boolean onMalletRMB() {
this.mLightMode = Utils.invertBoolean(mLightMode);
- return super.onMalletRMB();
+ this.markForUpdate();
+ return mLightMode;
}
@Override
@@ -91,8 +92,10 @@ public class BlockGenericRedstoneTest extends BlockGenericRedstone {
@Override
public boolean onWrenchRMB() {
- // TODO Auto-generated method stub
- return super.onWrenchRMB();
+ Logger.INFO("Found Wrench");
+ ExplosionHandler explode = new ExplosionHandler();
+ explode.createExplosion(this.worldObj, null, this.xCoord, this.yCoord, this.zCoord, 1f, false, true);
+ return true;
}
@Override