Fixed crash on server when getting an advancement, fixes #1345

This commit is contained in:
raoulvdberge
2017-07-07 20:50:48 +02:00
parent fc0fbd776a
commit 973c4f3a22
3 changed files with 7 additions and 6 deletions

View File

@@ -5,6 +5,7 @@
- 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 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)
### 1.5.7

View File

@@ -227,7 +227,7 @@ public class StorageDiskFluid implements IStorageDisk<FluidStack> {
this.accessType = accessType;
}
public static NBTTagCompound getShareTag(NBTTagCompound tag) {
public static NBTTagCompound getShareTag(@Nullable NBTTagCompound tag) {
NBTTagCompound otherTag = new NBTTagCompound();
otherTag.setInteger(NBT_STORED, getStored(tag));
@@ -237,8 +237,8 @@ public class StorageDiskFluid implements IStorageDisk<FluidStack> {
return otherTag;
}
public static int getStored(NBTTagCompound tag) {
return tag.getInteger(NBT_STORED);
public static int getStored(@Nullable NBTTagCompound tag) {
return tag == null ? 0 : tag.getInteger(NBT_STORED);
}
public static NBTTagCompound getTag() {

View File

@@ -281,7 +281,7 @@ public class StorageDiskItem implements IStorageDisk<ItemStack> {
return inserted;
}
public static NBTTagCompound getShareTag(NBTTagCompound tag) {
public static NBTTagCompound getShareTag(@Nullable NBTTagCompound tag) {
NBTTagCompound otherTag = new NBTTagCompound();
otherTag.setInteger(NBT_STORED, getStored(tag));
@@ -291,8 +291,8 @@ public class StorageDiskItem implements IStorageDisk<ItemStack> {
return otherTag;
}
public static int getStored(NBTTagCompound tag) {
return tag.getInteger(NBT_STORED);
public static int getStored(@Nullable NBTTagCompound tag) {
return tag == null ? 0 : tag.getInteger(NBT_STORED);
}
public static NBTTagCompound getTag() {