mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
Fix Dark Steel Anvils in WAILA (#152)
Dark Steel Anvils wouldn't show the correct block in WAILA if the "Sneaky Facades" option was on.
This commit is contained in:
1 parent
05d31b2e70
commit
fc5cba342c
1 file changed
+15
-21
@@ -140,30 +140,24 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
MovingObjectPosition pos = accessor.getPosition();
|
||||
if (config.getConfig("facades.hidden")) {
|
||||
if (accessor.getBlock() instanceof IFacade) {
|
||||
// If facades are hidden, we need to ignore it
|
||||
if (accessor.getTileEntity() instanceof IConduitBundle && ConduitUtil
|
||||
.isFacadeHidden((IConduitBundle) accessor.getTileEntity(), accessor.getPlayer())) {
|
||||
return null;
|
||||
}
|
||||
IFacade bundle = (IFacade) accessor.getBlock();
|
||||
Block facade = bundle.getFacade(
|
||||
accessor.getWorld(),
|
||||
if (config.getConfig("facades.hidden") && accessor.getBlock() instanceof IFacade) {
|
||||
// If facades are hidden, we need to ignore it
|
||||
if (accessor.getTileEntity() instanceof IConduitBundle
|
||||
&& ConduitUtil.isFacadeHidden((IConduitBundle) accessor.getTileEntity(), accessor.getPlayer())) {
|
||||
return null;
|
||||
}
|
||||
IFacade bundle = (IFacade) accessor.getBlock();
|
||||
Block facade = bundle
|
||||
.getFacade(accessor.getWorld(), pos.blockX, pos.blockY, pos.blockZ, accessor.getSide().ordinal());
|
||||
if (facade != accessor.getBlock()) {
|
||||
ItemStack ret = facade.getPickBlock(
|
||||
pos,
|
||||
new WailaWorldWrapper(accessor.getWorld()),
|
||||
pos.blockX,
|
||||
pos.blockY,
|
||||
pos.blockZ,
|
||||
accessor.getSide().ordinal());
|
||||
if (facade != accessor.getBlock()) {
|
||||
ItemStack ret = facade.getPickBlock(
|
||||
pos,
|
||||
new WailaWorldWrapper(accessor.getWorld()),
|
||||
pos.blockX,
|
||||
pos.blockY,
|
||||
pos.blockZ,
|
||||
accessor.getPlayer());
|
||||
return ret;
|
||||
}
|
||||
accessor.getPlayer());
|
||||
return ret;
|
||||
}
|
||||
} else if (accessor.getBlock() instanceof BlockDarkSteelAnvil) {
|
||||
return accessor.getBlock().getPickBlock(
|
||||
|
||||
Reference in new issue
Block a user