From aa8d41385f2304f0053607b49f947afc62d942d2 Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Sun, 19 Jun 2016 22:24:47 -0700 Subject: [PATCH] IAltarComponent should use state, not meta --- src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java | 4 ++-- .../WayofTime/bloodmagic/api/altar/IAltarComponent.java | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java b/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java index e4aa89aa..144cd88d 100644 --- a/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java +++ b/src/main/java/WayofTime/bloodmagic/altar/BloodAltar.java @@ -121,7 +121,7 @@ public class BloodAltar implements IFluidHandler { if (worldBlock.getBlock() instanceof IAltarComponent) { - EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(worldBlock.getMeta()); + EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(world, worldBlock.getState(), componentPos); if (component != altarComponent.getComponent()) return false; } else if (worldBlock.getBlock() != Utils.getBlockForComponent(altarComponent.getComponent())) @@ -154,7 +154,7 @@ public class BloodAltar implements IFluidHandler { if (worldBlock.getBlock() instanceof IAltarComponent) { - EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(worldBlock.getMeta()); + EnumAltarComponent component = ((IAltarComponent) worldBlock.getBlock()).getType(world, worldBlock.getState(), componentPos); if (component != altarComponent.getComponent()) { return new ImmutablePair(componentPos, altarComponent.getComponent()); diff --git a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java b/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java index 1079292f..211baee4 100644 --- a/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java +++ b/src/main/java/WayofTime/bloodmagic/api/altar/IAltarComponent.java @@ -1,6 +1,10 @@ package WayofTime.bloodmagic.api.altar; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + public interface IAltarComponent { - EnumAltarComponent getType(int meta); + EnumAltarComponent getType(World world, IBlockState state, BlockPos pos); }