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