Fix for forge tile entities

This commit is contained in:
Jesse Boyd 2016-09-11 17:02:30 +10:00
parent c86f556a03
commit 3a8d54bb78
4 changed files with 6 additions and 5 deletions

View File

@ -89,8 +89,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
public CompoundTag getTag(TileEntity tile) { public CompoundTag getTag(TileEntity tile) {
try { try {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
tile.readFromNBT(tag); // readTagIntoEntity tile.writeToNBT(tag); // readTagIntoEntity
return (CompoundTag) methodToNative.invoke(null, tag); CompoundTag result = (CompoundTag) methodToNative.invoke(null, tag);
return result;
} catch (Exception e) { } catch (Exception e) {
MainUtil.handleError(e); MainUtil.handleError(e);
return null; return null;

View File

@ -82,7 +82,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
public CompoundTag getTag(TileEntity tile) { public CompoundTag getTag(TileEntity tile) {
try { try {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
tile.readFromNBT(tag); // readTagIntoEntity tile.writeToNBT(tag); // readTagIntoEntity
return (CompoundTag) methodToNative.invoke(null, tag); return (CompoundTag) methodToNative.invoke(null, tag);
} catch (Exception e) { } catch (Exception e) {
MainUtil.handleError(e); MainUtil.handleError(e);

View File

@ -82,7 +82,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
public CompoundTag getTag(TileEntity tile) { public CompoundTag getTag(TileEntity tile) {
try { try {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
tile.readFromNBT(tag); // readTagIntoEntity tile.writeToNBT(tag); // readTagIntoEntity
return (CompoundTag) methodToNative.invoke(null, tag); return (CompoundTag) methodToNative.invoke(null, tag);
} catch (Exception e) { } catch (Exception e) {
MainUtil.handleError(e); MainUtil.handleError(e);

View File

@ -89,7 +89,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
public CompoundTag getTag(TileEntity tile) { public CompoundTag getTag(TileEntity tile) {
try { try {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
tile.readFromNBT(tag); // readTagIntoEntity tile.writeToNBT(tag); // readTagIntoEntity
return (CompoundTag) methodToNative.invoke(null, tag); return (CompoundTag) methodToNative.invoke(null, tag);
} catch (Exception e) { } catch (Exception e) {
MainUtil.handleError(e); MainUtil.handleError(e);