Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,18 @@ public void sendAllDataToRemote() {
}
}

@Override
public void forceSlot(@NotNull Container container, int slot) {
int slotsIndex = this.findSlot(container, slot).orElse(-1);
if (slotsIndex != -1) {
ItemStack item = this.slots.get(slotsIndex).getItem();
this.remoteSlots.get(slotsIndex).force(item);
if (this.synchronizer != null) {
this.synchronizer.sendSlotChange(this, slotsIndex, item.copy());
}
}
}

@Override
public void broadcastCarriedItem() {
ItemStack carried = this.getCarried();
Expand Down Expand Up @@ -424,7 +436,7 @@ private void updateDataSlotListeners(int i, int j) {
}
}

private void triggerSlotListeners(int index, ItemStack itemStack, Supplier<ItemStack> supplier) {
public void triggerSlotListeners(int index, @NotNull ItemStack itemStack, @NotNull Supplier<ItemStack> supplier) {
ItemStack itemStack1 = this.lastSlots.get(index);
if (!ItemStack.matches(itemStack1, itemStack)) {
ItemStack itemStack2 = supplier.get();
Expand All @@ -436,7 +448,7 @@ private void triggerSlotListeners(int index, ItemStack itemStack, Supplier<ItemS
}
}

private void synchronizeSlotToRemote(int i, ItemStack itemStack, Supplier<ItemStack> supplier) {
public void synchronizeSlotToRemote(int i, @NotNull ItemStack itemStack, @NotNull Supplier<ItemStack> supplier) {
if (!this.suppressRemoteUpdates) {
RemoteSlot slot = this.remoteSlots.get(i);
if (!slot.matches(itemStack)) {
Expand Down