Package crazypants.enderio.machine.generator.combustion

Examples of crazypants.enderio.machine.generator.combustion.TileCombustionGenerator


    Minecraft.getMinecraft().theWorld.spawnParticle("portal", bc.x + xOff, bc.y + yOff, bc.z + zOff, (rand.nextDouble() - 0.5) * 1.5, -rand.nextDouble(),
        (rand.nextDouble() - 0.5) * 1.5);
  }

  public static void setTankNBT(PacketCombustionTank message, int x, int y, int z) {
    TileCombustionGenerator tile = (TileCombustionGenerator) Minecraft.getMinecraft().theWorld.getTileEntity(x, y, z);
    if(tile == null) {
      //no loaded on client when receiving message, can happen when loading the chunks
      return;
    }

    if(message.nbtRoot.hasKey("coolantTank")) {
      NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("coolantTank");
      tile.getCoolantTank().readFromNBT(tankRoot);
    } else {
      tile.getCoolantTank().setFluid(null);
    }
    if(message.nbtRoot.hasKey("fuelTank")) {
      NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("fuelTank");
      tile.getFuelTank().readFromNBT(tankRoot);
    } else {
      tile.getFuelTank().setFluid(null);
    }
  }
View Full Code Here

TOP

Related Classes of crazypants.enderio.machine.generator.combustion.TileCombustionGenerator

Copyright © 2018 www.massapicom. 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.