mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
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:
parent
8539481a85
commit
c9534c92d0
4 changed files with 8 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue