From 6bc4db05a70f09c28d3e58924f73e1f79735e4fb Mon Sep 17 00:00:00 2001 From: asiekierka Date: Wed, 28 Jan 2015 14:00:42 +0100 Subject: [PATCH] fix compatibility with Artifice --- common/buildcraft/BuildCraftEnergy.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 0c9283ad..651750e7 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -266,8 +266,12 @@ public class BuildCraftEnergy extends BuildCraftMod { } // BucketHandler ensures empty buckets fill with the correct liquid. - BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil); - BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel); + if (blockOil != null) { + BucketHandler.INSTANCE.buckets.put(blockOil, bucketOil); + } + if (blockFuel != null) { + BucketHandler.INSTANCE.buckets.put(blockFuel, bucketFuel); + } MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE); BuildcraftRecipeRegistry.refinery.addRecipe("buildcraft:fuel", new FluidStack(fluidOil, 1), new FluidStack( @@ -369,9 +373,15 @@ public class BuildCraftEnergy extends BuildCraftMod { @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Post event) { if (event.map.getTextureType() == 0) { - buildcraftFluidOil.setIcons(blockOil.getBlockTextureFromSide(1), blockOil.getBlockTextureFromSide(2)); - buildcraftFluidFuel.setIcons(blockFuel.getBlockTextureFromSide(1), blockFuel.getBlockTextureFromSide(2)); - buildcraftFluidRedPlasma.setIcons(blockRedPlasma.getBlockTextureFromSide(1), blockRedPlasma.getBlockTextureFromSide(2)); + if (buildcraftFluidOil != null) { + buildcraftFluidOil.setIcons(blockOil.getBlockTextureFromSide(1), blockOil.getBlockTextureFromSide(2)); + } + if (buildcraftFluidFuel != null) { + buildcraftFluidFuel.setIcons(blockFuel.getBlockTextureFromSide(1), blockFuel.getBlockTextureFromSide(2)); + } + if (buildcraftFluidRedPlasma != null) { + buildcraftFluidRedPlasma.setIcons(blockRedPlasma.getBlockTextureFromSide(1), blockRedPlasma.getBlockTextureFromSide(2)); + } } }