Triple terrain fixes
This commit is contained in:
parent
0c26c6f648
commit
aaea144366
2 changed files with 7 additions and 4 deletions
|
@ -65,13 +65,13 @@ public class TripleTerrainBlock extends EndTerrainBlock {
|
||||||
@Override
|
@Override
|
||||||
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||||
TripleShape shape = state.get(SHAPE);
|
TripleShape shape = state.get(SHAPE);
|
||||||
if (shape == TripleShape.TOP) {
|
if (shape == TripleShape.BOTTOM) {
|
||||||
super.randomTick(state, world, pos, random);
|
super.randomTick(state, world, pos, random);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (random.nextInt(16) == 0) {
|
else if (random.nextInt(16) == 0) {
|
||||||
boolean bottom = canSurviveBottom(world, pos);
|
boolean bottom = canSurviveBottom(world, pos);
|
||||||
if (shape == TripleShape.BOTTOM) {
|
if (shape == TripleShape.TOP) {
|
||||||
if (!bottom) {
|
if (!bottom) {
|
||||||
world.setBlockState(pos, Blocks.END_STONE.getDefaultState());
|
world.setBlockState(pos, Blocks.END_STONE.getDefaultState());
|
||||||
}
|
}
|
||||||
|
@ -82,10 +82,10 @@ public class TripleTerrainBlock extends EndTerrainBlock {
|
||||||
world.setBlockState(pos, Blocks.END_STONE.getDefaultState());
|
world.setBlockState(pos, Blocks.END_STONE.getDefaultState());
|
||||||
}
|
}
|
||||||
else if (top && !bottom) {
|
else if (top && !bottom) {
|
||||||
world.setBlockState(pos, state.with(SHAPE, TripleShape.TOP));
|
world.setBlockState(pos, state.with(SHAPE, TripleShape.BOTTOM));
|
||||||
}
|
}
|
||||||
else if (!top && bottom) {
|
else if (!top && bottom) {
|
||||||
world.setBlockState(pos, state.with(SHAPE, TripleShape.BOTTOM));
|
world.setBlockState(pos, state.with(SHAPE, TripleShape.TOP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"defaultMaterial": "betterend:waving"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue