diff --git a/.gitignore b/.gitignore index a2391fdf..b7814c1e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ CHANGELOG !/models/ !info.txt !publish.bat +!publish_obf.bat !include.bat !buildlocal.bat !/README \ No newline at end of file diff --git a/publish_obf.bat b/publish_obf.bat new file mode 100644 index 00000000..9376fa50 --- /dev/null +++ b/publish_obf.bat @@ -0,0 +1,52 @@ +::ASSEMBLY LINE BUILDER +@echo off +echo Promotion Type? (Choose * for recommended, @ for stable and x for unstable) +set /p PROMOTION= + +set /p MODVERSION= 360) this.wheelRotation = 0; float wheelRotPct = wheelRotation / 360f; - animFrame = (int) (wheelRotPct * NUM_FRAMES); // sync the animation - if (animFrame < 0) - animFrame = 0; - if (animFrame > NUM_FRAMES) - animFrame = NUM_FRAMES; + + // Sync the animation. Slant belts are slower. + if (this.getSlant() == SlantType.NONE) + { + this.animFrame = (int) (wheelRotPct * MAX_FRAME); + if (this.animFrame < 0) + this.animFrame = 0; + if (this.animFrame > MAX_FRAME) + this.animFrame = MAX_FRAME; + } + else + { + this.animFrame = (int) (wheelRotPct * MAX_SLANT_FRAME); + if (this.animFrame < 0) + this.animFrame = 0; + if (this.animFrame > MAX_SLANT_FRAME) + this.animFrame = MAX_SLANT_FRAME; + } } } @@ -263,15 +274,31 @@ public class TileEntityConveyorBelt extends TileEntityAssemblyNetwork implements public int getAnimationFrame() { TileEntity te = null; - te = worldObj.getBlockTileEntity(xCoord - 1, yCoord, zCoord); + te = this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord); + if (te != null) + { if (te instanceof TileEntityConveyorBelt) - return ((TileEntityConveyorBelt) te).getAnimationFrame(); - te = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord - 1); + { + if (((TileEntityConveyorBelt) te).getSlant() == this.slantType) + return ((TileEntityConveyorBelt) te).getAnimationFrame(); + } + + } + + te = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1); + if (te != null) + { if (te instanceof TileEntityConveyorBelt) - return ((TileEntityConveyorBelt) te).getAnimationFrame(); - return animFrame; + { + if (((TileEntityConveyorBelt) te).getSlant() == this.slantType) + return ((TileEntityConveyorBelt) te).getAnimationFrame(); + } + + } + + return this.animFrame; } /**