fix more derpy pos issues
This commit is contained in:
parent
a37b0c5cc2
commit
c566614f66
@ -47,7 +47,7 @@ public interface ColumnDecorator {
|
||||
}
|
||||
|
||||
default void fillDown(IChunk chunk, int x, int z, int from, int to, BlockState state) {
|
||||
try (BlockPos.PooledMutable pos = pos()) {
|
||||
try (BlockPos.PooledMutable pos = ColumnDecorator.pos(x, from, z)) {
|
||||
for (int dy = from; dy > to; dy--) {
|
||||
chunk.setBlockState(pos.setPos(x, dy, z), state, false);
|
||||
}
|
||||
@ -62,7 +62,7 @@ public interface ColumnDecorator {
|
||||
return getNoise(x, z, seed, scale / 255F, bias / 255F);
|
||||
}
|
||||
|
||||
static BlockPos.PooledMutable pos() {
|
||||
return BlockPos.PooledMutable.retain();
|
||||
static BlockPos.PooledMutable pos(int x, int y, int z) {
|
||||
return BlockPos.PooledMutable.retain(x, y, z);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
package com.terraforged.api.chunk.surface;
|
||||
|
||||
|
||||
import com.terraforged.api.chunk.column.ColumnDecorator;
|
||||
import com.terraforged.api.chunk.surface.builder.Combiner;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@ -36,7 +37,7 @@ public interface Surface {
|
||||
void buildSurface(int x, int z, int height, SurfaceContext ctx);
|
||||
|
||||
default void fill(int x, int z, int start, int end, IChunk chunk, BlockState state) {
|
||||
try (BlockPos.PooledMutable pos = BlockPos.PooledMutable.retain()) {
|
||||
try (BlockPos.PooledMutable pos = ColumnDecorator.pos(x, start, z)) {
|
||||
if (start < end) {
|
||||
for (int y = start; y < end; y++) {
|
||||
chunk.setBlockState(pos.setPos(x, y, z), state, false);
|
||||
|
@ -45,11 +45,11 @@ public class FilterSettings {
|
||||
|
||||
@Range(min = 0F, max = 1F)
|
||||
@Comment("Controls how quickly material dissolves (during erosion)")
|
||||
public float erosionRate = 0.4F;
|
||||
public float erosionRate = 0.45F;
|
||||
|
||||
@Range(min = 0F, max = 1F)
|
||||
@Comment("Controls how quickly material is deposited (during erosion)")
|
||||
public float depositeRate = 0.4F;
|
||||
public float depositeRate = 0.35F;
|
||||
}
|
||||
|
||||
@Serializable
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 761cbd57e8b40211db5b9905a69f82dfcb3ae361
|
||||
Subproject commit 3717ff07d10d449d8a5c77ff75cf88f00e277429
|
Loading…
Reference in New Issue
Block a user