mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-03 23:17:48 +01:00
Add methods for BlockAlternative and reran generators
This commit is contained in:
parent
9bc4915d6c
commit
69654d05de
@ -155,7 +155,7 @@ public enum Block {
|
||||
TORCH("minecraft:torch", (short) 1435, 0.0, 0.0, false, false, null, true),
|
||||
WALL_TORCH("minecraft:wall_torch", (short) 1436, 0.0, 0.0, false, false, null, false),
|
||||
FIRE("minecraft:fire", (short) 1471, 0.0, 0.0, false, false, null, false),
|
||||
SOUL_FIRE("minecraft:soul_fire", (short) 1952, 0.0, 0.0, false, true, null, true),
|
||||
SOUL_FIRE("minecraft:soul_fire", (short) 1952, 0.0, 0.0, false, false, null, true),
|
||||
SPAWNER("minecraft:spawner", (short) 1953, 5.0, 5.0, false, true, NamespaceID.from("minecraft:mob_spawner"), true),
|
||||
OAK_STAIRS("minecraft:oak_stairs", (short) 1965, 0.0, 0.0, false, true, null, false),
|
||||
CHEST("minecraft:chest", (short) 2035, 2.5, 2.5, false, true, NamespaceID.from("minecraft:chest"), false),
|
||||
@ -209,8 +209,8 @@ public enum Block {
|
||||
SOUL_SOIL("minecraft:soul_soil", (short) 4001, 0.5, 0.5, false, true, null, true),
|
||||
BASALT("minecraft:basalt", (short) 4003, 1.25, 4.2, false, true, null, false),
|
||||
POLISHED_BASALT("minecraft:polished_basalt", (short) 4006, 1.25, 4.2, false, true, null, false),
|
||||
SOUL_TORCH("minecraft:soul_torch", (short) 4008, 0.0, 0.0, false, true, null, true),
|
||||
SOUL_WALL_TORCH("minecraft:soul_wall_torch", (short) 4009, 0.0, 0.0, false, true, null, false),
|
||||
SOUL_TORCH("minecraft:soul_torch", (short) 4008, 0.0, 0.0, false, false, null, true),
|
||||
SOUL_WALL_TORCH("minecraft:soul_wall_torch", (short) 4009, 0.0, 0.0, false, false, null, false),
|
||||
GLOWSTONE("minecraft:glowstone", (short) 4013, 0.3, 0.3, false, true, null, true),
|
||||
NETHER_PORTAL("minecraft:nether_portal", (short) 4014, 0.0, -1.0, false, false, null, false),
|
||||
CARVED_PUMPKIN("minecraft:carved_pumpkin", (short) 4016, 1.0, 1.0, false, true, null, false),
|
||||
@ -699,28 +699,28 @@ public enum Block {
|
||||
WARPED_HYPHAE("minecraft:warped_hyphae", (short) 14965, 2.0, 2.0, false, true, null, false),
|
||||
STRIPPED_WARPED_HYPHAE("minecraft:stripped_warped_hyphae", (short) 14968, 2.0, 2.0, false, true, null, false),
|
||||
WARPED_NYLIUM("minecraft:warped_nylium", (short) 14970, 0.4, 0.4, false, true, null, true),
|
||||
WARPED_FUNGUS("minecraft:warped_fungus", (short) 14971, 0.0, 0.0, false, true, null, true),
|
||||
WARPED_FUNGUS("minecraft:warped_fungus", (short) 14971, 0.0, 0.0, false, false, null, true),
|
||||
WARPED_WART_BLOCK("minecraft:warped_wart_block", (short) 14972, 1.0, 1.0, false, true, null, true),
|
||||
WARPED_ROOTS("minecraft:warped_roots", (short) 14973, 0.0, 0.0, false, true, null, true),
|
||||
NETHER_SPROUTS("minecraft:nether_sprouts", (short) 14974, 0.0, 0.0, false, true, null, true),
|
||||
WARPED_ROOTS("minecraft:warped_roots", (short) 14973, 0.0, 0.0, false, false, null, true),
|
||||
NETHER_SPROUTS("minecraft:nether_sprouts", (short) 14974, 0.0, 0.0, false, false, null, true),
|
||||
CRIMSON_STEM("minecraft:crimson_stem", (short) 14976, 2.0, 2.0, false, true, null, false),
|
||||
STRIPPED_CRIMSON_STEM("minecraft:stripped_crimson_stem", (short) 14979, 2.0, 2.0, false, true, null, false),
|
||||
CRIMSON_HYPHAE("minecraft:crimson_hyphae", (short) 14982, 2.0, 2.0, false, true, null, false),
|
||||
STRIPPED_CRIMSON_HYPHAE("minecraft:stripped_crimson_hyphae", (short) 14985, 2.0, 2.0, false, true, null, false),
|
||||
CRIMSON_NYLIUM("minecraft:crimson_nylium", (short) 14987, 0.4, 0.4, false, true, null, true),
|
||||
CRIMSON_FUNGUS("minecraft:crimson_fungus", (short) 14988, 0.0, 0.0, false, true, null, true),
|
||||
CRIMSON_FUNGUS("minecraft:crimson_fungus", (short) 14988, 0.0, 0.0, false, false, null, true),
|
||||
SHROOMLIGHT("minecraft:shroomlight", (short) 14989, 1.0, 1.0, false, true, null, true),
|
||||
WEEPING_VINES("minecraft:weeping_vines", (short) 14990, 0.0, 0.0, false, true, null, false),
|
||||
WEEPING_VINES_PLANT("minecraft:weeping_vines_plant", (short) 15016, 0.0, 0.0, false, true, null, true),
|
||||
TWISTING_VINES("minecraft:twisting_vines", (short) 15017, 0.0, 0.0, false, true, null, false),
|
||||
TWISTING_VINES_PLANT("minecraft:twisting_vines_plant", (short) 15043, 0.0, 0.0, false, true, null, true),
|
||||
CRIMSON_ROOTS("minecraft:crimson_roots", (short) 15044, 0.0, 0.0, false, true, null, true),
|
||||
WEEPING_VINES("minecraft:weeping_vines", (short) 14990, 0.0, 0.0, false, false, null, false),
|
||||
WEEPING_VINES_PLANT("minecraft:weeping_vines_plant", (short) 15016, 0.0, 0.0, false, false, null, true),
|
||||
TWISTING_VINES("minecraft:twisting_vines", (short) 15017, 0.0, 0.0, false, false, null, false),
|
||||
TWISTING_VINES_PLANT("minecraft:twisting_vines_plant", (short) 15043, 0.0, 0.0, false, false, null, true),
|
||||
CRIMSON_ROOTS("minecraft:crimson_roots", (short) 15044, 0.0, 0.0, false, false, null, true),
|
||||
CRIMSON_PLANKS("minecraft:crimson_planks", (short) 15045, 2.0, 3.0, false, true, null, true),
|
||||
WARPED_PLANKS("minecraft:warped_planks", (short) 15046, 2.0, 3.0, false, true, null, true),
|
||||
CRIMSON_SLAB("minecraft:crimson_slab", (short) 15050, 2.0, 3.0, false, true, null, false),
|
||||
WARPED_SLAB("minecraft:warped_slab", (short) 15056, 2.0, 3.0, false, true, null, false),
|
||||
CRIMSON_PRESSURE_PLATE("minecraft:crimson_pressure_plate", (short) 15060, 0.5, 0.5, false, true, null, false),
|
||||
WARPED_PRESSURE_PLATE("minecraft:warped_pressure_plate", (short) 15062, 0.5, 0.5, false, true, null, false),
|
||||
CRIMSON_PRESSURE_PLATE("minecraft:crimson_pressure_plate", (short) 15060, 0.5, 0.5, false, false, null, false),
|
||||
WARPED_PRESSURE_PLATE("minecraft:warped_pressure_plate", (short) 15062, 0.5, 0.5, false, false, null, false),
|
||||
CRIMSON_FENCE("minecraft:crimson_fence", (short) 15094, 2.0, 3.0, false, true, null, false),
|
||||
WARPED_FENCE("minecraft:warped_fence", (short) 15126, 2.0, 3.0, false, true, null, false),
|
||||
CRIMSON_TRAPDOOR("minecraft:crimson_trapdoor", (short) 15142, 3.0, 3.0, false, true, null, false),
|
||||
@ -729,14 +729,14 @@ public enum Block {
|
||||
WARPED_FENCE_GATE("minecraft:warped_fence_gate", (short) 15294, 2.0, 3.0, false, true, null, false),
|
||||
CRIMSON_STAIRS("minecraft:crimson_stairs", (short) 15330, 0.0, 0.0, false, true, null, false),
|
||||
WARPED_STAIRS("minecraft:warped_stairs", (short) 15410, 0.0, 0.0, false, true, null, false),
|
||||
CRIMSON_BUTTON("minecraft:crimson_button", (short) 15488, 0.5, 0.5, false, true, null, false),
|
||||
WARPED_BUTTON("minecraft:warped_button", (short) 15512, 0.5, 0.5, false, true, null, false),
|
||||
CRIMSON_BUTTON("minecraft:crimson_button", (short) 15488, 0.5, 0.5, false, false, null, false),
|
||||
WARPED_BUTTON("minecraft:warped_button", (short) 15512, 0.5, 0.5, false, false, null, false),
|
||||
CRIMSON_DOOR("minecraft:crimson_door", (short) 15538, 3.0, 3.0, false, true, null, false),
|
||||
WARPED_DOOR("minecraft:warped_door", (short) 15602, 3.0, 3.0, false, true, null, false),
|
||||
CRIMSON_SIGN("minecraft:crimson_sign", (short) 15656, 1.0, 1.0, false, true, NamespaceID.from("minecraft:sign"), false),
|
||||
WARPED_SIGN("minecraft:warped_sign", (short) 15688, 1.0, 1.0, false, true, NamespaceID.from("minecraft:sign"), false),
|
||||
CRIMSON_WALL_SIGN("minecraft:crimson_wall_sign", (short) 15720, 1.0, 1.0, false, true, NamespaceID.from("minecraft:sign"), false),
|
||||
WARPED_WALL_SIGN("minecraft:warped_wall_sign", (short) 15728, 1.0, 1.0, false, true, NamespaceID.from("minecraft:sign"), false),
|
||||
CRIMSON_SIGN("minecraft:crimson_sign", (short) 15656, 1.0, 1.0, false, false, NamespaceID.from("minecraft:sign"), false),
|
||||
WARPED_SIGN("minecraft:warped_sign", (short) 15688, 1.0, 1.0, false, false, NamespaceID.from("minecraft:sign"), false),
|
||||
CRIMSON_WALL_SIGN("minecraft:crimson_wall_sign", (short) 15720, 1.0, 1.0, false, false, NamespaceID.from("minecraft:sign"), false),
|
||||
WARPED_WALL_SIGN("minecraft:warped_wall_sign", (short) 15728, 1.0, 1.0, false, false, NamespaceID.from("minecraft:sign"), false),
|
||||
STRUCTURE_BLOCK("minecraft:structure_block", (short) 15735, 0.0, 3600000.0, false, true, NamespaceID.from("minecraft:structure_block"), false),
|
||||
JIGSAW("minecraft:jigsaw", (short) 15749, 0.0, 3600000.0, false, true, NamespaceID.from("minecraft:jigsaw"), false),
|
||||
COMPOSTER("minecraft:composter", (short) 15751, 0.6, 0.6, false, true, null, false),
|
||||
@ -768,8 +768,8 @@ public enum Block {
|
||||
GILDED_BLACKSTONE("minecraft:gilded_blackstone", (short) 16664, 0.0, 0.0, false, true, null, true),
|
||||
POLISHED_BLACKSTONE_STAIRS("minecraft:polished_blackstone_stairs", (short) 16676, 0.0, 0.0, false, true, null, false),
|
||||
POLISHED_BLACKSTONE_SLAB("minecraft:polished_blackstone_slab", (short) 16748, 0.0, 0.0, false, true, null, false),
|
||||
POLISHED_BLACKSTONE_PRESSURE_PLATE("minecraft:polished_blackstone_pressure_plate", (short) 16752, 0.5, 0.5, false, true, null, false),
|
||||
POLISHED_BLACKSTONE_BUTTON("minecraft:polished_blackstone_button", (short) 16762, 0.5, 0.5, false, true, null, false),
|
||||
POLISHED_BLACKSTONE_PRESSURE_PLATE("minecraft:polished_blackstone_pressure_plate", (short) 16752, 0.5, 0.5, false, false, null, false),
|
||||
POLISHED_BLACKSTONE_BUTTON("minecraft:polished_blackstone_button", (short) 16762, 0.5, 0.5, false, false, null, false),
|
||||
POLISHED_BLACKSTONE_WALL("minecraft:polished_blackstone_wall", (short) 16780, 0.0, 0.0, false, true, null, false),
|
||||
CHISELED_NETHER_BRICKS("minecraft:chiseled_nether_bricks", (short) 17101, 2.0, 6.0, false, true, null, true),
|
||||
CRACKED_NETHER_BRICKS("minecraft:cracked_nether_bricks", (short) 17102, 2.0, 6.0, false, true, null, true),
|
||||
@ -1317,6 +1317,19 @@ public enum Block {
|
||||
BlockMap.blocksMap.put(alternative.getId(), this);
|
||||
}
|
||||
|
||||
public BlockAlternative getAlternative(short blockId) {
|
||||
for (BlockAlternative alt : alternatives) {
|
||||
if (alt.getId() == blockId) {
|
||||
return alt;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<BlockAlternative> getAlternatives() {
|
||||
return alternatives;
|
||||
}
|
||||
|
||||
public short withProperties(String... properties) {
|
||||
for (BlockAlternative alt : alternatives) {
|
||||
if (Arrays.equals(alt.getProperties(), properties)) {
|
||||
|
@ -20,8 +20,8 @@ public enum Material {
|
||||
DIRT("minecraft:dirt", 64, Block.DIRT),
|
||||
COARSE_DIRT("minecraft:coarse_dirt", 64, Block.COARSE_DIRT),
|
||||
PODZOL("minecraft:podzol", 64, Block.PODZOL),
|
||||
CRIMSON_NYLIUM("minecraft:crimson_nylium", 64, null),
|
||||
WARPED_NYLIUM("minecraft:warped_nylium", 64, null),
|
||||
CRIMSON_NYLIUM("minecraft:crimson_nylium", 64, Block.CRIMSON_NYLIUM),
|
||||
WARPED_NYLIUM("minecraft:warped_nylium", 64, Block.WARPED_NYLIUM),
|
||||
COBBLESTONE("minecraft:cobblestone", 64, Block.COBBLESTONE),
|
||||
OAK_PLANKS("minecraft:oak_planks", 64, Block.OAK_PLANKS),
|
||||
SPRUCE_PLANKS("minecraft:spruce_planks", 64, Block.SPRUCE_PLANKS),
|
||||
@ -29,8 +29,8 @@ public enum Material {
|
||||
JUNGLE_PLANKS("minecraft:jungle_planks", 64, Block.JUNGLE_PLANKS),
|
||||
ACACIA_PLANKS("minecraft:acacia_planks", 64, Block.ACACIA_PLANKS),
|
||||
DARK_OAK_PLANKS("minecraft:dark_oak_planks", 64, Block.DARK_OAK_PLANKS),
|
||||
CRIMSON_PLANKS("minecraft:crimson_planks", 64, null),
|
||||
WARPED_PLANKS("minecraft:warped_planks", 64, null),
|
||||
CRIMSON_PLANKS("minecraft:crimson_planks", 64, Block.CRIMSON_PLANKS),
|
||||
WARPED_PLANKS("minecraft:warped_planks", 64, Block.WARPED_PLANKS),
|
||||
OAK_SAPLING("minecraft:oak_sapling", 64, Block.OAK_SAPLING),
|
||||
SPRUCE_SAPLING("minecraft:spruce_sapling", 64, Block.SPRUCE_SAPLING),
|
||||
BIRCH_SAPLING("minecraft:birch_sapling", 64, Block.BIRCH_SAPLING),
|
||||
@ -44,39 +44,39 @@ public enum Material {
|
||||
GOLD_ORE("minecraft:gold_ore", 64, Block.GOLD_ORE),
|
||||
IRON_ORE("minecraft:iron_ore", 64, Block.IRON_ORE),
|
||||
COAL_ORE("minecraft:coal_ore", 64, Block.COAL_ORE),
|
||||
NETHER_GOLD_ORE("minecraft:nether_gold_ore", 64, null),
|
||||
NETHER_GOLD_ORE("minecraft:nether_gold_ore", 64, Block.NETHER_GOLD_ORE),
|
||||
OAK_LOG("minecraft:oak_log", 64, Block.OAK_LOG),
|
||||
SPRUCE_LOG("minecraft:spruce_log", 64, Block.SPRUCE_LOG),
|
||||
BIRCH_LOG("minecraft:birch_log", 64, Block.BIRCH_LOG),
|
||||
JUNGLE_LOG("minecraft:jungle_log", 64, Block.JUNGLE_LOG),
|
||||
ACACIA_LOG("minecraft:acacia_log", 64, Block.ACACIA_LOG),
|
||||
DARK_OAK_LOG("minecraft:dark_oak_log", 64, Block.DARK_OAK_LOG),
|
||||
CRIMSON_STEM("minecraft:crimson_stem", 64, null),
|
||||
WARPED_STEM("minecraft:warped_stem", 64, null),
|
||||
CRIMSON_STEM("minecraft:crimson_stem", 64, Block.CRIMSON_STEM),
|
||||
WARPED_STEM("minecraft:warped_stem", 64, Block.WARPED_STEM),
|
||||
STRIPPED_OAK_LOG("minecraft:stripped_oak_log", 64, Block.STRIPPED_OAK_LOG),
|
||||
STRIPPED_SPRUCE_LOG("minecraft:stripped_spruce_log", 64, Block.STRIPPED_SPRUCE_LOG),
|
||||
STRIPPED_BIRCH_LOG("minecraft:stripped_birch_log", 64, Block.STRIPPED_BIRCH_LOG),
|
||||
STRIPPED_JUNGLE_LOG("minecraft:stripped_jungle_log", 64, Block.STRIPPED_JUNGLE_LOG),
|
||||
STRIPPED_ACACIA_LOG("minecraft:stripped_acacia_log", 64, Block.STRIPPED_ACACIA_LOG),
|
||||
STRIPPED_DARK_OAK_LOG("minecraft:stripped_dark_oak_log", 64, Block.STRIPPED_DARK_OAK_LOG),
|
||||
STRIPPED_CRIMSON_STEM("minecraft:stripped_crimson_stem", 64, null),
|
||||
STRIPPED_WARPED_STEM("minecraft:stripped_warped_stem", 64, null),
|
||||
STRIPPED_CRIMSON_STEM("minecraft:stripped_crimson_stem", 64, Block.STRIPPED_CRIMSON_STEM),
|
||||
STRIPPED_WARPED_STEM("minecraft:stripped_warped_stem", 64, Block.STRIPPED_WARPED_STEM),
|
||||
STRIPPED_OAK_WOOD("minecraft:stripped_oak_wood", 64, Block.STRIPPED_OAK_WOOD),
|
||||
STRIPPED_SPRUCE_WOOD("minecraft:stripped_spruce_wood", 64, Block.STRIPPED_SPRUCE_WOOD),
|
||||
STRIPPED_BIRCH_WOOD("minecraft:stripped_birch_wood", 64, Block.STRIPPED_BIRCH_WOOD),
|
||||
STRIPPED_JUNGLE_WOOD("minecraft:stripped_jungle_wood", 64, Block.STRIPPED_JUNGLE_WOOD),
|
||||
STRIPPED_ACACIA_WOOD("minecraft:stripped_acacia_wood", 64, Block.STRIPPED_ACACIA_WOOD),
|
||||
STRIPPED_DARK_OAK_WOOD("minecraft:stripped_dark_oak_wood", 64, Block.STRIPPED_DARK_OAK_WOOD),
|
||||
STRIPPED_CRIMSON_HYPHAE("minecraft:stripped_crimson_hyphae", 64, null),
|
||||
STRIPPED_WARPED_HYPHAE("minecraft:stripped_warped_hyphae", 64, null),
|
||||
STRIPPED_CRIMSON_HYPHAE("minecraft:stripped_crimson_hyphae", 64, Block.STRIPPED_CRIMSON_HYPHAE),
|
||||
STRIPPED_WARPED_HYPHAE("minecraft:stripped_warped_hyphae", 64, Block.STRIPPED_WARPED_HYPHAE),
|
||||
OAK_WOOD("minecraft:oak_wood", 64, Block.OAK_WOOD),
|
||||
SPRUCE_WOOD("minecraft:spruce_wood", 64, Block.SPRUCE_WOOD),
|
||||
BIRCH_WOOD("minecraft:birch_wood", 64, Block.BIRCH_WOOD),
|
||||
JUNGLE_WOOD("minecraft:jungle_wood", 64, Block.JUNGLE_WOOD),
|
||||
ACACIA_WOOD("minecraft:acacia_wood", 64, Block.ACACIA_WOOD),
|
||||
DARK_OAK_WOOD("minecraft:dark_oak_wood", 64, Block.DARK_OAK_WOOD),
|
||||
CRIMSON_HYPHAE("minecraft:crimson_hyphae", 64, null),
|
||||
WARPED_HYPHAE("minecraft:warped_hyphae", 64, null),
|
||||
CRIMSON_HYPHAE("minecraft:crimson_hyphae", 64, Block.CRIMSON_HYPHAE),
|
||||
WARPED_HYPHAE("minecraft:warped_hyphae", 64, Block.WARPED_HYPHAE),
|
||||
OAK_LEAVES("minecraft:oak_leaves", 64, Block.OAK_LEAVES),
|
||||
SPRUCE_LEAVES("minecraft:spruce_leaves", 64, Block.SPRUCE_LEAVES),
|
||||
BIRCH_LEAVES("minecraft:birch_leaves", 64, Block.BIRCH_LEAVES),
|
||||
@ -134,13 +134,13 @@ public enum Material {
|
||||
WITHER_ROSE("minecraft:wither_rose", 64, Block.WITHER_ROSE),
|
||||
BROWN_MUSHROOM("minecraft:brown_mushroom", 64, Block.BROWN_MUSHROOM),
|
||||
RED_MUSHROOM("minecraft:red_mushroom", 64, Block.RED_MUSHROOM),
|
||||
CRIMSON_FUNGUS("minecraft:crimson_fungus", 64, null),
|
||||
WARPED_FUNGUS("minecraft:warped_fungus", 64, null),
|
||||
CRIMSON_ROOTS("minecraft:crimson_roots", 64, null),
|
||||
WARPED_ROOTS("minecraft:warped_roots", 64, null),
|
||||
NETHER_SPROUTS("minecraft:nether_sprouts", 64, null),
|
||||
WEEPING_VINES("minecraft:weeping_vines", 64, null),
|
||||
TWISTING_VINES("minecraft:twisting_vines", 64, null),
|
||||
CRIMSON_FUNGUS("minecraft:crimson_fungus", 64, Block.CRIMSON_FUNGUS),
|
||||
WARPED_FUNGUS("minecraft:warped_fungus", 64, Block.WARPED_FUNGUS),
|
||||
CRIMSON_ROOTS("minecraft:crimson_roots", 64, Block.CRIMSON_ROOTS),
|
||||
WARPED_ROOTS("minecraft:warped_roots", 64, Block.WARPED_ROOTS),
|
||||
NETHER_SPROUTS("minecraft:nether_sprouts", 64, Block.NETHER_SPROUTS),
|
||||
WEEPING_VINES("minecraft:weeping_vines", 64, Block.WEEPING_VINES),
|
||||
TWISTING_VINES("minecraft:twisting_vines", 64, Block.TWISTING_VINES),
|
||||
SUGAR_CANE("minecraft:sugar_cane", 64, Block.SUGAR_CANE),
|
||||
KELP("minecraft:kelp", 64, Block.KELP),
|
||||
BAMBOO("minecraft:bamboo", 64, Block.BAMBOO),
|
||||
@ -152,8 +152,8 @@ public enum Material {
|
||||
JUNGLE_SLAB("minecraft:jungle_slab", 64, Block.JUNGLE_SLAB),
|
||||
ACACIA_SLAB("minecraft:acacia_slab", 64, Block.ACACIA_SLAB),
|
||||
DARK_OAK_SLAB("minecraft:dark_oak_slab", 64, Block.DARK_OAK_SLAB),
|
||||
CRIMSON_SLAB("minecraft:crimson_slab", 64, null),
|
||||
WARPED_SLAB("minecraft:warped_slab", 64, null),
|
||||
CRIMSON_SLAB("minecraft:crimson_slab", 64, Block.CRIMSON_SLAB),
|
||||
WARPED_SLAB("minecraft:warped_slab", 64, Block.WARPED_SLAB),
|
||||
STONE_SLAB("minecraft:stone_slab", 64, Block.STONE_SLAB),
|
||||
SMOOTH_STONE_SLAB("minecraft:smooth_stone_slab", 64, Block.SMOOTH_STONE_SLAB),
|
||||
SANDSTONE_SLAB("minecraft:sandstone_slab", 64, Block.SANDSTONE_SLAB),
|
||||
@ -205,9 +205,9 @@ public enum Material {
|
||||
JUNGLE_PRESSURE_PLATE("minecraft:jungle_pressure_plate", 64, Block.JUNGLE_PRESSURE_PLATE),
|
||||
ACACIA_PRESSURE_PLATE("minecraft:acacia_pressure_plate", 64, Block.ACACIA_PRESSURE_PLATE),
|
||||
DARK_OAK_PRESSURE_PLATE("minecraft:dark_oak_pressure_plate", 64, Block.DARK_OAK_PRESSURE_PLATE),
|
||||
CRIMSON_PRESSURE_PLATE("minecraft:crimson_pressure_plate", 64, null),
|
||||
WARPED_PRESSURE_PLATE("minecraft:warped_pressure_plate", 64, null),
|
||||
POLISHED_BLACKSTONE_PRESSURE_PLATE("minecraft:polished_blackstone_pressure_plate", 64, null),
|
||||
CRIMSON_PRESSURE_PLATE("minecraft:crimson_pressure_plate", 64, Block.CRIMSON_PRESSURE_PLATE),
|
||||
WARPED_PRESSURE_PLATE("minecraft:warped_pressure_plate", 64, Block.WARPED_PRESSURE_PLATE),
|
||||
POLISHED_BLACKSTONE_PRESSURE_PLATE("minecraft:polished_blackstone_pressure_plate", 64, Block.POLISHED_BLACKSTONE_PRESSURE_PLATE),
|
||||
REDSTONE_ORE("minecraft:redstone_ore", 64, Block.REDSTONE_ORE),
|
||||
REDSTONE_TORCH("minecraft:redstone_torch", 64, Block.REDSTONE_TORCH),
|
||||
SNOW("minecraft:snow", 64, Block.SNOW),
|
||||
@ -222,16 +222,16 @@ public enum Material {
|
||||
JUNGLE_FENCE("minecraft:jungle_fence", 64, Block.JUNGLE_FENCE),
|
||||
ACACIA_FENCE("minecraft:acacia_fence", 64, Block.ACACIA_FENCE),
|
||||
DARK_OAK_FENCE("minecraft:dark_oak_fence", 64, Block.DARK_OAK_FENCE),
|
||||
CRIMSON_FENCE("minecraft:crimson_fence", 64, null),
|
||||
WARPED_FENCE("minecraft:warped_fence", 64, null),
|
||||
CRIMSON_FENCE("minecraft:crimson_fence", 64, Block.CRIMSON_FENCE),
|
||||
WARPED_FENCE("minecraft:warped_fence", 64, Block.WARPED_FENCE),
|
||||
PUMPKIN("minecraft:pumpkin", 64, Block.PUMPKIN),
|
||||
CARVED_PUMPKIN("minecraft:carved_pumpkin", 64, Block.CARVED_PUMPKIN),
|
||||
NETHERRACK("minecraft:netherrack", 64, Block.NETHERRACK),
|
||||
SOUL_SAND("minecraft:soul_sand", 64, Block.SOUL_SAND),
|
||||
SOUL_SOIL("minecraft:soul_soil", 64, null),
|
||||
BASALT("minecraft:basalt", 64, null),
|
||||
POLISHED_BASALT("minecraft:polished_basalt", 64, null),
|
||||
SOUL_TORCH("minecraft:soul_torch", 64, null),
|
||||
SOUL_SOIL("minecraft:soul_soil", 64, Block.SOUL_SOIL),
|
||||
BASALT("minecraft:basalt", 64, Block.BASALT),
|
||||
POLISHED_BASALT("minecraft:polished_basalt", 64, Block.POLISHED_BASALT),
|
||||
SOUL_TORCH("minecraft:soul_torch", 64, Block.SOUL_TORCH),
|
||||
GLOWSTONE("minecraft:glowstone", 64, Block.GLOWSTONE),
|
||||
JACK_O_LANTERN("minecraft:jack_o_lantern", 64, Block.JACK_O_LANTERN),
|
||||
OAK_TRAPDOOR("minecraft:oak_trapdoor", 64, Block.OAK_TRAPDOOR),
|
||||
@ -240,8 +240,8 @@ public enum Material {
|
||||
JUNGLE_TRAPDOOR("minecraft:jungle_trapdoor", 64, Block.JUNGLE_TRAPDOOR),
|
||||
ACACIA_TRAPDOOR("minecraft:acacia_trapdoor", 64, Block.ACACIA_TRAPDOOR),
|
||||
DARK_OAK_TRAPDOOR("minecraft:dark_oak_trapdoor", 64, Block.DARK_OAK_TRAPDOOR),
|
||||
CRIMSON_TRAPDOOR("minecraft:crimson_trapdoor", 64, null),
|
||||
WARPED_TRAPDOOR("minecraft:warped_trapdoor", 64, null),
|
||||
CRIMSON_TRAPDOOR("minecraft:crimson_trapdoor", 64, Block.CRIMSON_TRAPDOOR),
|
||||
WARPED_TRAPDOOR("minecraft:warped_trapdoor", 64, Block.WARPED_TRAPDOOR),
|
||||
INFESTED_STONE("minecraft:infested_stone", 64, Block.INFESTED_STONE),
|
||||
INFESTED_COBBLESTONE("minecraft:infested_cobblestone", 64, Block.INFESTED_COBBLESTONE),
|
||||
INFESTED_STONE_BRICKS("minecraft:infested_stone_bricks", 64, Block.INFESTED_STONE_BRICKS),
|
||||
@ -256,7 +256,7 @@ public enum Material {
|
||||
RED_MUSHROOM_BLOCK("minecraft:red_mushroom_block", 64, Block.RED_MUSHROOM_BLOCK),
|
||||
MUSHROOM_STEM("minecraft:mushroom_stem", 64, Block.MUSHROOM_STEM),
|
||||
IRON_BARS("minecraft:iron_bars", 64, Block.IRON_BARS),
|
||||
CHAIN("minecraft:chain", 64, null),
|
||||
CHAIN("minecraft:chain", 64, Block.CHAIN),
|
||||
GLASS_PANE("minecraft:glass_pane", 64, Block.GLASS_PANE),
|
||||
MELON("minecraft:melon", 64, Block.MELON),
|
||||
VINE("minecraft:vine", 64, Block.VINE),
|
||||
@ -266,15 +266,15 @@ public enum Material {
|
||||
JUNGLE_FENCE_GATE("minecraft:jungle_fence_gate", 64, Block.JUNGLE_FENCE_GATE),
|
||||
ACACIA_FENCE_GATE("minecraft:acacia_fence_gate", 64, Block.ACACIA_FENCE_GATE),
|
||||
DARK_OAK_FENCE_GATE("minecraft:dark_oak_fence_gate", 64, Block.DARK_OAK_FENCE_GATE),
|
||||
CRIMSON_FENCE_GATE("minecraft:crimson_fence_gate", 64, null),
|
||||
WARPED_FENCE_GATE("minecraft:warped_fence_gate", 64, null),
|
||||
CRIMSON_FENCE_GATE("minecraft:crimson_fence_gate", 64, Block.CRIMSON_FENCE_GATE),
|
||||
WARPED_FENCE_GATE("minecraft:warped_fence_gate", 64, Block.WARPED_FENCE_GATE),
|
||||
BRICK_STAIRS("minecraft:brick_stairs", 64, Block.BRICK_STAIRS),
|
||||
STONE_BRICK_STAIRS("minecraft:stone_brick_stairs", 64, Block.STONE_BRICK_STAIRS),
|
||||
MYCELIUM("minecraft:mycelium", 64, Block.MYCELIUM),
|
||||
LILY_PAD("minecraft:lily_pad", 64, Block.LILY_PAD),
|
||||
NETHER_BRICKS("minecraft:nether_bricks", 64, Block.NETHER_BRICKS),
|
||||
CRACKED_NETHER_BRICKS("minecraft:cracked_nether_bricks", 64, null),
|
||||
CHISELED_NETHER_BRICKS("minecraft:chiseled_nether_bricks", 64, null),
|
||||
CRACKED_NETHER_BRICKS("minecraft:cracked_nether_bricks", 64, Block.CRACKED_NETHER_BRICKS),
|
||||
CHISELED_NETHER_BRICKS("minecraft:chiseled_nether_bricks", 64, Block.CHISELED_NETHER_BRICKS),
|
||||
NETHER_BRICK_FENCE("minecraft:nether_brick_fence", 64, Block.NETHER_BRICK_FENCE),
|
||||
NETHER_BRICK_STAIRS("minecraft:nether_brick_stairs", 64, Block.NETHER_BRICK_STAIRS),
|
||||
ENCHANTING_TABLE("minecraft:enchanting_table", 64, Block.ENCHANTING_TABLE),
|
||||
@ -291,8 +291,8 @@ public enum Material {
|
||||
SPRUCE_STAIRS("minecraft:spruce_stairs", 64, Block.SPRUCE_STAIRS),
|
||||
BIRCH_STAIRS("minecraft:birch_stairs", 64, Block.BIRCH_STAIRS),
|
||||
JUNGLE_STAIRS("minecraft:jungle_stairs", 64, Block.JUNGLE_STAIRS),
|
||||
CRIMSON_STAIRS("minecraft:crimson_stairs", 64, null),
|
||||
WARPED_STAIRS("minecraft:warped_stairs", 64, null),
|
||||
CRIMSON_STAIRS("minecraft:crimson_stairs", 64, Block.CRIMSON_STAIRS),
|
||||
WARPED_STAIRS("minecraft:warped_stairs", 64, Block.WARPED_STAIRS),
|
||||
COMMAND_BLOCK("minecraft:command_block", 64, Block.COMMAND_BLOCK),
|
||||
BEACON("minecraft:beacon", 64, Block.BEACON),
|
||||
COBBLESTONE_WALL("minecraft:cobblestone_wall", 64, Block.COBBLESTONE_WALL),
|
||||
@ -309,9 +309,9 @@ public enum Material {
|
||||
SANDSTONE_WALL("minecraft:sandstone_wall", 64, Block.SANDSTONE_WALL),
|
||||
END_STONE_BRICK_WALL("minecraft:end_stone_brick_wall", 64, Block.END_STONE_BRICK_WALL),
|
||||
DIORITE_WALL("minecraft:diorite_wall", 64, Block.DIORITE_WALL),
|
||||
BLACKSTONE_WALL("minecraft:blackstone_wall", 64, null),
|
||||
POLISHED_BLACKSTONE_WALL("minecraft:polished_blackstone_wall", 64, null),
|
||||
POLISHED_BLACKSTONE_BRICK_WALL("minecraft:polished_blackstone_brick_wall", 64, null),
|
||||
BLACKSTONE_WALL("minecraft:blackstone_wall", 64, Block.BLACKSTONE_WALL),
|
||||
POLISHED_BLACKSTONE_WALL("minecraft:polished_blackstone_wall", 64, Block.POLISHED_BLACKSTONE_WALL),
|
||||
POLISHED_BLACKSTONE_BRICK_WALL("minecraft:polished_blackstone_brick_wall", 64, Block.POLISHED_BLACKSTONE_BRICK_WALL),
|
||||
STONE_BUTTON("minecraft:stone_button", 64, Block.STONE_BUTTON),
|
||||
OAK_BUTTON("minecraft:oak_button", 64, Block.OAK_BUTTON),
|
||||
SPRUCE_BUTTON("minecraft:spruce_button", 64, Block.SPRUCE_BUTTON),
|
||||
@ -319,9 +319,9 @@ public enum Material {
|
||||
JUNGLE_BUTTON("minecraft:jungle_button", 64, Block.JUNGLE_BUTTON),
|
||||
ACACIA_BUTTON("minecraft:acacia_button", 64, Block.ACACIA_BUTTON),
|
||||
DARK_OAK_BUTTON("minecraft:dark_oak_button", 64, Block.DARK_OAK_BUTTON),
|
||||
CRIMSON_BUTTON("minecraft:crimson_button", 64, null),
|
||||
WARPED_BUTTON("minecraft:warped_button", 64, null),
|
||||
POLISHED_BLACKSTONE_BUTTON("minecraft:polished_blackstone_button", 64, null),
|
||||
CRIMSON_BUTTON("minecraft:crimson_button", 64, Block.CRIMSON_BUTTON),
|
||||
WARPED_BUTTON("minecraft:warped_button", 64, Block.WARPED_BUTTON),
|
||||
POLISHED_BLACKSTONE_BUTTON("minecraft:polished_blackstone_button", 64, Block.POLISHED_BLACKSTONE_BUTTON),
|
||||
ANVIL("minecraft:anvil", 64, Block.ANVIL),
|
||||
CHIPPED_ANVIL("minecraft:chipped_anvil", 64, Block.CHIPPED_ANVIL),
|
||||
DAMAGED_ANVIL("minecraft:damaged_anvil", 64, Block.DAMAGED_ANVIL),
|
||||
@ -334,7 +334,7 @@ public enum Material {
|
||||
HOPPER("minecraft:hopper", 64, Block.HOPPER),
|
||||
CHISELED_QUARTZ_BLOCK("minecraft:chiseled_quartz_block", 64, Block.CHISELED_QUARTZ_BLOCK),
|
||||
QUARTZ_BLOCK("minecraft:quartz_block", 64, Block.QUARTZ_BLOCK),
|
||||
QUARTZ_BRICKS("minecraft:quartz_bricks", 64, null),
|
||||
QUARTZ_BRICKS("minecraft:quartz_bricks", 64, Block.QUARTZ_BRICKS),
|
||||
QUARTZ_PILLAR("minecraft:quartz_pillar", 64, Block.QUARTZ_PILLAR),
|
||||
QUARTZ_STAIRS("minecraft:quartz_stairs", 64, Block.QUARTZ_STAIRS),
|
||||
ACTIVATOR_RAIL("minecraft:activator_rail", 64, Block.ACTIVATOR_RAIL),
|
||||
@ -434,7 +434,7 @@ public enum Material {
|
||||
CHAIN_COMMAND_BLOCK("minecraft:chain_command_block", 64, Block.CHAIN_COMMAND_BLOCK),
|
||||
MAGMA_BLOCK("minecraft:magma_block", 64, Block.MAGMA_BLOCK),
|
||||
NETHER_WART_BLOCK("minecraft:nether_wart_block", 64, Block.NETHER_WART_BLOCK),
|
||||
WARPED_WART_BLOCK("minecraft:warped_wart_block", 64, null),
|
||||
WARPED_WART_BLOCK("minecraft:warped_wart_block", 64, Block.WARPED_WART_BLOCK),
|
||||
RED_NETHER_BRICKS("minecraft:red_nether_bricks", 64, Block.RED_NETHER_BRICKS),
|
||||
BONE_BLOCK("minecraft:bone_block", 64, Block.BONE_BLOCK),
|
||||
STRUCTURE_VOID("minecraft:structure_void", 64, Block.STRUCTURE_VOID),
|
||||
@ -572,8 +572,8 @@ public enum Material {
|
||||
JUNGLE_DOOR("minecraft:jungle_door", 64, Block.JUNGLE_DOOR),
|
||||
ACACIA_DOOR("minecraft:acacia_door", 64, Block.ACACIA_DOOR),
|
||||
DARK_OAK_DOOR("minecraft:dark_oak_door", 64, Block.DARK_OAK_DOOR),
|
||||
CRIMSON_DOOR("minecraft:crimson_door", 64, null),
|
||||
WARPED_DOOR("minecraft:warped_door", 64, null),
|
||||
CRIMSON_DOOR("minecraft:crimson_door", 64, Block.CRIMSON_DOOR),
|
||||
WARPED_DOOR("minecraft:warped_door", 64, Block.WARPED_DOOR),
|
||||
REPEATER("minecraft:repeater", 64, Block.REPEATER),
|
||||
COMPARATOR("minecraft:comparator", 64, Block.COMPARATOR),
|
||||
STRUCTURE_BLOCK("minecraft:structure_block", 64, Block.STRUCTURE_BLOCK),
|
||||
@ -666,8 +666,8 @@ public enum Material {
|
||||
JUNGLE_SIGN("minecraft:jungle_sign", 16, Block.JUNGLE_SIGN),
|
||||
ACACIA_SIGN("minecraft:acacia_sign", 16, Block.ACACIA_SIGN),
|
||||
DARK_OAK_SIGN("minecraft:dark_oak_sign", 16, Block.DARK_OAK_SIGN),
|
||||
CRIMSON_SIGN("minecraft:crimson_sign", 16, null),
|
||||
WARPED_SIGN("minecraft:warped_sign", 16, null),
|
||||
CRIMSON_SIGN("minecraft:crimson_sign", 16, Block.CRIMSON_SIGN),
|
||||
WARPED_SIGN("minecraft:warped_sign", 16, Block.WARPED_SIGN),
|
||||
BUCKET("minecraft:bucket", 16, null),
|
||||
WATER_BUCKET("minecraft:water_bucket", 1, null),
|
||||
LAVA_BUCKET("minecraft:lava_bucket", 1, null),
|
||||
@ -954,35 +954,35 @@ public enum Material {
|
||||
STONECUTTER("minecraft:stonecutter", 64, Block.STONECUTTER),
|
||||
BELL("minecraft:bell", 64, Block.BELL),
|
||||
LANTERN("minecraft:lantern", 64, Block.LANTERN),
|
||||
SOUL_LANTERN("minecraft:soul_lantern", 64, null),
|
||||
SOUL_LANTERN("minecraft:soul_lantern", 64, Block.SOUL_LANTERN),
|
||||
SWEET_BERRIES("minecraft:sweet_berries", 64, null),
|
||||
CAMPFIRE("minecraft:campfire", 64, Block.CAMPFIRE),
|
||||
SOUL_CAMPFIRE("minecraft:soul_campfire", 64, null),
|
||||
SHROOMLIGHT("minecraft:shroomlight", 64, null),
|
||||
SOUL_CAMPFIRE("minecraft:soul_campfire", 64, Block.SOUL_CAMPFIRE),
|
||||
SHROOMLIGHT("minecraft:shroomlight", 64, Block.SHROOMLIGHT),
|
||||
HONEYCOMB("minecraft:honeycomb", 64, null),
|
||||
BEE_NEST("minecraft:bee_nest", 64, Block.BEE_NEST),
|
||||
BEEHIVE("minecraft:beehive", 64, Block.BEEHIVE),
|
||||
HONEY_BOTTLE("minecraft:honey_bottle", 16, null),
|
||||
HONEY_BLOCK("minecraft:honey_block", 64, Block.HONEY_BLOCK),
|
||||
HONEYCOMB_BLOCK("minecraft:honeycomb_block", 64, Block.HONEYCOMB_BLOCK),
|
||||
LODESTONE("minecraft:lodestone", 64, null),
|
||||
NETHERITE_BLOCK("minecraft:netherite_block", 64, null),
|
||||
ANCIENT_DEBRIS("minecraft:ancient_debris", 64, null),
|
||||
TARGET("minecraft:target", 64, null),
|
||||
CRYING_OBSIDIAN("minecraft:crying_obsidian", 64, null),
|
||||
BLACKSTONE("minecraft:blackstone", 64, null),
|
||||
BLACKSTONE_SLAB("minecraft:blackstone_slab", 64, null),
|
||||
BLACKSTONE_STAIRS("minecraft:blackstone_stairs", 64, null),
|
||||
GILDED_BLACKSTONE("minecraft:gilded_blackstone", 64, null),
|
||||
POLISHED_BLACKSTONE("minecraft:polished_blackstone", 64, null),
|
||||
POLISHED_BLACKSTONE_SLAB("minecraft:polished_blackstone_slab", 64, null),
|
||||
POLISHED_BLACKSTONE_STAIRS("minecraft:polished_blackstone_stairs", 64, null),
|
||||
CHISELED_POLISHED_BLACKSTONE("minecraft:chiseled_polished_blackstone", 64, null),
|
||||
POLISHED_BLACKSTONE_BRICKS("minecraft:polished_blackstone_bricks", 64, null),
|
||||
POLISHED_BLACKSTONE_BRICK_SLAB("minecraft:polished_blackstone_brick_slab", 64, null),
|
||||
POLISHED_BLACKSTONE_BRICK_STAIRS("minecraft:polished_blackstone_brick_stairs", 64, null),
|
||||
CRACKED_POLISHED_BLACKSTONE_BRICKS("minecraft:cracked_polished_blackstone_bricks", 64, null),
|
||||
RESPAWN_ANCHOR("minecraft:respawn_anchor", 64, null),
|
||||
LODESTONE("minecraft:lodestone", 64, Block.LODESTONE),
|
||||
NETHERITE_BLOCK("minecraft:netherite_block", 64, Block.NETHERITE_BLOCK),
|
||||
ANCIENT_DEBRIS("minecraft:ancient_debris", 64, Block.ANCIENT_DEBRIS),
|
||||
TARGET("minecraft:target", 64, Block.TARGET),
|
||||
CRYING_OBSIDIAN("minecraft:crying_obsidian", 64, Block.CRYING_OBSIDIAN),
|
||||
BLACKSTONE("minecraft:blackstone", 64, Block.BLACKSTONE),
|
||||
BLACKSTONE_SLAB("minecraft:blackstone_slab", 64, Block.BLACKSTONE_SLAB),
|
||||
BLACKSTONE_STAIRS("minecraft:blackstone_stairs", 64, Block.BLACKSTONE_STAIRS),
|
||||
GILDED_BLACKSTONE("minecraft:gilded_blackstone", 64, Block.GILDED_BLACKSTONE),
|
||||
POLISHED_BLACKSTONE("minecraft:polished_blackstone", 64, Block.POLISHED_BLACKSTONE),
|
||||
POLISHED_BLACKSTONE_SLAB("minecraft:polished_blackstone_slab", 64, Block.POLISHED_BLACKSTONE_SLAB),
|
||||
POLISHED_BLACKSTONE_STAIRS("minecraft:polished_blackstone_stairs", 64, Block.POLISHED_BLACKSTONE_STAIRS),
|
||||
CHISELED_POLISHED_BLACKSTONE("minecraft:chiseled_polished_blackstone", 64, Block.CHISELED_POLISHED_BLACKSTONE),
|
||||
POLISHED_BLACKSTONE_BRICKS("minecraft:polished_blackstone_bricks", 64, Block.POLISHED_BLACKSTONE_BRICKS),
|
||||
POLISHED_BLACKSTONE_BRICK_SLAB("minecraft:polished_blackstone_brick_slab", 64, Block.POLISHED_BLACKSTONE_BRICK_SLAB),
|
||||
POLISHED_BLACKSTONE_BRICK_STAIRS("minecraft:polished_blackstone_brick_stairs", 64, Block.POLISHED_BLACKSTONE_BRICK_STAIRS),
|
||||
CRACKED_POLISHED_BLACKSTONE_BRICKS("minecraft:cracked_polished_blackstone_bricks", 64, Block.CRACKED_POLISHED_BLACKSTONE_BRICKS),
|
||||
RESPAWN_ANCHOR("minecraft:respawn_anchor", 64, Block.RESPAWN_ANCHOR),
|
||||
;
|
||||
private String namespaceID;
|
||||
private int maxDefaultStackSize;
|
||||
|
@ -271,6 +271,14 @@ public class BlockEnumGenerator extends MinestomEnumGenerator<BlockContainer> {
|
||||
"}",
|
||||
"return defaultID;"
|
||||
};
|
||||
generator.addMethod("getAlternative", "(short blockId)", "BlockAlternative",
|
||||
"for (BlockAlternative alt : alternatives) {",
|
||||
"\tif (alt.getId() == blockId) {",
|
||||
"\t\treturn alt;",
|
||||
"\t}",
|
||||
"}",
|
||||
"return null;");
|
||||
generator.addMethod("getAlternatives", "()", "List<BlockAlternative>", "return alternatives;");
|
||||
generator.addMethod("withProperties", "(String... properties)", "short", withPropertiesLines);
|
||||
generator.addMethod("fromId", "(short blockId)", "static "+className, "return BlockMap.blocksMap.getOrDefault(blockId, AIR);");
|
||||
generator.appendToConstructor("if(singleState) {");
|
||||
|
@ -1,6 +1,8 @@
|
||||
package net.minestom.server.instance.block;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BlockAlternative {
|
||||
|
||||
@ -20,6 +22,15 @@ public class BlockAlternative {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public Map<String, String> createPropertiesMap() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
for(String p : properties) {
|
||||
String[] parts = p.split("=");
|
||||
map.put(parts[0], parts[1]);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BlockAlternative{" +
|
||||
|
Loading…
Reference in New Issue
Block a user