Merge branch 'master' into fix-bus-gui

This commit is contained in:
Maya authored and GitHub committed 2025-05-25 12:32:29 -06:00
commit 4aae6020c3
7 files changed
+39 -21

No files matched your search

+9 -9
View File
@@ -34,28 +34,28 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.7.44-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-606-GTNH:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.7.45-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-615-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.8.4:dev')
api('com.github.GTNewHorizons:waila:1.8.6:dev')
api("com.github.GTNewHorizons:GTNHLib:0.6.22:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.1:dev") {
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.2:dev") {
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.7-GTNH:dev')
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.8-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.7:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.12:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.285:dev') {
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.8:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.14:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.302:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.13-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.15-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.7-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.53:dev") { transitive = false }
@@ -13,6 +13,8 @@ import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
import org.jetbrains.annotations.NotNull;
import com.glodblock.github.common.item.ItemBaseInfinityStorageCell;
import com.glodblock.github.common.item.ItemFluidVoidStorageCell;
import com.glodblock.github.crossmod.extracells.storage.ProxyFluidCellInventory;
@@ -476,7 +478,7 @@ public class FluidCellInventory implements IFluidCellInventory {
}
@Override
public List<IAEFluidStack> getContents() {
public @NotNull List<IAEFluidStack> getContents() {
List<IAEFluidStack> ret = new ArrayList<>();
for (IAEFluidStack fluid : this.getCellFluids()) {
ret.add(fluid);
@@ -1,11 +1,14 @@
package com.glodblock.github.common.storage;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import appeng.api.config.Actionable;
import appeng.api.exceptions.AppEngException;
import appeng.api.networking.security.BaseActionSource;
@@ -109,7 +112,7 @@ public class FluidVoidStorageCellInventory extends FluidCellInventory {
}
@Override
public List<IAEFluidStack> getContents() {
return null;
public @NotNull List<IAEFluidStack> getContents() {
return Collections.emptyList();
}
}
@@ -5,6 +5,8 @@ import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.data.IAEFluidStack;
@@ -90,6 +92,7 @@ public interface IFluidCellInventory extends IMEInventory<IAEFluidStack> {
*/
long getTotalFluidTypes();
@NotNull
List<IAEFluidStack> getContents();
/**
@@ -85,7 +85,6 @@ public class NEICellViewHandler implements IUsageHandler {
int count = 0;
for (IAEFluidStack aeFluid : sortedStacks) {
FluidStack fluid = aeFluid.getFluidStack();
long amount = fluid.amount;
ItemStack fluidItemStack = ItemFluidDrop.newStack(fluid);
if (fluidItemStack != null) {
fluidItemStack.stackSize = 1;
@@ -93,7 +92,7 @@ public class NEICellViewHandler implements IUsageHandler {
fluidItemStack,
OFFSET_X + count % ROW_ITEM_NUM * 18 + 1,
ITEMS_OFFSET_Y + count / ROW_ITEM_NUM * 18 + 1);
stacks.add(new ViewItemStack(positionedStack, amount, fluid.getFluid().getIcon(), fluid.getFluid().getColor()));
stacks.add(new ViewItemStack(positionedStack, aeFluid.getStackSize(), fluid.getFluid().getIcon(), fluid.getFluid().getColor()));
count++;
}
}
@@ -3,6 +3,7 @@ package com.glodblock.github.nei;
import java.util.regex.Pattern;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import com.glodblock.github.common.storage.IFluidCellInventory;
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
@@ -13,9 +14,10 @@ import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import codechicken.nei.SearchField;
import codechicken.nei.SearchTokenParser;
import codechicken.nei.api.ItemFilter;
public class NEIItemFilter implements SearchField.ISearchProvider {
public class NEISearchFilter implements SearchTokenParser.ISearchParserProvider {
@Override
public ItemFilter getFilter(String searchText) {
@@ -24,8 +26,18 @@ public class NEIItemFilter implements SearchField.ISearchProvider {
}
@Override
public boolean isPrimary() {
return false;
public char getPrefix() {
return 0;
}
@Override
public EnumChatFormatting getHighlightedColor() {
return null;
}
@Override
public SearchTokenParser.SearchMode getSearchMode() {
return SearchTokenParser.SearchMode.ALWAYS;
}
public static class Filter implements ItemFilter {
@@ -40,13 +52,13 @@ public class NEIItemFilter implements SearchField.ISearchProvider {
public boolean matches(ItemStack itemStack) {
if (itemStack.getItem() instanceof IStorageFluidCell) {
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell()
.getCellInventory(itemStack, null, StorageChannel.FLUIDS);
.getCellInventory(itemStack, null, StorageChannel.FLUIDS);
if (inventory instanceof final IFluidCellInventoryHandler handler) {
final IFluidCellInventory cellInventory = handler.getCellInv();
if (cellInventory != null) {
for (IAEFluidStack fluid : cellInventory.getContents()) {
boolean result = pattern.matcher(fluid.getFluidStack().getLocalizedName().toLowerCase())
.find();
.find();
if (result) return true;
}
@@ -57,5 +69,4 @@ public class NEIItemFilter implements SearchField.ISearchProvider {
}
}
}
@@ -18,7 +18,7 @@ public class NEI_FC_Config implements IConfigureNEI {
@Override
public void loadConfig() {
API.registerNEIGuiHandler(new AE2FC_NEIGuiHandler());
API.addSearchProvider(new NEIItemFilter());
API.addSearchProvider(new NEISearchFilter());
API.registerStackStringifyHandler(new FCStackStringifyHandler());
API.registerUsageHandler(new NEICellViewHandler());