diff --git a/build.gradle b/build.gradle index dd77db3b..cccee9e2 100644 --- a/build.gradle +++ b/build.gradle @@ -90,25 +90,25 @@ dependencies { modApi include('xyz.nucleoid:more-codecs:0.3.2+1.20') modApi include('xyz.nucleoid:stimuli:0.4.7+1.20.1') modApi include('xyz.nucleoid:map-templates:0.1.8+1.20') - modApi include('xyz.nucleoid:substrate:0.2.1+1.19.4') - modApi 'eu.pb4:polymer-core:0.5.6+1.20.1' - modApi 'eu.pb4:polymer-resource-pack:0.5.6+1.20.1' - modApi 'eu.pb4:polymer-blocks:0.5.6+1.20.1' - modApi 'eu.pb4:polymer-virtual-entity:0.5.6+1.20.1' + modApi include('xyz.nucleoid:substrate:0.2.2+1.20.1') + modApi 'eu.pb4:polymer-core:0.5.15+1.20.1' + modApi 'eu.pb4:polymer-resource-pack:0.5.15+1.20.1' + modApi 'eu.pb4:polymer-blocks:0.5.15+1.20.1' + modApi 'eu.pb4:polymer-virtual-entity:0.5.15+1.20.1' modApi include('eu.pb4:hologram-api:0.2.4+1.20') modApi include('eu.pb4:sgui:1.2.2+1.20') modApi include('eu.pb4:sidebar-api:0.1.2+1.19.3') - modApi include("eu.pb4:placeholder-api:2.1.2+1.20.1") + modApi include("eu.pb4:placeholder-api:2.1.3+1.20.1") modApi include("eu.pb4:map-canvas-api:0.2.2+1.19.4") modApi include("eu.pb4:player-data-api:0.2.2+1.19.3") - modApi include("eu.pb4:predicate-api:0.1.2+1.20") + modApi include("eu.pb4:predicate-api:0.2.1+1.20.1") modCompileOnly('xyz.nucleoid:disguiselib-fabric:1.3.2') modCompileOnly('maven.modrinth:afkdisplay:1.1.0') modCompileOnly('eu.pb4:polymer-autohost:0.5.6+1.20.1') modCompileOnly("dev.emi:trinkets:3.7.1") - include(implementation(annotationProcessor("com.llamalad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}"))) + implementation(annotationProcessor("com.github.LlamaLad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}")) testmodImplementation sourceSets.main.output } @@ -147,6 +147,10 @@ if (System.getenv("MODRINTH")) { changelog = System.getenv("CHANGELOG") dependencies { required.project 'polymer' + required.project 'fabric-api' + optional.project 'afkdisplay' + optional.project 'disguiselib' + embedded.project 'placeholder-api' } loaders = ["fabric", "quilt"] } diff --git a/gradle.properties b/gradle.properties index 2a24ab3d..87240eba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,4 +14,4 @@ mod_version=0.5 maven_group=xyz.nucleoid archives_base_name=plasmid -mixin_extras_version=0.2.0-beta.9 +mixin_extras_version=0.2.0-rc.2 diff --git a/src/main/java/xyz/nucleoid/plasmid/util/WoodType.java b/src/main/java/xyz/nucleoid/plasmid/util/WoodType.java index c4593ba8..e5fb0ba9 100644 --- a/src/main/java/xyz/nucleoid/plasmid/util/WoodType.java +++ b/src/main/java/xyz/nucleoid/plasmid/util/WoodType.java @@ -7,21 +7,33 @@ import net.minecraft.item.Items; public enum WoodType { - OAK(Blocks.OAK_SAPLING, Blocks.OAK_LEAVES, Blocks.OAK_LOG, Blocks.OAK_PLANKS, Blocks.OAK_SLAB, Blocks.OAK_STAIRS, Blocks.OAK_FENCE, Blocks.OAK_FENCE_GATE, Blocks.OAK_DOOR, Blocks.OAK_SIGN, Blocks.OAK_BUTTON, Blocks.OAK_PRESSURE_PLATE, Items.OAK_BOAT), - SPRUCE(Blocks.SPRUCE_SAPLING, Blocks.SPRUCE_LEAVES, Blocks.SPRUCE_LOG, Blocks.SPRUCE_PLANKS, Blocks.SPRUCE_SLAB, Blocks.SPRUCE_STAIRS, Blocks.SPRUCE_FENCE, Blocks.SPRUCE_FENCE_GATE, Blocks.SPRUCE_DOOR, Blocks.SPRUCE_SIGN, Blocks.SPRUCE_BUTTON, Blocks.SPRUCE_PRESSURE_PLATE, Items.SPRUCE_BOAT), - BIRCH(Blocks.BIRCH_SAPLING, Blocks.BIRCH_LEAVES, Blocks.BIRCH_LOG, Blocks.BIRCH_PLANKS, Blocks.BIRCH_SLAB, Blocks.BIRCH_STAIRS, Blocks.BIRCH_FENCE, Blocks.BIRCH_FENCE_GATE, Blocks.BIRCH_DOOR, Blocks.BIRCH_SIGN, Blocks.BIRCH_BUTTON, Blocks.BIRCH_PRESSURE_PLATE, Items.BIRCH_BOAT), - JUNGLE(Blocks.JUNGLE_SAPLING, Blocks.JUNGLE_LEAVES, Blocks.JUNGLE_LOG, Blocks.JUNGLE_PLANKS, Blocks.JUNGLE_SLAB, Blocks.JUNGLE_STAIRS, Blocks.JUNGLE_FENCE, Blocks.JUNGLE_FENCE_GATE, Blocks.JUNGLE_DOOR, Blocks.JUNGLE_SIGN, Blocks.JUNGLE_BUTTON, Blocks.JUNGLE_PRESSURE_PLATE, Items.JUNGLE_BOAT), - ACACIA(Blocks.ACACIA_SAPLING, Blocks.ACACIA_LEAVES, Blocks.ACACIA_LOG, Blocks.ACACIA_PLANKS, Blocks.ACACIA_SLAB, Blocks.ACACIA_STAIRS, Blocks.ACACIA_FENCE, Blocks.ACACIA_FENCE_GATE, Blocks.ACACIA_DOOR, Blocks.ACACIA_SIGN, Blocks.ACACIA_BUTTON, Blocks.ACACIA_PRESSURE_PLATE, Items.ACACIA_BOAT), - DARK_OAK(Blocks.DARK_OAK_SAPLING, Blocks.DARK_OAK_LEAVES, Blocks.DARK_OAK_LOG, Blocks.DARK_OAK_PLANKS, Blocks.DARK_OAK_SLAB, Blocks.DARK_OAK_STAIRS, Blocks.DARK_OAK_FENCE, Blocks.DARK_OAK_FENCE_GATE, Blocks.DARK_OAK_DOOR, Blocks.DARK_OAK_SIGN, Blocks.DARK_OAK_BUTTON, Blocks.DARK_OAK_PRESSURE_PLATE, Items.DARK_OAK_BOAT), - MANGROVE(Blocks.MANGROVE_PROPAGULE, Blocks.MANGROVE_LEAVES, Blocks.MANGROVE_LOG, Blocks.MANGROVE_PLANKS, Blocks.MANGROVE_SLAB, Blocks.MANGROVE_STAIRS, Blocks.MANGROVE_FENCE, Blocks.MANGROVE_FENCE_GATE, Blocks.MANGROVE_DOOR, Blocks.MANGROVE_SIGN, Blocks.MANGROVE_BUTTON, Blocks.MANGROVE_PRESSURE_PLATE, Items.MANGROVE_BOAT); - - private final Block sapling, leaves, log, planks, slab, stairs, fence, fenceGate, door, sign, button, pressurePlate; - private final Item boat; - - WoodType(Block sapling, Block leaves, Block log, Block planks, Block slab, Block stairs, Block fence, Block fenceGate, Block door, Block sign, Block button, Block pressurePlate, Item boat) { - this.sapling = sapling; + OAK(Type.REGULAR, Blocks.OAK_SAPLING, Blocks.OAK_LEAVES, Blocks.OAK_LOG, Blocks.OAK_WOOD, Blocks.STRIPPED_OAK_LOG, Blocks.STRIPPED_OAK_WOOD, Blocks.OAK_PLANKS, Blocks.OAK_SLAB, Blocks.OAK_STAIRS, Blocks.OAK_FENCE, Blocks.OAK_FENCE_GATE, Blocks.OAK_DOOR, Blocks.OAK_SIGN, Blocks.OAK_WALL_SIGN, Blocks.OAK_HANGING_SIGN, Blocks.OAK_WALL_HANGING_SIGN, Blocks.OAK_BUTTON, Blocks.OAK_PRESSURE_PLATE, Items.OAK_BOAT, Items.OAK_CHEST_BOAT), + SPRUCE(Type.REGULAR, Blocks.SPRUCE_SAPLING, Blocks.SPRUCE_LEAVES, Blocks.SPRUCE_LOG, Blocks.SPRUCE_WOOD, Blocks.STRIPPED_SPRUCE_LOG, Blocks.STRIPPED_SPRUCE_WOOD, Blocks.SPRUCE_PLANKS, Blocks.SPRUCE_SLAB, Blocks.SPRUCE_STAIRS, Blocks.SPRUCE_FENCE, Blocks.SPRUCE_FENCE_GATE, Blocks.SPRUCE_DOOR, Blocks.SPRUCE_SIGN, Blocks.SPRUCE_WALL_SIGN, Blocks.SPRUCE_HANGING_SIGN, Blocks.SPRUCE_WALL_HANGING_SIGN, Blocks.SPRUCE_BUTTON, Blocks.SPRUCE_PRESSURE_PLATE, Items.SPRUCE_BOAT, Items.SPRUCE_CHEST_BOAT), + BIRCH(Type.REGULAR, Blocks.BIRCH_SAPLING, Blocks.BIRCH_LEAVES, Blocks.BIRCH_LOG, Blocks.BIRCH_WOOD, Blocks.STRIPPED_BIRCH_LOG, Blocks.STRIPPED_BIRCH_WOOD, Blocks.BIRCH_PLANKS, Blocks.BIRCH_SLAB, Blocks.BIRCH_STAIRS, Blocks.BIRCH_FENCE, Blocks.BIRCH_FENCE_GATE, Blocks.BIRCH_DOOR, Blocks.BIRCH_SIGN, Blocks.BIRCH_WALL_SIGN, Blocks.BIRCH_HANGING_SIGN, Blocks.BIRCH_WALL_HANGING_SIGN, Blocks.BIRCH_BUTTON, Blocks.BIRCH_PRESSURE_PLATE, Items.BIRCH_BOAT, Items.BIRCH_CHEST_BOAT), + JUNGLE(Type.REGULAR, Blocks.JUNGLE_SAPLING, Blocks.JUNGLE_LEAVES, Blocks.JUNGLE_LOG, Blocks.JUNGLE_WOOD, Blocks.STRIPPED_JUNGLE_LOG, Blocks.STRIPPED_JUNGLE_WOOD, Blocks.JUNGLE_PLANKS, Blocks.JUNGLE_SLAB, Blocks.JUNGLE_STAIRS, Blocks.JUNGLE_FENCE, Blocks.JUNGLE_FENCE_GATE, Blocks.JUNGLE_DOOR, Blocks.JUNGLE_SIGN, Blocks.JUNGLE_WALL_SIGN, Blocks.JUNGLE_HANGING_SIGN, Blocks.JUNGLE_WALL_HANGING_SIGN, Blocks.JUNGLE_BUTTON, Blocks.JUNGLE_PRESSURE_PLATE, Items.JUNGLE_BOAT, Items.JUNGLE_CHEST_BOAT), + ACACIA(Type.REGULAR, Blocks.ACACIA_SAPLING, Blocks.ACACIA_LEAVES, Blocks.ACACIA_LOG, Blocks.ACACIA_WOOD, Blocks.STRIPPED_ACACIA_LOG, Blocks.STRIPPED_ACACIA_WOOD, Blocks.ACACIA_PLANKS, Blocks.ACACIA_SLAB, Blocks.ACACIA_STAIRS, Blocks.ACACIA_FENCE, Blocks.ACACIA_FENCE_GATE, Blocks.ACACIA_DOOR, Blocks.ACACIA_SIGN, Blocks.ACACIA_WALL_SIGN, Blocks.ACACIA_HANGING_SIGN, Blocks.ACACIA_WALL_HANGING_SIGN, Blocks.ACACIA_BUTTON, Blocks.ACACIA_PRESSURE_PLATE, Items.ACACIA_BOAT, Items.ACACIA_CHEST_BOAT), + DARK_OAK(Type.REGULAR, Blocks.DARK_OAK_SAPLING, Blocks.DARK_OAK_LEAVES, Blocks.DARK_OAK_LOG, Blocks.DARK_OAK_WOOD, Blocks.STRIPPED_DARK_OAK_LOG, Blocks.STRIPPED_DARK_OAK_WOOD, Blocks.DARK_OAK_PLANKS, Blocks.DARK_OAK_SLAB, Blocks.DARK_OAK_STAIRS, Blocks.DARK_OAK_FENCE, Blocks.DARK_OAK_FENCE_GATE, Blocks.DARK_OAK_DOOR, Blocks.DARK_OAK_SIGN, Blocks.DARK_OAK_WALL_SIGN, Blocks.DARK_OAK_HANGING_SIGN, Blocks.DARK_OAK_WALL_HANGING_SIGN, Blocks.DARK_OAK_BUTTON, Blocks.DARK_OAK_PRESSURE_PLATE, Items.DARK_OAK_BOAT, Items.DARK_OAK_CHEST_BOAT), + CHERRY(Type.REGULAR, Blocks.CHERRY_SAPLING, Blocks.CHERRY_LEAVES, Blocks.CHERRY_LOG, Blocks.CHERRY_WOOD, Blocks.STRIPPED_CHERRY_LOG, Blocks.STRIPPED_CHERRY_WOOD, Blocks.CHERRY_PLANKS, Blocks.CHERRY_SLAB, Blocks.CHERRY_STAIRS, Blocks.CHERRY_FENCE, Blocks.CHERRY_FENCE_GATE, Blocks.CHERRY_DOOR, Blocks.CHERRY_SIGN, Blocks.CHERRY_WALL_SIGN, Blocks.CHERRY_HANGING_SIGN, Blocks.CHERRY_WALL_HANGING_SIGN, Blocks.CHERRY_BUTTON, Blocks.CHERRY_PRESSURE_PLATE, Items.CHERRY_BOAT, Items.CHERRY_CHEST_BOAT), + MANGROVE(Type.REGULAR, Blocks.MANGROVE_PROPAGULE, Blocks.MANGROVE_LEAVES, Blocks.MANGROVE_LOG, Blocks.MANGROVE_WOOD, Blocks.STRIPPED_MANGROVE_LOG, Blocks.STRIPPED_MANGROVE_WOOD, Blocks.MANGROVE_PLANKS, Blocks.MANGROVE_SLAB, Blocks.MANGROVE_STAIRS, Blocks.MANGROVE_FENCE, Blocks.MANGROVE_FENCE_GATE, Blocks.MANGROVE_DOOR, Blocks.MANGROVE_SIGN, Blocks.MANGROVE_WALL_SIGN, Blocks.MANGROVE_HANGING_SIGN, Blocks.MANGROVE_WALL_HANGING_SIGN, Blocks.MANGROVE_BUTTON, Blocks.MANGROVE_PRESSURE_PLATE, Items.MANGROVE_BOAT, Items.MANGROVE_CHEST_BOAT), + // Put here non-full wood-like types (aka with fallback blocks/items/etc.) + CRIMSON(Type.NETHER, Blocks.CRIMSON_FUNGUS, Blocks.NETHER_WART_BLOCK, Blocks.CRIMSON_STEM, Blocks.CRIMSON_HYPHAE, Blocks.STRIPPED_CRIMSON_STEM, Blocks.STRIPPED_CRIMSON_HYPHAE, Blocks.CRIMSON_PLANKS, Blocks.CRIMSON_SLAB, Blocks.CRIMSON_STAIRS, Blocks.CRIMSON_FENCE, Blocks.CRIMSON_FENCE_GATE, Blocks.CRIMSON_DOOR, Blocks.CRIMSON_SIGN, Blocks.CRIMSON_WALL_SIGN, Blocks.CRIMSON_HANGING_SIGN, Blocks.CRIMSON_WALL_HANGING_SIGN, Blocks.CRIMSON_BUTTON, Blocks.CRIMSON_PRESSURE_PLATE, Items.MANGROVE_BOAT, Items.MANGROVE_CHEST_BOAT), + WARPED(Type.NETHER, Blocks.WARPED_FUNGUS, Blocks.WARPED_WART_BLOCK, Blocks.WARPED_STEM, Blocks.WARPED_HYPHAE, Blocks.STRIPPED_WARPED_STEM, Blocks.STRIPPED_WARPED_HYPHAE, Blocks.WARPED_PLANKS, Blocks.WARPED_SLAB, Blocks.WARPED_STAIRS, Blocks.WARPED_FENCE, Blocks.WARPED_FENCE_GATE, Blocks.WARPED_DOOR, Blocks.WARPED_SIGN, Blocks.WARPED_WALL_SIGN, Blocks.WARPED_HANGING_SIGN, Blocks.WARPED_WALL_HANGING_SIGN, Blocks.WARPED_BUTTON, Blocks.WARPED_PRESSURE_PLATE, Items.BIRCH_BOAT, Items.BIRCH_CHEST_BOAT), + + BAMBOO(Type.BAMBOO, Blocks.BAMBOO, Blocks.JUNGLE_LEAVES, Blocks.BAMBOO_BLOCK, Blocks.BAMBOO_PLANKS, Blocks.STRIPPED_BAMBOO_BLOCK, Blocks.BAMBOO_PLANKS, Blocks.BAMBOO_PLANKS, Blocks.BAMBOO_SLAB, Blocks.BAMBOO_STAIRS, Blocks.BAMBOO_FENCE, Blocks.BAMBOO_FENCE_GATE, Blocks.BAMBOO_DOOR, Blocks.BAMBOO_SIGN, Blocks.BAMBOO_WALL_SIGN, Blocks.BAMBOO_HANGING_SIGN, Blocks.BAMBOO_WALL_HANGING_SIGN, Blocks.BAMBOO_BUTTON, Blocks.BAMBOO_PRESSURE_PLATE, Items.BAMBOO_RAFT, Items.BAMBOO_CHEST_RAFT); + + private final Block plant, leaves, log, wood, strippedLog, strippedWood, planks, slab, stairs, fence, fenceGate, door, sign, wallSign, hangingSign, wallHangingSign, button, pressurePlate; + private final Item boat, chestBoat; + private final Type type; + + WoodType(Type type, Block plant, Block leaves, Block log, Block wood, Block strippedLog, Block strippedWood, Block planks, Block slab, Block stairs, + Block fence, Block fenceGate, Block door, Block sign, Block wallSign, Block hangingSign, Block hangingWallSign, Block button, Block pressurePlate, Item boat, Item chestBoat) { + this.type = type; + this.plant = plant; this.leaves = leaves; this.log = log; + this.wood = wood; + this.strippedLog = strippedLog; + this.strippedWood = strippedWood; this.planks = planks; this.slab = slab; this.stairs = stairs; @@ -29,9 +41,13 @@ public enum WoodType { this.fenceGate = fenceGate; this.door = door; this.sign = sign; + this.wallSign = wallSign; + this.hangingSign = hangingSign; + this.wallHangingSign = hangingWallSign; this.button = button; this.pressurePlate = pressurePlate; this.boat = boat; + this.chestBoat = chestBoat; } public static WoodType getType(Block block) { @@ -53,7 +69,7 @@ public static WoodType getType(Item item) { } public boolean contains(Block block) { - return block == this.sapling || block == this.leaves || block == this.log || block == this.planks || block == this.slab || block == this.stairs || block == this.fence || block == this.fenceGate || block == this.door || block == this.sign || block == this.button || block == this.pressurePlate; + return block == this.plant || (this.type.hasLeavesLike() && block == this.leaves) || block == this.log || block == this.strippedLog || (this.type.hasWood && (block == this.wood || block == this.strippedWood)) || block == this.planks || block == this.slab || block == this.stairs || block == this.fence || block == this.fenceGate || block == this.door || block == this.sign || block == this.button || block == this.pressurePlate; } public boolean contains(Item item) { @@ -61,12 +77,21 @@ public boolean contains(Item item) { return this.contains(blockItem.getBlock()); } else { - return item == this.boat; + return this.type.hasBoats() && (item == this.boat || item == this.chestBoat); } } + public Type type() { + return this.type; + } + + @Deprecated public Block getSapling() { - return this.sapling; + return this.plant; + } + + public Block getPlant() { + return this.plant; } public Block getLeaves() { @@ -104,6 +129,16 @@ public Block getDoor() { public Block getSign() { return this.sign; } + public Block getWallSign() { + return this.wallSign; + } + + public Block getHangingSign() { + return this.hangingSign; + } + public Block getWallHangingSign() { + return this.wallHangingSign; + } public Block getButton() { return this.button; @@ -116,4 +151,35 @@ public Block getPressurePlate() { public Item getBoat() { return this.boat; } + + public enum Type { + REGULAR(true, true, true, true), + NETHER(false, true, true, false), + BAMBOO(true, false, false, false); + + final boolean hasBoats, hasWood, hasLeavesLike, hasLeaves; + + Type(boolean hasBoats, boolean hasWood, boolean hasLeaveLike, boolean hasLeaves) { + this.hasBoats = hasBoats; + this.hasWood = hasWood; + this.hasLeavesLike = hasLeaveLike; + this.hasLeaves = hasLeaves; + } + + public boolean hasBoats() { + return this.hasBoats; + } + + public boolean hasWood() { + return this.hasWood; + } + + public boolean hasLeavesLike() { + return this.hasLeavesLike; + } + + public boolean hasLeaves() { + return this.hasLeaves; + } + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 9cf4476b..c5368045 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -20,6 +20,7 @@ "depends": { "fabricloader": ">=0.14", "fabric": "*", + "polymer-core": "*", "minecraft": ">=1.20", "java": ">=17" } diff --git a/src/testmod/java/xyz/nucleoid/plasmid/test/TestGame.java b/src/testmod/java/xyz/nucleoid/plasmid/test/TestGame.java index 61d3cbfe..92e4b69d 100644 --- a/src/testmod/java/xyz/nucleoid/plasmid/test/TestGame.java +++ b/src/testmod/java/xyz/nucleoid/plasmid/test/TestGame.java @@ -1,7 +1,8 @@ package xyz.nucleoid.plasmid.test; +import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; +import net.minecraft.block.LeavesBlock; import net.minecraft.item.Item; import net.minecraft.item.Items; import net.minecraft.scoreboard.AbstractTeam; @@ -11,6 +12,7 @@ import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.GameMode; import net.minecraft.world.GameRules; @@ -29,9 +31,16 @@ import xyz.nucleoid.plasmid.game.stats.GameStatisticBundle; import xyz.nucleoid.plasmid.game.stats.StatisticKey; import xyz.nucleoid.plasmid.game.world.generator.TemplateChunkGenerator; +import xyz.nucleoid.plasmid.util.WoodType; import xyz.nucleoid.stimuli.event.player.PlayerDeathEvent; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.List; + public final class TestGame { + private static final List WOOD_TYPE_BLOCK_FIELDS = Arrays.stream(WoodType.class.getMethods()).filter(x -> x.getReturnType() == Block.class).toList(); private static final StatisticKey TEST_KEY = StatisticKey.doubleKey(new Identifier(Plasmid.ID, "test")); private static final GameTeam TEAM = new GameTeam( @@ -137,6 +146,25 @@ private static MapTemplate generateMapTemplate(BlockState state) { template.setBlockState(pos, state); } + try { + var mut = new BlockPos.Mutable(); + mut.setZ(16); + int y = 66 + WoodType.values().length; + for (var type : WoodType.values()) { + int x = 0; + mut.setY(y); + for (var field : WOOD_TYPE_BLOCK_FIELDS) { + state = ((Block) field.invoke(type)).getDefaultState().withIfExists(LeavesBlock.PERSISTENT, true); + template.setBlockState(mut.setX(x), state); + x++; + } + y--; + } + } catch (Throwable e) { + e.printStackTrace(); + } + + return template; } }