Merge pull request #1470 from fabricator77/BuildCraft-5.0.x
Restore bucket handler so empty buckets fill correctly.
This commit is contained in:
commit
7bee2a9717
2 changed files with 5 additions and 6 deletions
|
@ -186,11 +186,10 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("fuel", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Items.bucket));
|
||||
}
|
||||
|
||||
// TODO: Are these still really necessary? If not, remove the
|
||||
// BucketHandler class as well.
|
||||
//BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil);
|
||||
//BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel);
|
||||
//MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
// BucketHandler ensures empty buckets fill with the correct liquid.
|
||||
BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil);
|
||||
BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel);
|
||||
MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
|
||||
BuildcraftRecipes.refinery.addRecipe(new FluidStack(fluidOil, 1), new FluidStack(fluidFuel, 1), 12, 1);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BucketHandler {
|
|||
private ItemStack fillCustomBucket(World world, MovingObjectPosition pos) {
|
||||
Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
Item bucket = Item.getItemFromBlock(block);
|
||||
Item bucket = buckets.get(block);
|
||||
|
||||
if (bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) {
|
||||
world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
|
Loading…
Reference in a new issue