mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Fix stuff
This commit is contained in:
parent
d8080835f8
commit
19fd479170
@ -113,22 +113,22 @@ public class RenderCraneConsole extends TileEntitySpecialRenderer {
|
||||
GL11.glPushMatrix();
|
||||
int girderSpan = 0;
|
||||
GL11.glRotatef(-craneRotationOffset, 0F, 1F, 0F);
|
||||
switch((craneRotationOffset + teFacing) % 360) {
|
||||
switch(craneRotationOffset) {
|
||||
case 0:
|
||||
girderSpan = console.spanF + console.spanB + 1;
|
||||
GL11.glTranslated(posX - console.spanB, 0, 0);
|
||||
GL11.glTranslated(posX + console.spanB, 0, 0);
|
||||
break;
|
||||
case 90:
|
||||
girderSpan = console.spanL + console.spanR + 1;
|
||||
GL11.glTranslated(0, 0, -posZ + console.spanR);
|
||||
GL11.glTranslated(0, 0, -posZ - console.spanR);
|
||||
break;
|
||||
case 180:
|
||||
girderSpan = console.spanF + console.spanB + 1;
|
||||
GL11.glTranslated(posX + console.spanF, 0, 0);
|
||||
GL11.glTranslated(posX - console.spanF, 0, 0);
|
||||
break;
|
||||
case 270:
|
||||
girderSpan = console.spanL + console.spanR + 1;
|
||||
GL11.glTranslated(0, 0, -posZ - console.spanL);
|
||||
GL11.glTranslated(0, 0, -posZ + console.spanL);
|
||||
break;
|
||||
}
|
||||
GL11.glRotatef(craneRotationOffset, 0F, 1F, 0F);
|
||||
|
||||
@ -277,14 +277,14 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
|
||||
|
||||
int girderY = centerY + 6;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
this.spanF = this.findRoomExtent(x, girderY, z, dir, 0);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
|
||||
this.spanF = this.findRoomExtent(x, girderY, z, dir, 16);
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
this.spanR = this.findRoomExtent(x, girderY, z, dir, 0);
|
||||
this.spanR = this.findRoomExtent(x, girderY, z, dir, 16);
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
this.spanB = this.findRoomExtent(x, girderY, z, dir, 0);
|
||||
this.spanB = this.findRoomExtent(x, girderY, z, dir, 16);
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
this.spanL = this.findRoomExtent(x, girderY, z, dir, 0);
|
||||
this.spanL = this.findRoomExtent(x, girderY, z, dir, 16);
|
||||
|
||||
this.height = 7;
|
||||
|
||||
@ -293,14 +293,14 @@ public class TileEntityCraneConsole extends TileEntityLoadedBase implements Simp
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
private int findRoomExtent(int x, int y, int z, ForgeDirection dir, int def) {
|
||||
for (int i = 1; i < 32; i++) {
|
||||
private int findRoomExtent(int x, int y, int z, ForgeDirection dir, int max) {
|
||||
for (int i = 1; i < max; i++) {
|
||||
if (!worldObj.isAirBlock(x + dir.offsetX * i, y, z + dir.offsetZ * i)) {
|
||||
return i - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return def;
|
||||
return max;
|
||||
}
|
||||
|
||||
public void cycleCraneRotation() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user