mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 01:34:04 +00:00
Let the object model stand on the api: turn, scale, paste, records
Core turns objects with ObjectTurn and BlockTurn and scales with ScaleMethod, so the object model no longer reads the modules' ObjectRotation and ScaleInterpolation; /iris object paste writes the turned blocks with IrisObject.paste instead of running a placement. IrisObject takes no ObjectPlacement; the structure placers call ModuleObjectPlacement directly. IrisPlacements reads the run's name and JSON, the placement type comes from the module, placements are stored as PlacementMarkers texts and read back as PlacementRecords, the marker ids are Iris's own, the loot shuffle seed and the protected floor come from the modules, entity knobs are EntitySpec fields, and entity key completion is one handler by kind id. The entity pin is retaken with the old print proven to hash to the old number.
This commit is contained in:
1 parent
3022c54a43
commit
40436352bf
68 files changed
+1190
-427
No files matched your search
@@ -18,7 +18,7 @@
|
||||
|
||||
package art.arcane.iris.probe;
|
||||
|
||||
import art.arcane.iris.builtin.prepare.ObjectRotation;
|
||||
import art.arcane.iris.engine.object.prefab.ObjectTurn;
|
||||
import art.arcane.iris.engine.object.material.BlockDataMergeSupport;
|
||||
import art.arcane.iris.engine.object.prefab.BlockStateRotation;
|
||||
import art.arcane.iris.engine.object.prefab.TileData;
|
||||
@@ -66,11 +66,11 @@ public final class StubPlatform implements IrisPlatform {
|
||||
TileData.bindPlatformFactory(StubTileData::fromProperties);
|
||||
}
|
||||
|
||||
static PlatformBlockState rotateForTest(ObjectRotation rotation, PlatformBlockState state) {
|
||||
static PlatformBlockState rotateForTest(ObjectTurn rotation, PlatformBlockState state) {
|
||||
if (rotation == null || !rotation.canRotate()) {
|
||||
return state;
|
||||
}
|
||||
return rotateState(BlockStateRotation.turnOf(rotation, 0, 0, 0), state);
|
||||
return rotateState(rotation.blockTurn(), state);
|
||||
}
|
||||
|
||||
static PlatformBlockState mergeForTest(PlatformBlockState base, PlatformBlockState update) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.probe;
|
||||
|
||||
import art.arcane.iris.builtin.prepare.ObjectRotation;
|
||||
import art.arcane.iris.engine.object.prefab.ObjectTurn;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.spi.PlatformBlockState;
|
||||
import art.arcane.iris.spi.PlatformFace;
|
||||
@@ -23,7 +23,7 @@ public final class StubPlatformStateTest {
|
||||
|
||||
@Test
|
||||
public void rotatesFacingAxisAndConnectedFaces() {
|
||||
ObjectRotation rotation = ObjectRotation.of(0, 90, 0);
|
||||
ObjectTurn rotation = ObjectTurn.of(0, 90, 0);
|
||||
|
||||
assertEquals("minecraft:oak_stairs[facing=west,half=bottom]",
|
||||
StubPlatform.rotateForTest(rotation, state("minecraft:oak_stairs[facing=north,half=bottom]")).key());
|
||||
|
||||
Reference in new issue
Block a user