player init

This commit is contained in:
Eoghanmc22 2020-11-20 15:19:20 -05:00
parent 62663ccb64
commit cb013f8291

View File

@ -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)