changed Player spawn position

This commit is contained in:
Lars Neuhaus 2024-10-24 23:10:09 +02:00
parent e397d69d7a
commit 720d3c8d65

View File

@ -25,8 +25,7 @@ public class Playfield {
} }
public Pos getPlayerSpawnPosition() { public Pos getPlayerSpawnPosition() {
// return this.lowerLeftCorner.add(6, 9+((double) 3/16), 20).withView(180, 0); return this.lowerLeftCorner.add(6, 9, 20).withView(180, 0);
return this.lowerLeftCorner.add(6, 12, 25).withView(180, 0);
} }
public Pos getTetrominoSpawnPosition() { public Pos getTetrominoSpawnPosition() {
@ -64,10 +63,6 @@ public class Playfield {
// hold position: // hold position:
for(int x = 0; x < 4; x++) { for(int x = 0; x < 4; x++) {
for(int y = 0; y < 4; y++) { for(int y = 0; y < 4; y++) {
// if(x==0 || x==5 || y==0 || y==5) {
// batch.setBlock(this.getHoldPosition().add(x-2, y-2, 0), Block.BLACK_CONCRETE);
// batch.setBlock(this.getHoldPosition().add(x-2, y-2, -1), Block.BLACK_CONCRETE);
// }
batch.setBlock(this.getHoldPosition().add(x-1, y-1, -1), Block.QUARTZ_BLOCK); batch.setBlock(this.getHoldPosition().add(x-1, y-1, -1), Block.QUARTZ_BLOCK);
} }
} }
@ -75,10 +70,6 @@ public class Playfield {
// next positions: // next positions:
for(int x = 0; x < 4; x++) { for(int x = 0; x < 4; x++) {
for(int y = -4*this.nextTetrominoesCount+4; y < 4; y++) { for(int y = -4*this.nextTetrominoesCount+4; y < 4; y++) {
// if(x==0 || x==5 || y==-4*this.nextTetrominoesCount+4 || y==5) {
// batch.setBlock(this.getNextPosition().add(x-2, y-2, 0), Block.BLACK_CONCRETE);
// batch.setBlock(this.getNextPosition().add(x-2, y-2, -1), Block.BLACK_CONCRETE);
// }
batch.setBlock(this.getNextPosition().add(x-1, y-1, -1), Block.QUARTZ_BLOCK); batch.setBlock(this.getNextPosition().add(x-1, y-1, -1), Block.QUARTZ_BLOCK);
} }
} }
@ -88,9 +79,6 @@ public class Playfield {
batch.setBlock(getPlayerSpawnPosition().sub(1, 1, 1), Block.STONE); batch.setBlock(getPlayerSpawnPosition().sub(1, 1, 1), Block.STONE);
batch.setBlock(getPlayerSpawnPosition().sub(0, 1, 1), Block.STONE); batch.setBlock(getPlayerSpawnPosition().sub(0, 1, 1), Block.STONE);
// batch.setBlock(getPlayerSpawnPosition(), Block.IRON_TRAPDOOR.withProperty("half", "bottom"));
// batch.setBlock(getPlayerSpawnPosition().add(0, 1, 0), Block.IRON_TRAPDOOR.withProperty("half", "top"));
BatchUtil.loadAndApplyBatch(batch, this.instance, () -> {}); BatchUtil.loadAndApplyBatch(batch, this.instance, () -> {});
} }