This mod adds the /piss command, which triggers the player to urinate. The effect is visible to all players (everything is handled on the server; there is almost no client-side code).
/piss to start urinating.Shift to stop it early./piss again also stops the current urination.Parabola, not physics. Launch point — the player’s hips (player.position().add(0, 0.8, 0)), initial velocity — in the direction of the player’s gaze (player.getLookAngle(), velocity ~0.5–0.7), gravity ~0.05/tick². We sample the parabolic trajectory at ~12 points with a large step size—the jet’s cubes are sparsely distributed.
Glass blocks instead of particles. The jet is a Display.BlockDisplay pool containing a full block of yellow glass (Panes.GLASS_BLOCK, scale ~0.13, no rotation—the transformation is global and static), with one block per visible point on the parabola. Every tick, the pool is adjusted to the number of points, and the entities move (setPos) rather than being recreated; setPosRotInterpolationDuration(4) smooths and slows down the movement on the client. Particles are not used.
Hit point. Using the same parabolic segments—level.clip(new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, player)) for blocks, plus ProjectileUtil.getEntityHitResult(...) for entities (the segment is clipped by the block hit, and the player itself and Display entities of the jet stream are excluded from the predicate). First hit = landing point; we do not sample the parabola further.
Ghost block (puddle). At the point of impact, spawn a Display.BlockDisplay with a flat panel (NOT a cross-shaped one): YELLOW_STAINED_GLASS_PANE with both opposite sides set to true, facing the player (rotated around the Y-axis by -yRot). The world is NOT modified; by definition, display entities have no collisions.
entity.discard(). A new puddle is spawned every 4 ticks (GHOST_INTERVAL).setPosRotInterpolationDuration(2) for smoothness).Stopping the stream: timer (100 ticks = 5 s), repeated /piss (toggle), Shift (player.isShiftKeyDown() on the server—no client-side keybind required), death, logout, or dimension change. The command does not send any messages to chat or the action bar.
This project is licensed under the Softboundless Mod License 1.0.
Modification, redistribution, forks, ports, and modpack usage are generally permitted. However, use in third-party Minecraft modpacks using the Freakland name is restricted.
See LICENSE for the full terms.