Skip to content

Commit

Permalink
Fixed milk buckets that have been filled from a barrel/large vessel m…
Browse files Browse the repository at this point in the history
…issing their NBT data.
  • Loading branch information
Kittychanley committed Dec 19, 2015
1 parent 2de25a6 commit 726183c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Common/com/bioxx/tfc/Blocks/Devices/BlockBarrel.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.bioxx.tfc.Entities.EntityBarrel;
import com.bioxx.tfc.Items.ItemBlocks.ItemBarrels;
import com.bioxx.tfc.Items.ItemBlocks.ItemLargeVessel;
import com.bioxx.tfc.Items.Tools.ItemCustomBucketMilk;
import com.bioxx.tfc.TileEntities.TEBarrel;
import com.bioxx.tfc.api.TFCBlocks;
import com.bioxx.tfc.api.TFCItems;
Expand Down Expand Up @@ -385,6 +386,11 @@ else if(FluidContainerRegistry.isEmptyContainer(equippedItem) || equippedItem.ge
return false;
}

if (is.getItem() == TFCItems.woodenBucketMilk)
{
ItemCustomBucketMilk.createTag(is, 20f);
}

equippedItem.stackSize--;

if (equippedItem.stackSize == 0)
Expand Down
8 changes: 7 additions & 1 deletion src/Common/com/bioxx/tfc/TileEntities/TEBarrel.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.bioxx.tfc.Core.TFC_Core;
import com.bioxx.tfc.Core.TFC_Time;
import com.bioxx.tfc.Food.ItemFoodTFC;
import com.bioxx.tfc.Items.Tools.ItemCustomBucketMilk;
import com.bioxx.tfc.api.*;
import com.bioxx.tfc.api.Constant.Global;
import com.bioxx.tfc.api.Crafting.*;
Expand Down Expand Up @@ -750,7 +751,12 @@ else if(mode == MODE_OUT)
}
else if(FluidContainerRegistry.isEmptyContainer(container))
{
this.setInventorySlotContents(0, this.removeLiquid(getInputStack()));
ItemStack fullContainer = this.removeLiquid(getInputStack());
if (fullContainer.getItem() == TFCItems.woodenBucketMilk)
{
ItemCustomBucketMilk.createTag(fullContainer, 20f);
}
this.setInventorySlotContents(0, fullContainer);
}
}
}
Expand Down

0 comments on commit 726183c

Please sign in to comment.