Changed fill code to safer BuildcraftAPI.fillLiquidContainer()

This commit is contained in:
CovertJaguar 2012-07-10 03:07:56 -07:00
parent 2f0f8d9081
commit ace10b05f4

View file

@ -25,7 +25,7 @@ public class TankBucketHandler implements IBucketHandler {
int qty = tank.empty(BuildCraftAPI.BUCKET_VOLUME, false); int qty = tank.empty(BuildCraftAPI.BUCKET_VOLUME, false);
ItemStack filledBucket = BuildCraftAPI.getFilledItemForLiquid(tank.getLiquidId()); ItemStack filledBucket = BuildCraftAPI.fillLiquidContainer(tank.getLiquidId(), new ItemStack(Item.bucketEmpty));
if (qty >= BuildCraftAPI.BUCKET_VOLUME && filledBucket != null) { if (qty >= BuildCraftAPI.BUCKET_VOLUME && filledBucket != null) {
tank.empty(BuildCraftAPI.BUCKET_VOLUME, true); tank.empty(BuildCraftAPI.BUCKET_VOLUME, true);