Frog and Shop Flops

- Fixed Shopping lists not syncing with clients when adding purchases #7449 #7393
- Fixed Frogport ponder scene not animating
- Fixed broken address filter in second stock ticker ponder scene
This commit is contained in:
simibubi 2025-03-01 23:28:32 +01:00
parent 8539481a85
commit c9534c92d0
4 changed files with 8 additions and 2 deletions

View file

@ -47,7 +47,13 @@ public class ShoppingListItem extends Item {
UUIDUtil.STREAM_CODEC, ShoppingList::shopNetwork,
ShoppingList::new
);
public ShoppingList duplicate() {
return new ShoppingList(purchases.stream()
.map(ia -> IntAttached.with(ia.getFirst(), ia.getSecond()))
.toList(), shopOwner, shopNetwork);
}
// Y value of clothPos is pixel perfect (x16)
public void addPurchases(BlockPos clothPos, int amount) {
for (IntAttached<BlockPos> entry : purchases) {

View file

@ -218,7 +218,7 @@ public class TableClothBlockEntity extends SmartBlockEntity {
ShoppingList list = new ShoppingList(new ArrayList<>(), owner, tickerID);
if (addOntoList) {
ShoppingList prevList = ShoppingListItem.getList(prevListItem);
ShoppingList prevList = ShoppingListItem.getList(prevListItem).duplicate();
if (owner.equals(prevList.shopOwner()) && tickerID.equals(prevList.shopNetwork()))
list = prevList;
else