Storage disks and storage blocks now don't despawn anymore when dropped in the world
This commit is contained in:
@@ -81,6 +81,11 @@ public class ItemBlockFluidStorage extends ItemBlockBase {
|
||||
initNBT(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack stack, World world) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public static ItemStack initNBT(ItemStack stack) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setTag(TileFluidStorage.NBT_STORAGE, FluidStorageNBT.createNBT());
|
||||
|
||||
@@ -81,6 +81,11 @@ public class ItemBlockStorage extends ItemBlockBase {
|
||||
initNBT(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack stack, World world) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public static ItemStack initNBT(ItemStack stack) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setTag(TileStorage.NBT_STORAGE, ItemStorageNBT.createNBT());
|
||||
|
||||
@@ -114,4 +114,9 @@ public class ItemFluidStorageDisk extends ItemBase {
|
||||
|
||||
FluidStorageNBT.createStackWithNBT(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack stack, World world) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,4 +125,9 @@ public class ItemStorageDisk extends ItemBase {
|
||||
|
||||
ItemStorageNBT.createStackWithNBT(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack stack, World world) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user