From de029f96115156b0ebfc0b243adcd4644e88c8ee Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 7 Mar 2021 11:59:55 -0800 Subject: [PATCH 01/22] Version 1.16.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9b65117..97f8af1 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ -LOCAL - 1.16.0 + 1.16.1 BentoBoxWorld_SkyGrid bentobox-world From 9e34cb72d269756fa4877799f8023697bfbca2ab Mon Sep 17 00:00:00 2001 From: BONNe Date: Mon, 15 Mar 2021 16:06:34 +0200 Subject: [PATCH 02/22] Expose BentoBox 1.16 portal generation mechanics. BentoBoxWorld/BentoBox#1718 --- .../java/world/bentobox/skygrid/Settings.java | 43 +++++++++++++++++++ src/main/resources/config.yml | 10 ++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index a195cad..6cc3408 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -92,6 +92,12 @@ public class Settings implements WorldSettings { @ConfigEntry(path = "world.nether.blocks") private Map netherBlocks = new EnumMap<>(Material.class); + @ConfigComment("This option indicates if nether portals should be linked via dimensions.") + @ConfigComment("Option will simulate vanilla portal mechanics that links portals together") + @ConfigComment("or creates a new portal, if there is not a portal in that dimension.") + @ConfigEntry(path = "world.nether.create-and-link-portals", since = "1.16") + private boolean makeNetherPortals = false; + // End @ConfigComment("Generate SkyGrid End - if this is false, the end world will not be made") @ConfigEntry(path = "world.end.generate") @@ -101,6 +107,11 @@ public class Settings implements WorldSettings { @ConfigEntry(path = "world.end.blocks") private Map endBlocks = new EnumMap<>(Material.class); + @ConfigComment("This option indicates if obsidian platform in the end should be generated") + @ConfigComment("when player enters the end world.") + @ConfigEntry(path = "world.end.create-obsidian-platform", since = "1.16") + private boolean makeEndPortals = false; + /* SkyGrid */ @ConfigComment("Biomes - this will affect some block types and tree types.") @ConfigEntry(path = "world.create-biomes") @@ -1493,4 +1504,36 @@ public String getDefaultPlayerAction() { public void setDefaultPlayerAction(String defaultPlayerAction) { this.defaultPlayerAction = defaultPlayerAction; } + + /** + * @return the makeNetherPortals + */ + @Override + public boolean isMakeNetherPortals() { + return makeNetherPortals; + } + + /** + * @return the makeEndPortals + */ + @Override + public boolean isMakeEndPortals() { + return makeEndPortals; + } + + /** + * Sets make nether portals. + * @param makeNetherPortals the make nether portals + */ + public void setMakeNetherPortals(boolean makeNetherPortals) { + this.makeNetherPortals = makeNetherPortals; + } + + /** + * Sets make end portals. + * @param makeEndPortals the make end portals + */ + public void setMakeEndPortals(boolean makeEndPortals) { + this.makeEndPortals = makeEndPortals; + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 428f983..c988601 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -690,7 +690,11 @@ world: GILDED_BLACKSTONE: 10 SOUL_SOIL: 80 NETHER_GOLD_ORE: 12 - + + # This option indicates if nether portals should be linked via dimensions. + # Option will simulate vanilla portal mechanics that links portals together or creates a new portal, if there is not a portal in other dimension. + # Added since 1.16 + create-and-link-portals: false end: # Generate SkyGrid End - if this is false, the end world will not be made generate: true @@ -706,7 +710,9 @@ world: GRAVEL: 10 SPAWNER: 1 PURPUR_BLOCK: 50 - + # This option indicates if obsidian platform in the end should be generated when player enters the end world. + # Added since 1.16 + create-obsidian-platform: false # Biomes - this will affect some block types and tree types. create-biomes: true # The probability of a frame being created in a chunk. Frames are always at y=0. From bd36b951979a777c673a34ec22f21c2d54c6d7fe Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 16 Mar 2021 21:35:34 +0200 Subject: [PATCH 03/22] Adds isCheckForBlocks to false similar to CaveBlock. (#49) --- src/main/java/world/bentobox/skygrid/Settings.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index a195cad..1f00bd8 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1493,4 +1493,15 @@ public String getDefaultPlayerAction() { public void setDefaultPlayerAction(String defaultPlayerAction) { this.defaultPlayerAction = defaultPlayerAction; } + + + /** + * Similar to CaveBlock, SkyGrid should not check for blocks. + * @return false + */ + @Override + public boolean isCheckForBlocks() + { + return false; + } } From 138b4423490754d6282f457d4a77c10bf87a95cc Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 16 Mar 2021 12:37:39 -0700 Subject: [PATCH 04/22] Revert "Adds isCheckForBlocks to false similar to CaveBlock. (#49)" (#53) This reverts commit bd36b951979a777c673a34ec22f21c2d54c6d7fe. --- src/main/java/world/bentobox/skygrid/Settings.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 1f00bd8..a195cad 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1493,15 +1493,4 @@ public String getDefaultPlayerAction() { public void setDefaultPlayerAction(String defaultPlayerAction) { this.defaultPlayerAction = defaultPlayerAction; } - - - /** - * Similar to CaveBlock, SkyGrid should not check for blocks. - * @return false - */ - @Override - public boolean isCheckForBlocks() - { - return false; - } } From 63366f95be9a46c9832720cdfbf4963dda68aa7e Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 16 Mar 2021 21:37:51 +0200 Subject: [PATCH 05/22] Expose BentoBox mobLimitSettings option. (#52) --- .../java/world/bentobox/skygrid/Settings.java | 20 +++++++++++++++++++ src/main/resources/config.yml | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index a195cad..c77ceb0 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -377,6 +377,11 @@ public class Settings implements WorldSettings { @ConfigEntry(path = "protection.geo-limit-settings") private List geoLimitSettings = new ArrayList<>(); + @ConfigComment("AcidIsland blocked mobs.") + @ConfigComment("List of mobs that should not spawn in AcidIsland.") + @ConfigEntry(path = "protection.block-mobs") + private List mobLimitSettings = new ArrayList<>(); + // Invincible visitor settings @ConfigComment("Invincible visitors. List of damages that will not affect visitors.") @ConfigComment("Make list blank if visitors should receive all damages") @@ -1493,4 +1498,19 @@ public String getDefaultPlayerAction() { public void setDefaultPlayerAction(String defaultPlayerAction) { this.defaultPlayerAction = defaultPlayerAction; } + + /** + * @return the mobLimitSettings + */ + @Override + public List getMobLimitSettings() { + return mobLimitSettings; + } + + /** + * @param mobLimitSettings the mobLimitSettings to set + */ + public void setMobLimitSettings(List mobLimitSettings) { + this.mobLimitSettings = mobLimitSettings; + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 428f983..a9a7fb7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1046,6 +1046,9 @@ protection: # Geo restrict mobs. # Mobs that exit the protected space where they were spawned will be removed. geo-limit-settings: [] + # SkyGrid blocked mobs. + # List of mobs that should not spawn in SkyGrid. + block-mobs: [] # Invincible visitors. List of damages that will not affect visitors. # Make list blank if visitors should receive all damages invincible-visitors: [] From 680b03543b73158ea3549229b21afec58cda5044 Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 16 Mar 2021 21:38:01 +0200 Subject: [PATCH 06/22] Expose BentoBox 1.14 onRespawnCommands (#51) BentoBoxWorld/BentoBox#1719 --- .../java/world/bentobox/skygrid/Settings.java | 54 +++++++++++++++++++ src/main/resources/config.yml | 36 +++++++++++++ 2 files changed, 90 insertions(+) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index c77ceb0..f58ef92 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -330,13 +330,50 @@ public class Settings implements WorldSettings { // Commands @ConfigComment("List of commands to run when a player joins.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") @ConfigEntry(path = "area.commands.on-join") private List onJoinCommands = new ArrayList<>(); @ConfigComment("list of commands to run when a player leaves.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") @ConfigEntry(path = "area.commands.on-leave") private List onLeaveCommands = new ArrayList<>(); + @ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") + @ConfigEntry(path = "area.commands.on-respawn", since = "1.14.0") + private List onRespawnCommands = new ArrayList<>(); + // Sethome @ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.") @ConfigEntry(path = "area.sethome.nether.allow") @@ -1325,6 +1362,23 @@ public void setOnLeaveCommands(List onLeaveCommands) { this.onLeaveCommands = onLeaveCommands; } + /** + * @return the onRespawnCommands + */ + @Override + public List getOnRespawnCommands() { + return onRespawnCommands; + } + + /** + * Sets on respawn commands. + * + * @param onRespawnCommands the on respawn commands + */ + public void setOnRespawnCommands(List onRespawnCommands) { + this.onRespawnCommands = onRespawnCommands; + } + /** * @return the onJoinResetHealth */ diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a9a7fb7..02262db 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1010,9 +1010,45 @@ area: abort-on-logout: true commands: # List of commands to run when a player joins. + # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, + # in which case they are executed by the player. + # + # Available placeholders for the commands are the following: + # * [name]: name of the player + # + # Here are some examples of valid commands to execute: + # * '[SUDO] bbox version' + # * 'bsbadmin deaths set [player] 0' + # + # Note that player-executed commands might not work, as these commands can be run with said player being offline. on-join: [] # list of commands to run when a player leaves. + # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, + # in which case they are executed by the player. + # + # Available placeholders for the commands are the following: + # * [name]: name of the player + # + # Here are some examples of valid commands to execute: + # * '[SUDO] bbox version' + # * 'bsbadmin deaths set [player] 0' + # + # Note that player-executed commands might not work, as these commands can be run with said player being offline. on-leave: [] + # Returns a list of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true. + # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, + # in which case they are executed by the player. + # + # Available placeholders for the commands are the following: + # * [name]: name of the player + # + # Here are some examples of valid commands to execute: + # * '[SUDO] bbox version' + # * 'bsbadmin deaths set [player] 0' + # + # Note that player-executed commands might not work, as these commands can be run with said player being offline. + # Added since 1.14.0. + on-respawn: [ ] sethome: nether: # Allow setting home in the nether. Only available on nether islands, not vanilla nether. From a6bf2da4226fe7fe588255253400001956fa1330 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 16 Mar 2021 18:53:26 -0700 Subject: [PATCH 07/22] Implements https://github.com/BentoBoxWorld/SkyGrid/pull/49 --- src/main/java/world/bentobox/skygrid/Settings.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 47184c7..c849aec 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1610,4 +1610,14 @@ public void setMakeNetherPortals(boolean makeNetherPortals) { public void setMakeEndPortals(boolean makeEndPortals) { this.makeEndPortals = makeEndPortals; } + + /** + * SkyGrid should not check for blocks. + * @return false + */ + @Override + public boolean isCheckForBlocks() + { + return false; + } } From fcab05027cef37767f99ddf75f6340d602549ee1 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 12 Jul 2021 21:14:20 -0700 Subject: [PATCH 08/22] Update to 1.17 --- pom.xml | 30 +-- .../java/world/bentobox/skygrid/SkyGrid.java | 31 ++- src/main/resources/config.yml | 252 +++++++++++++++++- 3 files changed, 281 insertions(+), 32 deletions(-) diff --git a/pom.xml b/pom.xml index 97f8af1..6b177c2 100644 --- a/pom.xml +++ b/pom.xml @@ -57,14 +57,14 @@ 2.0.2 - 1.16.1-R0.1-SNAPSHOT - 1.16.0 + 1.17.1-R0.1-SNAPSHOT + 1.17.1 ${build.version}-SNAPSHOT -LOCAL - 1.16.1 + 1.17.0 BentoBoxWorld_SkyGrid bentobox-world @@ -111,30 +111,6 @@ - - sonar - - https://sonarcloud.io - bentobox-world - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.6.0.1398 - - - verify - - sonar - - - - - - - diff --git a/src/main/java/world/bentobox/skygrid/SkyGrid.java b/src/main/java/world/bentobox/skygrid/SkyGrid.java index ad7d58f..7b6df4f 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGrid.java +++ b/src/main/java/world/bentobox/skygrid/SkyGrid.java @@ -1,5 +1,11 @@ package world.bentobox.skygrid; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.bukkit.Material; import org.bukkit.World; import org.bukkit.WorldCreator; import org.bukkit.WorldType; @@ -46,6 +52,7 @@ private void loadSettings() { // Disable logError("SkyGrid settings could not load! Addon disabled."); setState(State.DISABLED); + return; } saveWorldSettings(); worldStyles = new WorldStyles(this); @@ -57,10 +64,32 @@ private void loadSettings() { playerCommand = new DefaultPlayerCommand(this) {}; adminCommand = new DefaultAdminCommand(this) {}; + // Check for missing items and blocks + @SuppressWarnings("deprecation") + List items = Arrays.stream(Material.values()).filter(Material::isItem).filter(m -> !m.isLegacy()).filter(m -> !m.isBlock()).collect(Collectors.toList()); + List allItems = settings.getChestItemsOverworld(); + allItems.addAll(settings.getChestItemsNether()); + allItems.addAll(settings.getChestItemsEnd()); + List missingItems = items.stream().map(Material::name).filter(s -> !allItems.contains(s)).collect(Collectors.toList()); + if (!missingItems.isEmpty()) { + this.logWarning("Missing items from config:"); + missingItems.forEach(this::logWarning); + } + // Blocks + @SuppressWarnings("deprecation") + List blocks = Arrays.stream(Material.values()).filter(Material::isBlock).filter(m -> !m.isLegacy()).collect(Collectors.toList()); + Set allBlocks = settings.getBlocks().keySet().stream().collect(Collectors.toSet()); + settings.getNetherBlocks().keySet().forEach(allBlocks::add); + settings.getEndBlocks().keySet().forEach(allBlocks::add); + Set missingBlocks = blocks.stream().filter(s -> !allBlocks.contains(s)).collect(Collectors.toSet()); + if (!missingBlocks.isEmpty()) { + this.logWarning("Missing blocks from config:"); + missingBlocks.stream().map(Material::name).forEach(this::logWarning); + } } @Override - public void onEnable(){ + public void onEnable() { // Set default protection flags for world to allow everything Flags.values().stream().filter(f -> f.getType().equals(Type.PROTECTION)).forEach(f -> f.setDefaultSetting(getOverWorld(), true)); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d2216ed..c8f2b97 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -30,16 +30,21 @@ world: # Chest items will be taken randomly from this list. All items have an equal chance. overworld: - ACTIVATOR_RAIL + - AMETHYST_SHARD - ANVIL - APPLE - ARMOR_STAND - ARROW + - AXOLOTL_BUCKET + - AXOLOTL_SPAWN_EGG - BAKED_POTATO - BAMBOO_SAPLING - BARREL - BAT_SPAWN_EGG - BEACON + - BEE_SPAWN_EGG - BEEF + - BEETROOT - BEETROOT_SEEDS - BEETROOT_SOUP - BELL @@ -71,6 +76,7 @@ world: - BROWN_MUSHROOM - BROWN_WOOL - BUCKET + - BUNDLE - CACTUS - CAKE - CAMPFIRE @@ -116,6 +122,7 @@ world: - COOKED_RABBIT - COOKED_SALMON - COOKIE + - COPPER_INGOT - CORNFLOWER - COW_SPAWN_EGG - CRAFTING_TABLE @@ -181,10 +188,16 @@ world: - FURNACE_MINECART - GHAST_SPAWN_EGG - GHAST_TEAR + - GLASS_BOTTLE - GLISTERING_MELON_SLICE - GLOBE_BANNER_PATTERN + - GLOW_BERRIES + - GLOW_INK_SAC + - GLOW_ITEM_FRAME + - GLOW_SQUID_SPAWN_EGG - GLOWSTONE - GLOWSTONE_DUST + - GOAT_SPAWN_EGG - GOLD_BLOCK - GOLD_INGOT - GOLD_NUGGET @@ -214,6 +227,8 @@ world: - HAY_BLOCK - HEART_OF_THE_SEA - HEAVY_WEIGHTED_PRESSURE_PLATE + - HONEY_BOTTLE + - HONEYCOMB - HOPPER - HOPPER_MINECART - HORSE_SPAWN_EGG @@ -368,8 +383,11 @@ world: - POTTED_SPRUCE_SAPLING - POTTED_WHITE_TULIP - POTTED_WITHER_ROSE + - POWDER_SNOW_BUCKET - POWERED_RAIL - PRISMARINE + - PRISMARINE_CRYSTALS + - PRISMARINE_SHARD - PUFFERFISH - PUFFERFISH_BUCKET - PUFFERFISH_SPAWN_EGG @@ -387,6 +405,9 @@ world: - RABBIT_STEW - RAIL - RAVAGER_SPAWN_EGG + - RAW_COPPER + - RAW_GOLD + - RAW_IRON - RED_BANNER - RED_BED - RED_DYE @@ -403,6 +424,7 @@ world: - REDSTONE_TORCH - REPEATER - ROSE_BUSH + - ROTTEN_FLESH - SADDLE - SALMON - SALMON_BUCKET @@ -433,6 +455,7 @@ world: - SPIDER_EYE - SPIDER_SPAWN_EGG - SPONGE + - SPYGLASS - SQUID_SPAWN_EGG - STICK - STICKY_PISTON @@ -442,6 +465,7 @@ world: - SUGAR - SUGAR_CANE - SUNFLOWER + - SUSPICIOUS_STEW - SWEET_BERRIES - SWEET_BERRY_BUSH - TERRACOTTA @@ -454,6 +478,7 @@ world: - TRIDENT - TRIPWIRE - TRIPWIRE_HOOK + - TROPICAL_FISH - TROPICAL_FISH_BUCKET - TROPICAL_FISH_SPAWN_EGG - TURTLE_EGG @@ -465,6 +490,7 @@ world: - VINE - WALL_TORCH - WANDERING_TRADER_SPAWN_EGG + - WARPED_FUNGUS_ON_A_STICK - WATER_BUCKET - WHEAT - WHEAT_SEEDS @@ -489,6 +515,8 @@ world: - DIAMOND_HORSE_ARMOR - ELYTRA - ENDER_EYE + - HOGLIN_SPAWN_EGG + - MUSIC_DISC_PIGSTEP - NETHER_BRICK - NETHER_BRICK_FENCE - NETHER_BRICK_SLAB @@ -500,7 +528,12 @@ world: - NETHER_STAR - NETHER_WART - NETHER_WART_BLOCK + - NETHERITE_INGOT + - NETHERITE_SCRAP - NETHERRACK + - PIGLIN_BANNER_PATTERN + - PIGLIN_BRUTE_SPAWN_EGG + - PIGLIN_SPAWN_EGG - QUARTZ - QUARTZ_BLOCK - QUARTZ_PILLAR @@ -510,11 +543,13 @@ world: - RED_NETHER_BRICK_STAIRS - RED_NETHER_BRICK_WALL - RED_NETHER_BRICKS + - STRIDER_SPAWN_EGG - WITHER_ROSE - WITHER_SKELETON_SKULL - WITHER_SKELETON_SPAWN_EGG + - ZOGLIN_SPAWN_EGG - ZOMBIE_HORSE_SPAWN_EGG - - ZOMBIE_PIGMAN_SPAWN_EGG + - ZOMBIFIED_PIGLIN_SPAWN_EGG end: - BLACK_SHULKER_BOX - BLUE_SHULKER_BOX @@ -529,6 +564,7 @@ world: - END_ROD - END_STONE - ENDERMAN_SPAWN_EGG + - ENDERMITE_SPAWN_EGG - LIGHT_BLUE_SHULKER_BOX - LIGHT_GRAY_SHULKER_BOX - LIME_SHULKER_BOX @@ -575,7 +611,7 @@ world: WHEAT: 4 STRIPPED_OAK_LOG: 1 CHEST: 5 - GRASS_PATH: 7 + DIRT_PATH: 7 STRIPPED_BIRCH_WOOD: 1 SPRUCE_LOG: 3 RED_MUSHROOM: 8 @@ -656,6 +692,205 @@ world: ANDESITE: 90 STONE: 180 ROSE_BUSH: 8 + ACACIA_PLANKS: 1 + AMETHYST_BLOCK: 1 + AMETHYST_CLUSTER: 1 + AZALEA: 1 + AZALEA_LEAVES: 1 + BARREL: 1 + BEE_NEST: 1 + BIRCH_PLANKS: 1 + BLACK_CONCRETE: 1 + BLACK_GLAZED_TERRACOTTA: 1 + BLACK_STAINED_GLASS: 1 + BLACK_TERRACOTTA: 1 + BLACK_WOOL: 1 + BLUE_CONCRETE: 1 + BLUE_GLAZED_TERRACOTTA: 1 + BLUE_ICE: 1 + BLUE_STAINED_GLASS: 1 + BLUE_TERRACOTTA: 1 + BLUE_WOOL: 1 + BRAIN_CORAL_BLOCK: 1 + BRICKS: 1 + BROWN_CONCRETE: 1 + BROWN_GLAZED_TERRACOTTA: 1 + BROWN_MUSHROOM_BLOCK: 1 + BROWN_STAINED_GLASS: 1 + BROWN_TERRACOTTA: 1 + BROWN_WOOL: 1 + BUBBLE_CORAL_BLOCK: 1 + CALCITE: 1 + CHISELED_DEEPSLATE: 1 + CHISELED_QUARTZ_BLOCK: 1 + CHISELED_RED_SANDSTONE: 1 + CHISELED_SANDSTONE: 1 + CHISELED_STONE_BRICKS: 1 + COAL_BLOCK: 1 + COBBLED_DEEPSLATE: 1 + COBBLESTONE: 1 + COMPOSTER: 1 + COPPER_BLOCK: 1 + COPPER_ORE: 1 + CRACKED_DEEPSLATE_BRICKS: 1 + CRACKED_STONE_BRICKS: 1 + CRIMSON_PLANKS: 1 + CUT_COPPER: 1 + CUT_RED_SANDSTONE: 1 + CUT_SANDSTONE: 1 + CYAN_CONCRETE: 1 + CYAN_GLAZED_TERRACOTTA: 1 + CYAN_STAINED_GLASS: 1 + CYAN_TERRACOTTA: 1 + CYAN_WOOL: 1 + DARK_OAK_PLANKS: 1 + DEAD_BRAIN_CORAL_BLOCK: 1 + DEAD_BUBBLE_CORAL_BLOCK: 1 + DEAD_FIRE_CORAL_BLOCK: 1 + DEAD_HORN_CORAL_BLOCK: 1 + DEAD_TUBE_CORAL_BLOCK: 1 + DEEPSLATE: 1 + DEEPSLATE_COAL_ORE: 1 + DEEPSLATE_COPPER_ORE: 1 + DEEPSLATE_DIAMOND_ORE: 1 + DEEPSLATE_EMERALD_ORE: 1 + DEEPSLATE_GOLD_ORE: 1 + DEEPSLATE_IRON_ORE: 1 + DEEPSLATE_LAPIS_ORE: 1 + DEEPSLATE_REDSTONE_ORE: 1 + DIRT: 1 + DRIPSTONE_BLOCK: 1 + END_STONE_BRICKS: 1 + EXPOSED_COPPER: 1 + EXPOSED_CUT_COPPER: 1 + FROSTED_ICE: 1 + GLASS: 1 + GRAY_CONCRETE: 1 + GRAY_GLAZED_TERRACOTTA: 1 + GRAY_STAINED_GLASS: 1 + GRAY_TERRACOTTA: 1 + GRAY_WOOL: 1 + GREEN_CONCRETE: 1 + GREEN_GLAZED_TERRACOTTA: 1 + GREEN_STAINED_GLASS: 1 + GREEN_TERRACOTTA: 1 + GREEN_WOOL: 1 + HAY_BLOCK: 1 + HONEY_BLOCK: 1 + HONEYCOMB_BLOCK: 1 + HORN_CORAL_BLOCK: 1 + JUNGLE_PLANKS: 1 + LARGE_AMETHYST_BUD: 1 + LAVA_CAULDRON: 1 + LIGHT_BLUE_CONCRETE: 1 + LIGHT_BLUE_GLAZED_TERRACOTTA: 1 + LIGHT_BLUE_STAINED_GLASS: 1 + LIGHT_BLUE_TERRACOTTA: 1 + LIGHT_BLUE_WOOL: 1 + LIGHT_GRAY_CONCRETE: 1 + LIGHT_GRAY_GLAZED_TERRACOTTA: 1 + LIGHT_GRAY_STAINED_GLASS: 1 + LIGHT_GRAY_TERRACOTTA: 1 + LIGHT_GRAY_WOOL: 1 + LIME_CONCRETE: 1 + LIME_GLAZED_TERRACOTTA: 1 + LIME_STAINED_GLASS: 1 + LIME_TERRACOTTA: 1 + LIME_WOOL: 1 + LODESTONE: 1 + MAGENTA_CONCRETE: 1 + MAGENTA_GLAZED_TERRACOTTA: 1 + MAGENTA_STAINED_GLASS: 1 + MAGENTA_TERRACOTTA: 1 + MEDIUM_AMETHYST_BUD: 1 + MOSS_BLOCK: 1 + MOSSY_STONE_BRICKS: 1 + MUSHROOM_STEM: 1 + OAK_PLANKS: 1 + ORANGE_CONCRETE: 1 + ORANGE_GLAZED_TERRACOTTA: 1 + ORANGE_STAINED_GLASS: 1 + ORANGE_TERRACOTTA: 1 + ORANGE_WOOL: 1 + OXIDIZED_COPPER: 1 + OXIDIZED_CUT_COPPER: 1 + PACKED_ICE: 1 + PINK_CONCRETE: 1 + PINK_GLAZED_TERRACOTTA: 1 + PINK_STAINED_GLASS: 1 + PINK_TERRACOTTA: 1 + PINK_WOOL: 1 + POINTED_DRIPSTONE: 1 + POLISHED_ANDESITE: 1 + POLISHED_BASALT: 1 + POLISHED_BLACKSTONE: 1 + POLISHED_DEEPSLATE: 1 + POLISHED_DIORITE: 1 + POLISHED_GRANITE: 1 + POWDER_SNOW_CAULDRON: 1 + PRISMARINE_BRICKS: 1 + PURPLE_CONCRETE: 1 + PURPLE_GLAZED_TERRACOTTA: 1 + PURPLE_TERRACOTTA: 1 + PURPUR_PILLAR: 1 + QUARTZ_BLOCK: 1 + RAW_COPPER_BLOCK: 1 + RAW_GOLD_BLOCK: 1 + RAW_IRON_BLOCK: 1 + RED_CONCRETE: 1 + RED_GLAZED_TERRACOTTA: 1 + RED_MUSHROOM_BLOCK: 1 + RED_STAINED_GLASS: 1 + RED_TERRACOTTA: 1 + RED_WOOL: 1 + REDSTONE_BLOCK: 1 + REDSTONE_LAMP: 1 + ROOTED_DIRT: 1 + SCAFFOLDING: 1 + SCULK_SENSOR: 1 + SHROOMLIGHT: 1 + SLIME_BLOCK: 1 + SMALL_AMETHYST_BUD: 1 + SMALL_DRIPLEAF: 1 + SMOOTH_BASALT: 1 + SMOOTH_QUARTZ: 1 + SMOOTH_RED_SANDSTONE: 1 + SMOOTH_SANDSTONE: 1 + SMOOTH_STONE: 1 + SNOW: 1 + SPRUCE_PLANKS: 1 + STICKY_PISTON: 1 + STONE_BRICKS: 1 + STRIPPED_CRIMSON_HYPHAE: 1 + STRIPPED_CRIMSON_STEM: 1 + STRIPPED_WARPED_HYPHAE: 1 + STRIPPED_WARPED_STEM: 1 + TARGET: 1 + TERRACOTTA: 1 + TINTED_GLASS: 1 + TUBE_CORAL_BLOCK: 1 + WATER_CAULDRON: 1 + WAXED_COPPER_BLOCK: 1 + WAXED_CUT_COPPER: 1 + WAXED_EXPOSED_COPPER: 1 + WAXED_EXPOSED_CUT_COPPER: 1 + WAXED_OXIDIZED_COPPER: 1 + WAXED_OXIDIZED_CUT_COPPER: 1 + WAXED_WEATHERED_COPPER: 1 + WAXED_WEATHERED_CUT_COPPER: 1 + WEATHERED_COPPER: 1 + WEATHERED_CUT_COPPER: 1 + WET_SPONGE: 1 + WHITE_CONCRETE: 1 + WHITE_GLAZED_TERRACOTTA: 1 + WHITE_STAINED_GLASS: 1 + WHITE_TERRACOTTA: 1 + WHITE_WOOL: 1 + YELLOW_CONCRETE: 1 + YELLOW_GLAZED_TERRACOTTA: 1 + YELLOW_STAINED_GLASS: 1 + YELLOW_TERRACOTTA: 1 + YELLOW_WOOL: 1 nether: # Generate SkyGrid Nether - if this is false, the nether world will not be made generate: true @@ -674,7 +909,7 @@ world: NETHERRACK: 200 NETHER_WART: 19 COBWEB: 7 - GLOWSTONE: 1 + GLOWSTONE: 2 RED_NETHER_BRICKS: 12 NETHER_BRICKS: 12 CHISELED_POLISHED_BLACKSTONE: 12 @@ -690,7 +925,16 @@ world: GILDED_BLACKSTONE: 10 SOUL_SOIL: 80 NETHER_GOLD_ORE: 12 - + BASALT: 20 + CHISELED_NETHER_BRICKS: 12 + CRACKED_NETHER_BRICKS: 10 + RESPAWN_ANCHOR: 1 + WARPED_FUNGUS: 1 + WARPED_HYPHAE: 1 + WARPED_NYLIUM: 1 + WARPED_PLANKS: 1 + WARPED_ROOTS: 1 + WARPED_WART_BLOCK: 1 # This option indicates if nether portals should be linked via dimensions. # Option will simulate vanilla portal mechanics that links portals together or creates a new portal, if there is not a portal in other dimension. # Added since 1.16 From 40344f23715f4b4d31b4b1aa7547b691dd3e97eb Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 12 Jul 2021 21:15:23 -0700 Subject: [PATCH 09/22] Improved blocks and items for 1.17 --- src/main/resources/config.yml | 422 ++++++++++++++++++++-------------- 1 file changed, 255 insertions(+), 167 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c8f2b97..a350857 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,4 +1,4 @@ -# SkyGrid Configuration ${version} +# SkyGrid Configuration {$version} # skygrid: command: @@ -490,7 +490,7 @@ world: - VINE - WALL_TORCH - WANDERING_TRADER_SPAWN_EGG - - WARPED_FUNGUS_ON_A_STICK + - WARPED_FUNGUS_ON_A_STICK - WATER_BUCKET - WHEAT - WHEAT_SEEDS @@ -509,6 +509,78 @@ world: - YELLOW_WOOL - ZOMBIE_SPAWN_EGG - ZOMBIE_VILLAGER_SPAWN_EGG + - BLAZE_SPAWN_EGG + - CHISELED_QUARTZ_BLOCK + - DIAMOND_HORSE_ARMOR + - ELYTRA + - ENDER_EYE + - HOGLIN_SPAWN_EGG + - MUSIC_DISC_PIGSTEP + - NETHER_BRICK + - NETHER_BRICK_FENCE + - NETHER_BRICK_SLAB + - NETHER_BRICK_STAIRS + - NETHER_BRICK_WALL + - NETHER_BRICKS + - NETHER_PORTAL + - NETHER_QUARTZ_ORE + - NETHER_STAR + - NETHER_WART + - NETHER_WART_BLOCK + - NETHERITE_INGOT + - NETHERITE_SCRAP + - NETHERRACK + - PIGLIN_BANNER_PATTERN + - PIGLIN_BRUTE_SPAWN_EGG + - PIGLIN_SPAWN_EGG + - QUARTZ + - QUARTZ_BLOCK + - QUARTZ_PILLAR + - QUARTZ_SLAB + - QUARTZ_STAIRS + - RED_NETHER_BRICK_SLAB + - RED_NETHER_BRICK_STAIRS + - RED_NETHER_BRICK_WALL + - RED_NETHER_BRICKS + - STRIDER_SPAWN_EGG + - WITHER_ROSE + - WITHER_SKELETON_SKULL + - WITHER_SKELETON_SPAWN_EGG + - ZOGLIN_SPAWN_EGG + - ZOMBIE_HORSE_SPAWN_EGG + - ZOMBIFIED_PIGLIN_SPAWN_EGG + - BLACK_SHULKER_BOX + - BLUE_SHULKER_BOX + - BREWING_STAND + - BROWN_SHULKER_BOX + - CHORUS_FLOWER + - CHORUS_FRUIT + - CHORUS_PLANT + - CYAN_SHULKER_BOX + - DRAGON_BREATH + - END_CRYSTAL + - END_ROD + - END_STONE + - ENDERMAN_SPAWN_EGG + - ENDERMITE_SPAWN_EGG + - LIGHT_BLUE_SHULKER_BOX + - LIGHT_GRAY_SHULKER_BOX + - LIME_SHULKER_BOX + - MAGENTA_SHULKER_BOX + - ORANGE_SHULKER_BOX + - PINK_SHULKER_BOX + - POPPED_CHORUS_FRUIT + - PURPLE_SHULKER_BOX + - PURPUR_BLOCK + - PURPUR_PILLAR + - PURPUR_SLAB + - PURPUR_STAIRS + - RED_SHULKER_BOX + - SHULKER_BOX + - SHULKER_SHELL + - SHULKER_SPAWN_EGG + - WHITE_SHULKER_BOX + - YELLOW_SHULKER_BOX nether: - BLAZE_SPAWN_EGG - CHISELED_QUARTZ_BLOCK @@ -589,117 +661,26 @@ world: # Chests have different items in them in different world types. # Over world blocks. Beware of making too many chests, they can lag a lot. blocks: - BROWN_MUSHROOM: 8 - STRIPPED_SPRUCE_LOG: 8 - SANDSTONE: 120 - RED_SAND: 20 - ACACIA_LOG: 20 - TNT: 1 - FERN: 4 - BOOKSHELF: 10 - PINK_TULIP: 8 - STRIPPED_ACACIA_LOG: 1 - JUNGLE_SAPLING: 19 - OAK_WOOD: 19 - WHITE_TULIP: 2 - CACTUS: 6 - SPRUCE_WOOD: 9 - BLUE_ORCHID: 1 - STRIPPED_ACACIA_WOOD: 1 - PUMPKIN: 9 - STRIPPED_BIRCH_LOG: 1 - WHEAT: 4 - STRIPPED_OAK_LOG: 1 - CHEST: 5 - DIRT_PATH: 7 - STRIPPED_BIRCH_WOOD: 1 - SPRUCE_LOG: 3 - RED_MUSHROOM: 8 - STRIPPED_DARK_OAK_WOOD: 1 - SPRUCE_SAPLING: 2 - REDSTONE_ORE: 2 - TALL_GRASS: 13 - DEAD_BUSH: 1 - DARK_OAK_SAPLING: 3 - GRASS_BLOCK: 200 - EMERALD_ORE: 5 - COAL_ORE: 70 - PETRIFIED_OAK_SLAB: 1 - SUNFLOWER: 3 - INFESTED_COBBLESTONE: 1 - DIORITE: 2 - STRIPPED_OAK_WOOD: 1 - FARMLAND: 7 - POPPY: 5 - DARK_OAK_WOOD: 18 - GOLD_ORE: 3 - DARK_OAK_LOG: 10 - CLAY: 5 - LILAC: 7 - DARK_PRISMARINE: 3 - STRIPPED_JUNGLE_LOG: 1 - PODZOL: 4 ACACIA_LEAVES: 8 - GRASS: 100 - STRIPPED_SPRUCE_WOOD: 1 - LARGE_FERN: 8 - GRANITE: 50 - SAND: 50 - FIRE_CORAL_BLOCK: 1 - SUGAR_CANE: 4 - JUNGLE_LEAVES: 10 - JUNGLE_WOOD: 20 - BONE_BLOCK: 1 - RED_TULIP: 3 - SPAWNER: 5 - JUNGLE_LOG: 17 - MOSSY_COBBLESTONE: 1 - PRISMARINE: 3 - DANDELION: 16 - ALLIUM: 12 - ACACIA_WOOD: 16 - PEONY: 7 - OAK_SAPLING: 11 - STRIPPED_DARK_OAK_LOG: 1 - LAVA: 5 - OBSIDIAN: 1 - AZURE_BLUET: 1 - OXEYE_DAISY: 6 - DARK_OAK_LEAVES: 9 - GRAVEL: 20 - SEA_LANTERN: 1 - MELON: 15 - COBWEB: 7 - COARSE_DIRT: 17 - LAPIS_ORE: 6 - ACACIA_SAPLING: 17 - BIRCH_SAPLING: 8 - OAK_LOG: 10 - BEETROOTS: 9 - STRIPPED_JUNGLE_WOOD: 1 - BIRCH_LOG: 2 - BIRCH_WOOD: 16 - MYCELIUM: 2 - DIAMOND_ORE: 1 - RED_SANDSTONE: 19 - OAK_LEAVES: 4 - IRON_ORE: 10 - SPRUCE_LEAVES: 9 - SPONGE: 1 - SNOW_BLOCK: 1 - BIRCH_LEAVES: 9 - ORANGE_TULIP: 10 - ANDESITE: 90 - STONE: 180 - ROSE_BUSH: 8 + ACACIA_LOG: 20 ACACIA_PLANKS: 1 + ACACIA_SAPLING: 17 + ACACIA_WOOD: 16 + ALLIUM: 12 AMETHYST_BLOCK: 1 AMETHYST_CLUSTER: 1 - AZALEA: 1 + ANDESITE: 90 AZALEA_LEAVES: 1 + AZALEA: 1 + AZURE_BLUET: 1 BARREL: 1 BEE_NEST: 1 + BEETROOTS: 9 + BIRCH_LEAVES: 9 + BIRCH_LOG: 2 BIRCH_PLANKS: 1 + BIRCH_SAPLING: 8 + BIRCH_WOOD: 16 BLACK_CONCRETE: 1 BLACK_GLAZED_TERRACOTTA: 1 BLACK_STAINED_GLASS: 1 @@ -708,33 +689,42 @@ world: BLUE_CONCRETE: 1 BLUE_GLAZED_TERRACOTTA: 1 BLUE_ICE: 1 + BLUE_ORCHID: 1 BLUE_STAINED_GLASS: 1 BLUE_TERRACOTTA: 1 BLUE_WOOL: 1 + BONE_BLOCK: 1 + BOOKSHELF: 10 BRAIN_CORAL_BLOCK: 1 BRICKS: 1 BROWN_CONCRETE: 1 BROWN_GLAZED_TERRACOTTA: 1 BROWN_MUSHROOM_BLOCK: 1 + BROWN_MUSHROOM: 8 BROWN_STAINED_GLASS: 1 BROWN_TERRACOTTA: 1 BROWN_WOOL: 1 BUBBLE_CORAL_BLOCK: 1 + CACTUS: 6 CALCITE: 1 + CHEST: 5 CHISELED_DEEPSLATE: 1 CHISELED_QUARTZ_BLOCK: 1 CHISELED_RED_SANDSTONE: 1 CHISELED_SANDSTONE: 1 CHISELED_STONE_BRICKS: 1 + CLAY: 5 COAL_BLOCK: 1 + COAL_ORE: 70 + COARSE_DIRT: 17 COBBLED_DEEPSLATE: 1 COBBLESTONE: 1 + COBWEB: 7 COMPOSTER: 1 COPPER_BLOCK: 1 COPPER_ORE: 1 CRACKED_DEEPSLATE_BRICKS: 1 CRACKED_STONE_BRICKS: 1 - CRIMSON_PLANKS: 1 CUT_COPPER: 1 CUT_RED_SANDSTONE: 1 CUT_SANDSTONE: 1 @@ -743,13 +733,19 @@ world: CYAN_STAINED_GLASS: 1 CYAN_TERRACOTTA: 1 CYAN_WOOL: 1 + DANDELION: 16 + DARK_OAK_LEAVES: 9 + DARK_OAK_LOG: 10 DARK_OAK_PLANKS: 1 + DARK_OAK_SAPLING: 3 + DARK_OAK_WOOD: 18 + DARK_PRISMARINE: 3 DEAD_BRAIN_CORAL_BLOCK: 1 DEAD_BUBBLE_CORAL_BLOCK: 1 + DEAD_BUSH: 1 DEAD_FIRE_CORAL_BLOCK: 1 DEAD_HORN_CORAL_BLOCK: 1 DEAD_TUBE_CORAL_BLOCK: 1 - DEEPSLATE: 1 DEEPSLATE_COAL_ORE: 1 DEEPSLATE_COPPER_ORE: 1 DEEPSLATE_DIAMOND_ORE: 1 @@ -758,13 +754,26 @@ world: DEEPSLATE_IRON_ORE: 1 DEEPSLATE_LAPIS_ORE: 1 DEEPSLATE_REDSTONE_ORE: 1 + DEEPSLATE: 1 + DIAMOND_ORE: 1 + DIORITE: 2 + DIRT_PATH: 7 DIRT: 1 DRIPSTONE_BLOCK: 1 + EMERALD_ORE: 5 END_STONE_BRICKS: 1 EXPOSED_COPPER: 1 EXPOSED_CUT_COPPER: 1 + FARMLAND: 7 + FERN: 4 + FIRE_CORAL_BLOCK: 1 FROSTED_ICE: 1 GLASS: 1 + GOLD_ORE: 3 + GRANITE: 50 + GRASS_BLOCK: 200 + GRASS: 100 + GRAVEL: 20 GRAY_CONCRETE: 1 GRAY_GLAZED_TERRACOTTA: 1 GRAY_STAINED_GLASS: 1 @@ -779,9 +788,18 @@ world: HONEY_BLOCK: 1 HONEYCOMB_BLOCK: 1 HORN_CORAL_BLOCK: 1 + INFESTED_COBBLESTONE: 1 + IRON_ORE: 10 + JUNGLE_LEAVES: 10 + JUNGLE_LOG: 17 JUNGLE_PLANKS: 1 + JUNGLE_SAPLING: 19 + JUNGLE_WOOD: 20 + LAPIS_ORE: 6 LARGE_AMETHYST_BUD: 1 + LARGE_FERN: 8 LAVA_CAULDRON: 1 + LAVA: 5 LIGHT_BLUE_CONCRETE: 1 LIGHT_BLUE_GLAZED_TERRACOTTA: 1 LIGHT_BLUE_STAINED_GLASS: 1 @@ -792,6 +810,7 @@ world: LIGHT_GRAY_STAINED_GLASS: 1 LIGHT_GRAY_TERRACOTTA: 1 LIGHT_GRAY_WOOL: 1 + LILAC: 7 LIME_CONCRETE: 1 LIME_GLAZED_TERRACOTTA: 1 LIME_STAINED_GLASS: 1 @@ -803,23 +822,37 @@ world: MAGENTA_STAINED_GLASS: 1 MAGENTA_TERRACOTTA: 1 MEDIUM_AMETHYST_BUD: 1 + MELON: 15 MOSS_BLOCK: 1 + MOSSY_COBBLESTONE: 1 MOSSY_STONE_BRICKS: 1 MUSHROOM_STEM: 1 + MYCELIUM: 2 + OAK_LEAVES: 4 + OAK_LOG: 10 OAK_PLANKS: 1 + OAK_SAPLING: 11 + OAK_WOOD: 19 + OBSIDIAN: 1 ORANGE_CONCRETE: 1 ORANGE_GLAZED_TERRACOTTA: 1 ORANGE_STAINED_GLASS: 1 ORANGE_TERRACOTTA: 1 + ORANGE_TULIP: 10 ORANGE_WOOL: 1 + OXEYE_DAISY: 6 OXIDIZED_COPPER: 1 OXIDIZED_CUT_COPPER: 1 PACKED_ICE: 1 + PEONY: 7 + PETRIFIED_OAK_SLAB: 1 PINK_CONCRETE: 1 PINK_GLAZED_TERRACOTTA: 1 PINK_STAINED_GLASS: 1 PINK_TERRACOTTA: 1 + PINK_TULIP: 8 PINK_WOOL: 1 + PODZOL: 4 POINTED_DRIPSTONE: 1 POLISHED_ANDESITE: 1 POLISHED_BASALT: 1 @@ -827,27 +860,37 @@ world: POLISHED_DEEPSLATE: 1 POLISHED_DIORITE: 1 POLISHED_GRANITE: 1 + POPPY: 5 POWDER_SNOW_CAULDRON: 1 PRISMARINE_BRICKS: 1 + PRISMARINE: 3 + PUMPKIN: 9 PURPLE_CONCRETE: 1 PURPLE_GLAZED_TERRACOTTA: 1 PURPLE_TERRACOTTA: 1 - PURPUR_PILLAR: 1 - QUARTZ_BLOCK: 1 RAW_COPPER_BLOCK: 1 RAW_GOLD_BLOCK: 1 RAW_IRON_BLOCK: 1 RED_CONCRETE: 1 RED_GLAZED_TERRACOTTA: 1 RED_MUSHROOM_BLOCK: 1 + RED_MUSHROOM: 8 + RED_SAND: 20 + RED_SANDSTONE: 19 RED_STAINED_GLASS: 1 RED_TERRACOTTA: 1 + RED_TULIP: 3 RED_WOOL: 1 REDSTONE_BLOCK: 1 REDSTONE_LAMP: 1 + REDSTONE_ORE: 3 ROOTED_DIRT: 1 + ROSE_BUSH: 8 + SAND: 50 + SANDSTONE: 120 SCAFFOLDING: 1 SCULK_SENSOR: 1 + SEA_LANTERN: 1 SHROOMLIGHT: 1 SLIME_BLOCK: 1 SMALL_AMETHYST_BUD: 1 @@ -857,17 +900,37 @@ world: SMOOTH_RED_SANDSTONE: 1 SMOOTH_SANDSTONE: 1 SMOOTH_STONE: 1 + SNOW_BLOCK: 1 SNOW: 1 + SPAWNER: 5 + SPONGE: 1 + SPRUCE_LEAVES: 9 + SPRUCE_LOG: 3 SPRUCE_PLANKS: 1 + SPRUCE_SAPLING: 2 + SPRUCE_WOOD: 9 STICKY_PISTON: 1 STONE_BRICKS: 1 - STRIPPED_CRIMSON_HYPHAE: 1 - STRIPPED_CRIMSON_STEM: 1 - STRIPPED_WARPED_HYPHAE: 1 - STRIPPED_WARPED_STEM: 1 + STONE: 180 + STRIPPED_ACACIA_LOG: 10 + STRIPPED_ACACIA_WOOD: 10 + STRIPPED_BIRCH_LOG: 10 + STRIPPED_BIRCH_WOOD: 10 + STRIPPED_DARK_OAK_LOG: 10 + STRIPPED_DARK_OAK_WOOD: 10 + STRIPPED_JUNGLE_LOG: 10 + STRIPPED_JUNGLE_WOOD: 10 + STRIPPED_OAK_LOG: 10 + STRIPPED_OAK_WOOD: 10 + STRIPPED_SPRUCE_LOG: 10 + STRIPPED_SPRUCE_WOOD: 10 + SUGAR_CANE: 4 + SUNFLOWER: 3 + TALL_GRASS: 13 TARGET: 1 TERRACOTTA: 1 TINTED_GLASS: 1 + TNT: 1 TUBE_CORAL_BLOCK: 1 WATER_CAULDRON: 1 WAXED_COPPER_BLOCK: 1 @@ -881,10 +944,12 @@ world: WEATHERED_COPPER: 1 WEATHERED_CUT_COPPER: 1 WET_SPONGE: 1 + WHEAT: 4 WHITE_CONCRETE: 1 WHITE_GLAZED_TERRACOTTA: 1 WHITE_STAINED_GLASS: 1 WHITE_TERRACOTTA: 1 + WHITE_TULIP: 2 WHITE_WOOL: 1 YELLOW_CONCRETE: 1 YELLOW_GLAZED_TERRACOTTA: 1 @@ -898,46 +963,53 @@ world: # Beware with glowstone and lava - the lighting calcs will lag the # server badly if there are too many blocks. blocks: - SOUL_SAND: 90 + POLISHED_BLACKSTONE_BRICKS: 12 LAVA: 1 + OBSIDIAN: 10 NETHER_QUARTZ_ORE: 15 + NETHERITE_BLOCK: 10 MAGMA_BLOCK: 1 - NETHER_WART_BLOCK: 12 GRAVEL: 10 - SPAWNER: 2 - CHEST: 15 - NETHERRACK: 200 - NETHER_WART: 19 + CRACKED_POLISHED_BLACKSTONE_BRICKS: 12 + BASALT: 20 + GILDED_BLACKSTONE: 10 + WARPED_WART_BLOCK: 1 + CRACKED_NETHER_BRICKS: 10 COBWEB: 7 + WARPED_NYLIUM: 1 GLOWSTONE: 2 - RED_NETHER_BRICKS: 12 - NETHER_BRICKS: 12 CHISELED_POLISHED_BLACKSTONE: 12 - POLISHED_BLACKSTONE_BRICKS: 12 - POLISHED_BLACKSTONE_BRICK_STAIRS: 12 - CRACKED_POLISHED_BLACKSTONE_BRICKS: 12 - NETHERITE_BLOCK: 10 ANCIENT_DEBRIS: 10 - BONE_BLOCK: 10 - CRYING_OBSIDIAN: 10 - OBSIDIAN: 10 + RED_NETHER_BRICKS: 12 + NETHER_BRICKS: 12 + SOUL_SAND: 90 BLACKSTONE: 10 - GILDED_BLACKSTONE: 10 - SOUL_SOIL: 80 + POLISHED_BLACKSTONE_BRICK_STAIRS: 12 + NETHER_WART_BLOCK: 12 NETHER_GOLD_ORE: 12 - BASALT: 20 - CHISELED_NETHER_BRICKS: 12 - CRACKED_NETHER_BRICKS: 10 - RESPAWN_ANCHOR: 1 + BONE_BLOCK: 10 + SPAWNER: 2 + WARPED_ROOTS: 1 WARPED_FUNGUS: 1 - WARPED_HYPHAE: 1 - WARPED_NYLIUM: 1 + CHEST: 15 + NETHER_WART: 19 + NETHERRACK: 200 WARPED_PLANKS: 1 - WARPED_ROOTS: 1 - WARPED_WART_BLOCK: 1 + WARPED_HYPHAE: 1 + RESPAWN_ANCHOR: 1 + CHISELED_NETHER_BRICKS: 12 + SOUL_SOIL: 80 + CRYING_OBSIDIAN: 10 + STRIPPED_CRIMSON_HYPHAE: 100 + STRIPPED_CRIMSON_STEM: 100 + STRIPPED_WARPED_HYPHAE: 100 + STRIPPED_WARPED_STEM: 100 + CRIMSON_PLANKS: 100 + # This option indicates if nether portals should be linked via dimensions. - # Option will simulate vanilla portal mechanics that links portals together or creates a new portal, if there is not a portal in other dimension. - # Added since 1.16 + # Option will simulate vanilla portal mechanics that links portals together + # or creates a new portal, if there is not a portal in that dimension. + # Added since 1.16. create-and-link-portals: false end: # Generate SkyGrid End - if this is false, the end world will not be made @@ -946,16 +1018,17 @@ world: blocks: CHEST: 1 END_ROD: 1 - OBSIDIAN: 5 CHORUS_PLANT: 2 + OBSIDIAN: 5 PURPLE_STAINED_GLASS: 50 AIR: 200 END_STONE: 200 GRAVEL: 10 SPAWNER: 1 PURPUR_BLOCK: 50 - # This option indicates if obsidian platform in the end should be generated when player enters the end world. - # Added since 1.16 + # This option indicates if obsidian platform in the end should be generated + # when player enters the end world. + # Added since 1.16. create-obsidian-platform: false # Biomes - this will affect some block types and tree types. create-biomes: true @@ -1003,8 +1076,10 @@ world: DRAGON_EGG: true ISLAND_RESPAWN: true REDSTONE: true + VISITOR_KEEP_INVENTORY: false BUCKET: true LOCK: true + PETS_STAY_AT_HOME: true ENDER_PEARL: true DOOR: true NATURAL_SPAWNING_OUTSIDE_RANGE: true @@ -1014,6 +1089,7 @@ world: ANVIL: true MINECART: true FISH_SCOOPING: true + TRAPPED_CHEST: true END_PORTAL: true BREEDING: true HURT_VILLAGERS: true @@ -1033,12 +1109,15 @@ world: TRADING: true EGGS: true ITEM_DROP: true + CHEST: true NOTE_BLOCK: true ENTER_EXIT_MESSAGES: true FLINT_AND_STEEL: true NETHER_PORTAL: true REMOVE_END_EXIT_ISLAND: true LECTERN: true + SHULKER_BOX: true + OFFLINE_GROWTH: true CROP_TRAMPLE: true ITEM_PICKUP: true BREWING: true @@ -1047,6 +1126,7 @@ world: TNT_PRIMING: true COLLECT_WATER: true BUTTON: true + COMPOSTER: true FIRE_EXTINGUISH: true COMMAND_RANKS: true BEACON: true @@ -1061,6 +1141,7 @@ world: REMOVE_MOBS: true ENCHANTING: true SHEARING: true + FLOWER_POT: true BOAT: true BED: true SPAWN_EGGS: true @@ -1073,10 +1154,12 @@ world: LEASH: true BREAK_BLOCKS: true MOUNT_INVENTORY: true + OFFLINE_REDSTONE: true CHORUS_FRUIT: true CONTAINER: true JUKEBOX: true POTION_THROWING: true + BARREL: true # These are the default protection settings protected areas. # The value is the minimum island rank required to do the action # Ranks are: Visitor = 0, Member = 900, Owner = 1000 @@ -1090,9 +1173,10 @@ world: DOOR: 500 BREAK_HOPPERS: 500 FURNACE: 500 - ANVIL: 500 MINECART: 500 + ANVIL: 500 FISH_SCOOPING: 500 + TRAPPED_CHEST: 500 END_PORTAL: 500 BREEDING: 500 HURT_VILLAGERS: 500 @@ -1102,39 +1186,42 @@ world: BREAK_SPAWNERS: 500 LEVER: 500 ELYTRA: 0 - CAKE: 500 RIDING: 500 + CAKE: 500 HURT_MONSTERS: 500 NAME_TAG: 500 ARMOR_STAND: 500 TRADING: 500 EGGS: 500 ITEM_DROP: 500 + CHEST: 500 NOTE_BLOCK: 500 FLINT_AND_STEEL: 500 NETHER_PORTAL: 500 LECTERN: 500 + SHULKER_BOX: 500 ITEM_PICKUP: 500 CROP_TRAMPLE: 500 - MOVE_BOX: 1000 - BREWING: 500 DROPPER: 500 + BREWING: 500 TNT_PRIMING: 500 COLLECT_WATER: 500 + COMPOSTER: 500 BUTTON: 500 FIRE_EXTINGUISH: 500 COMMAND_RANKS: 500 BEACON: 500 TRAPDOOR: 500 - PRESSURE_PLATE: 500 EXPERIENCE_BOTTLE_THROWING: 500 - HIVE: 500 + PRESSURE_PLATE: 500 DYE: 500 + HIVE: 500 PLACE_BLOCKS: 500 ITEM_FRAME: 500 CRAFTING: 500 - SHEARING: 500 ENCHANTING: 500 + SHEARING: 500 + FLOWER_POT: 500 BOAT: 500 SPAWN_EGGS: 500 BED: 500 @@ -1144,25 +1231,26 @@ world: EXPERIENCE_PICKUP: 500 HOPPER: 500 LEASH: 500 - MOUNT_INVENTORY: 500 BREAK_BLOCKS: 500 + MOUNT_INVENTORY: 500 CHORUS_FRUIT: 500 CONTAINER: 500 - JUKEBOX: 500 + BARREL: 500 POTION_THROWING: 500 + JUKEBOX: 500 # These are the default settings for new protected areas default-settings: PVP_END: false PVP_NETHER: false LEAF_DECAY: true - TNT_DAMAGE: true MONSTER_SPAWNERS_SPAWN: true + TNT_DAMAGE: true ANIMAL_NATURAL_SPAWN: true MONSTER_NATURAL_SPAWN: true FIRE_IGNITE: true FIRE_SPREAD: true - FIRE_BURNING: true ANIMAL_SPAWNERS_SPAWN: true + FIRE_BURNING: true PVP_OVERWORLD: false # These settings/flags are hidden from users # Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings @@ -1262,43 +1350,43 @@ area: # List of commands to run when a player joins. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. on-join: [] # list of commands to run when a player leaves. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. on-leave: [] - # Returns a list of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true. + # List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. # Added since 1.14.0. - on-respawn: [ ] + on-respawn: [] sethome: nether: # Allow setting home in the nether. Only available on nether islands, not vanilla nether. @@ -1332,8 +1420,8 @@ protection: # Geo restrict mobs. # Mobs that exit the protected space where they were spawned will be removed. geo-limit-settings: [] - # SkyGrid blocked mobs. - # List of mobs that should not spawn in SkyGrid. + # AcidIsland blocked mobs. + # List of mobs that should not spawn in AcidIsland. block-mobs: [] # Invincible visitors. List of damages that will not affect visitors. # Make list blank if visitors should receive all damages From 30bec598aa546942cd3d87a82eea4e542fb53378 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 12 Jul 2021 21:18:23 -0700 Subject: [PATCH 10/22] Update GitHub Action to Java 16 --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e16544..07dd6b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,18 +14,19 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 16 + uses: actions/setup-java@v2 with: - java-version: 11 + distribution: 'adopt' + java-version: 16 - name: Cache SonarCloud packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} From 7436d438431ce0a833bb4eb9390c4f0f04a9a588 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 09:56:27 -0700 Subject: [PATCH 11/22] Make Pladdon Java 16 code clean up. --- pom.xml | 13 +-- .../java/world/bentobox/skygrid/Settings.java | 14 +--- .../java/world/bentobox/skygrid/SkyGrid.java | 9 +- .../bentobox/skygrid/SkyGridPladdon.java | 12 +++ .../bentobox/skygrid/generators/Biomes.java | 8 +- .../skygrid/generators/BlockProbability.java | 2 +- .../skygrid/generators/RandomSeries.java | 2 +- .../skygrid/generators/SkyGridChunks.java | 84 ++++++------------- .../skygrid/generators/SkyGridGen.java | 6 +- .../skygrid/generators/SkyGridPop.java | 2 +- src/main/resources/config.yml | 8 +- src/main/resources/plugin.yml | 7 ++ 12 files changed, 75 insertions(+), 92 deletions(-) create mode 100644 src/main/java/world/bentobox/skygrid/SkyGridPladdon.java create mode 100644 src/main/resources/plugin.yml diff --git a/pom.xml b/pom.xml index 6b177c2..e88f8e0 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ UTF-8 UTF-8 - 1.8 + 16 2.0.2 @@ -230,8 +230,7 @@ maven-compiler-plugin 3.7.0 - ${java.version} - ${java.version} + ${java.version} @@ -244,18 +243,20 @@ maven-jar-plugin 3.1.0 - + org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 + 3.3.0 - public false -Xdoclint:none + + ${java.home}/bin/javadoc attach-javadocs + install jar diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index c849aec..d5de44c 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1,12 +1,6 @@ package world.bentobox.skygrid; -import java.util.ArrayList; -import java.util.EnumMap; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import org.bukkit.Difficulty; import org.bukkit.GameMode; @@ -1348,7 +1342,7 @@ public void setDeathsResetOnNewIsland(boolean deathsResetOnNewIsland) { */ @Override public List getOnJoinCommands() { - return onJoinCommands; + return Objects.requireNonNullElseGet(onJoinCommands, () -> new ArrayList<>()); } /** @@ -1363,7 +1357,7 @@ public void setOnJoinCommands(List onJoinCommands) { */ @Override public List getOnLeaveCommands() { - return onLeaveCommands; + return Objects.requireNonNullElseGet(onLeaveCommands, () -> new ArrayList<>()); } /** @@ -1378,7 +1372,7 @@ public void setOnLeaveCommands(List onLeaveCommands) { */ @Override public List getOnRespawnCommands() { - return onRespawnCommands; + return Objects.requireNonNullElseGet(onRespawnCommands, () -> new ArrayList<>()); } /** diff --git a/src/main/java/world/bentobox/skygrid/SkyGrid.java b/src/main/java/world/bentobox/skygrid/SkyGrid.java index 7b6df4f..5a552bb 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGrid.java +++ b/src/main/java/world/bentobox/skygrid/SkyGrid.java @@ -1,6 +1,7 @@ package world.bentobox.skygrid; import java.util.Arrays; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @@ -36,7 +37,7 @@ public class SkyGrid extends GameModeAddon { private Settings settings; private WorldStyles worldStyles; private SkyGridGen gen; - private Config configObject = new Config<>(this, Settings.class); + private final Config configObject = new Config<>(this, Settings.class); @Override public void onLoad() { @@ -78,9 +79,9 @@ private void loadSettings() { // Blocks @SuppressWarnings("deprecation") List blocks = Arrays.stream(Material.values()).filter(Material::isBlock).filter(m -> !m.isLegacy()).collect(Collectors.toList()); - Set allBlocks = settings.getBlocks().keySet().stream().collect(Collectors.toSet()); - settings.getNetherBlocks().keySet().forEach(allBlocks::add); - settings.getEndBlocks().keySet().forEach(allBlocks::add); + Set allBlocks = new HashSet<>(settings.getBlocks().keySet()); + allBlocks.addAll(settings.getNetherBlocks().keySet()); + allBlocks.addAll(settings.getEndBlocks().keySet()); Set missingBlocks = blocks.stream().filter(s -> !allBlocks.contains(s)).collect(Collectors.toSet()); if (!missingBlocks.isEmpty()) { this.logWarning("Missing blocks from config:"); diff --git a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java new file mode 100644 index 0000000..4eb0674 --- /dev/null +++ b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java @@ -0,0 +1,12 @@ +package world.bentobox.skygrid; + +import world.bentobox.bentobox.api.addons.Addon; +import world.bentobox.bentobox.api.addons.Pladdon; + +public class SkyGridPladdon extends Pladdon { + + @Override + public Addon getAddon() { + return new SkyGrid(); + } +} diff --git a/src/main/java/world/bentobox/skygrid/generators/Biomes.java b/src/main/java/world/bentobox/skygrid/generators/Biomes.java index 93c6395..74ec42d 100644 --- a/src/main/java/world/bentobox/skygrid/generators/Biomes.java +++ b/src/main/java/world/bentobox/skygrid/generators/Biomes.java @@ -7,14 +7,14 @@ import org.bukkit.block.Biome; /** - * In order to find the biome of a region, we look up how close it's - * conditions are to the conditions on this map. We can use it's proximity + * In order to find the biome of a region, we look up how close its + * conditions are to the conditions on this map. We can use its proximity * to a biome to determine how much influence that biome's noise generators, * vegetation and features should have on the area of the map. This allows us * to have seamless transitions between the biomes (at the price of speed) * - * For example, a place with no precipitation and -30 degree (celcius) weather - * is a tundra, but it is also much closer to a dessert than a rain forest. + * For example, a place with no precipitation and -30 degree (Celcius) weather + * is a tundra, but it is also much closer to a desert than a rain forest. * */ public enum Biomes { diff --git a/src/main/java/world/bentobox/skygrid/generators/BlockProbability.java b/src/main/java/world/bentobox/skygrid/generators/BlockProbability.java index e356183..4d2638d 100644 --- a/src/main/java/world/bentobox/skygrid/generators/BlockProbability.java +++ b/src/main/java/world/bentobox/skygrid/generators/BlockProbability.java @@ -31,7 +31,7 @@ public void addBlock(Material material, int prob) { /** * This picks a random block with the following constraints: * A cactus is never chosen as the bottom block. - * Water or lava never is placed above sugar cane or cactuses because when they grow, they will touch the + * Water or lava is never placed above sugar cane or cacti because when they grow, they will touch the * liquid and cause it to flow. * @param random - random object * @param bottom - if true, result will never be CACTUS diff --git a/src/main/java/world/bentobox/skygrid/generators/RandomSeries.java b/src/main/java/world/bentobox/skygrid/generators/RandomSeries.java index cc06ec4..85b8207 100644 --- a/src/main/java/world/bentobox/skygrid/generators/RandomSeries.java +++ b/src/main/java/world/bentobox/skygrid/generators/RandomSeries.java @@ -8,7 +8,7 @@ * */ public class RandomSeries { - private Random random = new Random(); + private final Random random = new Random(); private final int[] reset; private int[] series; private int pos; diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java index 84b5941..fa9a637 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java @@ -1,8 +1,6 @@ package world.bentobox.skygrid.generators; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.Random; @@ -21,38 +19,13 @@ public class SkyGridChunks { // Blocks that need to be placed on dirt - private static final List NEEDS_DIRT = Collections.unmodifiableList(Arrays.asList( - Material.ACACIA_SAPLING, - Material.ALLIUM, - Material.AZURE_BLUET, - Material.BEETROOTS, - Material.BIRCH_SAPLING, - Material.BLUE_ORCHID, - Material.BROWN_MUSHROOM, - Material.DANDELION, - Material.DARK_OAK_SAPLING, - Material.DEAD_BUSH, - Material.FERN, - Material.GRASS, - Material.JUNGLE_SAPLING, - Material.LARGE_FERN, - Material.LILAC, - Material.OAK_SAPLING, - Material.ORANGE_TULIP, - Material.OXEYE_DAISY, - Material.PEONY, - Material.PINK_TULIP, - Material.POPPY, - Material.RED_MUSHROOM, - Material.RED_TULIP, - Material.ROSE_BUSH, - Material.SPRUCE_SAPLING, - Material.SUGAR_CANE, - Material.SUNFLOWER, - Material.TALL_GRASS, - Material.WHEAT, - Material.WHITE_TULIP - )); + private static final List NEEDS_DIRT = List.of(Material.ACACIA_SAPLING, Material.ALLIUM, Material.AZURE_BLUET, + Material.BEETROOTS, Material.BIRCH_SAPLING, Material.BLUE_ORCHID, Material.BROWN_MUSHROOM, Material.DANDELION, + Material.DARK_OAK_SAPLING, Material.DEAD_BUSH, Material.FERN, Material.GRASS, Material.JUNGLE_SAPLING, + Material.LARGE_FERN, Material.LILAC, Material.OAK_SAPLING, Material.ORANGE_TULIP, Material.OXEYE_DAISY, + Material.PEONY, Material.PINK_TULIP, Material.POPPY, Material.RED_MUSHROOM, Material.RED_TULIP, + Material.ROSE_BUSH, Material.SPRUCE_SAPLING, Material.SUGAR_CANE, Material.SUNFLOWER, Material.TALL_GRASS, + Material.WHEAT, Material.WHITE_TULIP); private static final int PRE_MADE_CHUNKS_NUMBER = 100; @@ -100,14 +73,11 @@ private List getChunk(BlockProbability prob) { * @return list of sky grid blocks */ public List getSkyGridChunk(Environment env) { - switch (env) { - case NETHER: - return chunksNether.get(random.nextInt(chunksNether.size())); - case THE_END: - return chunksEnd.get(random.nextInt(chunksEnd.size())); - default: - return chunks.get(random.nextInt(chunks.size())); - } + return switch (env) { + case NETHER -> chunksNether.get(random.nextInt(chunksNether.size())); + case THE_END -> chunksEnd.get(random.nextInt(chunksEnd.size())); + default -> chunks.get(random.nextInt(chunks.size())); + }; } @@ -138,22 +108,20 @@ private void setBlock(BlockProbability prob, int x, int y, int z, List { + result.add(new SkyGridBlock(x, y, z, Material.SAND)); + result.add(new SkyGridBlock(x, y - 1, z, Material.SANDSTONE)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + case NETHER_WART -> { + result.add(new SkyGridBlock(x, y, z, Material.SOUL_SAND)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + case END_ROD, CHORUS_PLANT -> { + result.add(new SkyGridBlock(x, y, z, Material.END_STONE)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + default -> result.add(new SkyGridBlock(x, y, z, blockMat)); } } diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java index 44279ce..eaf1c6b 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java @@ -19,11 +19,11 @@ public class SkyGridGen extends ChunkGenerator { private final SkyGrid addon; - private Map biomeGenerator; + private final Map biomeGenerator; - private BlockPopulator populator; + private final BlockPopulator populator; - private SkyGridChunks preMade; + private final SkyGridChunks preMade; /** * @param addon - addon diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java index 2cfc39d..57fb12f 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java @@ -28,7 +28,7 @@ public class SkyGridPop extends BlockPopulator { private static final RandomSeries slt = new RandomSeries(27); private final int size; - private SkyGrid addon; + private final SkyGrid addon; private final List chestItemsWorld; private final List chestItemsNether; private final List chestItemsEnd; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index a350857..487e620 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -10,12 +10,12 @@ skygrid: admin: sgadmin sga # The default action for new player command call. # Sub-command of main player command that will be run on first player command call. - # By default it is sub-command 'create'. + # By default, it is the sub-command 'create'. # Added since 1.16.0. new-player-action: create # The default action for player command. # Sub-command of main player command that will be run on each player command call. - # By default it is sub-command 'go'. + # By default, it is the sub-command 'go'. # Added since 1.16.0. default-action: go world: @@ -960,7 +960,7 @@ world: # Generate SkyGrid Nether - if this is false, the nether world will not be made generate: true # Nether block types - # Beware with glowstone and lava - the lighting calcs will lag the + # Beware of glowstone and lava - the lighting calcs will lag the # server badly if there are too many blocks. blocks: POLISHED_BLACKSTONE_BRICKS: 12 @@ -1326,7 +1326,7 @@ area: # Warning: # * If you are running multiple gamemodes on your server, and all of them have # this feature enabled, an area in all the gamemodes will be created simultaneously. - # However, it is impossible to know on which area the player will be teleported to afterwards. + # However, it is impossible to know on which area the player will be teleported afterwards. # * Area creation can be resource-intensive, please consider the options below to help mitigate # the potential issues, especially if you expect a lot of players to connect to your server # in a limited period of time. diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..e88ac5c --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,7 @@ +name: Pladdon +main: world.bentobox.skygrid.SkyGrid +version: ${version} +api-version: 1.17 +description: SkyGrid +author: tastybento +depend: [BentoBox] From 34bde965f257af9c95018815bc9037aa445151b6 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 10:05:16 -0700 Subject: [PATCH 12/22] Remove missing blocks/items checking code. --- .../java/world/bentobox/skygrid/SkyGrid.java | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/SkyGrid.java b/src/main/java/world/bentobox/skygrid/SkyGrid.java index 5a552bb..d7f2fe7 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGrid.java +++ b/src/main/java/world/bentobox/skygrid/SkyGrid.java @@ -1,12 +1,5 @@ package world.bentobox.skygrid; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -import org.bukkit.Material; import org.bukkit.World; import org.bukkit.WorldCreator; import org.bukkit.WorldType; @@ -65,28 +58,6 @@ private void loadSettings() { playerCommand = new DefaultPlayerCommand(this) {}; adminCommand = new DefaultAdminCommand(this) {}; - // Check for missing items and blocks - @SuppressWarnings("deprecation") - List items = Arrays.stream(Material.values()).filter(Material::isItem).filter(m -> !m.isLegacy()).filter(m -> !m.isBlock()).collect(Collectors.toList()); - List allItems = settings.getChestItemsOverworld(); - allItems.addAll(settings.getChestItemsNether()); - allItems.addAll(settings.getChestItemsEnd()); - List missingItems = items.stream().map(Material::name).filter(s -> !allItems.contains(s)).collect(Collectors.toList()); - if (!missingItems.isEmpty()) { - this.logWarning("Missing items from config:"); - missingItems.forEach(this::logWarning); - } - // Blocks - @SuppressWarnings("deprecation") - List blocks = Arrays.stream(Material.values()).filter(Material::isBlock).filter(m -> !m.isLegacy()).collect(Collectors.toList()); - Set allBlocks = new HashSet<>(settings.getBlocks().keySet()); - allBlocks.addAll(settings.getNetherBlocks().keySet()); - allBlocks.addAll(settings.getEndBlocks().keySet()); - Set missingBlocks = blocks.stream().filter(s -> !allBlocks.contains(s)).collect(Collectors.toSet()); - if (!missingBlocks.isEmpty()) { - this.logWarning("Missing blocks from config:"); - missingBlocks.stream().map(Material::name).forEach(this::logWarning); - } } @Override From a2d2698ca297fa2423cd87eb9d24ff3bd7f5a213 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 10:08:31 -0700 Subject: [PATCH 13/22] Correct reference to SkyGrid in settings --- src/main/java/world/bentobox/skygrid/Settings.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index d5de44c..c29abca 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -419,8 +419,8 @@ public class Settings implements WorldSettings { @ConfigEntry(path = "protection.geo-limit-settings") private List geoLimitSettings = new ArrayList<>(); - @ConfigComment("AcidIsland blocked mobs.") - @ConfigComment("List of mobs that should not spawn in AcidIsland.") + @ConfigComment("SkyGrid blocked mobs.") + @ConfigComment("List of mobs that should not spawn in SkyGrid.") @ConfigEntry(path = "protection.block-mobs") private List mobLimitSettings = new ArrayList<>(); @@ -1572,8 +1572,8 @@ public List getMobLimitSettings() { public void setMobLimitSettings(List mobLimitSettings) { this.mobLimitSettings = mobLimitSettings; } - - /** + + /** * @return the makeNetherPortals */ @Override @@ -1604,7 +1604,7 @@ public void setMakeNetherPortals(boolean makeNetherPortals) { public void setMakeEndPortals(boolean makeEndPortals) { this.makeEndPortals = makeEndPortals; } - + /** * SkyGrid should not check for blocks. * @return false From f0dd4ee6837bc7fcdbf9bc4bd69718facc5389a0 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 10:19:09 -0700 Subject: [PATCH 14/22] Fix code smells. --- .../java/world/bentobox/skygrid/Settings.java | 6 +-- .../skygrid/generators/SkyGridChunks.java | 40 +++++++++---------- .../skygrid/generators/SkyGridPop.java | 40 +++++++++---------- 3 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index c29abca..fabdb91 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1342,7 +1342,7 @@ public void setDeathsResetOnNewIsland(boolean deathsResetOnNewIsland) { */ @Override public List getOnJoinCommands() { - return Objects.requireNonNullElseGet(onJoinCommands, () -> new ArrayList<>()); + return Objects.requireNonNullElseGet(onJoinCommands, ArrayList::new); } /** @@ -1357,7 +1357,7 @@ public void setOnJoinCommands(List onJoinCommands) { */ @Override public List getOnLeaveCommands() { - return Objects.requireNonNullElseGet(onLeaveCommands, () -> new ArrayList<>()); + return Objects.requireNonNullElseGet(onLeaveCommands, ArrayList::new); } /** @@ -1372,7 +1372,7 @@ public void setOnLeaveCommands(List onLeaveCommands) { */ @Override public List getOnRespawnCommands() { - return Objects.requireNonNullElseGet(onRespawnCommands, () -> new ArrayList<>()); + return Objects.requireNonNullElseGet(onRespawnCommands, ArrayList::new); } /** diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java index fa9a637..b596158 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridChunks.java @@ -74,9 +74,9 @@ private List getChunk(BlockProbability prob) { */ public List getSkyGridChunk(Environment env) { return switch (env) { - case NETHER -> chunksNether.get(random.nextInt(chunksNether.size())); - case THE_END -> chunksEnd.get(random.nextInt(chunksEnd.size())); - default -> chunks.get(random.nextInt(chunks.size())); + case NETHER -> chunksNether.get(random.nextInt(chunksNether.size())); + case THE_END -> chunksEnd.get(random.nextInt(chunksEnd.size())); + default -> chunks.get(random.nextInt(chunks.size())); }; } @@ -93,10 +93,10 @@ private void setBlock(BlockProbability prob, int x, int y, int z, List { - result.add(new SkyGridBlock(x, y, z, Material.SAND)); - result.add(new SkyGridBlock(x, y - 1, z, Material.SANDSTONE)); - result.add(new SkyGridBlock(x, y + 1, z, blockMat)); - } - case NETHER_WART -> { - result.add(new SkyGridBlock(x, y, z, Material.SOUL_SAND)); - result.add(new SkyGridBlock(x, y + 1, z, blockMat)); - } - case END_ROD, CHORUS_PLANT -> { - result.add(new SkyGridBlock(x, y, z, Material.END_STONE)); - result.add(new SkyGridBlock(x, y + 1, z, blockMat)); - } - default -> result.add(new SkyGridBlock(x, y, z, blockMat)); + case CACTUS -> { + result.add(new SkyGridBlock(x, y, z, Material.SAND)); + result.add(new SkyGridBlock(x, y - 1, z, Material.SANDSTONE)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + case NETHER_WART -> { + result.add(new SkyGridBlock(x, y, z, Material.SOUL_SAND)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + case END_ROD, CHORUS_PLANT -> { + result.add(new SkyGridBlock(x, y, z, Material.END_STONE)); + result.add(new SkyGridBlock(x, y + 1, z, blockMat)); + } + default -> result.add(new SkyGridBlock(x, y, z, blockMat)); } } diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java index 57fb12f..43976d3 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java @@ -4,7 +4,6 @@ import java.util.NavigableMap; import java.util.Objects; import java.util.Random; -import java.util.stream.Collectors; import org.bukkit.Chunk; import org.bukkit.Material; @@ -43,16 +42,16 @@ public class SkyGridPop extends BlockPopulator { Material.OAK_SAPLING, Material.SPRUCE_SAPLING }; - + private static final String LOADED = "Loaded "; public SkyGridPop(SkyGrid addon) { this.addon = addon; this.size = addon.getSettings().getIslandHeight(); // Load the chest items - chestItemsWorld = addon.getSettings().getChestItemsOverworld().stream().map(Material::matchMaterial).filter(Objects::nonNull).collect(Collectors.toList()); - chestItemsNether = addon.getSettings().getChestItemsNether().stream().map(Material::matchMaterial).filter(Objects::nonNull).collect(Collectors.toList()); - chestItemsEnd = addon.getSettings().getChestItemsEnd().stream().map(Material::matchMaterial).filter(Objects::nonNull).collect(Collectors.toList()); + chestItemsWorld = addon.getSettings().getChestItemsOverworld().stream().map(Material::matchMaterial).filter(Objects::nonNull).toList(); + chestItemsNether = addon.getSettings().getChestItemsNether().stream().map(Material::matchMaterial).filter(Objects::nonNull).toList(); + chestItemsEnd = addon.getSettings().getChestItemsEnd().stream().map(Material::matchMaterial).filter(Objects::nonNull).toList(); addon.log(LOADED + chestItemsWorld.size() + " chest items for world"); addon.log(LOADED + chestItemsNether.size() + " chest items for nether world"); addon.log(LOADED + chestItemsEnd.size() + " chest items for end world"); @@ -60,13 +59,10 @@ public SkyGridPop(SkyGrid addon) { } @Override + @Deprecated public void populate(World world, Random random, Chunk chunk) { this.random = random; this.chunk = chunk; - // Do an end portal check - if (addon.getSettings().isEndGenerate() && world.getEnvironment().equals(Environment.NORMAL)) { - checkEndPortal(); - } for (int x = 1; x < 16; x += 4) { for (int z = 1; z < 16; z +=4) { for (int y = 0; y <= size; y += 4) { @@ -74,6 +70,11 @@ public void populate(World world, Random random, Chunk chunk) { } } } + // Do an end portal check + if (addon.getSettings().isEndGenerate() && world.getEnvironment().equals(Environment.NORMAL) + && random.nextDouble() < addon.getSettings().getEndFrameProb()) { + makeEndPortal(); + } } private void alterBlocks(Block b) { @@ -97,18 +98,16 @@ private void alterBlocks(Block b) { default: break; } - + } - private void checkEndPortal() { - if (random.nextDouble() < addon.getSettings().getEndFrameProb()) { - for (int xx = 1; xx< 6; xx++) { - for (int zz = 1; zz < 6; zz++) { - if (xx == zz || (xx==1 && zz==5) || (xx==5 && zz==1) || (xx>1 && xx<5 && zz>1 && zz<5)) { - continue; - } - setFrame(xx, zz, chunk.getBlock(xx, 0, zz)); + private void makeEndPortal() { + for (int xx = 1; xx< 6; xx++) { + for (int zz = 1; zz < 6; zz++) { + if (xx == zz || (xx==1 && zz==5) || (xx==5 && zz==1) || (xx>1 && xx<5 && zz>1 && zz<5)) { + continue; } + setFrame(xx, zz, chunk.getBlock(xx, 0, zz)); } } } @@ -153,10 +152,9 @@ private void setSaplingType(Block b) { break; case SWAMP: break; - case DESERT: - case DESERT_HILLS: + case DESERT, DESERT_HILLS: b.setType(Material.DEAD_BUSH, false); - break; + break; case SAVANNA: b.setType(Material.ACACIA_SAPLING, false); // Acacia break; From f9189e6d77a6b4e22d4c3f4257f141e9edb029ae Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 13 Dec 2021 21:49:41 -0800 Subject: [PATCH 15/22] Update to Minecraft 1.17 world gen. Biomes are made by default now. --- pom.xml | 6 +- .../java/world/bentobox/skygrid/Settings.java | 18 --- .../java/world/bentobox/skygrid/SkyGrid.java | 10 +- .../skygrid/generators/BiomeGenerator.java | 51 -------- .../bentobox/skygrid/generators/Biomes.java | 116 ------------------ .../skygrid/generators/SkyGridGen.java | 33 +---- .../skygrid/generators/SkyGridPop.java | 4 +- src/main/resources/addon.yml | 2 +- src/main/resources/config.yml | 2 - 9 files changed, 15 insertions(+), 227 deletions(-) delete mode 100644 src/main/java/world/bentobox/skygrid/generators/BiomeGenerator.java delete mode 100644 src/main/java/world/bentobox/skygrid/generators/Biomes.java diff --git a/pom.xml b/pom.xml index e88f8e0..6b56d5f 100644 --- a/pom.xml +++ b/pom.xml @@ -57,14 +57,14 @@ 2.0.2 - 1.17.1-R0.1-SNAPSHOT - 1.17.1 + 1.18.1-R0.1-SNAPSHOT + 1.18.0-SNAPSHOT ${build.version}-SNAPSHOT -LOCAL - 1.17.0 + 1.18.0 BentoBoxWorld_SkyGrid bentobox-world diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index fabdb91..0461487 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -107,10 +107,6 @@ public class Settings implements WorldSettings { private boolean makeEndPortals = false; /* SkyGrid */ - @ConfigComment("Biomes - this will affect some block types and tree types.") - @ConfigEntry(path = "world.create-biomes") - private boolean createBiomes = true; - @ConfigComment("The probability of a frame being created in a chunk. Frames are always at y=0.") @ConfigEntry(path = "world.end-frame-probability") private double endFrameProb = 0.1; @@ -479,20 +475,6 @@ public void setEndBlocks(Map endBlocks) { this.endBlocks = endBlocks; } - /** - * @return the createBiomes - */ - public boolean isCreateBiomes() { - return createBiomes; - } - - /** - * @param createBiomes the createBiomes to set - */ - public void setCreateBiomes(boolean createBiomes) { - this.createBiomes = createBiomes; - } - /** * @return the endFrameProb */ diff --git a/src/main/java/world/bentobox/skygrid/SkyGrid.java b/src/main/java/world/bentobox/skygrid/SkyGrid.java index d7f2fe7..3c15765 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGrid.java +++ b/src/main/java/world/bentobox/skygrid/SkyGrid.java @@ -2,7 +2,6 @@ import org.bukkit.World; import org.bukkit.WorldCreator; -import org.bukkit.WorldType; import org.bukkit.generator.ChunkGenerator; import org.eclipse.jdt.annotation.NonNull; @@ -90,24 +89,21 @@ public void createWorlds() { getLogger().info("Creating SkyGrid world ..."); } // Create the world if it does not exist - islandWorld = WorldCreator.name(worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(gen) - .createWorld(); + islandWorld = WorldCreator.name(worldName).environment(World.Environment.NORMAL).generator(gen).createWorld(); // Make the nether if it does not exist if (settings.isNetherGenerate()) { if (getServer().getWorld(worldName + NETHER) == null) { log("Creating SkyGrid's Nether..."); } - netherWorld = WorldCreator.name(worldName + NETHER).type(WorldType.FLAT).generator(gen) - .environment(World.Environment.NETHER).createWorld(); + netherWorld = WorldCreator.name(worldName + NETHER).generator(gen).environment(World.Environment.NETHER).createWorld(); } // Make the end if it does not exist if (settings.isEndGenerate()) { if (getServer().getWorld(worldName + THE_END) == null) { log("Creating SkyGrid's End World..."); } - endWorld = WorldCreator.name(worldName + THE_END).type(WorldType.FLAT).generator(gen) - .environment(World.Environment.THE_END).createWorld(); + endWorld = WorldCreator.name(worldName + THE_END).generator(gen).environment(World.Environment.THE_END).createWorld(); } } diff --git a/src/main/java/world/bentobox/skygrid/generators/BiomeGenerator.java b/src/main/java/world/bentobox/skygrid/generators/BiomeGenerator.java deleted file mode 100644 index b091184..0000000 --- a/src/main/java/world/bentobox/skygrid/generators/BiomeGenerator.java +++ /dev/null @@ -1,51 +0,0 @@ -package world.bentobox.skygrid.generators; - -import java.util.Map; -import java.util.Map.Entry; -import java.util.Objects; - -import org.bukkit.World; -import org.bukkit.World.Environment; -import org.bukkit.block.Biome; -import org.bukkit.util.noise.PerlinOctaveGenerator; - -public class BiomeGenerator { - - private final PerlinOctaveGenerator temperatureGen; - private final PerlinOctaveGenerator rainfallGen; - private final Environment env; - - public BiomeGenerator(World world) { - temperatureGen = new PerlinOctaveGenerator(world.getSeed(), 16); - temperatureGen.setScale(1.0/100.0); - - rainfallGen = new PerlinOctaveGenerator(world.getSeed() + 1, 15); - rainfallGen.setScale(1.0/100.0); - - env = world.getEnvironment(); - } - - /** - * Get the biome for this coordinate - * @param realX - x - * @param realZ - z - * @return Biome - */ - public Biome getDominantBiome(int realX, int realZ) { - //We get the 3 closest biome's to the temperature and rainfall at this block - Map biomes = Biomes.getBiomes(env, Math.abs(temperatureGen.noise(realX, realZ, 0.5, 0.5)*100.0), - Math.abs(rainfallGen.noise(realX, realZ, 0.5, 0.5)*100.0)); - //And tell bukkit (who tells the client) what the biggest biome here is - double maxNoiz = 0.0; - Biomes maxBiome = null; - - for (Entry biome : biomes.entrySet()) { - if (biome.getValue() >= maxNoiz) { - maxNoiz = biome.getValue(); - maxBiome = biome.getKey(); - } - } - return Objects.requireNonNull(maxBiome).biome; - } - -} \ No newline at end of file diff --git a/src/main/java/world/bentobox/skygrid/generators/Biomes.java b/src/main/java/world/bentobox/skygrid/generators/Biomes.java deleted file mode 100644 index 74ec42d..0000000 --- a/src/main/java/world/bentobox/skygrid/generators/Biomes.java +++ /dev/null @@ -1,116 +0,0 @@ -package world.bentobox.skygrid.generators; - -import java.util.EnumMap; -import java.util.Map; - -import org.bukkit.World.Environment; -import org.bukkit.block.Biome; - -/** - * In order to find the biome of a region, we look up how close its - * conditions are to the conditions on this map. We can use its proximity - * to a biome to determine how much influence that biome's noise generators, - * vegetation and features should have on the area of the map. This allows us - * to have seamless transitions between the biomes (at the price of speed) - * - * For example, a place with no precipitation and -30 degree (Celcius) weather - * is a tundra, but it is also much closer to a desert than a rain forest. - * - */ -public enum Biomes { - - //We store the biome, the temperature and rainfall for each biome. - SNOWY_TUNDRA(Environment.NORMAL, Biome.SNOWY_TUNDRA, 0, 100), - SNOWY_TAIGA(Environment.NORMAL, Biome.SNOWY_TAIGA, 0, 100), - FROZEN_RIVER(Environment.NORMAL, Biome.FROZEN_RIVER, 0, 10), - SNOWY_BEACH(Environment.NORMAL, Biome.SNOWY_BEACH, 0, 100), - MOUNTAINS(Environment.NORMAL, Biome.MOUNTAINS, 20, 60), - WOODED_MOUNTAINS(Environment.NORMAL, Biome.WOODED_MOUNTAINS, 20, 60), - DESERT(Environment.NORMAL, Biome.DESERT, 60, 4), - FOREST(Environment.NORMAL, Biome.FOREST, 50, 60), - PLAINS(Environment.NORMAL, Biome.PLAINS, 40, 30), - SWAMP(Environment.NORMAL, Biome.SWAMP, 40, 70), - JUNGLE(Environment.NORMAL, Biome.JUNGLE, 60, 50), - SAVANNA(Environment.NORMAL, Biome.SAVANNA, 40, 10), - DESERT_HILLS(Environment.NORMAL, Biome.DESERT_HILLS, 60, 5), - TAIGA(Environment.NORMAL, Biome.TAIGA, 30, 5), - // Nether - NETHER_WASTES(Environment.NETHER, Biome.NETHER_WASTES, 40, 30), - SOUL_SAND_VALLEY(Environment.NETHER, Biome.SOUL_SAND_VALLEY, 40, 70), - CRIMSON_FOREST(Environment.NETHER, Biome.CRIMSON_FOREST, 50, 60), - WARPED_FOREST(Environment.NETHER, Biome.WARPED_FOREST, 20, 60), - BASALT_DELTAS(Environment.NETHER, Biome.BASALT_DELTAS, 20, 50), - // The End - THE_END(Environment.THE_END, Biome.THE_END, 40, 30), - SMALL_END_ISLANDS(Environment.THE_END, Biome.SMALL_END_ISLANDS, 0, 100), - END_MIDLANDS(Environment.THE_END, Biome.END_MIDLANDS, 50, 60), - END_HIGHLANDS(Environment.THE_END, Biome.END_HIGHLANDS, 20, 60), - END_BARRENS(Environment.THE_END, Biome.END_BARRENS, 60, 4); - - public final Environment env; - public final Biome biome; - public final double optimumTemperature; - public final double optimumRainfall; - - Biomes(Environment env, Biome biome, double temp, double rain) { - this.env = env; - this.biome = biome; - this.optimumTemperature = temp; - this.optimumRainfall = rain; - } - - /** - * Returns the mapping between the 3 closest biomes and "amount of the biome" in this location. - * This is just so that we can limit the amount of calculations we have to do. - * @param env - environment - * @param temp - temperature - * @param rain - rain - * @return Map of 3 biomes - */ - public static Map getBiomes(Environment env, double temp, double rain) { - // We tell it the capacity we need to avoid expensive dynamic lengthening - Map biomes = new EnumMap<>(Biomes.class); - - Biomes closestBiome = null; - Biomes secondClosestBiome = null; - Biomes thirdClosestBiome = null; - double closestDist = 10000000; - double secondClosestDist = 10000000; - double thirdClosestDist = 10000000; - - for (Biomes biome : Biomes.values()) { - if (!env.equals(biome.env)) continue; - // To avoid having to do an expensive square root per biome per block, - // we just compare the square distances, and take the square root at the - // end. - double dist = getSquaredDistance(biome, temp, rain); - - if (dist <= closestDist) { - thirdClosestDist = secondClosestDist; thirdClosestBiome = secondClosestBiome; - secondClosestDist = closestDist; secondClosestBiome = closestBiome; - closestDist = dist; closestBiome = biome; - } - - else if (dist <= secondClosestDist) { - thirdClosestDist = secondClosestDist; thirdClosestBiome = secondClosestBiome; - secondClosestDist = dist; secondClosestBiome = biome; - } - - else if (dist <= thirdClosestDist) { - thirdClosestDist = dist; thirdClosestBiome = biome; - } - } - - // The 10 is just so that farther distances have less influence - biomes.put(closestBiome, 10.0/Math.sqrt(closestDist)); - biomes.put(secondClosestBiome, 10.0/Math.sqrt(secondClosestDist)); - biomes.put(thirdClosestBiome, 10.0/Math.sqrt(thirdClosestDist)); - - return biomes; - } - - private static double getSquaredDistance(Biomes biome, double temp, double rain) { - return Math.abs((biome.optimumTemperature-temp)*(biome.optimumTemperature-temp) + (biome.optimumRainfall-rain)*(biome.optimumRainfall-rain)); - } - -} \ No newline at end of file diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java index eaf1c6b..b4d136f 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridGen.java @@ -1,17 +1,15 @@ package world.bentobox.skygrid.generators; import java.util.Collections; -import java.util.EnumMap; import java.util.List; -import java.util.Map; import java.util.Random; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.World.Environment; -import org.bukkit.block.Biome; import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; +import org.bukkit.generator.WorldInfo; import world.bentobox.skygrid.SkyGrid; @@ -19,8 +17,6 @@ public class SkyGridGen extends ChunkGenerator { private final SkyGrid addon; - private final Map biomeGenerator; - private final BlockPopulator populator; private final SkyGridChunks preMade; @@ -32,30 +28,14 @@ public SkyGridGen(SkyGrid addon) { this.addon = addon; this.populator = new SkyGridPop(addon); preMade = new SkyGridChunks(addon); - biomeGenerator = new EnumMap<>(Environment.class); } @Override - public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid biomeGrid) { - // The chunk we are making - ChunkData result = createChunkData(world); - preMade.getSkyGridChunk(world.getEnvironment()).forEach(b -> result.setBlock(b.getX(), b.getY(), b.getZ(), b.getBd())); - // Set biome - if (addon.getSettings().isCreateBiomes()) { - for (int x = 0; x < 16; x +=4) { - for (int z = 0; z < 16; z +=4) { - int realX = x + chunkX * 16; //used so that the noise function gives us - int realZ = z + chunkZ * 16; //different values each chunk - Biome b = biomeGenerator.computeIfAbsent(world.getEnvironment(), k -> new BiomeGenerator(world)).getDominantBiome(realX, realZ); - for (int y = 0; y < world.getMaxHeight(); y+=4) { - biomeGrid.setBiome(x, y, z, b); - } - } - } - } - return result; - } + public void generateNoise(WorldInfo worldInfo, Random r, int x, int z, ChunkData result) { + result.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.AIR); + preMade.getSkyGridChunk(worldInfo.getEnvironment()).forEach(b -> result.setBlock(b.getX(), b.getY(), b.getZ(), b.getBd())); + } @Override public List getDefaultPopulators(World world) { @@ -68,5 +48,4 @@ public Location getFixedSpawnLocation(World world, Random random) { } - } \ No newline at end of file diff --git a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java index 43976d3..25e8776 100644 --- a/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java +++ b/src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java @@ -152,9 +152,9 @@ private void setSaplingType(Block b) { break; case SWAMP: break; - case DESERT, DESERT_HILLS: + case DESERT: b.setType(Material.DEAD_BUSH, false); - break; + break; case SAVANNA: b.setType(Material.ACACIA_SAPLING, false); // Acacia break; diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 9a80f81..6e113c2 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -4,7 +4,7 @@ version: ${version}${build.number} metrics: true repository: "BentoBoxWorld/SkyGrid" icon: "COBWEB" -api-version: 1.14 +api-version: 1.17 authors: tastybento diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 487e620..30b7ae7 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1030,8 +1030,6 @@ world: # when player enters the end world. # Added since 1.16. create-obsidian-platform: false - # Biomes - this will affect some block types and tree types. - create-biomes: true # The probability of a frame being created in a chunk. Frames are always at y=0. end-frame-probability: 0.1 # Friendly name for this world. Used in admin commands. Must be a single word From 5a3783be00e80d65ab7dfdcf673396f4cee61fef Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:32:24 +0300 Subject: [PATCH 16/22] Update to BentoBox 1.21 API --- .github/workflows/build.yml | 4 +- pom.xml | 9 ++-- .../java/world/bentobox/skygrid/Settings.java | 44 ++++++++++++++----- src/main/resources/addon.yml | 2 +- src/main/resources/plugin.yml | 2 +- 5 files changed, 42 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07dd6b1..6d8a454 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,11 +14,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 16 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: 16 + java-version: 17 - name: Cache SonarCloud packages uses: actions/cache@v2 with: diff --git a/pom.xml b/pom.xml index 6b56d5f..48a5636 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,7 @@ skygrid ${revision} + SkyGrid Skygrid is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like BSkyBlock or AcidIsland. https://github.com/BentoBoxWorld/SkyGrid 2017 @@ -53,12 +54,12 @@ UTF-8 UTF-8 - 16 + 17 2.0.2 - 1.18.1-R0.1-SNAPSHOT - 1.18.0-SNAPSHOT + 1.19.1-R0.1-SNAPSHOT + 1.21.0 ${build.version}-SNAPSHOT @@ -315,6 +316,4 @@ - - SkyGrid \ No newline at end of file diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 0461487..1d83c89 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -13,6 +13,7 @@ import world.bentobox.bentobox.api.configuration.WorldSettings; import world.bentobox.bentobox.api.flags.Flag; import world.bentobox.bentobox.database.objects.adapters.Adapter; +import world.bentobox.bentobox.database.objects.adapters.FlagBooleanSerializer; import world.bentobox.bentobox.database.objects.adapters.FlagSerializer; import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2; @@ -174,13 +175,12 @@ public class Settings implements WorldSettings { @ConfigComment("The value is the minimum island rank required to do the action") @ConfigComment("Ranks are: Visitor = 0, Member = 900, Owner = 1000") @ConfigEntry(path = "world.default-protection-flags") - @Adapter(FlagSerializer.class) - private Map defaultIslandFlags = new HashMap<>(); + private Map defaultIslandFlagNames = new HashMap<>(); @ConfigComment("These are the default settings for new protected areas") @ConfigEntry(path = "world.default-settings") - @Adapter(FlagSerializer2.class) - private Map defaultIslandSettings = new HashMap<>(); + @Adapter(FlagBooleanSerializer.class) + private Map defaultIslandSettingNames = new HashMap<>(); @ConfigComment("These settings/flags are hidden from users") @ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings") @@ -720,32 +720,56 @@ public void setWorldFlags(Map worldFlags) { /** * @return the defaultIslandFlags + * @deprecated since 1.21 */ @Override public Map getDefaultIslandFlags() { - return defaultIslandFlags; + return Collections.emptyMap(); } + + /** + * @return defaultIslandFlagNames + */ + @Override + public Map getDefaultIslandFlagNames() + { + return defaultIslandFlagNames; + } + + /** * @param defaultIslandFlags the defaultIslandFlags to set */ - public void setDefaultIslandFlags(Map defaultIslandFlags) { - this.defaultIslandFlags = defaultIslandFlags; + public void setDefaultIslandFlagNames(Map defaultIslandFlags) { + this.defaultIslandFlagNames = defaultIslandFlags; } /** * @return the defaultIslandSettings + * @deprecated since 1.21 */ @Override public Map getDefaultIslandSettings() { - return defaultIslandSettings; + return Collections.emptyMap(); } + + /** + * @return defaultIslandSettingNames + */ + @Override + public Map getDefaultIslandSettingNames() + { + return defaultIslandSettingNames; + } + + /** * @param defaultIslandSettings the defaultIslandSettings to set */ - public void setDefaultIslandSettings(Map defaultIslandSettings) { - this.defaultIslandSettings = defaultIslandSettings; + public void setDefaultIslandSettingNames(Map defaultIslandSettings) { + this.defaultIslandSettingNames = defaultIslandSettings; } /** diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 6e113c2..1f9b41e 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -4,7 +4,7 @@ version: ${version}${build.number} metrics: true repository: "BentoBoxWorld/SkyGrid" icon: "COBWEB" -api-version: 1.17 +api-version: 1.21 authors: tastybento diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e88ac5c..edd241a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Pladdon main: world.bentobox.skygrid.SkyGrid version: ${version} -api-version: 1.17 +api-version: 1.19 description: SkyGrid author: tastybento depend: [BentoBox] From acf580d8cb17a1d5e8ee5588a36794ec858261d8 Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:33:28 +0300 Subject: [PATCH 17/22] Init next SkyGrid version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 48a5636..0142a14 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ -LOCAL - 1.18.0 + 1.19.0 BentoBoxWorld_SkyGrid bentobox-world @@ -316,4 +316,4 @@ - \ No newline at end of file + From f3645f0fc535c3fb3675396ec6081a7502eda261 Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 28 Dec 2022 11:44:49 -0800 Subject: [PATCH 18/22] Make the obsidian platform default. SkyGrid end portals are at y=0 so players fall into the void and this will prevent them from doing so. Fixes #58 --- src/main/java/world/bentobox/skygrid/Settings.java | 4 +++- src/main/resources/config.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 1d83c89..42017c1 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -105,7 +105,7 @@ public class Settings implements WorldSettings { @ConfigComment("This option indicates if obsidian platform in the end should be generated") @ConfigComment("when player enters the end world.") @ConfigEntry(path = "world.end.create-obsidian-platform", since = "1.16") - private boolean makeEndPortals = false; + private boolean makeEndPortals = true; /* SkyGrid */ @ConfigComment("The probability of a frame being created in a chunk. Frames are always at y=0.") @@ -722,6 +722,7 @@ public void setWorldFlags(Map worldFlags) { * @return the defaultIslandFlags * @deprecated since 1.21 */ + @Deprecated @Override public Map getDefaultIslandFlags() { return Collections.emptyMap(); @@ -749,6 +750,7 @@ public void setDefaultIslandFlagNames(Map defaultIslandFlags) { * @return the defaultIslandSettings * @deprecated since 1.21 */ + @Deprecated @Override public Map getDefaultIslandSettings() { return Collections.emptyMap(); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 30b7ae7..329f8e6 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1029,7 +1029,7 @@ world: # This option indicates if obsidian platform in the end should be generated # when player enters the end world. # Added since 1.16. - create-obsidian-platform: false + create-obsidian-platform: true # The probability of a frame being created in a chunk. Frames are always at y=0. end-frame-probability: 0.1 # Friendly name for this world. Used in admin commands. Must be a single word From 78286956e79a618e7eb4c41d67bd6ba1dc71dc3d Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 28 Dec 2022 11:47:50 -0800 Subject: [PATCH 19/22] Add .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 525681c..e76db69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /target/ /.classpath /.project +/.DS_Store +/bin/ From 6a365f26bf07900aaabfe6ded5ae10c2b80489de Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 25 Mar 2023 09:59:13 -0700 Subject: [PATCH 20/22] Move to annotations for plugin.yml --- pom.xml | 5 +++++ src/main/java/world/bentobox/skygrid/Settings.java | 12 +++++++++--- .../java/world/bentobox/skygrid/SkyGridPladdon.java | 5 +++++ src/main/resources/plugin.yml | 7 ------- 4 files changed, 19 insertions(+), 10 deletions(-) delete mode 100644 src/main/resources/plugin.yml diff --git a/pom.xml b/pom.xml index 0142a14..e9fa077 100644 --- a/pom.xml +++ b/pom.xml @@ -141,6 +141,11 @@ ${spigot.version} provided + + org.spigotmc + plugin-annotations + 1.2.3-SNAPSHOT + org.mockito diff --git a/src/main/java/world/bentobox/skygrid/Settings.java b/src/main/java/world/bentobox/skygrid/Settings.java index 42017c1..b46c5ba 100644 --- a/src/main/java/world/bentobox/skygrid/Settings.java +++ b/src/main/java/world/bentobox/skygrid/Settings.java @@ -1,6 +1,14 @@ package world.bentobox.skygrid; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; import org.bukkit.Difficulty; import org.bukkit.GameMode; @@ -14,8 +22,6 @@ import world.bentobox.bentobox.api.flags.Flag; import world.bentobox.bentobox.database.objects.adapters.Adapter; import world.bentobox.bentobox.database.objects.adapters.FlagBooleanSerializer; -import world.bentobox.bentobox.database.objects.adapters.FlagSerializer; -import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2; /** * All the settings are here diff --git a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java index 4eb0674..8618259 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java +++ b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java @@ -1,8 +1,13 @@ package world.bentobox.skygrid; +import org.bukkit.plugin.java.annotation.plugin.ApiVersion; +import org.bukkit.plugin.java.annotation.plugin.Plugin; + import world.bentobox.bentobox.api.addons.Addon; import world.bentobox.bentobox.api.addons.Pladdon; +@Plugin(name="SkyGrid", version="1.0") +@ApiVersion(ApiVersion.Target.v1_16) public class SkyGridPladdon extends Pladdon { @Override diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index edd241a..0000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: Pladdon -main: world.bentobox.skygrid.SkyGrid -version: ${version} -api-version: 1.19 -description: SkyGrid -author: tastybento -depend: [BentoBox] From 9b2a1f904dc601b0ae1784ce7844d3882524daf0 Mon Sep 17 00:00:00 2001 From: BONNe Date: Sat, 8 Apr 2023 19:14:59 +0300 Subject: [PATCH 21/22] Return to plugin.yml (#59) * Create plugin.yml * Update pom.xml * Update SkyGridPladdon.java --- pom.xml | 5 ----- src/main/java/world/bentobox/skygrid/SkyGridPladdon.java | 5 +---- src/main/resources/plugin.yml | 9 +++++++++ 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 src/main/resources/plugin.yml diff --git a/pom.xml b/pom.xml index e9fa077..0142a14 100644 --- a/pom.xml +++ b/pom.xml @@ -141,11 +141,6 @@ ${spigot.version} provided - - org.spigotmc - plugin-annotations - 1.2.3-SNAPSHOT - org.mockito diff --git a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java index 8618259..9368da8 100644 --- a/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java +++ b/src/main/java/world/bentobox/skygrid/SkyGridPladdon.java @@ -1,13 +1,10 @@ package world.bentobox.skygrid; -import org.bukkit.plugin.java.annotation.plugin.ApiVersion; -import org.bukkit.plugin.java.annotation.plugin.Plugin; import world.bentobox.bentobox.api.addons.Addon; import world.bentobox.bentobox.api.addons.Pladdon; -@Plugin(name="SkyGrid", version="1.0") -@ApiVersion(ApiVersion.Target.v1_16) + public class SkyGridPladdon extends Pladdon { @Override diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..277f996 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,9 @@ +name: BentoBox-SkyGrid +main: world.bentobox.skygrid.SkyGridPladdon +version: ${project.version}${build.number} +api-version: "1.19" + +authors: [tastybento] +contributors: ["The BentoBoxWorld Community"] +website: https://bentobox.world +description: ${project.description} From ace620507278183e6b2d8c981bebfc68a2d46c6f Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 16 Apr 2023 13:32:44 -0700 Subject: [PATCH 22/22] Update dependencies --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0142a14..039c470 100644 --- a/pom.xml +++ b/pom.xml @@ -58,8 +58,8 @@ 2.0.2 - 1.19.1-R0.1-SNAPSHOT - 1.21.0 + 1.19.4-R0.1-SNAPSHOT + 1.23.0 ${build.version}-SNAPSHOT