generated from tilera/1710mod
Fixed TileLogicPointer, same problem with getWorldTime vs getTotalWorldTime as earlier nonfunctional item.
This commit is contained in:
parent
3d0fc6eb71
commit
5a117ea18a
1 changed files with 13 additions and 13 deletions
|
@ -69,14 +69,14 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
|
|
||||||
super.Powered = false;
|
super.Powered = false;
|
||||||
super.Disabled = false;
|
super.Disabled = false;
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
} else if (super.Disabled) {
|
} else if (super.Disabled) {
|
||||||
if (ps > 0) {
|
if (ps > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
super.Disabled = false;
|
super.Disabled = false;
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
} else {
|
} else {
|
||||||
|
@ -108,7 +108,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
|
|
||||||
super.Disabled = false;
|
super.Disabled = false;
|
||||||
super.Powered = false;
|
super.Powered = false;
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -120,14 +120,14 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
this.scheduleTick(2);
|
this.scheduleTick(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
this.updateBlockChange();
|
this.updateBlockChange();
|
||||||
} else if (super.Disabled) {
|
} else if (super.Disabled) {
|
||||||
if (ps > 0) {
|
if (ps > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
super.Disabled = false;
|
super.Disabled = false;
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
} else {
|
} else {
|
||||||
|
@ -142,7 +142,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
|
|
||||||
private void timerUpdate() {
|
private void timerUpdate() {
|
||||||
if (!super.worldObj.isRemote && !super.Powered && !super.Disabled) {
|
if (!super.worldObj.isRemote && !super.Powered && !super.Disabled) {
|
||||||
long wt = super.worldObj.getWorldTime();
|
long wt = super.worldObj.getTotalWorldTime();
|
||||||
if (this.interval < 2L) {
|
if (this.interval < 2L) {
|
||||||
this.interval = 2L;
|
this.interval = 2L;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sequencerUpdate() {
|
private void sequencerUpdate() {
|
||||||
long wt = super.worldObj.getWorldTime() + 6000L;
|
long wt = super.worldObj.getTotalWorldTime() + 6000L;
|
||||||
float f = (float) wt / (float) (this.interval * 4L);
|
float f = (float) wt / (float) (this.interval * 4L);
|
||||||
int i = (int) Math.floor((double) (f * 4.0F));
|
int i = (int) Math.floor((double) (f * 4.0F));
|
||||||
if (super.Deadmap == 1) {
|
if (super.Deadmap == 1) {
|
||||||
|
@ -189,7 +189,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
boolean ps3 = super.Deadmap == 0 ? (ps & 3) > 0 : (ps & 6) > 0;
|
boolean ps3 = super.Deadmap == 0 ? (ps & 3) > 0 : (ps & 6) > 0;
|
||||||
if (super.Disabled && !ps3) {
|
if (super.Disabled && !ps3) {
|
||||||
super.Disabled = false;
|
super.Disabled = false;
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
} else if (!super.Disabled && ps3) {
|
} else if (!super.Disabled && ps3) {
|
||||||
super.Disabled = true;
|
super.Disabled = true;
|
||||||
|
@ -207,7 +207,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
if (!super.Active && super.Powered) {
|
if (!super.Active && super.Powered) {
|
||||||
super.Powered = false;
|
super.Powered = false;
|
||||||
super.Active = true;
|
super.Active = true;
|
||||||
this.timestart = super.worldObj.getWorldTime();
|
this.timestart = super.worldObj.getTotalWorldTime();
|
||||||
this.updateBlockChange();
|
this.updateBlockChange();
|
||||||
} else if (super.Active && super.Powered) {
|
} else if (super.Active && super.Powered) {
|
||||||
super.Powered = false;
|
super.Powered = false;
|
||||||
|
@ -219,7 +219,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
private void stateCellUpdate() {
|
private void stateCellUpdate() {
|
||||||
if (!super.worldObj.isRemote && super.Active && !super.Powered
|
if (!super.worldObj.isRemote && super.Active && !super.Powered
|
||||||
&& !super.Disabled) {
|
&& !super.Disabled) {
|
||||||
long wt = super.worldObj.getWorldTime();
|
long wt = super.worldObj.getTotalWorldTime();
|
||||||
if (this.interval < 2L) {
|
if (this.interval < 2L) {
|
||||||
this.interval = 2L;
|
this.interval = 2L;
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
public float getPointerDirection(float partialTicks) {
|
public float getPointerDirection(float partialTicks) {
|
||||||
if (super.SubId == 0) {
|
if (super.SubId == 0) {
|
||||||
if (!super.Powered && !super.Disabled) {
|
if (!super.Powered && !super.Disabled) {
|
||||||
long wt = super.worldObj.getWorldTime();
|
long wt = super.worldObj.getTotalWorldTime();
|
||||||
float ivt = ((float) wt + partialTicks - (float) this.timestart)
|
float ivt = ((float) wt + partialTicks - (float) this.timestart)
|
||||||
/ (float) this.interval;
|
/ (float) this.interval;
|
||||||
if (ivt > 1.0F) {
|
if (ivt > 1.0F) {
|
||||||
|
@ -335,7 +335,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
return 0.75F;
|
return 0.75F;
|
||||||
}
|
}
|
||||||
} else if (super.SubId == 1) {
|
} else if (super.SubId == 1) {
|
||||||
long wt = super.worldObj.getWorldTime() + 6000L;
|
long wt = super.worldObj.getTotalWorldTime() + 6000L;
|
||||||
float ivt = ((float) wt + partialTicks) / (float) (this.interval * 4L);
|
float ivt = ((float) wt + partialTicks) / (float) (this.interval * 4L);
|
||||||
if (super.Deadmap == 1) {
|
if (super.Deadmap == 1) {
|
||||||
ivt = 0.75F - ivt;
|
ivt = 0.75F - ivt;
|
||||||
|
@ -365,7 +365,7 @@ public class TileLogicPointer extends TileLogic implements IPointerTile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long wt = super.worldObj.getWorldTime();
|
long wt = super.worldObj.getTotalWorldTime();
|
||||||
float ivt = ((float) wt + partialTicks - (float) this.timestart)
|
float ivt = ((float) wt + partialTicks - (float) this.timestart)
|
||||||
/ (float) this.interval;
|
/ (float) this.interval;
|
||||||
return super.Deadmap > 0 ? 1.0F - 0.2F * ivt : 0.5F + 0.2F * ivt;
|
return super.Deadmap > 0 ? 1.0F - 0.2F * ivt : 0.5F + 0.2F * ivt;
|
||||||
|
|
Loading…
Reference in a new issue