This commit is contained in:
Raoul Van den Berge
2016-05-26 17:23:08 +02:00
parent 02a8046d0f
commit 782813de90
4 changed files with 24 additions and 19 deletions

View File

@@ -1,5 +1,9 @@
# Refined Storage Changelog
### 0.7.4
**Bugfixes**
- Updated to Forge 1922
### 0.7.3
**Bugfixes**
- Fixed grid performance by not sending grid data so often

View File

@@ -17,7 +17,7 @@ group = "refinedstorage"
archivesBaseName = "refinedstorage"
minecraft {
version = "1.9.4-12.17.0.1910-1.9.4"
version = "1.9.4-12.17.0.1922-1.9.4"
runDir = "run"
useDepAts = true
mappings = "snapshot_20160518"

View File

@@ -19,7 +19,6 @@ import refinedstorage.network.MessageTileContainerUpdate;
import javax.annotation.Nullable;
public abstract class TileBase extends TileEntity implements ITickable {
public static final String NBT_UPDATE = "U";
public static final String NBT_DIRECTION = "Direction";
private EnumFacing direction = EnumFacing.NORTH;
@@ -58,7 +57,6 @@ public abstract class TileBase extends TileEntity implements ITickable {
}
public NBTTagCompound writeUpdate(NBTTagCompound tag) {
tag.setByte(NBT_UPDATE, (byte) 1);
tag.setInteger(NBT_DIRECTION, direction.ordinal());
return tag;
@@ -74,22 +72,6 @@ public abstract class TileBase extends TileEntity implements ITickable {
RefinedStorageUtils.updateBlock(worldObj, pos);
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
if (tag.hasKey(NBT_UPDATE)) {
readUpdate(tag);
} else {
read(tag);
}
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tag) {
return write(super.writeToNBT(tag));
}
@Override
public NBTTagCompound getUpdateTag() {
return writeUpdate(super.getUpdateTag());
@@ -106,6 +88,25 @@ public abstract class TileBase extends TileEntity implements ITickable {
readUpdate(packet.getNbtCompound());
}
@Override
public void handleUpdateTag(NBTTagCompound tag) {
super.readFromNBT(tag);
readUpdate(tag);
}
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
read(tag);
}
@Override
public NBTTagCompound writeToNBT(NBTTagCompound tag) {
return write(super.writeToNBT(tag));
}
@Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
return oldState.getBlock() != newState.getBlock();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB