Replace more getWorldTime with getTotalWorldTime #7

Merged
tilera merged 1 commit from :master into master 2023-01-12 21:35:01 +01:00
6 changed files with 7 additions and 7 deletions
Showing only changes of commit a2ad18b4de - Show all commits

View file

@ -97,7 +97,7 @@ public class GuiDisplay extends GuiContainer {
} }
if (this.disp.cursMode == 2) { if (this.disp.cursMode == 2) {
long tm = super.mc.theWorld.getWorldTime(); long tm = super.mc.theWorld.getTotalWorldTime();
if ((tm >> 2 & 1L) > 0L) { if ((tm >> 2 & 1L) > 0L) {
b ^= 128; b ^= 128;
} }

View file

@ -86,7 +86,7 @@ public abstract class BluePowerConductor {
} }
public double getVoltage() { public double getVoltage() {
long lt = this.getParent().getWorldObj().getWorldTime(); long lt = this.getParent().getWorldObj().getTotalWorldTime();
if ((lt & 65535L) == (long) this.lastTick) { if ((lt & 65535L) == (long) this.lastTick) {
return this.Vcap; return this.Vcap;
} else { } else {

View file

@ -10,7 +10,7 @@ public class EnvironLib {
return 0.5; return 0.5;
} else { } else {
double nv = FractalLib.noise1D( double nv = FractalLib.noise1D(
2576710L, (double) world.getWorldTime() * 1.0E-4, 0.6F, 5 2576710L, (double) world.getTotalWorldTime() * 1.0E-4, 0.6F, 5
); );
nv = Math.max(0.0, 1.6 * (nv - 0.5) + 0.5); nv = Math.max(0.0, 1.6 * (nv - 0.5) + 0.5);
if (world.getWorldInfo().getTerrainType() != WorldType.FLAT) { if (world.getWorldInfo().getTerrainType() != WorldType.FLAT) {

View file

@ -20,7 +20,7 @@ public abstract class FluidBuffer {
} }
public int getLevel() { public int getLevel() {
long lt = this.getParent().getWorldObj().getWorldTime(); long lt = this.getParent().getWorldObj().getTotalWorldTime();
if ((lt & 65535L) == (long) this.lastTick) { if ((lt & 65535L) == (long) this.lastTick) {
return this.Level; return this.Level;
} else { } else {

View file

@ -64,7 +64,7 @@ public abstract class TileExtended extends TileEntity {
} }
public void scheduleTick(int time) { public void scheduleTick(int time) {
long tn = super.worldObj.getWorldTime() + (long) time; long tn = super.worldObj.getTotalWorldTime() + (long) time;
if (this.timeSched <= 0L || this.timeSched >= tn) { if (this.timeSched <= 0L || this.timeSched >= tn) {
this.timeSched = tn; this.timeSched = tn;
this.updateBlock(); this.updateBlock();
@ -72,7 +72,7 @@ public abstract class TileExtended extends TileEntity {
} }
public boolean isTickRunnable() { public boolean isTickRunnable() {
return this.timeSched >= 0L && this.timeSched <= super.worldObj.getWorldTime(); return this.timeSched >= 0L && this.timeSched <= super.worldObj.getTotalWorldTime();
} }
public boolean isTickScheduled() { public boolean isTickScheduled() {

View file

@ -136,7 +136,7 @@ public class TilePipe extends TileCovered implements IPipeConnectable {
super.worldObj, this, new WorldCoord(this), this.ConCache super.worldObj, this, new WorldCoord(this), this.ConCache
); );
this.markDirty(); this.markDirty();
if ((super.worldObj.getWorldTime() & 16L) == 0L) { if ((super.worldObj.getTotalWorldTime() & 16L) == 0L) {
this.hasChanged = true; this.hasChanged = true;
this.markForUpdate(); this.markForUpdate();
this.markDirty(); this.markDirty();