Regressions

- Fix regressions from the catnip & ponder merge
This commit is contained in:
IThundxr 2025-01-18 16:30:51 -05:00
parent b98c4f5001
commit c845431cad
Failed to generate hash of commit
2 changed files with 3 additions and 4 deletions

View file

@ -33,7 +33,7 @@ jei_minecraft_version = 1.21
jei_version = 19.5.0.33
curios_minecraft_version = 1.21.1
curios_version = 9.2.2
ponder_version = 0.9.12
ponder_version = 0.9.13
catnip_and_ponder_mc_ver = 1.21.1
cc_tweaked_enable = true

View file

@ -8,8 +8,6 @@ import java.util.List;
import java.util.Map;
import java.util.function.Predicate;
import net.createmod.catnip.platform.CatnipServices;
import org.apache.commons.lang3.mutable.MutableInt;
import com.google.common.collect.Lists;
@ -179,6 +177,7 @@ public class InventorySummary {
CatnipServices.NETWORK.sendToClient(player, new LogisticalStockResponsePacket(true, pos, currentList));
}
// TODO - Create codec for this
public CompoundTag write() {
List<BigItemStack> all = new ArrayList<>();
items.forEach((key, list) -> all.addAll(list));
@ -189,7 +188,7 @@ public class InventorySummary {
public static InventorySummary read(CompoundTag tag) {
InventorySummary summary = new InventorySummary();
summary.addAllBigItemStacks(CatnipCodecUtils.decode(Codec.list(BigItemStack.CODEC), tag.getCompound("List")).orElseThrow());
summary.addAllBigItemStacks(CatnipCodecUtils.decode(Codec.list(BigItemStack.CODEC), tag.getCompound("List")).orElse(Collections.emptyList()));
return summary;
}