Examples of ChunkCoordinates


Examples of net.minecraft.util.ChunkCoordinates

  public void onUpdate() {
    setTicksExisted(getTicksExisted() + 1);
    superUpdate();

    if(!fake && !isDead) {
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
      if(tile != null && tile instanceof TileSpreader)
        ((TileSpreader) tile).canShootBurst = false;
    }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    NBTTagCompound lensCmp = new NBTTagCompound();
    if(stack != null)
      stack.writeToNBT(lensCmp);
    par1nbtTagCompound.setTag(TAG_LENS_STACK, lensCmp);

    ChunkCoordinates coords = getBurstSourceChunkCoordinates();
    par1nbtTagCompound.setInteger(TAG_SPREADER_X, coords.posX);
    par1nbtTagCompound.setInteger(TAG_SPREADER_Y, coords.posY);
    par1nbtTagCompound.setInteger(TAG_SPREADER_Z, coords.posZ);

    par1nbtTagCompound.setDouble(TAG_LAST_MOTION_X, motionX);
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

        return;

      if(BotaniaAPI.internalHandler.isBuildcraftPipe(tile))
        return;
     
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      if(tile != null && (tile.xCoord != coords.posX || tile.yCoord != coords.posY || tile.zCoord != coords.posZ))
        collidedTile = tile;

      if(tile == null || tile.xCoord != coords.posX || tile.yCoord != coords.posY || tile.zCoord != coords.posZ) {
        if(!fake && !noParticles && (!worldObj.isRemote || tile instanceof IClientManaHandler) && tile != null && tile instanceof IManaReceiver && ((IManaReceiver) tile).canRecieveManaFromBursts()) {
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  @Override
  public void setDead() {
    super.setDead();

    if(!fake) {
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
      if(tile != null && tile instanceof TileSpreader)
        ((TileSpreader) tile).canShootBurst = true;
    } else setDeathTicksForFakeParticle();
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  public ChunkCoordinates getBurstSourceChunkCoordinates() {
    int x = dataWatcher.getWatchableObjectInt(coordsStart);
    int y = dataWatcher.getWatchableObjectInt(coordsStart + 1);
    int z = dataWatcher.getWatchableObjectInt(coordsStart + 2);

    return new ChunkCoordinates(x, y, z);
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  private boolean shouldDoFakeParticles() {
    if(ConfigHandler.staticWandBeam)
      return true;

    ChunkCoordinates coords = getBurstSourceChunkCoordinates();
    TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
    if(tile != null && tile instanceof TileSpreader)
      return getMana() != getStartingMana() && fullManaLastTick || Math.abs(((TileSpreader) tile).burstParticleTick - getTicksExisted()) < 4;
    return false;
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

      return getMana() != getStartingMana() && fullManaLastTick || Math.abs(((TileSpreader) tile).burstParticleTick - getTicksExisted()) < 4;
    return false;
  }

  private void incrementFakeParticleTick() {
    ChunkCoordinates coords = getBurstSourceChunkCoordinates();
    TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
    if(tile != null && tile instanceof TileSpreader) {
      TileSpreader spreader = (TileSpreader) tile;
      spreader.burstParticleTick += 2;
      if(spreader.lastBurstDeathTick != -1 && spreader.burstParticleTick > spreader.lastBurstDeathTick)
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

        spreader.burstParticleTick = 0;
    }
  }

  private void setDeathTicksForFakeParticle() {
    ChunkCoordinates coords = getBurstSourceChunkCoordinates();
    TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
    if(tile != null && tile instanceof TileSpreader)
      ((TileSpreader) tile).lastBurstDeathTick = getTicksExisted();
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    public PositionProperties(Entity entity) {
      int x = MathHelper.floor_double(entity.posX);
      int y = MathHelper.floor_double(entity.posY);
      int z = MathHelper.floor_double(entity.posZ);
      coords = new ChunkCoordinates(x, y, z);
      block = entity.worldObj.getBlock(x, y, z);
      meta = entity.worldObj.getBlockMetadata(x, y, z);
    }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    if(needsNew) {
      IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
      int size = network.getAllCollectorsInWorld(supertile.getWorldObj()).size();
      if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
        ChunkCoordinates coords = new ChunkCoordinates(supertile.xCoord, supertile.yCoord, supertile.zCoord);
        linkedCollector = network.getClosestCollector(coords, supertile.getWorldObj(), range);
        sizeLastCheck = size;
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.