Fixed crash on server when getting an advancement, fixes #1345
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Updated Storage Drawers API (raoulvdberge)
|
- Updated Storage Drawers API (raoulvdberge)
|
||||||
- Fixed bug where disks have to be re-inserted in the Disk Drive in order to work again after rejoining a chunk (raoulvdberge)
|
- Fixed bug where disks have to be re-inserted in the Disk Drive in order to work again after rejoining a chunk (raoulvdberge)
|
||||||
- Fixed bug where items inserted in Storage Drawers through External Storage with a Drawer Controller wouldn't respect drawer priority rules (raoulvdberge)
|
- Fixed bug where items inserted in Storage Drawers through External Storage with a Drawer Controller wouldn't respect drawer priority rules (raoulvdberge)
|
||||||
|
- Fixed crash on server when getting an advancement (raoulvdberge)
|
||||||
- Autocrafting can now fill water bottles with water from the fluid storage - regular bottles or pattern for regular bottles are required (raoulvdberge)
|
- Autocrafting can now fill water bottles with water from the fluid storage - regular bottles or pattern for regular bottles are required (raoulvdberge)
|
||||||
|
|
||||||
### 1.5.7
|
### 1.5.7
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class StorageDiskFluid implements IStorageDisk<FluidStack> {
|
|||||||
this.accessType = accessType;
|
this.accessType = accessType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NBTTagCompound getShareTag(NBTTagCompound tag) {
|
public static NBTTagCompound getShareTag(@Nullable NBTTagCompound tag) {
|
||||||
NBTTagCompound otherTag = new NBTTagCompound();
|
NBTTagCompound otherTag = new NBTTagCompound();
|
||||||
|
|
||||||
otherTag.setInteger(NBT_STORED, getStored(tag));
|
otherTag.setInteger(NBT_STORED, getStored(tag));
|
||||||
@@ -237,8 +237,8 @@ public class StorageDiskFluid implements IStorageDisk<FluidStack> {
|
|||||||
return otherTag;
|
return otherTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getStored(NBTTagCompound tag) {
|
public static int getStored(@Nullable NBTTagCompound tag) {
|
||||||
return tag.getInteger(NBT_STORED);
|
return tag == null ? 0 : tag.getInteger(NBT_STORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NBTTagCompound getTag() {
|
public static NBTTagCompound getTag() {
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ public class StorageDiskItem implements IStorageDisk<ItemStack> {
|
|||||||
return inserted;
|
return inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NBTTagCompound getShareTag(NBTTagCompound tag) {
|
public static NBTTagCompound getShareTag(@Nullable NBTTagCompound tag) {
|
||||||
NBTTagCompound otherTag = new NBTTagCompound();
|
NBTTagCompound otherTag = new NBTTagCompound();
|
||||||
|
|
||||||
otherTag.setInteger(NBT_STORED, getStored(tag));
|
otherTag.setInteger(NBT_STORED, getStored(tag));
|
||||||
@@ -291,8 +291,8 @@ public class StorageDiskItem implements IStorageDisk<ItemStack> {
|
|||||||
return otherTag;
|
return otherTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getStored(NBTTagCompound tag) {
|
public static int getStored(@Nullable NBTTagCompound tag) {
|
||||||
return tag.getInteger(NBT_STORED);
|
return tag == null ? 0 : tag.getInteger(NBT_STORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NBTTagCompound getTag() {
|
public static NBTTagCompound getTag() {
|
||||||
|
|||||||
Reference in New Issue
Block a user