Skip to content

Commit

Permalink
Merge pull request #46 from Delfayne/delfayne/2.3.2-fixes
Browse files Browse the repository at this point in the history
Fixes for essentia sorting and essentia terminal withdrawal
  • Loading branch information
Delfayne authored Jul 2, 2024
2 parents 7ad4adc + a4f0318 commit f7b0086
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.parallel=true
# Allow Gradle to cache build to avoid recompiling classes that did not change.
org.gradle.caching=true
# Mod Information
modVersion=2.3.1
modVersion=2.3.2
mavenGroup=org.dv.minecraft.thaumicenergistics
modArchiveName=thaumic-energistics-extended-life
modName=Thaumic Energistics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import appeng.integration.Integrations;
import appeng.integration.abstraction.IInvTweaks;
import appeng.util.Platform;
import thaumicenergistics.util.AEUtil;

import java.util.Comparator;

Expand All @@ -15,7 +16,7 @@ public class ThEItemSorters {
private static SortDir Direction = SortDir.ASCENDING;

public static final Comparator<IAEStack<?>> CONFIG_BASED_SORT_BY_NAME = (o1, o2) -> {
final int cmp = Platform.getItemDisplayName(o1).compareToIgnoreCase(Platform.getItemDisplayName(o2));
final int cmp = AEUtil.getDisplayName(o1).compareToIgnoreCase(AEUtil.getDisplayName(o2));
return applyDirection(cmp);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ public void fromBytes(ByteBuf in) {
if (nbt.hasKey("index")) {
this.index = nbt.getInteger("index");
}
if (nbt.hasKey("Cnt")) {
// AE2 items etc use Cnt, Essentia uses Count
if (nbt.hasKey("Cnt") || nbt.hasKey("Count")) {
AEApi.instance().storage().storageChannels().forEach(channel -> {
if (requestedStack == null) {
try {
this.requestedStack = channel.createFromNBT(nbt);
requestedStack = channel.createFromNBT(nbt);
} catch (Throwable ignored) {
ThELog.error("Failed to read stack from packet, {}", channel.getClass().getSimpleName());
}
Expand Down

0 comments on commit f7b0086

Please sign in to comment.