mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 04:09:43 +00:00
Added support for RC linked rails to EnderRail
Fixed bug in transciever when reloading SP worlds.
This commit is contained in:
1 parent
31d7a26aa9
commit
8d9efabfb4
6 files changed
+211
-249
No files matched your search
@@ -106,6 +106,13 @@ public class ServerChannelRegister extends ChannelRegister {
|
||||
public void dergister(TileTransceiver transceiver) {
|
||||
transceivers.remove(transceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
transceivers.clear();
|
||||
iterators.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeChannel(Channel channel) {
|
||||
|
||||
@@ -32,6 +32,7 @@ import crazypants.enderio.power.BasicCapacitor;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
import crazypants.enderio.power.PowerDistributor;
|
||||
import crazypants.enderio.rail.EnderRailController;
|
||||
import crazypants.util.FluidUtil;
|
||||
import crazypants.util.ItemUtil;
|
||||
import crazypants.vecmath.VecmathUtil;
|
||||
@@ -52,6 +53,8 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
private Map<ForgeDirection, IFluidHandler> neighbourFluidHandlers = null;
|
||||
|
||||
private PowerDistributor powerDistributor;
|
||||
|
||||
private final EnderRailController railController;
|
||||
|
||||
public TileTransceiver() {
|
||||
super(new SlotDefinition(8, 8, 0));
|
||||
@@ -60,9 +63,13 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
recieveChannels.put(type, new ArrayList<Channel>());
|
||||
}
|
||||
currentTask = new ContinuousTask(Config.transceiverUpkeepCostRF);
|
||||
|
||||
}
|
||||
railController = new EnderRailController(this);
|
||||
}
|
||||
|
||||
public EnderRailController getRailController() {
|
||||
return railController;
|
||||
}
|
||||
|
||||
public boolean isRedstoneChecksPassed() {
|
||||
return redstoneCheckPassed;
|
||||
}
|
||||
@@ -91,6 +98,7 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
super.updateEntity();
|
||||
|
||||
if(worldObj != null && !worldObj.isRemote) {
|
||||
railController.doTick();
|
||||
if(sendChannelsDirty) {
|
||||
PacketHandler.sendToAllAround(new PacketSendRecieveChannelList(this, true), this, 256);
|
||||
sendChannelsDirty = false;
|
||||
@@ -216,8 +224,15 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound nbtRoot) {
|
||||
super.readCustomNBT(nbtRoot);
|
||||
railController.readFromNBT(nbtRoot);
|
||||
currentTask = new ContinuousTask(Config.transceiverUpkeepCostRF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound nbtRoot) {
|
||||
super.writeCustomNBT(nbtRoot);
|
||||
railController.writeToNBT(nbtRoot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readCommon(NBTTagCompound nbtRoot) {
|
||||
|
||||
@@ -85,19 +85,8 @@ public class BlockEnderRail extends BlockRail {
|
||||
|
||||
private void init() {
|
||||
GameRegistry.registerBlock(this, ModObject.blockEnderRail.unlocalisedName);
|
||||
GameRegistry.registerTileEntity(TileEnderRail.class, ModObject.blockEnderRail.unlocalisedName + "TileEntity");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata) {
|
||||
return new TileEnderRail();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
@@ -170,15 +159,14 @@ public class BlockEnderRail extends BlockRail {
|
||||
if(world.isRemote) {
|
||||
return;
|
||||
}
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof TileEnderRail)) {
|
||||
TileEntity te = world.getTileEntity(x, y - 1, z);
|
||||
if(!(te instanceof TileTransceiver)) {
|
||||
return;
|
||||
}
|
||||
TileEnderRail ter = (TileEnderRail) te;
|
||||
if(ter.isRecievedCart(cart)) {
|
||||
TileTransceiver ter = (TileTransceiver) te;
|
||||
if(ter.getRailController().isRecievedCart(cart)) {
|
||||
return;
|
||||
}
|
||||
|
||||
tryTeleport(world, cart, x, y, z);
|
||||
}
|
||||
|
||||
@@ -225,12 +213,11 @@ public class BlockEnderRail extends BlockRail {
|
||||
if(!reciever.hasPower()) {
|
||||
return false;
|
||||
}
|
||||
TileEntity te = reciever.getWorldObj().getTileEntity(reciever.xCoord, reciever.yCoord + 1, reciever.zCoord);
|
||||
if(!(te instanceof TileEnderRail)) {
|
||||
Block blk = reciever.getWorldObj().getBlock(reciever.xCoord, reciever.yCoord + 1, reciever.zCoord);
|
||||
if(blk != EnderIO.blockEnderRail) {
|
||||
return false;
|
||||
}
|
||||
TileEnderRail railTE = (TileEnderRail) te;
|
||||
return railTE.isClear();
|
||||
}
|
||||
return reciever.getRailController().isClear();
|
||||
}
|
||||
|
||||
private int getPowerRequired(EntityMinecart cart, TileTransceiver sender, TileTransceiver reciever) {
|
||||
@@ -252,11 +239,6 @@ public class BlockEnderRail extends BlockRail {
|
||||
|
||||
private boolean teleportCart(World world, EntityMinecart cart, TileTransceiver sender, TileTransceiver reciever) {
|
||||
|
||||
TileEnderRail destRail = getRailTile(reciever);
|
||||
if(destRail == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<EntityMinecart> allCarts = TeleportUtil.getCartsInTrain(cart);
|
||||
if(allCarts.size() > 1) {
|
||||
TeleportUtil.updateCartLinks(world, cart);
|
||||
@@ -278,22 +260,11 @@ public class BlockEnderRail extends BlockRail {
|
||||
TeleportUtil.despawn(sender.getWorldObj(), despawnCart);
|
||||
}
|
||||
|
||||
destRail.onTrainRecieved(toTeleport);
|
||||
reciever.getRailController().onTrainRecieved(toTeleport);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
private TileEnderRail getRailTile(TileTransceiver reciever) {
|
||||
if(reciever == null || reciever.getWorldObj() == null) {
|
||||
return null;
|
||||
}
|
||||
TileEntity te = reciever.getWorldObj().getTileEntity(reciever.xCoord, reciever.yCoord + 1, reciever.zCoord);
|
||||
if(!(te instanceof TileEnderRail)) {
|
||||
return null;
|
||||
}
|
||||
return (TileEnderRail) te;
|
||||
}
|
||||
|
||||
public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
package crazypants.enderio.rail;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import crazypants.enderio.machine.transceiver.TileTransceiver;
|
||||
import crazypants.util.BlockCoord;
|
||||
import crazypants.util.ForgeDirectionOffsets;
|
||||
import crazypants.vecmath.Vector3d;
|
||||
|
||||
public class EnderRailController {
|
||||
|
||||
//keep track of which carts we have received have left the track as they can't be teleported again until they have
|
||||
private final Set<EntityMinecart> newlySpawnedCarts = new HashSet<EntityMinecart>();
|
||||
|
||||
private final LinkedList<List<Entity>> cartsToSpawn = new LinkedList<List<Entity>>();
|
||||
|
||||
private int ticksFailedToSpawn = 0;
|
||||
|
||||
private NBTTagList cartList;
|
||||
|
||||
private final TileTransceiver transciever;
|
||||
|
||||
public EnderRailController(TileTransceiver tileTransceiver) {
|
||||
transciever = tileTransceiver;
|
||||
}
|
||||
|
||||
public void doTick() {
|
||||
|
||||
if(cartList != null) {
|
||||
loadCartsToSpawn();
|
||||
cartList = null;
|
||||
}
|
||||
|
||||
spawnRecievedCart();
|
||||
|
||||
List<EntityMinecart> carts = getMinecartsAt(transciever.getWorldObj(), transciever.xCoord, transciever.yCoord + 1, transciever.zCoord);
|
||||
List<EntityMinecart> toRemove = new ArrayList<EntityMinecart>();
|
||||
for (EntityMinecart recievedCart : newlySpawnedCarts) {
|
||||
if(!carts.contains(recievedCart)) {
|
||||
toRemove.add(recievedCart);
|
||||
}
|
||||
}
|
||||
for (EntityMinecart recievedCart : toRemove) {
|
||||
newlySpawnedCarts.remove(recievedCart);
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnRecievedCart() {
|
||||
|
||||
if(cartsToSpawn.isEmpty()) {
|
||||
ticksFailedToSpawn = 0;
|
||||
return;
|
||||
}
|
||||
if(!isClear()) {
|
||||
ticksFailedToSpawn++;
|
||||
if(ticksFailedToSpawn < 60) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
List<Entity> spawnThisTick = cartsToSpawn.removeFirst();
|
||||
for (Entity ent : spawnThisTick) {
|
||||
TeleportUtil.spawn(transciever.getWorldObj(), ent);
|
||||
if(ent instanceof EntityMinecart) {
|
||||
EntityMinecart cart = (EntityMinecart) ent;
|
||||
newlySpawnedCarts.add(cart);
|
||||
TeleportUtil.recreateLinks(cart);
|
||||
}
|
||||
}
|
||||
ticksFailedToSpawn = 0;
|
||||
|
||||
}
|
||||
|
||||
public void onTrainRecieved(List<List<Entity>> toTeleport) {
|
||||
cartsToSpawn.addAll(toTeleport);
|
||||
}
|
||||
|
||||
public boolean isRecievedCart(EntityMinecart mc) {
|
||||
return newlySpawnedCarts.contains(mc);
|
||||
}
|
||||
|
||||
public boolean isClear() {
|
||||
World worldObj = transciever.getWorldObj();
|
||||
|
||||
BlockCoord railCoord = new BlockCoord(transciever).getLocation(ForgeDirection.UP);
|
||||
int meta = worldObj.getBlockMetadata(railCoord.x, railCoord.y, railCoord.z);
|
||||
|
||||
double buf = 1;
|
||||
ForgeDirection dir = BlockEnderRail.getDirection(meta);
|
||||
Vector3d offset = ForgeDirectionOffsets.forDirCopy(dir);
|
||||
offset.scale(buf);
|
||||
offset.x = Math.abs(offset.x);
|
||||
offset.z = Math.abs(offset.z);
|
||||
List res = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(railCoord.x - offset.x, railCoord.y,
|
||||
railCoord.z - offset.z, railCoord.x + 1 + offset.x, railCoord.y + 1, railCoord.z + 1 + offset.z));
|
||||
return res == null || res.isEmpty();
|
||||
}
|
||||
|
||||
public static List<EntityMinecart> getMinecartsAt(World world, int x, int y, int z) {
|
||||
List entities = world.getEntitiesWithinAABB(EntityMinecart.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1));
|
||||
List<EntityMinecart> carts = new ArrayList<EntityMinecart>();
|
||||
for (Object o : entities) {
|
||||
EntityMinecart cart = (EntityMinecart) o;
|
||||
if(!cart.isDead) {
|
||||
carts.add((EntityMinecart) o);
|
||||
}
|
||||
}
|
||||
return carts;
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound root) {
|
||||
cartsToSpawn.clear();
|
||||
if(!root.hasKey("cartList")) {
|
||||
return;
|
||||
}
|
||||
cartList = (NBTTagList) root.getTag("cartList");
|
||||
}
|
||||
|
||||
private void loadCartsToSpawn() {
|
||||
World worldObj = transciever.getWorldObj();
|
||||
while (cartList.tagCount() > 0) {
|
||||
NBTTagList entityList = (NBTTagList) cartList.removeTag(0);
|
||||
List<Entity> ents = new ArrayList<Entity>(entityList.tagCount());
|
||||
for (int i = 0; i < entityList.tagCount(); i++) {
|
||||
NBTTagCompound entityRoot = entityList.getCompoundTagAt(i);
|
||||
Entity entity = EntityList.createEntityFromNBT(entityRoot, worldObj);
|
||||
if(entity != null) {
|
||||
ents.add(entity);
|
||||
}
|
||||
}
|
||||
cartsToSpawn.add(ents);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound root) {
|
||||
if(cartsToSpawn.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
NBTTagList cartList = new NBTTagList();
|
||||
|
||||
for (List<Entity> entsInCart : cartsToSpawn) {
|
||||
if(entsInCart != null && !entsInCart.isEmpty()) {
|
||||
NBTTagList entityList = new NBTTagList();
|
||||
cartList.appendTag(entityList);
|
||||
for (Entity entity : entsInCart) {
|
||||
NBTTagCompound entRoot = new NBTTagCompound();
|
||||
entRoot.setString("id", EntityList.getEntityString(entity));
|
||||
entity.writeToNBT(entRoot);
|
||||
entityList.appendTag(entRoot);
|
||||
}
|
||||
}
|
||||
}
|
||||
root.setTag("cartList", cartList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
package crazypants.enderio.rail;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.TileEntityEio;
|
||||
import crazypants.util.BlockCoord;
|
||||
import crazypants.util.EntityUtil;
|
||||
import crazypants.util.ForgeDirectionOffsets;
|
||||
import crazypants.util.MetadataUtil;
|
||||
import crazypants.vecmath.Vector3d;
|
||||
|
||||
import mods.railcraft.api.carts.CartTools;
|
||||
import mods.railcraft.api.carts.ILinkageManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEnderRail extends TileEntityEio {
|
||||
|
||||
//keep track of which carts we have received have left the track as they can't be teleported again until they have
|
||||
private final Set<EntityMinecart> newlySpawnedCarts = new HashSet<EntityMinecart>();
|
||||
|
||||
private final LinkedList<List<Entity>> cartsToSpawn = new LinkedList<List<Entity>>();
|
||||
|
||||
private int ticksFailedToSpawn = 0;
|
||||
|
||||
// private NBTTagList cartList;
|
||||
|
||||
public TileEnderRail() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
// if(cartList != null) {
|
||||
// loadCartsToSpawn();
|
||||
// cartList = null;
|
||||
// }
|
||||
|
||||
spawnRecievedCart();
|
||||
|
||||
List<EntityMinecart> carts = getMinecartsAt(getWorldObj(), xCoord, yCoord, zCoord);
|
||||
List<EntityMinecart> toRemove = new ArrayList<EntityMinecart>();
|
||||
for (EntityMinecart recievedCart : newlySpawnedCarts) {
|
||||
if(!carts.contains(recievedCart)) {
|
||||
toRemove.add(recievedCart);
|
||||
}
|
||||
}
|
||||
for (EntityMinecart recievedCart : toRemove) {
|
||||
newlySpawnedCarts.remove(recievedCart);
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnRecievedCart() {
|
||||
// System.out.println("TileEnderRail.spawnRecievedCart: " + cartsToSpawn.size() + ":" + new BlockCoord(this));
|
||||
if(cartsToSpawn.isEmpty()) {
|
||||
ticksFailedToSpawn = 0;
|
||||
return;
|
||||
}
|
||||
if(!isClear()) {
|
||||
ticksFailedToSpawn++;
|
||||
if(ticksFailedToSpawn < 60) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
System.out.println("TileEnderRail.spawnRecievedCart: " + cartsToSpawn);
|
||||
|
||||
List<Entity> spawnThisTick = cartsToSpawn.removeFirst();
|
||||
for(Entity ent : spawnThisTick) {
|
||||
TeleportUtil.spawn(getWorldObj(), ent);
|
||||
if(ent instanceof EntityMinecart) {
|
||||
EntityMinecart cart = (EntityMinecart)ent;
|
||||
newlySpawnedCarts.add(cart);
|
||||
TeleportUtil.recreateLinks(cart);
|
||||
}
|
||||
}
|
||||
ticksFailedToSpawn = 0;
|
||||
|
||||
}
|
||||
|
||||
// public boolean isReverse() {
|
||||
// return BlockEnderRail.isReverse(getBlockMetadata());
|
||||
// }
|
||||
//
|
||||
// public ForgeDirection getDirection() {
|
||||
// return BlockEnderRail.getDirection(getBlockMetadata());
|
||||
// }
|
||||
|
||||
public void onTrainRecieved(List<List<Entity>> toTeleport) {
|
||||
// System.out.println("TileEnderRail.onTrainRecieved: " + toTeleport.size() + ":" + System.identityHashCode(this) + ":" + new BlockCoord(this));
|
||||
cartsToSpawn.addAll(toTeleport);
|
||||
// System.out.println("TileEnderRail.onTrainRecieved: Carts to spawn now " + cartsToSpawn.size() + ":" + new BlockCoord(this));
|
||||
}
|
||||
|
||||
public boolean isRecievedCart(EntityMinecart mc) {
|
||||
return newlySpawnedCarts.contains(mc);
|
||||
}
|
||||
|
||||
public boolean isClear() {
|
||||
double buf = 1;
|
||||
ForgeDirection dir = BlockEnderRail.getDirection(getBlockMetadata());
|
||||
Vector3d offset = ForgeDirectionOffsets.forDirCopy(dir);
|
||||
offset.scale(buf);
|
||||
offset.x = Math.abs(offset.x);
|
||||
offset.z = Math.abs(offset.z);
|
||||
List res = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(xCoord - offset.x, yCoord, zCoord - offset.z, xCoord + 1 + offset.x, yCoord + 1, zCoord + 1 + offset.z));
|
||||
return res == null || res.isEmpty();
|
||||
}
|
||||
|
||||
public List<EntityMinecart> getCartsOnTrack() {
|
||||
return getMinecartsAt(getWorldObj(), xCoord, yCoord + 1, zCoord);
|
||||
}
|
||||
|
||||
public static List<EntityMinecart> getMinecartsAt(World world, int x, int y, int z) {
|
||||
List entities = world.getEntitiesWithinAABB(EntityMinecart.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1));
|
||||
List<EntityMinecart> carts = new ArrayList<EntityMinecart>();
|
||||
for (Object o : entities) {
|
||||
EntityMinecart cart = (EntityMinecart) o;
|
||||
if(!cart.isDead) {
|
||||
carts.add((EntityMinecart) o);
|
||||
}
|
||||
}
|
||||
return carts;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void readFromNBT(NBTTagCompound root) {
|
||||
//
|
||||
// super.readFromNBT(root);
|
||||
// cartsToSpawn.clear();
|
||||
// if(!root.hasKey("cartList")) {
|
||||
// System.out.println("TileEnderRail.readFromNBT: No cart list found");
|
||||
// return;
|
||||
// }
|
||||
// cartList = (NBTTagList)root.getTag("cartList");
|
||||
// System.out.println("TileEnderRail.readFromNBT: read cart list with " + cartList.tagCount() + " entries");
|
||||
// }
|
||||
|
||||
// private void loadCartsToSpawn() {
|
||||
// System.out.println("TileEnderRail.loadCartsToSpawn: Loading carts to spawn: " + cartList.tagCount());
|
||||
// while(cartList.tagCount() > 0) {
|
||||
// NBTTagList entityList = (NBTTagList)cartList.removeTag(0);
|
||||
// System.out.println("TileEnderRail.loadCartsToSpawn: Entity list size: " + entityList.tagCount());
|
||||
// List<Entity> ents = new ArrayList<Entity>(entityList.tagCount());
|
||||
// for(int i=0;i < entityList.tagCount();i++) {
|
||||
// NBTTagCompound entityRoot = entityList.getCompoundTagAt(i);
|
||||
// Entity entity = EntityList.createEntityFromNBT(entityRoot, worldObj);
|
||||
// if(entity != null) {
|
||||
// ents.add(entity);
|
||||
// System.out.println("TileEnderRail.loadCartsToSpawn: Added entity to list: " + entity);
|
||||
// } else {
|
||||
// System.out.println("TileEnderRail.loadCartsToSpawn: Null emtity");
|
||||
// }
|
||||
// }
|
||||
// cartsToSpawn.add(ents);
|
||||
// }
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public void writeToNBT(NBTTagCompound root) {
|
||||
// super.writeToNBT(root);
|
||||
// if(cartsToSpawn.isEmpty()) {
|
||||
// return;
|
||||
// }
|
||||
// NBTTagList cartList = new NBTTagList();
|
||||
//
|
||||
// for(List<Entity> entsInCart : cartsToSpawn) {
|
||||
// if(entsInCart != null && !entsInCart.isEmpty()) {
|
||||
// NBTTagList entityList = new NBTTagList();
|
||||
// cartList.appendTag(entityList);
|
||||
// for(Entity entity : entsInCart) {
|
||||
// NBTTagCompound entRoot = new NBTTagCompound();
|
||||
// entRoot.setString("id", EntityList.getEntityString(entity));
|
||||
// entity.writeToNBT(entRoot);
|
||||
// entityList.appendTag(entRoot);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// root.setTag("cartList", cartList);
|
||||
// System.out.println("TileEnderRail.writeToNBT: Wrote out a cart list with " + cartList.tagCount() + " carts");
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void writeCustomNBT(NBTTagCompound root) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readCustomNBT(NBTTagCompound root) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user