Follow the API's renamed highest, get and withPropertyIfAccepted

This commit is contained in:
piexel committed 2026-11-06 06:18:37 +01:00
1 parent f98d78a87b
commit b961a5d3b2
7 files changed
+8 -8

No files matched your search

@@ -158,7 +158,7 @@ final class IrisBlockRegistry implements BlockRegistry {
}
@Override
public BlockState withProperty(BlockState state, String name, String value) {
public BlockState withPropertyIfAccepted(BlockState state, String name, String value) {
try {
return apiState(platformState(state).withProperty(name, value));
} catch (IllegalArgumentException notAccepted) {
@@ -79,7 +79,7 @@ final class IrisRunningWorld implements RunningWorld {
}
@Override
public int highestBlock(int worldX, int worldZ, boolean ignoreFluid) {
public int highest(int worldX, int worldZ, boolean ignoreFluid) {
return engine.getHeight(worldX, worldZ, ignoreFluid);
}
@@ -210,7 +210,7 @@ public class TreeSVC implements IrisService {
}
@Override
public com.volmit.block.BlockState blockAt(int x, int y, int z) {
public com.volmit.block.BlockState get(int x, int y, int z) {
int worldY = y + world.getMinHeight();
if (saplingPlane.contains(x, worldY, z)) {
return AIR;
@@ -309,7 +309,7 @@ public final class CarveTestWorld implements PackWorld {
}
@Override
public BlockState withProperty(BlockState state, String name, String value) {
public BlockState withPropertyIfAccepted(BlockState state, String name, String value) {
return state.withProperty(name, value);
}
@@ -138,7 +138,7 @@ public class IrisBlockRegistryTest {
when(sand.withProperty("facing", "up")).thenThrow(new IllegalArgumentException("Could not parse data: minecraft:sand[facing=up]"));
BlockState sandState = BlockState.parse("minecraft:sand");
assertEquals(sandState, blocks.withProperty(sandState, "facing", "up"));
assertEquals(sandState, blocks.withPropertyIfAccepted(sandState, "facing", "up"));
}
@Test
@@ -134,8 +134,8 @@ public class IrisRunningWorldTest {
when(engine.getHeight(X, Z, true)).thenReturn(60);
when(engine.getHeight(X, Z, false)).thenReturn(63);
assertEquals(60, running.highestBlock(X, Z, true));
assertEquals(63, running.highestBlock(X, Z, false));
assertEquals(60, running.highest(X, Z, true));
assertEquals(63, running.highest(X, Z, false));
}
@Test
@@ -828,7 +828,7 @@ public final class ApiChunk implements GenerationContext {
}
@Override
public BlockState withProperty(BlockState state, String name, String value) {
public BlockState withPropertyIfAccepted(BlockState state, String name, String value) {
return state.withProperty(name, value);
}