mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Fix issues with serverside networks, make target save to NBT
This commit is contained in:
1 parent
cb17d38101
commit
8ad52a2de0
4 files changed
+64
-21
No files matched your search
@@ -5,6 +5,7 @@ import com.google.common.base.Strings;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@@ -121,4 +122,17 @@ public final class BlockCoord {
|
||||
public static BlockCoord readFromBuf(ByteBuf buf) {
|
||||
return new BlockCoord(buf.readInt(), buf.readInt(), buf.readInt());
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
tag.setInteger("bc:x", x);
|
||||
tag.setInteger("bc:y", y);
|
||||
tag.setInteger("bc:z", z);
|
||||
}
|
||||
|
||||
public BlockCoord readFromNBT(NBTTagCompound tag) {
|
||||
x = tag.getInteger("bc:x");
|
||||
y = tag.getInteger("bc:y");
|
||||
z = tag.getInteger("bc:z");
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user