mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-15 16:28:14 +02:00
player init
This commit is contained in:
parent
62663ccb64
commit
cb013f8291
@ -49,11 +49,11 @@ public class PlayerInit {
|
||||
instanceContainer.setChunkGenerator(noiseTestGenerator);
|
||||
|
||||
// Load some chunks beforehand
|
||||
final int loopStart = -10;
|
||||
final int loopEnd = 10;
|
||||
final int loopStart = -32;
|
||||
final int loopEnd = 32;
|
||||
for (int x = loopStart; x < loopEnd; x++)
|
||||
for (int z = loopStart; z < loopEnd; z++) {
|
||||
//instanceContainer.loadChunk(x, z);
|
||||
instanceContainer.loadChunk(x, z);
|
||||
}
|
||||
|
||||
inventory = new Inventory(InventoryType.CHEST_1_ROW, "Test inventory");
|
||||
@ -174,7 +174,7 @@ public class PlayerInit {
|
||||
event.setSpawningInstance(instanceContainer);
|
||||
int x = Math.abs(ThreadLocalRandom.current().nextInt()) % 1000 + 500;
|
||||
int z = Math.abs(ThreadLocalRandom.current().nextInt()) % 1000 + 500;
|
||||
player.setRespawnPoint(new Position(0, 70f, 0));
|
||||
player.setRespawnPoint(new Position(x, 70f, z));
|
||||
|
||||
/*player.getInventory().addInventoryCondition((p, slot, clickType, inventoryConditionResult) -> {
|
||||
if (slot == -999)
|
||||
|
Loading…
Reference in New Issue
Block a user