rename main back to master, minor cleanup

This commit is contained in:
mworzala 2023-09-18 17:20:53 -04:00 committed by Matt Worzala
parent 351d2197b1
commit 5d00aa5f28
4 changed files with 3 additions and 16 deletions

View File

@ -2,7 +2,7 @@ name: Build and test Minestom
on:
pull_request:
branches: [ main ]
branches: [ master ]
jobs:
build:

View File

@ -2,7 +2,7 @@ name: Gradle Publish to Maven Central
on:
push:
branches: [ main ]
branches: [ master ]
jobs:
build:

View File

@ -1,7 +1,7 @@
name: Trigger Jitpack Build
on:
push:
branches: [ main ]
branches: [ master ]
workflow_dispatch:
jobs:

View File

@ -121,14 +121,10 @@ public class PlayerInit {
var itemStack = event.getItemStack();
var block = event.getInstance().getBlock(event.getPosition());
event.getPlayer().sendMessage("MESSAGE " + ThreadLocalRandom.current().nextDouble());
if ("false".equals(block.getProperty("waterlogged")) && itemStack.material().equals(Material.WATER_BUCKET)) {
block = block.withProperty("waterlogged", "true");
System.out.println("SET WATERLOGGER");
} else if ("true".equals(block.getProperty("waterlogged")) && itemStack.material().equals(Material.BUCKET)) {
block = block.withProperty("waterlogged", "false");
System.out.println("SET NOT WATERLOGGED");
} else return;
event.getInstance().setBlock(event.getPosition(), block);
@ -145,15 +141,6 @@ public class PlayerInit {
instanceContainer.setGenerator(unit -> unit.modifier().fillHeight(0, 40, Block.STONE));
instanceContainer.setChunkSupplier(LightingChunk::new);
// System.out.println("start");
// var chunks = new ArrayList<CompletableFuture<Chunk>>();
// ChunkUtils.forChunksInRange(0, 0, 32, (x, z) -> chunks.add(instanceContainer.loadChunk(x, z)));
// CompletableFuture.runAsync(() -> {
// CompletableFuture.allOf(chunks.toArray(CompletableFuture[]::new)).join();
// System.out.println("load end");
// });
inventory = new Inventory(InventoryType.CHEST_1_ROW, Component.text("Test inventory"));
inventory.setItemStack(3, ItemStack.of(Material.DIAMOND, 34));
}