Skip to content

Commit

Permalink
use PlayerSource constructor without IActionHost argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari023 committed Jan 5, 2025
1 parent a7a3702 commit f54fc08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/mari_023/ae2wtlib/AE2wtlibEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public static void restock(ServerPlayer player, ItemStack item, int count, Consu
if (toAdd > 0)
changed = cTHandler.getTargetGrid().getStorageService().getInventory().extract(
AEItemKey.of(item), toAdd, Actionable.MODULATE,
new PlayerSource(player, null));
new PlayerSource(player));
else
changed = -cTHandler.getTargetGrid().getStorageService().getInventory().insert(
AEItemKey.of(item), -toAdd, Actionable.MODULATE,
new PlayerSource(player, null));
new PlayerSource(player));

item.setCount(count + (int) changed);
setStack.accept(item);
Expand Down Expand Up @@ -113,7 +113,7 @@ public static void insertStackInME(ItemEntity entity, Player player) {
return;

long inserted = cTHandler.getTargetGrid().getStorageService().getInventory().insert(AEItemKey.of(stack),
stack.getCount(), Actionable.MODULATE, new PlayerSource(player, null));
stack.getCount(), Actionable.MODULATE, new PlayerSource(player));
int leftover = (int) (stack.getCount() - inserted);

player.awardStat(Stats.ITEM_PICKED_UP.get(stack.getItem()), (int) inserted);
Expand All @@ -137,7 +137,7 @@ public static void pickBlock(ServerPlayer player, ItemStack stack) {
if (cTHandler.getTargetGrid().getStorageService() == null)
return;
var networkInventory = cTHandler.getTargetGrid().getStorageService().getInventory();
var playerSource = new PlayerSource(player, null);
var playerSource = new PlayerSource(player);

var inventory = player.getInventory();
int targetSlot = inventory.getSuitableHotbarSlot();
Expand Down

0 comments on commit f54fc08

Please sign in to comment.