mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-28 15:56:14 +00:00
Phased out any usage of World.getTotalWorldTime() in favor of internal tickers. SubTileEntity now has a session and packet safe internal ticker.
This commit is contained in:
1 parent
0a7d5ec220
commit
765e302c7e
23 files changed
+47
-46
No files matched your search
@@ -25,9 +25,11 @@ public class TilePylon extends TileEntity {
|
||||
|
||||
boolean activated = false;
|
||||
int centerX, centerY, centerZ;
|
||||
int ticks = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
++ticks;
|
||||
int meta = getBlockMetadata();
|
||||
|
||||
if(activated && worldObj.isRemote) {
|
||||
@@ -40,7 +42,7 @@ public class TilePylon extends TileEntity {
|
||||
|
||||
if(meta == 1) {
|
||||
if(ConfigHandler.elfPortalParticlesEnabled) {
|
||||
double worldTime = (int) worldObj.getTotalWorldTime();
|
||||
double worldTime = ticks;
|
||||
worldTime += new Random(xCoord ^ yCoord ^ zCoord).nextInt(1000);
|
||||
worldTime /= 5;
|
||||
|
||||
|
||||
Reference in new issue
Block a user