Fix filters

Add oredictionary filter
Fix inconsistent with WCT
Gui improvements
Filter caching
GuiFCImgButton 3/4 size support
This commit is contained in:
lordIcocain committed 2025-04-11 02:00:31 +03:00
1 parent 083c135874
commit bb912ec8a1
14 files changed
+310 -232

No files matched your search

@@ -112,6 +112,8 @@ public class NameConst {
public static final String TT_ULTRA_TERMINAL_RESTOCK_ON = TT_ULTRA_TERMINAL_RESTOCK + ".on";
public static final String TT_ULTRA_TERMINAL_RESTOCK_OFF = TT_ULTRA_TERMINAL_RESTOCK + ".off";
public static final String TT_MAGNET_CARD_OREDICT = TT_KEY + "magnet_card.oreDictFilter";
public static final String WAILA_KEY = FluidCraft.MODID + ".waila.";
public static final String WAILA_ENABLE = WAILA_KEY + "enable";
public static final String WAILA_DISABLE = WAILA_KEY + "disable";
@@ -162,22 +162,26 @@ public final class Util {
}
public static IMEInventoryHandler<?> getWirelessInv(ItemStack is, EntityPlayer player, StorageChannel channel) {
if (Platform.isClient()) return new NullInventory<>();
IGridNode gridNode = getWirelessGrid(is);
if (gridNode == null) return null;
IGrid grid = gridNode.getGrid();
if (grid == null) return null;
if (rangeCheck(is, player, grid)) {
IStorageGrid gridCache = grid.getCache(IStorageGrid.class);
if (gridCache != null) {
if (channel == StorageChannel.FLUIDS) {
return gridCache.getFluidInventory();
} else {
return gridCache.getItemInventory();
if (Platform.isServer()) {
IGridNode gridNode = getWirelessGrid(is);
if (gridNode != null) {
IGrid grid = gridNode.getGrid();
if (grid != null) {
if (rangeCheck(is, player, grid)) {
IStorageGrid gridCache = grid.getCache(IStorageGrid.class);
if (gridCache != null) {
if (channel == StorageChannel.FLUIDS) {
return gridCache.getFluidInventory();
} else {
return gridCache.getItemInventory();
}
}
}
}
}
return null;
}
return null;
return new NullInventory<>();
}
public static ItemStack getWirelessTerminal(EntityPlayer player, int x) {