aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block/general
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-02 18:20:28 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-04-02 18:20:28 +1000
commitaf61708010aef717ecc3537fa115547acb9aa9c7 (patch)
tree663bd3d765daa0fc1d053840dad558ab7bb62dba /src/Java/gtPlusPlus/core/block/general
parent70a0df8a68725c16f0c0b959639b8e82cbbcf3a0 (diff)
downloadGT5-Unofficial-af61708010aef717ecc3537fa115547acb9aa9c7.tar.gz
GT5-Unofficial-af61708010aef717ecc3537fa115547acb9aa9c7.tar.bz2
GT5-Unofficial-af61708010aef717ecc3537fa115547acb9aa9c7.zip
$ More fixes.
Diffstat (limited to 'src/Java/gtPlusPlus/core/block/general')
-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