diff --git a/build.gradle b/build.gradle
index 06e4cd9..a073b54 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,23 @@
-def mainVersion = "1.2"
-def buildNumber = "6"
+def mainVersion = "1.3"
+def buildNumber = "7"
+
+/*
+ * This file is part of Industrial Wires.
+ * Copyright (C) 2016-2017 malte0811
+ *
+ * Industrial Wires is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Industrial Wires is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Industrial Wires. If not, see .
+ */
// For those who want the bleeding edge
buildscript {
diff --git a/changelog.md b/changelog.md
index 98767f1..6f388e4 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,7 @@
+#####Version 1.3-7
+ - added Jacob's Ladders/High voltage travelling arcs
+ - they don't have a particular purpose aside from looking nice
+
#####Version 1.2-6
- reduced the discrepancies between IC2 cables and Industrial Wires
- machines don't explode when they shouldn't except in some corner cases
diff --git a/src/main/java/malte0811/industrialWires/blocks/BlockJacobsLadder.java b/src/main/java/malte0811/industrialWires/blocks/BlockJacobsLadder.java
index 8f3a119..5c09370 100644
--- a/src/main/java/malte0811/industrialWires/blocks/BlockJacobsLadder.java
+++ b/src/main/java/malte0811/industrialWires/blocks/BlockJacobsLadder.java
@@ -205,7 +205,7 @@ public class BlockJacobsLadder extends Block implements IMetaEnum, IPlacementChe
min = new Vec3d(distZ, 0, distX);
max = new Vec3d(1 - distZ, h, 1 - distX);
}
- return new AxisAlignedBB(min, max);
+ return new AxisAlignedBB(min.xCoord, min.yCoord, min.zCoord, max.xCoord, max.yCoord, max.zCoord);
}
}
@@ -256,4 +256,21 @@ public class BlockJacobsLadder extends Block implements IMetaEnum, IPlacementChe
}
return true;
}
+
+ @Override
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) {
+ TileEntity te = world.getTileEntity(pos);
+ return te instanceof TileEntityJacobsLadder && ((TileEntityJacobsLadder) te).rotate(world, pos, axis);
+ }
+
+ @Override
+ public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param) {
+ boolean def = super.eventReceived(state, worldIn, pos, id, param);
+ if ((id&255)==255) {
+ IBlockState s = worldIn.getBlockState(pos);
+ worldIn.notifyBlockUpdate(pos, s, s, 3);
+ return true;
+ }
+ return def;
+ }
}
diff --git a/src/main/java/malte0811/industrialWires/blocks/TileEntityJacobsLadder.java b/src/main/java/malte0811/industrialWires/blocks/TileEntityJacobsLadder.java
index 2490cea..b8f14a2 100644
--- a/src/main/java/malte0811/industrialWires/blocks/TileEntityJacobsLadder.java
+++ b/src/main/java/malte0811/industrialWires/blocks/TileEntityJacobsLadder.java
@@ -41,6 +41,7 @@ import net.minecraft.util.*;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
+import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
@@ -304,6 +305,10 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
}
public boolean isActive() {
+ if (isDummy()) {
+ TileEntity master = worldObj.getTileEntity(pos.down(dummy));
+ return master instanceof TileEntityJacobsLadder&&((TileEntityJacobsLadder) master).isActive();
+ }
return timeTillActive == 0 && t < 1;
}
@@ -356,6 +361,30 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
return false;
}
+ public boolean rotate(World world, BlockPos pos, EnumFacing axis) {
+ if (isActive()) {
+ return false;
+ }
+ if (!worldObj.isRemote) {
+ EnumFacing targetDir = facing.rotateAround(EnumFacing.Axis.Y);
+ for (int i = -dummy;i