use of hellfirepvp.astralsorcery.common.tile.TileRitualLink in project AstralSorcery by HellFirePvP.
the class ConstellationEffect method getPedestal.
@Nullable
public TileRitualPedestal getPedestal(World world, BlockPos pos) {
TileEntity te = MiscUtils.getTileAt(world, pos, TileEntity.class, false);
if (te instanceof TileRitualLink) {
TileRitualLink link = (TileRitualLink) te;
pos = link.getLinkedTo();
if (pos != null) {
pos = pos.subtract(TileRitualPedestal.RITUAL_ANCHOR_OFFEST);
return MiscUtils.getTileAt(world, pos, TileRitualPedestal.class, false);
}
}
return te instanceof TileRitualPedestal ? (TileRitualPedestal) te : null;
}
Aggregations