This commit is contained in:
Bruno Rybársky 2024-08-21 16:11:38 +02:00
parent 792336812b
commit 0d52210209
4 changed files with 5 additions and 5 deletions

@ -6,7 +6,7 @@ minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3 yarn_mappings=1.21.1+build.3
loader_version=0.16.2 loader_version=0.16.2
# Mod Properties # Mod Properties
mod_version=1.4.4 mod_version=1.4.5
maven_group=systems.brn maven_group=systems.brn
archives_base_name=servershop archives_base_name=servershop
# Dependencies # Dependencies

@ -41,7 +41,7 @@ public class StoreCommands {
ItemStack itemStack = new ItemStack(item, count); ItemStack itemStack = new ItemStack(item, count);
ServerPlayerEntity player = ctx.getSource().getPlayer(); ServerPlayerEntity player = ctx.getSource().getPlayer();
if (player != null) { if (player != null) {
sell(itemStack, player, false); sell(itemStack.copy(), player, false);
return 0; return 0;
} }
return 1; return 1;
@ -52,7 +52,7 @@ public class StoreCommands {
ItemStack itemStack = new ItemStack(item); ItemStack itemStack = new ItemStack(item);
ServerPlayerEntity player = ctx.getSource().getPlayer(); ServerPlayerEntity player = ctx.getSource().getPlayer();
if (player != null) { if (player != null) {
sell(itemStack, player, false); sell(itemStack.copy(), player, false);
return 0; return 0;
} }
return 1; return 1;

@ -61,7 +61,7 @@ public class BalanceScreen extends PagedGui implements SearchableInterface {
@Override @Override
public boolean insertItem(ItemStack stack, int startIndex, int endIndex, boolean fromLast) { public boolean insertItem(ItemStack stack, int startIndex, int endIndex, boolean fromLast) {
sell(stack, player, true); sell(stack.copy(), player, true);
return super.insertItem(stack, startIndex, endIndex, fromLast); return super.insertItem(stack, startIndex, endIndex, fromLast);
} }

@ -80,7 +80,7 @@ public class ShopScreen extends PagedGui implements SearchableInterface {
@Override @Override
public boolean insertItem(ItemStack stack, int startIndex, int endIndex, boolean fromLast) { public boolean insertItem(ItemStack stack, int startIndex, int endIndex, boolean fromLast) {
sell(stack, player, true); sell(stack.copy(), player, true);
return super.insertItem(stack, startIndex, endIndex, fromLast); return super.insertItem(stack, startIndex, endIndex, fromLast);
} }