IAltarComponent should use state, not meta
This commit is contained in:
parent
4fd69186fb
commit
aa8d41385f
|
@ -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<BlockPos, EnumAltarComponent>(componentPos, altarComponent.getComponent());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue