org.lodemc.api.prop package. Plain flora (plants without a crop or sapling section) works exactly like a prop, so it’s included too.
How a placed prop is stored
Each placed prop is one savedItemDisplay entity, its anchor. The anchor draws the model and keeps all the piece’s data, so props survive restarts, chunk unloads and WorldEdit copies. A prop’s solid cells are real blocks, and its other hitboxes are packet-only entities that don’t exist on the server.
That means:
- Only props in loaded chunks can be found.
- Clicking a solid cell gives a normal block event; use
LodeProps.at(block)to find the piece. - Don’t remove the anchor yourself. Use
PlacedProp.remove()orbreakNaturally(), which also clear its cells, lights and seats.
LodeProps
Finding props
PlacedProp
The piece filling
block with one of its solid cells, or standing in it (its origin block). null if there’s none.PlacedProp
The piece whose anchor display
entity is, or null.PlacedProp
The piece whose anchor has this UUID, if its chunk is loaded. Use it to find a piece again later: save
getUuid(), not the object.List<PlacedProp>
Pieces whose anchor is within
radius blocks of center.List<PlacedProp>
Every piece in loaded chunks of
world, or of every world when you leave world out.Collection<CustomProp>
Every prop configured right now.
CustomProp
Prop
id, or null. Also takes the id as a String.CustomProp
The prop a stack places, or
null.Placing props
PlacedProp
Places prop
id standing on the floor in origin. Also takes the id as a String.yawworks like a player’s yaw: the prop faces whoever looks at it with that yaw, as if they had placed it. It’s snapped to the prop’srotation:. It defaults to 0, which is a player looking south, so the prop’s front faces north.playeris optional. With a player, protection plugins are asked first through a block place event, and thePropPlaceEventnames them.
null if it doesn’t fit there or was refused.String
Why prop
id can’t be placed in origin turned to yaw, such as There isn't enough room., or null if it can. It checks the same rules as placing: free cells, the world border, on: and not-on:, and max-nearby.PlacedProp
A placed prop. It reads the live piece, so values are always current. It stops being valid once the piece is broken or its chunk unloads; look it up again then. TwoPlacedProps for the same piece are equal.
And to change it:
boolean
Switches it to one of its
states:, or to its default look with null, with the state’s sound, lights and particles. A PropStateChangeEvent fires first. Returns false if the name isn’t one of its states or the event was cancelled.boolean
Turns it to
yaw, snapped to its rotation:, if it still fits when turned. Returns true if it turned.boolean
Breaks it the way a player does. With a
player, protection plugins are asked first through a block break event, and the tool rules in drops: read the player’s hand. A PropBreakEvent fires and can change the drops. drops (default true) controls whether its drops: are dropped. Both arguments are optional. Storage contents and a jukebox’s disc always spill out. Returns true if it broke.void
Takes it away with no drops, events or sounds. Storage contents and a jukebox’s disc still spill out.
