mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Make Y the height above the dimension's bottom everywhere in the API: document it, and drop GenerationContext.originY, which is always 0 now
This commit is contained in:
1 parent
33fc9adca9
commit
09afee8ae3
26 files changed
+91
-54
No files matched your search
@@ -6,7 +6,9 @@ import com.volmit.world.BlockPosition;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/** A proposed or buffered write in world coordinates, including its block entity payload. */
|
||||
/** A proposed or buffered write, including its block entity payload. The position has world X and Z and a
|
||||
* Y that is the height above the dimension's bottom (0 = bottom).
|
||||
*/
|
||||
public record PlacedBlock(BlockPosition position, BlockState state, Optional<BlockEntityData> blockEntity) {
|
||||
public PlacedBlock {
|
||||
Objects.requireNonNull(position, "position");
|
||||
|
||||
@@ -5,7 +5,9 @@ import com.volmit.world.BlockPosition;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/** Marker metadata in world coordinates. */
|
||||
/** Marker metadata. The position has world X and Z and a Y that is the height above the dimension's bottom
|
||||
* (0 = bottom).
|
||||
*/
|
||||
public record PlacedMarker(BlockPosition position, ResourceId type, Map<String, String> attributes) {
|
||||
public PlacedMarker {
|
||||
Objects.requireNonNull(position, "position");
|
||||
|
||||
@@ -3,7 +3,8 @@ package com.volmit.placement;
|
||||
import com.volmit.mantle.Mantle;
|
||||
import com.volmit.world.BlockView;
|
||||
|
||||
/** Buffered world-space access for placement stages, without ownership of commit/close.
|
||||
/** Buffered access for placement stages, without ownership of commit/close. X and Z are world coordinates;
|
||||
* Y is the height above the dimension's bottom (0 = bottom).
|
||||
* Reads include the overlay. Bounds are the host-prepared placement area.
|
||||
* Block/entity/marker/mantle writes share the host edit.
|
||||
* Out-of-area access throws; nested mantle edits are unsupported. Do not retain this view.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.volmit.placement;
|
||||
|
||||
/** Host-owned buffered placement writes, in world coordinates, including cross-chunk writes.
|
||||
/** Host-owned buffered placement writes, with world X and Z and Y as the height above the
|
||||
* dimension's bottom (0 = bottom), including cross-chunk writes.
|
||||
* All reads see the overlay. Block/entity/marker/mantle mutations participate in one commit.
|
||||
* Out-of-bounds access fails, never clips. The host excludes competing writers and handles
|
||||
* block entity replacement/removal when states change. Nested mantle edits are unsupported.
|
||||
|
||||
@@ -6,7 +6,8 @@ import com.volmit.resource.ResourceId;
|
||||
import com.volmit.world.BlockPosition;
|
||||
import java.util.Objects;
|
||||
|
||||
/** One placement attempt. Geometry is already transformed; anchor is a world block position.
|
||||
/** One placement attempt. Geometry is already transformed; anchor is a world block position (world X and Z, Y as the height
|
||||
* above the dimension's bottom).
|
||||
* World position = local position - object anchor + request anchor. Arithmetic never wraps.
|
||||
* id identifies this attempt within the host's generation plan.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user