Skip to content

FastEdit 1.3.0

Choose a tag to compare

@Wyze3306 Wyze3306 released this 07 Aug 19:04
· 6 commits to main since this release

Two fixes: //replace was throwing away a block's orientation, and the smooth brush wrecked the terrain instead of smoothing it.

Orientation is kept

A pattern token resolved to the block type's default state. So //replace oak_stairs stone_brick_stairs did swap the material, but put every step back facing east and right side up — a whole staircase turned into a pile of blocks all pointing the same way. Same for slabs (top/bottom), logs (axis), trapdoors and doors.

BlockStates.reorient now replays the old block's properties onto the new one, in two passes:

  1. Same name on both sides: straight copy. Covers stairs→stairs, slabs→slabs, logs→logs, and the whole family.
  2. Different names for the same idea: through a canonical BlockFace / vertical half / axis. Bedrock spells the same orientation six different ways depending on the block — weirdo_direction for stairs, minecraft:vertical_half for slabs, direction for trapdoors, minecraft:cardinal_direction for doors, facing_direction for pistons, pillar_axis for logs.
//replace oak_stairs stone_brick_stairs   facing + upside-down carried over
//replace cobblestone_slab oak_slab       top/bottom half carried over
//replace oak_log birch_log               axis carried over
//replace oak_stairs oak_slab             an upside-down stair becomes a top slab
//replace wooden_door iron_door           facing, hinge, open, upper half

A PNX API trap along the way: BlockState compares BlockPropertyType by identity, never by name. A value built from a CommonBlockProperties constant is rejected as soon as the block was registered with another instance of the same name — rail_direction exists as both 0-9 and 0-5. Values are therefore always created from the target block's own getPropertyTypeSet().

Explicit states

Patterns and masks now take id[prop=value,...]. That is the way out: anything written by hand is pinned and never overwritten by the old block.

//set oak_log[pillar_axis=y]                        stand every log upright
//replace oak_stairs oak_stairs[weirdo_direction=0] point them all east
//replace oak_stairs[upside_down_bit=true] oak_slab  only the flipped ones

An unknown property is reported with the list of the real ones, and /inspect prints the block's full state — exactly the form a pattern takes, so it can be pasted straight back.

Zero cost on blocks with no properties: //set stone does no extra world read, and that is decided once when the pattern is parsed.

The smooth brush, rewritten

The old one averaged one height per column, then re-poured the whole column from a pattern. Consequences: overhangs and caves were shaved into a single surface, everything it touched came out in the brush's material whatever the rock was, and it rewrote its entire cylinder even where the terrain was already smooth.

Redone on the model of EasyEdit's SmoothTask. Each column of the window becomes a signed distance field: +1 on the outermost ground block growing inwards, -1 on the air touching it growing outwards. Blurring that field over the 3×3 neighbouring columns and re-thresholding it into ground/air is what actually rounds a surface off — spikes lose the vote, pits get filled, and flat ground or a straight wall does not move by a single block.

  • Only cells whose depth changes are written. Brushing already-smooth terrain now does nothing at all.
  • The material comes from the column itself, at the matching depth: grass stays on top of dirt on top of stone, instead of the whole cut turning into one block.
  • Water and lava close back over what is carved out, instead of leaving a dry hole in a lake.
  • Trees and plants are transparent to the height field, so the brush follows the hill and not the trunks.
  • Overhangs and caves survive: it is the full shape of the column that is described, not a single top.

One deliberate deviation from EasyEdit: it clamps the air side of the field to a flat -1 while letting the ground side grow, which drags material out of any wall taller than the brush. The two sides are symmetric here — verified: a vertical cliff produces no change at all.

//brush smooth 6          rounds the terrain off in a 6-block sphere
//brush smooth 6 4        four passes, melts a cliff into a slope

//brush smooth no longer takes a pattern, the radius comes first. A pattern typed out of habit is accepted and dropped, and shovels bound by a previous version keep working. passes defaults to 2, 6 maximum; the radius is capped at 32.

Bedrock detail: the numeric form needs its own command overload, otherwise the client refuses the radius where the block enum used to be.

Also in this version

The selection outline goes through BoxShape primitives (PR #1 from @ValresMC), and //stack with no direction stacks up or down depending on where you look.

Still PNX 3.0.x. No change to selections, clipboard or schematics.