mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Fix WAILA on conduits not working, also fix conduit pick block
This commit is contained in:
1 parent
210fb1ebf2
commit
55ec1fa34c
2 files changed
+9
-6
No files matched your search
@@ -258,6 +258,11 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
EnderIO.guiHandler.registerGuiHandler(GuiHandler.GUI_ID_EXTERNAL_CONNECTION_SELECTOR, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return getPickBlock(target, world, x, y, z, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
ItemStack ret = null;
|
||||
@@ -689,7 +694,7 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean handleFacadeClick(World world, int x, int y, int z, EntityPlayer player, int side, IConduitBundle bundle, ItemStack stack) {
|
||||
public boolean handleFacadeClick(World world, int x, int y, int z, EntityPlayer player, int side, IConduitBundle bundle, ItemStack stack) {
|
||||
// Add facade
|
||||
if(player.isSneaking()) {
|
||||
return false;
|
||||
|
||||
@@ -130,8 +130,6 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
ConfigHandler.instance().addConfig(EnderIO.MOD_NAME, "facades.hidden", EnderIO.lang.localize("waila.config.hiddenfacades"));
|
||||
}
|
||||
|
||||
// IGNORE deprecation, the new method requires forge 1234 which is too new for cauldron!
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
MovingObjectPosition pos = accessor.getPosition();
|
||||
@@ -143,14 +141,14 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
}
|
||||
IFacade bundle = (IFacade) accessor.getBlock();
|
||||
Block facade = bundle.getFacade(accessor.getWorld(), pos.blockX, pos.blockY, pos.blockZ, accessor.getSide().ordinal());
|
||||
if(facade != null) {
|
||||
ItemStack ret = facade.getPickBlock(pos, new WailaWorldWrapper(accessor.getWorld()), pos.blockX, pos.blockY, pos.blockZ);
|
||||
if(facade != accessor.getBlock()) {
|
||||
ItemStack ret = facade.getPickBlock(pos, new WailaWorldWrapper(accessor.getWorld()), pos.blockX, pos.blockY, pos.blockZ, accessor.getPlayer());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} else if(accessor.getBlock() instanceof BlockDarkSteelAnvil) {
|
||||
return accessor.getBlock().getPickBlock(accessor.getPosition(), accessor.getWorld(), accessor.getPosition().blockX, accessor.getPosition().blockY,
|
||||
accessor.getPosition().blockZ);
|
||||
accessor.getPosition().blockZ, accessor.getPlayer());
|
||||
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user