compat with WailaPlugins own fluid handler (#217)

This commit is contained in:
danyadev authored and GitHub committed 2026-01-13 11:27:35 +01:00
1 parent 73891d20ff
commit f615df5010
13 files changed
+76 -21

No files matched your search

@@ -214,6 +214,7 @@ public class EnderIO {
public static final boolean hasLwjgl3 = Loader.isModLoaded("lwjgl3ify");
public static final boolean hasGT5 = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
public static final boolean hasHP = Loader.isModLoaded("hodgepodge");
public static final boolean hasWailaPlugins = Loader.isModLoaded("wailaplugins");
// Materials
public static ItemCapacitor itemBasicCapacitor;
@@ -159,10 +159,13 @@ public class BlockZombieGenerator extends AbstractMachineBlock<TileZombieGenerat
@Override
public void getWailaInfo(List<String> tooltip, EntityPlayer player, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof TileZombieGenerator) {
if (EnderIO.hasWailaPlugins) {
return;
}
if (world.getTileEntity(x, y, z) instanceof TileZombieGenerator generator) {
tooltip.add(
((TileZombieGenerator) te).getFluidStored(ForgeDirection.UNKNOWN) + " "
generator.getFluidStored(ForgeDirection.UNKNOWN) + " "
+ EnderIO.lang.localize("fluid.millibucket.abr"));
}
}
@@ -187,6 +187,10 @@ public class BlockTank extends AbstractMachineBlock<TileTank> implements IAdvanc
@Override
@SideOnly(Side.CLIENT)
public void addBasicEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) {
if (EnderIO.hasWailaPlugins) {
return;
}
if (itemstack.stackTagCompound != null && itemstack.stackTagCompound.hasKey("tankContents")) {
FluidStack fl = FluidStack
.loadFluidStackFromNBT((NBTTagCompound) itemstack.stackTagCompound.getTag("tankContents"));
@@ -219,9 +223,11 @@ public class BlockTank extends AbstractMachineBlock<TileTank> implements IAdvanc
@Override
public void getWailaInfo(List<String> tooltip, EntityPlayer player, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if (te instanceof TileTank) {
TileTank tank = (TileTank) te;
if (EnderIO.hasWailaPlugins) {
return;
}
if (world.getTileEntity(x, y, z) instanceof TileTank tank) {
FluidStack stored = tank.tank.getFluid();
String fluid = stored == null ? EnderIO.lang.localize("tooltip.none")
: stored.getFluid().getLocalizedName(stored);
@@ -308,7 +308,7 @@ public class WailaCompat implements IWailaDataProvider {
PowerDisplayUtil.abrevation()));
}
} else if (itemStack.getItem() == EnderIO.itemLiquidConduit) {
} else if (itemStack.getItem() == EnderIO.itemLiquidConduit && !EnderIO.hasWailaPlugins) {
NBTTagCompound nbtRoot = accessor.getNBTData();
if (nbtRoot.hasKey("fluidLocked") && nbtRoot.hasKey("FluidName")) {
boolean fluidTypeLocked = nbtRoot.getBoolean("fluidLocked");