Storage disks and storage blocks now don't despawn anymore when dropped in the world

This commit is contained in:
Raoul Van den Berge
2016-10-14 23:00:47 +02:00
parent 15442d8603
commit a06d163575
6 changed files with 22 additions and 0 deletions

View File

@@ -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());

View File

@@ -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());

View File

@@ -114,4 +114,9 @@ public class ItemFluidStorageDisk extends ItemBase {
FluidStorageNBT.createStackWithNBT(stack);
}
@Override
public int getEntityLifespan(ItemStack stack, World world) {
return Integer.MAX_VALUE;
}
}

View File

@@ -125,4 +125,9 @@ public class ItemStorageDisk extends ItemBase {
ItemStorageNBT.createStackWithNBT(stack);
}
@Override
public int getEntityLifespan(ItemStack stack, World world) {
return Integer.MAX_VALUE;
}
}