Examples of GateExpansionController


Examples of buildcraft.api.gates.GateExpansionController

    gate.readFromNBT(nbt);

    // Legacy support
    if (nbt.hasKey("Pulser")) {
      NBTTagCompound pulsarTag = nbt.getCompoundTag("Pulser");
      GateExpansionController pulsarCon = GateExpansionPulsar.INSTANCE.makeController(pipe.container);
      pulsarCon.readFromNBT(pulsarTag);
      gate.expansions.put(GateExpansionPulsar.INSTANCE, pulsarCon);
    }

    NBTTagList exList = nbt.getTagList("expansions", Constants.NBT.TAG_COMPOUND);
    for (int i = 0; i < exList.tagCount(); i++) {
      NBTTagCompound conNBT = exList.getCompoundTagAt(i);
      IGateExpansion ex = GateExpansions.getExpansion(conNBT.getString("type"));
      if (ex != null) {
        GateExpansionController con = ex.makeController(pipe.container);
        con.readFromNBT(conNBT.getCompoundTag("data"));
        gate.expansions.put(ex, con);
      }
    }

    return gate;
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.