diff --git a/dependencies.gradle b/dependencies.gradle index 3e6b4b36b14..d95c23905e5 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,21 +1,21 @@ // Add your dependencies here dependencies { - implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.46-GTNH:dev') + implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev') implementation('curse.maven:cofh-core-69162:2388751') - compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta20:api') - compileOnly("com.github.GTNewHorizons:GTNHLib:0.5.20:dev") {transitive = false} + compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta26:api') + compileOnly("com.github.GTNewHorizons:GTNHLib:0.5.22:dev") {transitive = false} compileOnly('com.github.GTNewHorizons:ThaumicTinkerer:2.10.2:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:dev') {transitive = false} - compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.17:dev') {transitive = false} // required to compile CraftingV2Tests.java now + compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.19:dev') {transitive = false} // required to compile CraftingV2Tests.java now compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.5.0:dev') {transitive = false} - compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.70:dev') {transitive = false} + compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.10:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:Jabba:1.4.6:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.7.0:api') {transitive = false} - compileOnly('com.github.GTNewHorizons:OpenComputers:1.10.27-GTNH:api') {transitive = false} + compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.1-GTNH:api') {transitive = false} compileOnly('com.github.GTNewHorizons:waila:1.8.2:dev') {transitive = false} - compileOnly('com.github.GTNewHorizons:Railcraft:9.15.14:api') {transitive = false} + compileOnly('com.github.GTNewHorizons:Railcraft:9.15.15:api') {transitive = false} compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false } compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') compileOnly('curse.maven:minefactory-reloaded-66672:2366150') @@ -34,7 +34,7 @@ dependencies { functionalTestImplementation('org.junit.platform:junit-platform-engine') functionalTestImplementation('org.junit.platform:junit-platform-launcher') functionalTestImplementation('org.junit.platform:junit-platform-reporting') - functionalTestImplementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.70:dev') { + functionalTestImplementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.10:dev') { exclude module: "Applied-Energistics-2-Unofficial" } @@ -42,6 +42,6 @@ dependencies { runtimeOnlyNonPublishable('com.github.GTNewHorizons:Baubles:1.0.4:dev') runtimeOnlyNonPublishable('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') runtimeOnlyNonPublishable('com.github.GTNewHorizons:ThaumicEnergistics:1.6.27-GTNH:dev') { transitive = false } - runtimeOnlyNonPublishable('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.47-gtnh:dev') { transitive = false } - runtimeOnlyNonPublishable("com.github.GTNewHorizons:BloodMagic:1.6.7") { transitive = false } + runtimeOnlyNonPublishable('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.51-gtnh:dev') { transitive = false } + runtimeOnlyNonPublishable("com.github.GTNewHorizons:BloodMagic:1.6.9") { transitive = false } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7..a4b76b9530d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 09523c0e549..e2847c82004 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 06204f7d6d8..3ca43ea41ca 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30' } diff --git a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java index c2c1305cf7a..38ed081b73d 100644 --- a/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java +++ b/src/main/java/appeng/client/gui/implementations/GuiInterfaceTerminal.java @@ -909,11 +909,13 @@ private static boolean itemStackMatchesSearchTerm(final ItemStack itemStack, fin final NBTTagList tags = encodedValue.getTagList(in ? "in" : "out", NBT.TAG_COMPOUND); final boolean containsInvalidDisplayName = GuiText.UnknownItem.getLocal().toLowerCase().contains(searchTerm); - Predicate itemFilter = (is) -> Platform - .getItemDisplayName(AEApi.instance().storage().createItemStack(is)).toLowerCase().contains(searchTerm); + Predicate itemFilter; if (NEI.searchField.existsSearchField()) { itemFilter = NEI.searchField.getFilter(searchTerm); + } else { + itemFilter = is -> Platform.getItemDisplayName(AEApi.instance().storage().createItemStack(is)).toLowerCase() + .contains(searchTerm); } for (int i = 0; i < tags.tagCount(); i++) { diff --git a/src/main/java/appeng/client/me/ItemRepo.java b/src/main/java/appeng/client/me/ItemRepo.java index 896a57e6ef1..127dea92772 100644 --- a/src/main/java/appeng/client/me/ItemRepo.java +++ b/src/main/java/appeng/client/me/ItemRepo.java @@ -11,6 +11,8 @@ package appeng.client.me; import java.util.ArrayList; +import java.util.Map; +import java.util.WeakHashMap; import java.util.function.BiPredicate; import java.util.function.Predicate; import java.util.regex.Pattern; @@ -52,6 +54,7 @@ public class ItemRepo implements IDisplayRepo { private int rowSize = 9; private String searchString = ""; + private Map searchCache = new WeakHashMap<>(); private IPartitionList myPartitionList; private boolean hasPower; @@ -107,52 +110,48 @@ public void updateView() { this.dsp.ensureCapacity(this.list.size()); final Enum viewMode = this.sortSrc.getSortDisplay(); - final Enum searchMode = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE); final Enum typeFilter = this.sortSrc.getTypeFilter(); - Predicate itemFilter = getFilter(this.searchString); - - if (NEI.searchField.existsSearchField()) { - if (searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH) { - NEI.searchField.setText(this.searchString); + Predicate itemFilter = null; + + if (!this.searchString.trim().isEmpty()) { + if (NEI.searchField.existsSearchField()) { + final Predicate neiFilter = NEI.searchField.getFilter(this.searchString); + itemFilter = is -> neiFilter.test(is.getItemStack()); + } else { + itemFilter = getFilter(this.searchString); } - - final Predicate neiFilter = NEI.searchField.getFilter(this.searchString); - itemFilter = is -> neiFilter.test(is.getItemStack()); - } - - if (itemFilter == null) { - return; } IItemDisplayRegistry registry = AEApi.instance().registries().itemDisplay(); out: for (IAEItemStack is : this.list) { - if (registry.isBlacklisted(is.getItem()) || registry.isBlacklisted(is.getItem().getClass())) { + if (viewMode == ViewItems.CRAFTABLE && !is.isCraftable()) { continue; } - for (final BiPredicate filter : registry.getItemFilters()) { - if (!filter.test((TypeFilter) typeFilter, is)) continue out; + if (viewMode == ViewItems.STORED && is.getStackSize() == 0) { + continue; } if (this.myPartitionList != null && !this.myPartitionList.isListed(is)) { continue; } - if (viewMode == ViewItems.CRAFTABLE && !is.isCraftable()) { + if (registry.isBlacklisted(is.getItem()) || registry.isBlacklisted(is.getItem().getClass())) { continue; } - if (viewMode == ViewItems.CRAFTABLE) { - is = is.copy(); - is.setStackSize(0); + for (final BiPredicate filter : registry.getItemFilters()) { + if (!filter.test((TypeFilter) typeFilter, is)) continue out; } - if (viewMode == ViewItems.STORED && is.getStackSize() == 0) { - continue; - } + if (itemFilter == null || Boolean.TRUE.equals(this.searchCache.computeIfAbsent(is, itemFilter::test))) { + + if (viewMode == ViewItems.CRAFTABLE) { + is = is.copy(); + is.setStackSize(0); + } - if (itemFilter.test(is)) { this.view.add(is); } } @@ -180,7 +179,7 @@ public void updateView() { private Predicate getFilter(String innerSearch) { - if (innerSearch.length() == 0) { + if (innerSearch.isEmpty()) { return stack -> true; } @@ -265,6 +264,17 @@ public String getSearchString() { @Override public void setSearchString(@Nonnull final String searchString) { - this.searchString = searchString; + if (!searchString.equals(this.searchString)) { + this.searchString = searchString; + this.searchCache.clear(); + + if (NEI.searchField.existsSearchField()) { + final Enum searchMode = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE); + if (searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH) { + NEI.searchField.setText(this.searchString); + } + } + } + } } diff --git a/src/main/java/appeng/client/render/blocks/RenderMEChest.java b/src/main/java/appeng/client/render/blocks/RenderMEChest.java index 9ec8ff98122..fb4b3fc720d 100644 --- a/src/main/java/appeng/client/render/blocks/RenderMEChest.java +++ b/src/main/java/appeng/client/render/blocks/RenderMEChest.java @@ -81,12 +81,11 @@ public boolean renderInWorld(final BlockChest imb, final IBlockAccess world, fin this.selectFace(renderer, west, up, forward, 5, 16 - 5, 9, 12); - int offsetU = 4; + int offsetU = -4; int offsetV = 9 - type * 4; if (stat == 0) { - // Right up corner - offsetU = -4; - offsetV = 8; + // Bottom middle right + offsetV = -5; } int b = world.getLightBrightnessForSkyBlocks(x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ, 0); diff --git a/src/main/java/appeng/integration/modules/NEIHelpers/NEISearchField.java b/src/main/java/appeng/integration/modules/NEIHelpers/NEISearchField.java index 9fde078c51b..c3bae6c3195 100644 --- a/src/main/java/appeng/integration/modules/NEIHelpers/NEISearchField.java +++ b/src/main/java/appeng/integration/modules/NEIHelpers/NEISearchField.java @@ -76,7 +76,7 @@ public Predicate getFilter(String filterText) { if (searchField != null) { final ItemFilter filter = searchField.getFilter(filterText); - return stack -> filter.matches(stack); + return filter::matches; } return null; diff --git a/src/main/java/appeng/items/tools/ToolMemoryCard.java b/src/main/java/appeng/items/tools/ToolMemoryCard.java index fab7d123f58..5fbd68962ab 100644 --- a/src/main/java/appeng/items/tools/ToolMemoryCard.java +++ b/src/main/java/appeng/items/tools/ToolMemoryCard.java @@ -56,7 +56,12 @@ public void addCheckedInformation(final ItemStack stack, final EntityPlayer play lines.add(String.format(local, freqTooltip)); } - if (data.hasKey("custom_name")) lines.add(data.getString("custom_name")); + + if (data.hasKey("custom_name")) { + lines.add(data.getString("custom_name")); + } else if (data.hasKey("display") && data.getCompoundTag("display").hasKey("Name")) { + lines.add(data.getCompoundTag("display").getString("Name")); + } } /** diff --git a/src/main/java/appeng/tile/storage/TileChest.java b/src/main/java/appeng/tile/storage/TileChest.java index 4e04091ca22..46df57563c1 100644 --- a/src/main/java/appeng/tile/storage/TileChest.java +++ b/src/main/java/appeng/tile/storage/TileChest.java @@ -413,6 +413,7 @@ public boolean readFromStream_TileChest(final ByteBuf data) { this.type = data.readByte() & 0b11; final AEColor oldPaintedColor = this.paintedColor; this.paintedColor = AEColor.values()[data.readByte()]; + this.getProxy().setColor(this.paintedColor); final int item = data.readInt(); @@ -433,6 +434,7 @@ public void readFromNBT_TileChest(final NBTTagCompound data) { this.priority = data.getInteger("priority"); if (data.hasKey("paintedColor")) { this.paintedColor = AEColor.values()[data.getByte("paintedColor")]; + this.getProxy().setColor(this.paintedColor); } } @@ -715,8 +717,11 @@ public boolean recolourBlock(final ForgeDirection side, final AEColor newPainted if (this.paintedColor == newPaintedColor) { return false; } - this.paintedColor = newPaintedColor; + this.getProxy().setColor(this.paintedColor); + if (getGridNode(side) != null) { + getGridNode(side).updateState(); + } this.markDirty(); this.markForUpdate(); return true; diff --git a/src/main/resources/assets/appliedenergistics2/textures/blocks/MEStorageCellTextures.png b/src/main/resources/assets/appliedenergistics2/textures/blocks/MEStorageCellTextures.png index 4c793bed7e2..724cbbe6f04 100644 Binary files a/src/main/resources/assets/appliedenergistics2/textures/blocks/MEStorageCellTextures.png and b/src/main/resources/assets/appliedenergistics2/textures/blocks/MEStorageCellTextures.png differ