@Override public void updateEntity() { if (ticks == 0) this.onFirstTick(); ticks++; if (DragonAPICore.debugtest) { ChromaStructures.getPortalStructure(worldObj, xCoord, yCoord, zCoord, false).place(); DragonAPICore.debugtest = false; } if (complete) { if (charge < MINCHARGE || !ChunkProviderChroma.areStructuresReady()) { charge++; if (worldObj.isRemote) this.chargingParticles(); } } else { charge = 0; } int pos = this.getPortalPosition(); if (worldObj.isRemote) { if (pos == 5 && this.isFull9x9()) { if (worldObj.isRemote) this.idleParticles(); if (complete) { if (charge >= MINCHARGE) { if (worldObj.isRemote) this.activeParticles(); } } } } if (pos == 5 && this.isFull9x9()) { if (ticks % 20 == 0) this.validateStructure(worldObj, xCoord, yCoord, zCoord); if (complete && ticks % 90 == 0) { ChromaSounds.PORTAL.playSoundAtBlock(this); } } }
public boolean canPlayerUse(EntityPlayer ep) { return ChunkProviderChroma.areStructuresReady() && charge >= MINCHARGE && ProgressionManager.instance.playerHasPrerequisites(ep, ProgressStage.DIMENSION); }