aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java b/src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java
index c12dc7d02a..b0127ba81f 100644
--- a/src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java
+++ b/src/main/java/gregtech/api/net/GTPacketInfiniteSpraycan.java
@@ -71,15 +71,10 @@ public class GTPacketInfiniteSpraycan extends GTPacket {
public void process(final IBlockAccess aWorld) {
ItemStack currentItemStack = player.inventory.getCurrentItem();
if (currentItemStack != null && currentItemStack.getItem() instanceof MetaBaseItem item) {
- item.forEachBehavior(currentItemStack, behavior -> {
- if (behavior instanceof BehaviourSprayColorInfinite spraycanBehavior
- && action.execute(spraycanBehavior, currentItemStack, player, newColor)) {
- player.sendSlotContents(player.inventoryContainer, player.inventory.currentItem, currentItemStack);
- return true;
- }
-
- return false;
- });
+ item.forEachBehavior(
+ currentItemStack,
+ behavior -> behavior instanceof BehaviourSprayColorInfinite spraycanBehavior
+ && action.execute(spraycanBehavior, currentItemStack, player, newColor));
}
}