Skip to content

Commit fe30334

Browse files
committed
fix pipe buffoonery
1 parent 00c4a20 commit fe30334

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/fluid/connecting/ConnectingService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ object ConnectingService : org.bukkit.event.Listener {
2121

2222
fun startConnection(player: Player, startPoint: ConnectingPoint, pipe: FluidPipe) {
2323
check(!ConnectingService.connectionsInProgress.containsKey(player))
24-
ConnectingService.connectionsInProgress.put(player, ConnectingTask(player, startPoint, pipe))
24+
// Clone to prevent the PylonItem instance being shared between player's hotbar and the pipe itself
25+
ConnectingService.connectionsInProgress.put(player, ConnectingTask(player, startPoint, FluidPipe(pipe.stack.clone())))
2526
}
2627

2728
@JvmStatic

0 commit comments

Comments
 (0)