From c61a2deaac95ca2778c668299b96abcc468e27dd Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 7 Mar 2021 13:39:15 -0800 Subject: [PATCH 01/33] Version 1.14.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cdc54ab..40cc26d 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ ${build.version}-SNAPSHOT - 1.14.3 + 1.14.4 -LOCAL From 9006a5f4d4ba3105f277656e1a81c02780feff7a Mon Sep 17 00:00:00 2001 From: BONNe Date: Mon, 15 Mar 2021 14:33:43 +0200 Subject: [PATCH 02/33] Implement options for linking nether portals and crating end obsidian platform. --- .../world/bentobox/caveblock/Settings.java | 53 +++++++++++++++++++ src/main/resources/config.yml | 5 ++ 2 files changed, 58 insertions(+) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index eb24894..00525a5 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -862,6 +862,26 @@ public class Settings implements WorldSettings } + /** + * {@inheritDoc} + */ + @Override + public boolean isMakeNetherPortals() + { + return this.makeNetherPortals; + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isMakeEndPortals() + { + return this.makeEndPortals; + } + + // --------------------------------------------------------------------- // Section: Setters // --------------------------------------------------------------------- @@ -2001,6 +2021,28 @@ public class Settings implements WorldSettings } + /** + * 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; + } + + // --------------------------------------------------------------------- // Section: Variables // --------------------------------------------------------------------- @@ -2207,6 +2249,12 @@ public class Settings implements WorldSettings @ConfigEntry(path = "world.nether.blocks", needsReset = true) private List netherBlocks = new ArrayList<>(); + @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") + private boolean makeNetherPortals = false; + // End @ConfigEntry(path = "world.end.generate") private boolean endGenerate = true; @@ -2245,6 +2293,11 @@ public class Settings implements WorldSettings @ConfigEntry(path = "world.end.blocks", needsReset = true) private List endBlocks = new ArrayList<>(); + @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") + private boolean makeEndPortals = false; + // Other staff. @ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /cave") diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index af2e17d..4adcac0 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -181,6 +181,9 @@ world: - ENTITY:GHAST:0.1:1 - ENTITY:WITHER_SKELETON:0.1:1 - MATERIAL:FIRE:10: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. + create-and-link-portals: false end: generate: true # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. @@ -213,6 +216,8 @@ world: - ENTITY:SHULKER:0.2:1 - MATERIAL:OBSIDIAN:1:1 - MATERIAL:CHORUS_PLANT:1:3 + # This option indicates if obsidian platform in the end should be generated when player enters the end world. + create-obsidian-platform: false # Mob white list - these mobs will NOT be removed when logging in or doing /cave remove-mobs-whitelist: - WITHER From c12310a6271561641bdec55f7b2789c512bdace6 Mon Sep 17 00:00:00 2001 From: BONNe Date: Mon, 15 Mar 2021 14:49:16 +0200 Subject: [PATCH 03/33] Implement onRespawnCommands() option from BentoBox 1.14. --- .../world/bentobox/caveblock/Settings.java | 67 +++++++++++++++++-- src/main/resources/config.yml | 6 +- 2 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 00525a5..e1ce109 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -13,6 +13,7 @@ import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.block.Biome; import org.bukkit.entity.EntityType; +import org.eclipse.jdt.annotation.NonNull; import com.google.common.base.Enums; @@ -882,6 +883,16 @@ public class Settings implements WorldSettings } + /** + * {@inheritDoc} + */ + @Override + public @NonNull List getOnRespawnCommands() + { + return this.onRespawnCommands; + } + + // --------------------------------------------------------------------- // Section: Setters // --------------------------------------------------------------------- @@ -2043,6 +2054,17 @@ public class Settings implements WorldSettings } + /** + * Sets on respawn commands. + * + * @param onRespawnCommands the on respawn commands + */ + public void setOnRespawnCommands(List onRespawnCommands) + { + this.onRespawnCommands = onRespawnCommands; + } + + // --------------------------------------------------------------------- // Section: Variables // --------------------------------------------------------------------- @@ -2493,14 +2515,51 @@ public class Settings implements WorldSettings private boolean pasteMissingIslands = false; // Commands - @ConfigComment("List of commands to run when a player joins.") - @ConfigEntry(path = "cave.commands.on-join") + @ConfigComment("List of commands to run when a player joins an cave or creates one.") + @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 = "cave.commands.on-join", since = "1.8.0") private List onJoinCommands = new ArrayList<>(); - @ConfigComment("list of commands to run when a player leaves.") - @ConfigEntry(path = "cave.commands.on-leave") + @ConfigComment("List of commands to run when a player leaves a cave, resets his cave or gets kicked from it.") + @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 = "cave.commands.on-leave", since = "1.8.0") private List onLeaveCommands = new ArrayList<>(); + @ConfigComment("Returns a 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 = "cave.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 = "cave.sethome.nether.allow") diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 4adcac0..1da2b6e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -459,10 +459,12 @@ cave: # Added since 1.10.0. create-missing-nether-end-caves: false commands: - # List of commands to run when a player joins. + # List of commands to run when a player joins an cave or creates one. on-join: [] - # list of commands to run when a player leaves. + # List of commands to run when a player leaves a cave, resets his cave or gets kicked from it. on-leave: [] + # Returns a list of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true. + on-respawn: [] sethome: nether: # Allow setting home in the nether. Only available on nether islands, not vanilla nether. From 982725c737c646932e5b6a4916ef315ab4328fc0 Mon Sep 17 00:00:00 2001 From: BONNe Date: Mon, 15 Mar 2021 14:50:19 +0200 Subject: [PATCH 04/33] Fixes copy-paste issue --- src/main/java/world/bentobox/caveblock/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index e1ce109..2795e19 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -2545,7 +2545,7 @@ public class Settings implements WorldSettings @ConfigEntry(path = "cave.commands.on-leave", since = "1.8.0") private List onLeaveCommands = new ArrayList<>(); - @ConfigComment("Returns a list of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.") + @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("") From 4ce4f1fc705c9f30f8a3371e60267c2028045e4d Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 30 Mar 2021 18:38:01 +0300 Subject: [PATCH 05/33] Init 1.14.5 version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40cc26d..d7b44a8 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ ${build.version}-SNAPSHOT - 1.14.4 + 1.14.5 -LOCAL From 8bda6b8849101fcc5568659ff795b70200c2d58a Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 11:19:28 -0700 Subject: [PATCH 06/33] Fix for mobs in negative coords. Fixes https://github.com/BentoBoxWorld/CaveBlock/issues/59 --- .../generators/populators/EntitiesPopulator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java index c09a57c..4c95ec2 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java @@ -134,9 +134,10 @@ public class EntitiesPopulator extends BlockPopulator } // Make space for entity based on the entity's size BoundingBox bb = e.getBoundingBox(); - for (int x = (int) bb.getMinX(); x < bb.getMaxX(); x++) { - for (int z = (int) bb.getMinZ(); z < bb.getMaxZ(); z++) { - int y = (int) bb.getMinY(); + + for (int x = (int) Math.floor(bb.getMinX()); x < bb.getMaxX(); x++) { + for (int z = (int) Math.floor(bb.getMinZ()); z < bb.getMaxZ(); z++) { + int y = (int) Math.floor(bb.getMinY()); Block b = world.getBlockAt(x, y, z); for (; y < bb.getMaxY(); y++) { if (addon.getSettings().isDebug()) { @@ -148,7 +149,7 @@ public class EntitiesPopulator extends BlockPopulator e.remove(); return; } - b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.CAVE_AIR); + b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.AIR); } // Add air block on top for all water entities (required for dolphin, okay for others) if (WATER_ENTITIES.contains(entity) && b.getRelative(BlockFace.UP).getType().equals(originalMaterial)) { From 6b18aedf7572a7778c4c745cd5ee22d73e8abed9 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 11:22:32 -0700 Subject: [PATCH 07/33] Remove unused Sonar profile. --- pom.xml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/pom.xml b/pom.xml index d7b44a8..4272208 100644 --- a/pom.xml +++ b/pom.xml @@ -92,30 +92,6 @@ - - sonar - - https://sonarcloud.io - bentobox-world - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.6.0.1398 - - - verify - - sonar - - - - - - - From 4af68cd933556ce0cd0fe8467a4a21132e91e5ab Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 11:25:58 -0700 Subject: [PATCH 08/33] Shift to Github Actions --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------------- 2 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b9cf60c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build +on: + push: + branches: + - develop + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 16 + uses: actions/setup-java@v1 + with: + java-version: 16 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8a21fa1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: java -sudo: false -addons: - sonarcloud: - organization: "bentobox-world" - -jdk: - - openjdk8 - - openjdk11 - -matrix: - allow_failures: - - jdk: openjdk11 - -script: - # the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis - - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock - -cache: - directories: - - '$HOME/.m2/repository' - - '$HOME/.sonar/cache' From 08aef3daa4c8152ba7eca64e3ade6329c4e0ef2a Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 11:28:25 -0700 Subject: [PATCH 09/33] Add correct properties for SonarCloud --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 4272208..f3d163f 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,8 @@ 1.14.5 -LOCAL + bentobox-world + https://sonarcloud.io From 45955df99040bb3e9fa692601ecbf115496d60ef Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 15 Aug 2021 11:40:40 -0700 Subject: [PATCH 10/33] Now with correct CaveBlock reference. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9cf60c..e9a6cdc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,4 +34,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ No newline at end of file + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock \ No newline at end of file From 665b68aa2f0d849b96a351a02af2ccc39b87903f Mon Sep 17 00:00:00 2001 From: Katorly <70022443+katorly@users.noreply.github.com> Date: Tue, 5 Oct 2021 23:50:04 +0800 Subject: [PATCH 11/33] Re-translate zh-CN.yml (#63) --- src/main/resources/locales/zh-CN.yml | 372 +++++++++++++-------------- 1 file changed, 184 insertions(+), 188 deletions(-) diff --git a/src/main/resources/locales/zh-CN.yml b/src/main/resources/locales/zh-CN.yml index dabc0a1..14f858a 100644 --- a/src/main/resources/locales/zh-CN.yml +++ b/src/main/resources/locales/zh-CN.yml @@ -1,286 +1,282 @@ ---- caveblock: sign: - line0: "&c方块洞穴" - line1: 欢迎! - line3: 开始挖掘! &c <3 + line0: "&c洞穴生存" + line1: "欢迎!" line2: "[name]" + line3: "开始挖掘吧! &c<3" + informational: - to-nether: 真倒霉到地狱了。 - to-the-end: 您已经到了末地。 - to-normal: 回到你的洞穴。 + to-nether: "太不走运了! 掉进了下界." + to-the-end: "您到达了末地." + to-normal: "回到您的洞穴." general: errors: - no-island: "&c您没有洞穴!" - player-has-island: "&c玩家已经有一个山洞了!" - player-has-no-island: "&c该玩家没有洞穴!" - already-have-island: "&c您已经有一个山洞!" - no-safe-location-found: "&c在山洞找不到传送您的安全地点。" - not-owner: "&c您不是洞穴的所有者!" + no-island: "&c您还没有洞穴!" + player-has-island: "&c玩家已有洞穴!" + player-has-no-island: "&c玩家还没有洞穴!" + already-have-island: "&c您已经拥有洞穴!" + no-safe-location-found: "&c无法将您传送到洞穴中, 因为没有找到安全的位置." + not-owner: "&c您不是您洞穴的主人!" commands: admin: team: add: - name-has-island: "&c [name]有一个山洞。首先注销或删除它们!" - success: "&b [name]&a已添加到&b [owner]&a的洞穴中。" + name-has-island: "&c[name] 已有洞穴. 请先反注册或删除它们!" + success: "&b[name]&a 已被添加到 &b[owner]&a 的洞穴." kick: - success: "&b [name]&ahas被踢出了&b [owner]&a的山洞。" + success: "&b[name] &a已被 &b[owner]&a 的洞穴移出." setowner: - description: 将洞穴所有权转移给玩家 - already-owner: "&c [name]已经是该洞穴的所有者!" - success: "&b [name]&a现在是这个洞穴的所有者。" + description: "将洞穴的所有权转让给玩家" + already-owner: "&c[name] 玩家已经是此洞穴的主人了!" + success: "&b[name]&a 现在是此洞穴的主人." range: - description: 管理员洞穴范围命令 + description: "管理员洞穴边界命令" display: - description: 显示/隐藏洞穴范围指示器 + description: "显示/隐藏洞穴边界" hint: |- - &c红色屏障图标&f显示当前的洞穴保护范围限制。 - &7灰色粒子&f显示最大洞穴极限。 - &a绿色粒子&f如果洞穴保护范围不同于默认保护范围,则显示默认保护范围。 + &c 红色屏障图标 &f 显示洞穴现在被保护的范围. + &7 灰色粒子 &f 显示最大边界范围. + &a 绿色粒子 &f 显示默认被保护的边界, 如果现在的边界不与其重合的话. set: - description: 设置洞穴保护范围 - success: "&a将洞穴保护范围设置为&b [number]&a。" + description: "设置洞穴被保护的边界范围" + success: "&a洞穴被保护的范围更新至 &b[number]&a." reset: - description: 将洞穴保护范围重置为世界默认值 - success: "&a将洞穴保护范围重置为&b [number]&a。" + description: "重置洞穴被保护的范围到当前世界的默认值" + success: "&a重置洞穴被保护的范围至 &b[number]&a." register: - description: 注册玩家到您所在的无人洞 - registered-island: "&a注册玩家到[xyz]洞穴。" - already-owned: "&c洞穴已被另一位玩家拥有!" - no-island-here: "&c这里没有洞穴。确认做一个。" - in-deletion: "&c该洞穴空间当前正在被删除。等会再试。" - cannot-make-island: "&c抱歉,不能在此处放置洞穴。请参阅控制台以获取可能的错误。" + description: "将玩家注册到您所在的未被拥有的洞穴中" + registered-island: "&a在 [xyz] 将玩家注册到洞穴中." + already-owned: "&c此洞穴已被其他玩家所有!" + no-island-here: "&c这里还没有 box. 确认以创建一个." + in-deletion: "&c此区域正在重新生成. 请稍后重试." + cannot-make-island: "&c抱歉, 无法在此处生成洞穴. 从后台查看可能的错误." unregister: - description: 从山洞中注销所有者,但保留山洞块 - unregistered-island: "&a来自[xyz]洞穴的未注册玩家。" + description: "反注册洞穴的主人, 同时保留洞穴中的方块" + unregistered-island: "&a在 [xyz] 将玩家从洞穴中反注册." info: - description: 获取有关您所在位置或玩家洞穴的信息 - no-island: "&c您现在不在山洞里..." - title: "==========洞穴信息============" - islands-in-trash: "&d玩家在垃圾桶中有洞穴。" - is-spawn: 岛是出生点 + description: "获取您所在区域或相应玩家洞穴的信息" + no-island: "&c您未在一个洞穴中......" + title: "========== 洞穴信息 ============" + islands-in-trash: "&d玩家拥有废弃的洞穴." + is-spawn: "该区域是主城" switchto: - description: 将玩家的洞穴切换到垃圾桶中的第一洞 - out-of-range: "&c数字必须介于1到[number]之间。使用&l [label]垃圾[player]&r&c查看洞穴编号" + description: "将玩家的洞穴切换到废弃的洞穴中的第一位" + out-of-range: "&c数字必须从 1 到 [number]. 输入 &l[label] trash [player] &r&c来查看洞穴数量" trash: - no-unowned-in-trash: "&c垃圾桶中没有无人认领的洞穴" - no-islands-in-trash: "&c玩家没有洞穴在垃圾桶中" - description: 在垃圾桶中显示无人洞穴或玩家的洞穴 - title: "&d ============垃圾洞===========" + no-unowned-in-trash: "&c废弃的洞穴中没有无主人的洞穴" + no-islands-in-trash: "&c玩家没有废弃的洞穴" + description: "在废弃的洞穴中显示无主人的洞穴或玩家的洞穴" + title: "&d=========== 废弃的洞穴 ===========" count: "&l&d洞穴 [number]:" - use-switch: "&a使用&l [label]切换到 &r&a将玩家洞穴切换到垃圾桶" + use-switch: "&a输入 &l[label] switchto &r&a 将玩家切换到废弃的洞穴中" emptytrash: - description: 清除玩家的垃圾桶,或垃圾桶中所有未拥有的洞穴 + description: "给玩家清除废弃的洞穴, 或清除所有无主人的废弃的洞穴" setrange: - description: 设定玩家洞穴的范围 - range-updated: 洞穴范围更新为[数字] + description: "设置玩家洞穴的范围" + range-updated: "洞穴范围更新至 [number]" tp: - description: 传送到玩家的洞穴 + description: "传送到玩家的洞穴" getrank: - description: 在他们的洞穴中获得玩家的排名 - rank-is: "&aRank在他们的洞穴中[排名]。" + description: "查看玩家在其洞穴中的地位" + rank-is: "&a玩家在其洞穴中的地位是 [rank]." setrank: - description: 设定玩家在洞穴中的等级 + description: "设置玩家在其洞穴中的地位" setspawn: - description: 为这个世界设置一个洞穴 - already-spawn: "&c这个洞穴已经是产卵了!" - no-island-here: "&c这里没有洞穴。" - confirmation: "&c您确定要将此洞穴设置为这个世界的生成物吗?" + description: "将洞穴设置为当前世界的主城" + already-spawn: "&c此洞穴已经是主城了!" + no-island-here: "&c这里还没有洞穴." + confirmation: "&c确认要将将洞穴设置为当前世界的主城吗?" resetflags: - description: 将所有洞穴重置为config.yml中的默认标志设置 + description: "重置所有洞穴的 flag 值成 config.yml 中的默认值" delete: - description: 删除玩家的洞穴 - cannot-delete-owner: "&c删除所有洞穴成员之前,必须将其踢出洞穴。" - deleted-island: "&e [xyz]&ahas中的&aIsland已成功删除。" + description: "删除一名玩家的洞穴" + cannot-delete-owner: "&c在删除此洞穴之前, 必须移出此洞穴中的所有成员." + deleted-island: "&a成功删除位于 &e[xyz] &a处的洞穴." island: go: - description: 传送你到你的洞穴 - teleport: "&a将您传送到山洞。" + description: "传送到您的洞穴" + teleport: "&a正在传送到您的洞穴." help: - description: 主要洞穴命令 + description: "洞穴主命令" create: - description: 使用可选的蓝图创建一个洞穴(需要许可) - too-many-islands: "&c这个世界上有太多的洞穴:没有足够的空间来创建您的洞穴。" - unable-create-island: "&c您的洞穴无法生成,请与管理员联系。" - creating-island: "&a创建您的洞穴,请稍等..." - pick: "&a选择一个山洞" + description: "使用模板创建一个新的洞穴 (需要权限)" + too-many-islands: "&c世界中含有太多洞穴了: 没有空间创建您的洞穴." + unable-create-island: "&c生成洞穴失败, 请联系管理员." + creating-island: "&a生成洞穴中, 请稍后..." + pick: "&a选择一个洞穴" info: - description: 显示有关您的洞穴或玩家洞穴的信息 + description: "显示您或相应玩家的洞穴信息" near: - description: 显示您周围的洞穴名称 - the-following-islands: "&a附近有以下洞穴:" - no-neighbors: "&c您没有紧邻的洞穴!" + description: "显示周围洞穴的名称" + the-following-islands: "&a周围的洞穴有:" + no-neighbors: "&c您的周围没有其它洞穴!" reset: - description: 重新启动您的洞穴并删除旧的 - must-remove-members: "&c您必须先从洞穴中删除所有成员,然后才能重新启动洞穴(/岛国队踢<player>)。" + description: "删除现有的洞穴并重新开始" + must-remove-members: "&c在您重新开始之前, 您必须移出洞穴中的所有成员 (/island team kick )." sethome: - must-be-on-your-island: "&c您必须在洞穴里才能回家!" - home-set: "&6您的洞穴之家已设置为您当前的位置。" + must-be-on-your-island: "&c必须在洞穴中才能设置家的位置!" + home-set: "&6洞穴家的位置已设置到您当前位置." setname: - description: 为你的洞穴命名 + description: "设置您洞穴的名称" resetname: - description: 重设您的洞穴名称 + description: "重置您洞穴的名称" team: coop: - description: 让玩家在你的洞穴中进行排名 + description: "将玩家设置为您洞穴的副 OP" uncoop: - you-are-no-longer-a-coop-member: "&c您不再是[name]的洞穴的鸡舍成员" - all-members-logged-off: "&c所有洞穴成员都已注销,因此您不再是[name]洞穴的合作伙伴" + you-are-no-longer-a-coop-member: "&c您不再是 [name] 的洞穴的副 OP 了" + all-members-logged-off: "&c洞穴的所有玩家都离线了, 因此您不再是 [name] 的洞穴的副 OP 了" trust: - description: 给玩家一个值得信赖的等级 + description: "将玩家设置为您洞穴的信任者" invite: - description: 邀请玩家加入你的洞穴 - name-has-invited-you: "&a [name]邀请您加入他们的洞穴。" - you-will-lose-your-island: "&c警告!如果您接受,您将迷路!" + description: "邀请一名玩家到您的洞穴中" + name-has-invited-you: "&a[name] 邀请您加入他(她)的洞穴." + you-will-lose-your-island: "&c注意! 如果接受邀请, 您将失去现有的洞穴!" errors: - island-is-full: "&c您的洞穴已满,您不能邀请其他任何人。" + island-is-full: "&c您的洞穴已满, 无法再邀请更多的玩家." accept: - you-joined-island: "&a您加入了一个山洞!使用/ [标签]小组信息来查看其他成员。" - name-joined-your-island: "&a [name]加入了您的洞穴!" + you-joined-island: "&a您加入了一个洞穴! 输入 /[label] team info 来查看其他成员." + name-joined-your-island: "&a[name] 加入了您的洞穴!" confirmation: |- - &c确定要接受此邀请吗? - &c&l您会&nLOSE&r&c&ly您当前的洞穴! + &c确认要接收此邀请? + &c&l您将 &n失去&r &c&l现有的洞穴! reject: - you-rejected-invite: "&a您拒绝了加入洞穴的邀请。" - name-rejected-your-invite: "&c [name]拒绝了您的洞穴邀请!" + you-rejected-invite: "&a您拒绝了加入洞穴的邀请." + name-rejected-your-invite: "&c[name] 拒绝了您加入洞穴的邀请!" cancel: - description: 取消待处理的邀请,加入你的洞穴 + description: "取消待接受/拒绝的洞穴加入邀请" leave: - description: 离开你的洞穴 - left-your-island: "&c [name]&cleft your cave" + description: "退出您的洞穴" + left-your-island: "&c[name] &c退出了您的洞穴" kick: - description: 从您的洞穴中删除一个成员 - owner-kicked: "&c主人将您踢出山洞!" - success: "&b [name]&ahas被踢出您的山洞。" + description: "从您的洞穴中移出一名玩家" + owner-kicked: "&c洞穴的主人移出了您!" + success: "&b[name] &a从您的洞穴中被移出." demote: - description: 将您的玩家降级 + description: "降低洞穴中一名玩家的地位" promote: - description: 提升您的玩家排名 + description: "提升洞穴中一名玩家的地位" setowner: - description: 将您的洞穴所有权转让给成员 + description: "将洞穴转让给一名成员" errors: - target-is-not-member: 该球员不属于您的洞穴团队! - name-is-the-owner: "&a [name]现在是洞穴所有者!" - you-are-the-owner: "&a您现在是洞穴主人!" + target-is-not-member: "&c玩家不在您洞穴的队伍中!" + name-is-the-owner: "&a[name] 现在是洞穴的主人!" + you-are-the-owner: "&a您成为了洞穴的主人!" ban: - description: 禁止玩家进入您的洞穴 - cannot-ban-more-players: "&c您已达到禁令限制,您不能再从您的洞穴禁赛。" - player-banned: "&b [name]&c现在被禁止进入您的洞穴。" - owner-banned-you: "&b [name]&c禁止您进入他们的洞穴!" - you-are-banned: "&b您被禁止进入这个洞穴!" + description: "从洞穴中禁止一名玩家" + cannot-ban-more-players: "&c达到最大禁止玩家的数量, 无法再禁止更多的玩家." + player-banned: "&b[name]&c 被您的洞穴禁止." + owner-banned-you: "&b[name]&c 的洞穴禁止了您!" + you-are-banned: "&b您已被此洞穴禁止!" unban: - description: 禁止玩家进入您的洞穴 - player-unbanned: "&b [name]&a现在不受您的洞穴限制。" - you-are-unbanned: "&b [name]&a禁止您进入他们的洞穴!" + description: "从洞穴中解封一名玩家" + player-unbanned: "&b[name]&a 被您的洞穴解封." + you-are-unbanned: "&b[name]&a 的洞穴解封了您!" banlist: - noone: "&a没有人被禁止进入这个洞穴。" + noone: "&a没有玩家被此洞穴禁止." settings: - description: 显示洞穴设置 + description: "显示洞穴设置" expel: - description: 将玩家驱逐出您的洞穴 - not-on-island: "&c那个玩家不在你的洞穴里!" - player-expelled-you: "&b [name]&c将您赶出了山洞!" + description: "从洞穴中请出一名玩家" + not-on-island: "&c该玩家不在您洞穴中!" + player-expelled-you: "&c您被 &b[name]&c 的洞穴请出!" + ranks: - owner: 矮人王 - sub-owner: 矮人骑士 - member: 侏儒 - trusted: 值得信赖 - coop: 鸡舍 - visitor: 人的 - banned: 兽人 + owner: "矮人王" + sub-owner: "矮人骑士" + member: "小矮人" + trusted: "信任者" + coop: "副 OP" + visitor: "人类" + banned: "被禁止玩家" + protection: flags: ENDERMAN_GRIEFING: description: |- - &aEndermen可以删除 - &a洞穴 - name: 恩德曼悲痛 + &a末影人可以 + &a移动洞穴中的方块 + name: "末影人破坏" ENTER_EXIT_MESSAGES: - island: "[名字]的洞穴" + island: "[name] 的洞穴" GEO_LIMIT_MOBS: description: |- - &a删除小怪 - &外部保护 - &占用空间 - name: "&e限制小怪进入山洞" + &a移除在洞穴保护 + &a范围外的生物 + name: "&e将生物限制在洞穴内" ISLAND_RESPAWN: description: |- - &a玩家重生 - 和他们的洞穴 - name: 洞穴重生 + &a玩家在他们的 + &a洞穴中重生 + name: "洞穴中重生" LIQUIDS_FLOWING_OUT: - name: 液体在洞穴外流动 + name: "流体流出洞穴" description: |- - &a切换液体是否可以流出 - &a洞穴的保护范围。 + &a切换流体是否能 + &a流出洞穴保护范围. LOCK: - description: 拨动锁 - name: 锁洞 + description: "切换是否禁止访客访问" + name: "锁定洞穴" NATURAL_SPAWNING_OUTSIDE_RANGE: - name: 自然生物产生范围外 + name: "常规生物在保护范围外生成" description: |- - &a切换是否生物(动物和 - &amonsters)可以在外面自然产卵 - &aa洞穴的保护范围。 + &a切换常规生物 (动物和 + &a怪物) 是否能在洞穴保护 + &a范围外生成. - &c请注意,这不会阻止生物 - &cto通过暴民生成器或生成器生成 - &cegg。 + &c注意, 此操作不能防止 + &c洞穴保护范围外的 + &c刷怪笼或刷怪蛋生成生物. OFFLINE_GROWTH: description: |- - &a禁用时,植物 - &a不会在洞穴中生长 - &awhen所有成员均处于离线状态。 - &a可以帮助减少延迟。 - name: 离线增长 + &a如果禁用, 当洞穴中的所有成员 + &a都离线时, 植物将停止生长. + &a或许能减少服务器卡顿. + name: "离线生长" OFFLINE_REDSTONE: description: |- - &a禁用时,红石 - &a不会在山洞中运作 - &a所有成员均处于离线状态。 - &a可以帮助减少延迟。 - name: 离线红石 + &a如果禁用, 当洞穴中的所有成员 + &a都离线时, 红石将停止运作. + &a或许能减少服务器卡顿. + name: "离线红石" PISTON_PUSH: description: |- - &a允许活塞推动 - &在洞穴外面 - name: 活塞推 + &a允许活塞推动 + &a洞穴外的方块 + name: "活塞推动" REMOVE_MOBS: description: |- - &a移除怪物 - &前往洞穴 - name: 移除怪物 + &a传送到洞穴中时, + &a移除洞穴中的所有怪物 + name: "Remove monsters" TREES_GROWING_OUTSIDE_RANGE: - name: 树木生长范围外 + name: "树木在洞穴保护范围外生长" description: |- - &a切换树木是否可以在 - 是否使用&acave的保护范围。 + &a切换树木是否能长到 + &a洞穴保护范围之外. PREVENT_TELEPORT_WHEN_FALLING: - name: 跌倒时防止传送 + name: "掉落时禁止传送" description: |- - &a防止玩家被传送 - 使用命令返回他们的洞穴 - &aif他们跌倒了。 - hint: "&c跌倒时无法传送回洞穴。" - locked: "&c这个洞穴被锁了!" - protected: "&cCave保护:[说明]" - spawn-protected: "&cSpawn受保护:[描述]" + &a当玩家正在掉落时 + &a禁止他们通过指令进行传送. + hint: "&c在掉落时不能传送." + locked: "&c该洞穴已禁止访客访问!" + protected: "&c没有权限: [description]" + spawn-protected: "&c没有权限: [description]" + panel: PROTECTION: description: |- - &a保护设置 - &a这个洞 + &a洞穴的 + &a保护设置 SETTING: description: |- - &a常规设置 - &a这个洞 + &a洞穴的 + &a一般设置 + protection: flags: SKY_WALKER_FLAG: - hint: 允许在洞穴顶上行走。 - name: 天空行者 - description: |- - &5&o这允许启用/禁用 - &5&o能力继续前进 - &5&otop洞穴世界 - &5&o没有额外的权限。 + description: "&5&o这将允许/禁止\n&5&o没有额外权限的玩家\n&5&o在洞穴世界的顶部\n&5&o行走." + name: "天空行者" + hint: "允许在洞穴的天花板上行走." From b71288d1519ed0266b9c0752f7465e70805b72a2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 10 Oct 2021 17:41:10 -0700 Subject: [PATCH 12/33] 1.17 world gen (#61) * Uses the new 1.17.1 ChunkGenerator options * More work on the ores * Make CaveBlock a Pladdon * WWIP - added nether and end ores. * Improved generation --- pom.xml | 11 +- .../world/bentobox/caveblock/CaveBlock.java | 2 - .../bentobox/caveblock/CaveBlockPladdon.java | 12 + .../generators/ChunkGeneratorWorld.java | 315 ++++++++---------- .../bentobox/caveblock/generators/Ore.java | 16 + src/main/resources/plugin.yml | 8 + 6 files changed, 171 insertions(+), 193 deletions(-) create mode 100644 src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java create mode 100644 src/main/java/world/bentobox/caveblock/generators/Ore.java create mode 100644 src/main/resources/plugin.yml diff --git a/pom.xml b/pom.xml index f3d163f..df0e0bb 100644 --- a/pom.xml +++ b/pom.xml @@ -43,14 +43,14 @@ UTF-8 UTF-8 - 1.8 + 16 - 1.16.4-R0.1-SNAPSHOT - 1.16.0 + 1.17.1-R0.1-SNAPSHOT + 1.18.0-SNAPSHOT ${build.version}-SNAPSHOT - 1.14.5 + 1.15.0 -LOCAL bentobox-world https://sonarcloud.io @@ -170,8 +170,7 @@ maven-compiler-plugin 3.7.0 - ${java.version} - ${java.version} + ${java.version} diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index d0e4cb4..70dc5e9 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -76,7 +76,6 @@ public class CaveBlock extends GameModeAddon { super.onReload(); this.loadSettings(); - this.chunkGenerator.reload(); } @@ -137,7 +136,6 @@ public class CaveBlock extends GameModeAddon // Create the world if it does not exist this.islandWorld = WorldCreator.name(worldName). - type(WorldType.FLAT). environment(World.Environment.NORMAL). generator(this.chunkGenerator). createWorld(); diff --git a/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java new file mode 100644 index 0000000..6408f9c --- /dev/null +++ b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java @@ -0,0 +1,12 @@ +package world.bentobox.caveblock; + +import world.bentobox.bentobox.api.addons.Addon; +import world.bentobox.bentobox.api.addons.Pladdon; + +public class CaveBlockPladdon extends Pladdon { + + @Override + public Addon getAddon() { + return new CaveBlock(); + } +} diff --git a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java index 6b845df..ba23844 100644 --- a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java @@ -2,18 +2,21 @@ package world.bentobox.caveblock.generators; import java.util.ArrayList; +import java.util.EnumMap; import java.util.List; +import java.util.Map; import java.util.Random; import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.generator.BlockPopulator; +import org.bukkit.World.Environment; +import org.bukkit.block.data.BlockData; import org.bukkit.generator.ChunkGenerator; +import org.bukkit.generator.WorldInfo; +import world.bentobox.bentobox.BentoBox; import world.bentobox.caveblock.CaveBlock; import world.bentobox.caveblock.Settings; -import world.bentobox.caveblock.generators.populators.EntitiesPopulator; -import world.bentobox.caveblock.generators.populators.MaterialPopulator; /** @@ -24,6 +27,12 @@ import world.bentobox.caveblock.generators.populators.MaterialPopulator; */ public class ChunkGeneratorWorld extends ChunkGenerator { + private CaveBlock addon; + private Settings settings; + private Map map = new EnumMap<>(Environment.class); + private final Random r = new Random(); + private Map> ores = new EnumMap<>(Environment.class); + // --------------------------------------------------------------------- // Section: Constructor // --------------------------------------------------------------------- @@ -37,8 +46,51 @@ public class ChunkGeneratorWorld extends ChunkGenerator super(); this.addon = addon; this.settings = addon.getSettings(); + // Source https://minecraft.fandom.com/wiki/Blob + List worldOres = new ArrayList<>(); + worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); + worldOres.add(new Ore(-64, 64, Material.LAPIS_ORE, 1, 7, true)); + worldOres.add(new Ore(-64, 30, Material.GOLD_ORE, 2, 9, true)); + worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); + worldOres.add(new Ore(-64, 16, Material.REDSTONE_ORE, 8, 8, true)); + worldOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); + worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.ANDESITE,5, 33, false)); + worldOres.add(new Ore(0, 79, Material.DIORITE,5, 33, false)); + worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); + worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); + worldOres.add(new Ore(0, 96, Material.COPPER_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.IRON_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + ores.put(Environment.NORMAL, worldOres); + List netherOres = new ArrayList<>(); + netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); + netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); + netherOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.BASALT, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.FIRE, 8 , 33, false)); + netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8 , 33, false)); + netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + netherOres.add(new Ore(-64, 320, Material.LAVA, 8 , 33, false)); + netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8 , 33, false)); + netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); + netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); + netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); + ores.put(Environment.NETHER, netherOres); + List endOres = new ArrayList<>(); + endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); + endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); + endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + ores.put(Environment.THE_END, endOres); - reload(); } @@ -46,7 +98,70 @@ public class ChunkGeneratorWorld extends ChunkGenerator // Section: Methods // --------------------------------------------------------------------- + @Override + public void generateNoise(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { + switch(worldInfo.getEnvironment()) { + default: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.STONE); + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 7, 16, Material.DEEPSLATE); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + case NETHER: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.NETHERRACK); + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 34, 16, Material.SOUL_SAND); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + case THE_END: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.END_STONE); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + } + // Generate ores + for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { + for (Ore o: ores.get(worldInfo.getEnvironment())) { + if (y > o.minY() && y < o.maxY() && r.nextInt(100) <= o.chance()) { + pasteBlob(chunkData, y, o); + if (o.cont()) { + break; + } + } + } + + } + } + + private void pasteBlob(ChunkData chunkData, int y, Ore o) { + //int blobSize = (int) (((double)r.nextInt(o.blob()) / 3) + 1); + int blobSize = 1; + int offset = r.nextInt(16); + for (int x = Math.max(0, offset - blobSize); x < Math.min(16, offset + blobSize); x++) { + for (int z = Math.max(0, offset - blobSize); z < Math.min(16, offset + blobSize); z++) { + for (int yy = Math.max(chunkData.getMinHeight(), y - blobSize); yy < Math.min(chunkData.getMaxHeight(),y + blobSize); yy++) { + BlockData bd = chunkData.getBlockData(x, yy, z); + if (bd.getMaterial().isSolid() && r.nextBoolean()) { + chunkData.setBlock(x, yy, z, o.material()); + } + } + } + } + } + + /* + @Override + public void generateSurface(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { + //BentoBox.getInstance().logDebug("generateSurface " + x + " " + z + " " + chunkData); + } + + @Override + public void generateBedrock(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { + //BentoBox.getInstance().logDebug("generateBedrock " + x + " " + z + " " + chunkData); + } + @Override + public void generateCaves(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { + //BentoBox.getInstance().logDebug("generateCaves " + x + " " + z + " " + chunkData); + } + */ /** * This method sets if given coordinates can be set as spawn location */ @@ -56,196 +171,26 @@ public class ChunkGeneratorWorld extends ChunkGenerator return true; } - - /** - * This method generates given chunk. - * @param world World where chunk must be generated. - * @param random Random that allows define object randomness. - * @param chunkX Chunk X coordinate. - * @param chunkZ Chunk Z coordinate. - * @param biomeGrid BiomeGrid that contains biomes. - * @return new ChunkData for given chunk. - */ @Override - public ChunkData generateChunkData(World world, - Random random, - int chunkX, - int chunkZ, - ChunkGenerator.BiomeGrid biomeGrid) - { - ChunkData result = this.createChunkData(world); - - // Populate chunk with necessary information - if (world.getEnvironment().equals(World.Environment.NETHER)) - { - this.populateNetherChunk(world, result, biomeGrid); - } - else if (world.getEnvironment().equals(World.Environment.THE_END)) - { - this.populateTheEndChunk(world, result, biomeGrid); - } - else - { - this.populateOverWorldChunk(world, result, biomeGrid); - } - - return result; + public boolean shouldGenerateNoise() { + return false; } - - /** - * This method populates The End world chunk data. - * @param world world where chunks are generated. - * @param chunkData ChunkData that must be populated. - * @param biomeGrid BiomeGrid for this chunk. - */ - private void populateTheEndChunk(World world, ChunkData chunkData, BiomeGrid biomeGrid) - { - // because everything starts at 0 and ends at 255 - final int worldHeight = this.settings.getWorldDepth(); - - // Fill all blocks - chunkData.setRegion(0, 1, 0, - 16, worldHeight - 1, 16, - this.settings.getEndMainBlock()); - - // Generate ground and ceiling. - chunkData.setRegion(0, 0, 0, - 16, 1, 16, - this.settings.isEndFloor() ? Material.BEDROCK : this.settings.getEndMainBlock()); - chunkData.setRegion(0, worldHeight - 1, 0, - 16, worldHeight, 16, - this.settings.isEndRoof() ? Material.BEDROCK : this.settings.getEndMainBlock()); - - // Set biome - for (int x = 0; x < 16; x += 4) - { - for (int y = 0; y < world.getMaxHeight(); y += 4) - { - for (int z = 0; z < 16; z += 4) - { - biomeGrid.setBiome(x, y, z, this.settings.getDefaultTheEndBiome()); - } - } - } - } - - - /** - * This method populates nether world chunk data. - * @param world world where chunks are generated. - * @param chunkData ChunkData that must be populated. - * @param biomeGrid BiomeGrid for this chunk. - */ - private void populateNetherChunk(World world, ChunkData chunkData, BiomeGrid biomeGrid) - { - // because everything starts at 0 and ends at 255 - final int worldHeight = this.settings.getWorldDepth(); - - // Fill all blocks - chunkData.setRegion(0, 1, 0, - 16, worldHeight - 1, 16, - this.settings.getNetherMainBlock()); - - // Generate ground and ceiling. - chunkData.setRegion(0, 0, 0, - 16, 1, 16, - this.settings.isNetherFloor() ? Material.BEDROCK : this.settings.getNetherMainBlock()); - chunkData.setRegion(0, worldHeight - 1, 0, - 16, worldHeight, 16, - this.settings.isNetherRoof() ? Material.BEDROCK : this.settings.getNetherMainBlock()); - - // Set biome - for (int x = 0; x < 16; x += 4) - { - for (int y = 0; y < world.getMaxHeight(); y += 4) - { - for (int z = 0; z < 16; z += 4) - { - biomeGrid.setBiome(x, y, z, this.settings.getDefaultNetherBiome()); - } - } - } - } - - - /** - * This method populates Over world chunk data. - * @param world world where chunks are generated. - * @param chunkData ChunkData that must be populated. - * @param biomeGrid BiomeGrid for this chunk. - */ - private void populateOverWorldChunk(World world, ChunkData chunkData, BiomeGrid biomeGrid) - { - // because everything starts at 0 and ends at 255 - final int worldHeight = this.settings.getWorldDepth(); - - // Fill all blocks - chunkData.setRegion(0, 1, 0, - 16, worldHeight - 1, 16, - this.settings.getNormalMainBlock()); - - // Generate ground and ceiling. - chunkData.setRegion(0, 0, 0, - 16, 1, 16, - this.settings.isNormalFloor() ? Material.BEDROCK : this.settings.getNormalMainBlock()); - chunkData.setRegion(0, worldHeight - 1, 0, - 16, worldHeight, 16, - this.settings.isNormalRoof() ? Material.BEDROCK : this.settings.getNormalMainBlock()); - - // Set biome - for (int x = 0; x < 16; x += 4) - { - for (int y = 0; y < world.getMaxHeight(); y += 4) - { - for (int z = 0; z < 16; z += 4) - { - biomeGrid.setBiome(x, y, z, this.settings.getDefaultBiome()); - } - } - } - } - - - /** - * This method set world block populators. - * @param world World where this must apply. - * @return List with block populators. - */ @Override - public List getDefaultPopulators(final World world) - { - return this.blockPopulators; + public boolean shouldGenerateSurface() { + return true; } - /** - * Called when config is reloaded - */ - public void reload() { - this.blockPopulators = new ArrayList<>(2); - - this.blockPopulators.add(new MaterialPopulator(this.addon)); - this.blockPopulators.add(new EntitiesPopulator(this.addon)); - + @Override + public boolean shouldGenerateBedrock() { + return true; } - // --------------------------------------------------------------------- - // Section: Variables - // --------------------------------------------------------------------- + @Override + public boolean shouldGenerateCaves() { + return true; + } - /** - * CaveBlock addon. - */ - private CaveBlock addon; - /** - * Addon settings. - */ - private Settings settings; - - /** - * This list contains block populators that will be applied after chunk is generated. - */ - private List blockPopulators; } diff --git a/src/main/java/world/bentobox/caveblock/generators/Ore.java b/src/main/java/world/bentobox/caveblock/generators/Ore.java new file mode 100644 index 0000000..7f2b6c0 --- /dev/null +++ b/src/main/java/world/bentobox/caveblock/generators/Ore.java @@ -0,0 +1,16 @@ +package world.bentobox.caveblock.generators; + +import org.bukkit.Material; + +/** + * @author tastybento + * @param minY minimum Y level this ore should appear + * @param minY maximum Y level this ore should appear + * @param material Material + * @param chance chance + * @param blob maximum size of blob to generate + * @param cont whether the generator should continue to try to make other ores at this level after making this one + */ +public record Ore (int minY, int maxY, Material material, int chance, int blob, boolean cont){ + +} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..51cf0ff --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,8 @@ +name: Pladdon +main: world.bentobox.caveblock.CaveBlockPladdon +version: ${version} +api-version: 1.17 +description: A CaveBlock Plugin +author: tastybento +depend: + - BentoBox From 1fdc07e0a89a6c71142f9ad8ff062cce0f821f3f Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 10 Oct 2021 20:31:03 -0700 Subject: [PATCH 13/33] Remove javadoc --- pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pom.xml b/pom.xml index df0e0bb..dc69f34 100644 --- a/pom.xml +++ b/pom.xml @@ -183,24 +183,6 @@ maven-jar-plugin 3.1.0 - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - public - false - -Xdoclint:none - - - - attach-javadocs - - jar - - - - org.apache.maven.plugins maven-source-plugin From b41a6e21379b5b76c21e7f96505b2ecb75f5a1fc Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 11 Oct 2021 18:32:31 -0700 Subject: [PATCH 14/33] Revert "Remove javadoc" This reverts commit 1fdc07e0a89a6c71142f9ad8ff062cce0f821f3f. --- pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index dc69f34..df0e0bb 100644 --- a/pom.xml +++ b/pom.xml @@ -183,6 +183,24 @@ maven-jar-plugin 3.1.0 + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + public + false + -Xdoclint:none + + + + attach-javadocs + + jar + + + + org.apache.maven.plugins maven-source-plugin From cdbb629760f6238ed8f41b8104e13b56f4cfbf18 Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:17:42 -0700 Subject: [PATCH 15/33] Polish translation (#64) * Translate pl.yml via GitLocalize * Translate pl.yml via GitLocalize * Translate pl.yml via GitLocalize Co-authored-by: Repo92 Co-authored-by: mt-gitlocalize Co-authored-by: tastybento --- src/main/resources/locales/pl.yml | 301 ++++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 src/main/resources/locales/pl.yml diff --git a/src/main/resources/locales/pl.yml b/src/main/resources/locales/pl.yml new file mode 100644 index 0000000..87939ed --- /dev/null +++ b/src/main/resources/locales/pl.yml @@ -0,0 +1,301 @@ +--- +caveblock: + sign: + line0: "&cCaveBlock" + line1: Witaj! + line2: "[name]" + line3: Zacznij kopać! &c<3 + informational: + to-nether: Uuu... Pech, wpadłes do Netheru. + to-the-end: To już jest koniec. + to-normal: Powrót do jaskini. + general: + errors: + no-island: "&cNie masz jaskini!" + player-has-island: "&cGracz już posiada jaskinie!" + player-has-no-island: "&cTen gracz nie posiada jaskini!" + already-have-island: "&cJuż masz jaskinie!" + no-safe-location-found: "&cNie można znaleźć bezpiecznego miejsca dla teleportu + do jaskini." + not-owner: "&cTo nie twoja jaskinia!" + commands: + admin: + team: + add: + name-has-island: "&c[name] posiada jaskinie. Pierw wyrejestruj lub usuń!" + success: "&b[name]&a został dodany do jaskini gracza &b[owner]." + kick: + success: "&b[name] &azostał wyrzucony z jaskini gracza &b[owner]." + setowner: + description: przenosi własności jaskini do gracza + already-owner: "&c[name] jest już właścicielem tej jaskini!" + success: "&b name]&a jest teraz właścicielem tej jaskini." + range: + description: Zasięg komendy Jaskinii Admina + display: + description: pokaż/ukryj wskaźniki zasięgu jaskiń + hint: |- + &cCzerwone ikony bariery &fpokazują aktualny limit zasięgu chronionego jaskini. + &7Szare cząsteczki &fpokazują maksymalny limit jaskini. + &aZielone cząsteczki &fpokazują domyślny zasięg ochrony, jeśli zasięg ochrony jaskini różni się od niego. + set: + description: ustawia zasięg ochrony jaskini + success: "&aUstaw zasięg ochrony jaskini na &b[liczba]&a." + reset: + description: resetuje zasięg chroniony jaskini do wartości domyślnych świata + success: "&aZresetuj zasięg ochrony jaskini na &b[numer]&a." + register: + description: zarejestruj gracza w niezarejestrowanej jaskini, w której się + znajdujesz + registered-island: "&aZarejestrowano gracza do jaskini w [xyz]." + already-owned: "&cJaskinia jest już własnością innego gracza!" + no-island-here: "&cTutaj nie ma jaskini. Potwierdź, aby utworzyć." + in-deletion: "&cTo miejsce jaskini jest obecnie usuwane. Spróbuj później." + cannot-make-island: "&cPrzepraszamy, nie można tu umieścić jaskini. Zobacz + konsolę, aby poznać możliwe błędy." + unregister: + description: wyrejestruj właściciela z jaskini, ale zachowaj bloki jaskiniowe + unregistered-island: "&aNiezarejestrowany gracz z jaskini w [xyz]." + info: + description: uzyskaj informacje o tym, gdzie jesteś lub o jaskini gracza + no-island: "&cNie jesteś teraz w jaskini ..." + title: "======== Informacje o jaskini ========" + islands-in-trash: "&dGracz ma jaskinie w koszu." + is-spawn: Wyspa jest jaskinią spawnu + switchto: + description: zmień jaskinię gracza na ponumerowaną znajdującą się w koszu + out-of-range: "&cNumer musi mieścić się w przedziale od 1 do [number]. Użyj + &l[label] trash [player], &r&caby zobaczyć numery jaskiń" + trash: + no-unowned-in-trash: "&cŻadnych bezpańskich jaskiń w śmieciach" + no-islands-in-trash: "&cGracz nie ma jaskiń w koszu" + description: pokaż bezpańskie jaskinie lub jaskinie graczy w śmieciach + title: "&d=========== Jaskinie w koszu ===========" + count: "&l&dJaskinia [number]:" + use-switch: "&aUżyj &l[label] switchto &r&a aby przełączyć + gracza do jaskini w koszu" + emptytrash: + description: Usuń śmieci dla gracza lub wszystkie bezpańskie jaskinie w koszu + setrange: + description: ustaw zasięg jaskini gracza + range-updated: Zasięg jaskiń został zaktualizowany do [number] + tp: + description: teleportuj się do jaskini gracza + getrank: + description: zdobądź rangę gracza w swojej jaskini + rank-is: "&aRank to [range] w ich jaskini." + setrank: + description: ustaw rangę gracza w jego jaskini + setspawn: + description: ustaw jaskinię jako spawn dla tego świata + already-spawn: "&cTa jaskinia już się odradza!" + no-island-here: "&cNie ma tu jaskini." + confirmation: "&cCzy na pewno chcesz ustawić tę jaskinię jako miejsce odrodzenia + tego świata?" + resetflags: + description: Zresetuj wszystkie jaskinie do domyślnych ustawień flag w config.yml + delete: + description: usuwa jaskinię gracza + cannot-delete-owner: "&cWszyscy członkowie jaskini muszą zostać wyrzuceni + z jaskini przed jej usunięciem." + deleted-island: "&aWyspa w &e[xyz] &azostała pomyślnie usunięta." + island: + go: + description: teleportować cię do swojej jaskini + teleport: "&aTeleportuję Cię do Twojej jaskini." + help: + description: Główne dowództwo jaskini + create: + description: stwórz jaskinię, korzystając z opcjonalnego planu (wymaga pozwolenia) + too-many-islands: "&cNa tym świecie jest zbyt wiele jaskiń: nie ma wystarczająco + dużo miejsca, aby stworzyć twoją." + unable-create-island: "&cTwoja jaskinia nie może zostać wygenerowana, skontaktuj + się z administratorem." + creating-island: "&aTworzenie jaskini, proszę chwilę poczekać..." + pick: "&aWybierz jaskinię" + info: + description: wyświetlaj informacje o swojej jaskini lub jaskini gracza + near: + description: pokaż nazwy sąsiednich jaskiń wokół ciebie + the-following-islands: "&aW pobliżu znajdują się następujące jaskinie:" + no-neighbors: "&cNie masz bezpośrednio sąsiadujących jaskiń!" + reset: + description: uruchom ponownie jaskinię i usuń starą + must-remove-members: "&cMusisz usunąć wszystkich członków ze swojej jaskini, + zanim będziesz mógł ją ponownie uruchomić (/island team kick )." + sethome: + must-be-on-your-island: "&cMusisz być w swojej jaskini, aby wrócić do domu!" + home-set: "&6Twój dom w jaskini został ustawiony na bieżącą lokalizację." + setname: + description: ustaw nazwę dla swojej jaskini + resetname: + description: zresetuj nazwę jaskini + team: + coop: + description: zrób ranking kooperacyjny gracza w swojej jaskini + uncoop: + you-are-no-longer-a-coop-member: "&cNie jesteś już członkiem współpracy + w jaskini [name]" + all-members-logged-off: "&cWszyscy członkowie jaskini wylogowali się, więc + nie jesteś już członkiem kooperacji w jaskini [name]" + trust: + description: dać graczowi zaufaną rangę w swojej jaskini + invite: + description: zaproś gracza do swojej jaskini + name-has-invited-you: "&a[name] zaprasza Cię do swojej jaskini." + you-will-lose-your-island: "&cOSTRZEŻENIE! Stracisz swoją jaskinię, jeśli + się zgodzisz!" + errors: + island-is-full: "&cTwoja jaskinia jest pełna, nie możesz nikogo zaprosić." + accept: + you-joined-island: "&aDołączyłeś do jaskini! Użyj /[etykieta] informacji + o zespole, aby zobaczyć innych członków." + name-joined-your-island: "&a[name] dołączył do Twojej jaskini!" + confirmation: |- + &cCzy na pewno chcesz przyjąć to zaproszenie? + &c&lZgubisz&n&r &c&lyswoją obecną jaskinię! + reject: + you-rejected-invite: "&aOdrzuciłeś zaproszenie do jaskini." + name-rejected-your-invite: "&c[name] odrzucił Twoje zaproszenie do jaskini!" + cancel: + description: anuluj oczekujące zaproszenie do swojej jaskini + leave: + description: opuść swoją jaskinię + left-your-island: "&c[name] &rozszczep swoją jaskinię" + kick: + description: usuń członka ze swojej jaskini + owner-kicked: "&cWłaściciel wykopał cię z jaskini!" + success: "&b[name] &został wyrzucony z Twojej jaskini." + demote: + description: zdegraduj gracza w swojej jaskini w dół o rangę + promote: + description: awansować gracza w swojej jaskini na wyższą rangę + setowner: + description: przenieść własność jaskini na członka + errors: + target-is-not-member: "&cTen gracz nie jest częścią twojej drużyny jaskiniowej!" + name-is-the-owner: "&a[name] jest teraz właścicielem jaskini!" + you-are-the-owner: "&aJesteś teraz właścicielem jaskini!" + ban: + description: zbanuj gracza ze swojej jaskini + cannot-ban-more-players: "&c Osiągnąłeś limit banów, nie możesz zbanować więcej + graczy ze swojej jaskini." + player-banned: "&b[name]&c jest teraz zablokowany w Twojej jaskini." + owner-banned-you: "&b[name]&c zabronił Ci wstępu do swojej jaskini!" + you-are-banned: "&bNie masz dostępu do tej jaskini!" + unban: + description: odbanuj gracza z twojej jaskini + player-unbanned: "&b[name]&a jest teraz odblokowany w Twojej jaskini." + you-are-unbanned: "&b[name]&a odblokował cię w swojej jaskini!" + banlist: + noone: "&aNikt nie jest zabroniony w tej jaskini." + settings: + description: wyświetl ustawienia jaskini + expel: + description: wyrzuć gracza ze swojej jaskini + not-on-island: "&cTego gracza nie ma w twojej jaskini!" + player-expelled-you: "&b[name]&c wyrzucił cię z jaskini!" + ranks: + owner: Król krasnoludów + sub-owner: Krasnoludzki Rycerz + member: Krasnolud + trusted: Zaufane + coop: Kooperacja + visitor: Człowiek + banned: Ork + protection: + flags: + ENDERMAN_GRIEFING: + description: |- + &aEndermen może usunąć + &blokady z jaskiń + name: Rozpacz Endermana + ENTER_EXIT_MESSAGES: + island: Jaskinia [name] + GEO_LIMIT_MOBS: + description: |- + &aUsuń moby, które idą + &poza chronionym + &ostań w przestrzeni + name: "&eOgranicz moby do jaskini" + ISLAND_RESPAWN: + description: |- + &aGracze odradzają się + &w ich jaskini + name: Odrodzenie w jaskini + LIQUIDS_FLOWING_OUT: + name: Płyny wypływające poza jaskinie + description: |- + &aPrzełącz, czy płyny mogą wypływać na zewnątrz + &a zasięgu ochrony jaskini. + LOCK: + description: Przełącz blokadę + name: Zablokuj jaskinię + NATURAL_SPAWNING_OUTSIDE_RANGE: + name: Naturalne stworzenie odradzające się poza zasięgiem + description: |- + &aPrzełącz czy stworzenia (zwierzęta i + i potwory) mogą naturalnie odradzać się na zewnątrz + &aa zasięg ochrony jaskini. + + &cPamiętaj, że nie zapobiega to stworzeniom + &cby odradzać się za pomocą generatora mobów lub spawnu + &ceg. + OFFLINE_GROWTH: + description: |- + &aPo wyłączeniu rośliny + &nie będzie rosnąć w jaskiniach + &kiedy wszyscy członkowie są offline. + &aMoże pomóc zmniejszyć opóźnienia. + name: Rozwój offline + OFFLINE_REDSTONE: + description: |- + &aKiedy wyłączone, czerwony kamień + &nie będzie działać w jaskiniach + &gdzie wszyscy członkowie są offline. + &aMoże pomóc zmniejszyć opóźnienia. + name: Offline Redstone + PISTON_PUSH: + description: |- + &aZezwalaj tłokom na pchanie + &blokuje na zewnątrz jaskini + name: Popychanie tłoka + REMOVE_MOBS: + description: |- + &aUsuń potwory, gdy + &ateleport do jaskini + name: Usuń potwory + TREES_GROWING_OUTSIDE_RANGE: + name: Drzewa rosnące poza zasięgiem + description: |- + &aPrzełącz, czy drzewa mogą rosnąć na zewnątrz i + zakres ochrony &acave, czy nie. + PREVENT_TELEPORT_WHEN_FALLING: + name: Zapobiegaj teleportacji podczas upadku + description: |- + &aZapobiegaj teleportacji graczy + &z powrotem do swojej jaskini za pomocą poleceń + i jeśli spadają. + hint: "&cNie możesz teleportować się z powrotem do swojej jaskini, gdy spadasz." + locked: "&cTa jaskinia jest zamknięta!" + protected: "&cJaskinia chroniona: [description]" + spawn-protected: "&cSpawn chroniony: [description]" + panel: + PROTECTION: + description: |- + &aUstawienia ochrony + &dla tej jaskini + SETTING: + description: |- + &aUstawienia ogólne + &dla tej jaskini +protection: + flags: + SKY_WALKER_FLAG: + description: |- + &5&oPozwala to włączyć/wyłączyć + &5&możliwość chodzenia po + &5&otop świata jaskiń + &5&obez dodatkowych uprawnień. + name: Sky Walker + hint: Pozwala chodzić po suficie jaskini. From 30f59d2a31338039d0003dd09a1c3a1370f1c356 Mon Sep 17 00:00:00 2001 From: Huynh Tien Date: Sat, 16 Oct 2021 23:51:33 +0700 Subject: [PATCH 16/33] Add Vietnamese (#65) --- src/main/resources/locales/vi.yml | 292 ++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 src/main/resources/locales/vi.yml diff --git a/src/main/resources/locales/vi.yml b/src/main/resources/locales/vi.yml new file mode 100644 index 0000000..08c34ad --- /dev/null +++ b/src/main/resources/locales/vi.yml @@ -0,0 +1,292 @@ +########################################################################################### +# This is a YML file. Be careful when editing. Check your edits in a YAML checker like # +# the one at http://yaml-online-parser.appspot.com # +########################################################################################### + +caveblock: + sign: + line0: "&cCaveBlock" + line1: "Chào mừng!" + line2: "[name]" + line3: "Đào đi! &c<3" + + informational: + to-nether: "Rất tệ khi vào địa ngục." + to-the-end: "Kết thúc rồi." + to-normal: "Về hang của bạn." + # Override BentoBox default command strings + # General strings + general: + errors: + no-island: "&cBạn không có hang!" + player-has-island: "&cNgười chơi đã có hang!" + player-has-no-island: "&cNgười chơi không có hang!" + already-have-island: "&cBạn đã có hang!" + no-safe-location-found: "&cKhông thể tìm thấy vị trí an toàn trong hang." + not-owner: "&cBạn không phải chủ hang!" + commands: + # Parameters in <> are required, parameters in [] are optional + admin: + team: + add: + name-has-island: "&c[name] đã có hang. Huỷ hoặc xoá nó trước!" + success: "&b[name]&a đã được thêm vào hang của &b[owner]&a." + kick: + success: "&b[name] &ađã bị đuổi từ hang của &b[owner]&a." + setowner: + description: "chuyển quyền chủ hang cho người chơi" + already-owner: "&c[name] đã là chủ hang!" + success: "&b[name]&a giờ là chủ hang." + range: + description: "lệnh độ rộng hang của Admin" + display: + description: "hiện/ẩn đánh dấu độ rộng hang" + hint: |- + &cKí tự Rào chặn đỏ &fthể hiện độ rộng vùng bảo vệ của hang. + &7Hạt Xám &fthể hiện giới hạn của hang. + &aHạt Xanh &fthể hiện vùng bảo vệ mặc định nếu vùng bảo vệ của hang khác mặc định. + set: + description: "chỉnh vùng bảo vệ hang" + success: "&aĐã chỉnh vùng bảo vệ hang thành &b[number]&a." + reset: + description: "chỉnh vùng bảo vệ hang về mặc định" + success: "&aĐã chỉnh vùng bảo vệ hang thành &b[number]&a." + register: + description: "đăng kí người chơi vào hang không chủ ở vị trí của bạn" + registered-island: "&aĐã đăng kí người chơi ở hang [xyz]." + already-owned: "&cHang đã có chủ!" + no-island-here: "&cKhông có hang ở đây. Xác nhận để tạo." + in-deletion: "&cHang đang được xoá. Thử lại sau." + cannot-make-island: "&c Hang không thể đặt ở đây. Xem lỗi trên bảng điều khiển." + unregister: + description: "huỷ quyền chủ hang, nhưng giữ lại các khối trong hang" + unregistered-island: "&aĐã huỷ đăng kí người chơi ở hang [xyz]." + info: + description: "lấy thông về nơi bạn ở hoặc hang của người chơi" + no-island: "&cBạn không ở một hang..." + title: "========== Thông tin Hang ============" + islands-in-trash: "&dNgười chơi có hang trong thùng rác." + is-spawn: "Đảo là hang triệu hồi" + switchto: + description: "chuyển hang của người chơi thành một số trong thùng rác" + out-of-range: "&cSố phải từ 1 đến [number]. Dùng &l[label] trash [player] &r&cđể xem số hang" + trash: + no-unowned-in-trash: "&cKhông có hang không chủ trong thùng rác" + no-islands-in-trash: "&cNgười chơi không có hang trong thùng rác" + description: "xem hang không chủ hoặc của người chơi trong thùng rác" + title: "&d=========== Hang trong Thùng Rác ===========" + count: "&l&dHang [number]:" + use-switch: "&aDùng &l[label] switchto &r&a để chuyển người chơi vào hang trong thùng rác" + emptytrash: + description: "Dọn rác cho người chơi, hoặc toàn bộ hang không chủ trong thùng rác" + setrange: + description: "chỉnh độ rộng hang của người chơi" + range-updated: "Đã chỉnh độ rộng của hang thành [number]" + tp: + description: "dịch chuyển đến hang của người chơi" + getrank: + description: "xem cấp độ của người chơi trong hang" + rank-is: "&aCấp độ là [rank] ở hang của họ." + setrank: + description: "chỉnh cấp độ của người chơi ở hang của họ" + setspawn: + description: "chỉnh một hang thành nơi bắt đầu ở thế giới này" + already-spawn: "&cHang này đã là nơi bắt đầu!" + no-island-here: "&cKhông có hang ở đây." + confirmation: "&cBạn có chắc là chọn hang này làm nơi bắt đầu ở thế giới này?" + resetflags: + description: "Đặt lại cờ của các hang về mặc định trong config.yml" + delete: + description: "xoá hang của người chơi" + cannot-delete-owner: "&cThành viên của hang phải bị đuổi trước khi xoá." + deleted-island: "&aĐảo &e[xyz] &ađã được xoá thành công." + island: + go: + description: "dịch chuyển đến hang của bạn" + teleport: "&aĐang dịch chuyển đến hang của bạn." + help: + description: "Lệnh hang chính" + create: + description: "tạo hang, dùng bản vẽ nếu có (cần quyền)" + too-many-islands: "&cQuá nhiều hang ở thế giới này: không đủ khoảng trống cho khu của bạn." + unable-create-island: "&cHang của bạn không được tạo, hãy liên hệ quản trị viên." + creating-island: "&aĐang tạo hang, chờ một chút..." + pick: "&aChọn hang" + info: + description: "xem thông tin hang của bạn hoặc của người chơi" + near: + description: "xem tên của hang kế bên bạn" + the-following-islands: "&aHang kế bên bạn:" + no-neighbors: "&cKhông có hang kế bên bạn!" + reset: + description: "tạo lại hang và xoá hang cũ" + must-remove-members: "&cBạn phải xoá thành viên khỏi hang trước khi xoá (/[label] team kick )." + sethome: + must-be-on-your-island: "&cBạn phải ở hang của bạn để đặt nhà!" + home-set: "&6Nhà của hang đã đặt ở vị trí của bạn." + setname: + description: "đặt tên cho hang" + resetname: + description: "đặt lại tên của hang" + team: + coop: + description: "cho người chơi cấp chơi cùng với hang của bạn" + uncoop: + you-are-no-longer-a-coop-member: '&cBạn không còn chơi cùng với hang của [name].' + all-members-logged-off: '&c Người chơi ở hang đã thoát hết nên bạn không còn chơi cùng với hang của [name].' + trust: + description: "cho người chơi cấp tin tưởng với hang bạn" + invite: + description: "mời người chơi vào hang của bạn" + name-has-invited-you: "&a[name] đã mời bạn vào hang của họ." + you-will-lose-your-island: "&cCHÚ Ý! Bạn sẽ mất hang của bạn nếu chấp nhận lời mời" + errors: + island-is-full: "&cHang đã đầy, bạn không thể mời thêm." + accept: + you-joined-island: "&aBạn đã vào hang! Dùng /[label] team info để xem thành viên khác." + name-joined-your-island: "&a[name] đã vào hang của bạn!" + confirmation: |- + &cBạn có chắc muón chấp nhận lời mời này? + &c&lBạn sẽ &nMẤT&r &c&lhang hiện tại của bạn! + reject: + you-rejected-invite: "&aBạn đã từ chối lời mời vào hang." + name-rejected-your-invite: "&c[name] đã từ chối lời mời của bạn!" + cancel: + description: "huỷ lời mời đang chờ vào hang của bạn" + leave: + description: "rời hang của bạn" + left-your-island: "&c[name] &cđã rời hang của bạn" + kick: + description: "xoá thành viên khỏi hang của bạn" + owner-kicked: "&cChủ hang đã đuổi bạn!" + success: "&b[name] &ađã bị đuổi khỏi hang của bạn." + demote: + description: "hạ cấp của người chơi trong hang" + promote: + description: "nâng cấp của người chơi trong hang" + setowner: + description: "chuyển quyền chủ hang cho người chơi" + errors: + target-is-not-member: "&cNgười chơi đó không ở trong đội của bạn!" + name-is-the-owner: "&a[name] giờ là chủ hang!" + you-are-the-owner: "&aBạn giờ là chủ hang!" + ban: + description: "cấm người chơi khỏi hang của bạn" + cannot-ban-more-players: "&cĐã đạt giới hạn cấm, bạn không thể cấm thêm người." + player-banned: "&b[name]&c đã bị cấm khỏi hang của bạn." + owner-banned-you: "&b[name]&c đã cấm bạn khỏi hang của họ!" + you-are-banned: "&bBạn đã bị cấm ở hang này!" + unban: + description: "bỏ cấm người chơi khỏi hang của bạn" + player-unbanned: "&b[name]&a không còn bị cấm khỏi hang của bạn." + you-are-unbanned: "&b[name]&a huỷ cấm bạn khỏi hang của họ!" + banlist: + noone: "&aKhông ai bị cấm ở hang này." + settings: + description: "xem tuỳ chọn hang" + expel: + description: "trục xuất người chơi khỏi hang của bạn" + not-on-island: "&cNgười chơi đó không ở hang của bạn!" + player-expelled-you: "&b[name]&c đã trục xuất bạn khỏi hang của họ!" + + ranks: + owner: "Vua Người Lùn" + sub-owner: "Hiệp Sĩ Người Lùn" + member: "Người Lùn" + trusted: "Tin Tưởng" + coop: "Chơi Cùng" + visitor: "Con Người" + banned: "Orc" + + protection: + flags: + ENDERMAN_GRIEFING: + description: |- + &aNgười Ender có thể cướp + &akhối khỏi hang + name: "Trộm bởi Người Ender" + ENTER_EXIT_MESSAGES: + island: "hang của [name]" + GEO_LIMIT_MOBS: + description: |- + &a Xóa các quái đã rời khỏi + &a khu vực bảo vệ trong hang + name: "&eGiới hạn quái trong đảo" + ISLAND_RESPAWN: + description: |- + &aNgười chơi hồi sinh + &aở hang của họ + name: "Hồi sinh tại hang" + LIQUIDS_FLOWING_OUT: + name: "Chất lỏng tràn ra khỏi hang" + description: |- + &aBật/Tắt việc chất lỏng có thể + &atràn ra khỏi khu vực bảo vệ của hang. + LOCK: + description: "Bật/Tắt khóa" + name: "Khoá đảo" + NATURAL_SPAWNING_OUTSIDE_RANGE: + name: "Sinh quái tự nhiên ngoài hang" + description: |- + &aBật/Tắt cho phép con vật (động vật và + &aquái vật) có thể sinh tự nhiên ngoài + &akhu vực bảo vệ của hang. + + &cLưu ý là nó không chặn việc sinh quái + &cbằng lồng triệu hồi hoặc trứng. + OFFLINE_GROWTH: + description: |- + &aKhi tắt, cây trồng + &asẽ không mọc lớn trong hang + &anếu tất cả thành viên đều ngoại tuyến. + &aCó thể giúp giảm lag. + name: "Mọc cây khi ngoại tuyến" + OFFLINE_REDSTONE: + description: |- + &aKhi tắt, đá đỏ + &asẽ không hoạt động trong hang + &anếu tất cả thành viên đều ngoại tuyến. + &aCó thể giúp giảm lag. + &aKhông ảnh hưởng đảo triệu hồi. + name: "Đá đỏ khi ngoại tuyến" + PISTON_PUSH: + description: |- + &aCho phép pít tông đẩy + &akhối ra khỏi hang + name: "Pít tông đẩy khối" + REMOVE_MOBS: + description: |- + &aXoá quái khi dịch + &achuyển đến đảo + name: "Xoá quái" + TREES_GROWING_OUTSIDE_RANGE: + name: "Cây mọc ngoài đảo" + description: |- + &aBật/Tắt việc cây có thể mọc ngoài + &akhu vực bảo vệ trong hang. + PREVENT_TELEPORT_WHEN_FALLING: + name: "Chặn dịch chuyển khi đang rời" + description: |- + &aChặn người chơi khỏi việc dịch chuyển + &avề đảo của họ bằng lệnh khi đang rơi. + hint: '&cBạn không thể làm điều đó khi đang rơi.' + locked: "&cHang đã bị khoá!" + protected: "&cĐã bảo vệ hang: [description]" + spawn-protected: "&cĐã bảo vệ nơi bắt đầu: [description]" + + panel: + PROTECTION: + description: |- + &aTuỳ chỉnh bảo vệ + &acho hang này + SETTING: + description: |- + &aTuỳ chỉnh tổng quan + &acho hang này + +protection: + flags: + SKY_WALKER_FLAG: + description: "&5&oCho phép bật/tắt\n&5&oquyền để đi trên\n&5&ođỉnh của thế giới hang\n&5&omà không cần thêm quyền." + name: "Bước Trên Trời Cao" + hint: "Cho phép đi trên đỉnh hang." \ No newline at end of file From 7824c7bf7146a3f2f16e2286b1f513d674591a89 Mon Sep 17 00:00:00 2001 From: Huynh Tien Date: Tue, 14 Dec 2021 11:00:54 +0700 Subject: [PATCH 17/33] Optional Generators (#67) * old generators in new api * add NewMaterialPopulator * forgot to prevent physics loop * I see... the new generator creates caves * apply getMinHeight and getMaxHeight * getMinHeight and getMaxHeight for populators too * summarize * general reformat on populators * small typos * comment sections * small reformat * warning on config * apply new API on BlockPopulator p.1 * apply new API on BlockPopulator p.2 * apply new API on BlockPopulator p.3 (final) * hasAI option --- .../world/bentobox/caveblock/Settings.java | 26 ++ .../java/world/bentobox/caveblock/Utils.java | 20 ++ .../generators/ChunkGeneratorWorld.java | 209 +++++--------- .../bentobox/caveblock/generators/Ore.java | 14 +- .../populators/EntitiesPopulator.java | 264 +++++++++--------- .../populators/FlatBiomeProvider.java | 48 ++++ .../populators/MaterialPopulator.java | 259 ++++++++--------- .../populators/NewMaterialPopulator.java | 96 +++++++ src/main/resources/config.yml | 5 + 9 files changed, 515 insertions(+), 426 deletions(-) create mode 100644 src/main/java/world/bentobox/caveblock/Utils.java create mode 100644 src/main/java/world/bentobox/caveblock/generators/populators/FlatBiomeProvider.java create mode 100644 src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 2795e19..67b63e4 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -812,6 +812,15 @@ public class Settings implements WorldSettings return numberOfBlockGenerationTries; } + /** + * This method returns the newMaterialGenerator value. + * @return the value of newMaterialGenerator. + */ + public boolean isNewMaterialGenerator() + { + return newMaterialGenerator; + } + /** * {@inheritDoc} @@ -1647,6 +1656,17 @@ public class Settings implements WorldSettings } + /** + * This method sets the newMaterialGenerator value. + * @param newMaterialGenerator the numberOfBlockGenerationTries new value. + * + */ + public void setNewMaterialGenerator(boolean newMaterialGenerator) + { + this.newMaterialGenerator = newMaterialGenerator; + } + + /** * @return the debug */ @@ -2198,6 +2218,12 @@ public class Settings implements WorldSettings @ConfigEntry(path = "world.generation-tries", needsReset = true) private int numberOfBlockGenerationTries = 1; + @ConfigComment("Should we use the new material generator ?") + @ConfigComment("This will generate ores and blocks similar to how vanilla does,") + @ConfigComment("but it will override the blocks settings of each world.") + @ConfigEntry(path = "world.use-new-material-generator", needsReset = true) + private boolean newMaterialGenerator = false; + @ConfigComment("") @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone") @ConfigEntry(path = "world.normal.roof", needsReset = true) diff --git a/src/main/java/world/bentobox/caveblock/Utils.java b/src/main/java/world/bentobox/caveblock/Utils.java new file mode 100644 index 0000000..934bfd3 --- /dev/null +++ b/src/main/java/world/bentobox/caveblock/Utils.java @@ -0,0 +1,20 @@ +package world.bentobox.caveblock; + +import org.bukkit.Location; + +public class Utils { + + /** + * Convert chunk location to world location + * + * @param x the x coordinate of the chunk location + * @param y the y coordinate + * @param z the z coordinate of the chunk location + * @param chunkX the x coordinate of the chunk + * @param chunkZ the z coordinate of the chunk + * @return the world location + */ + public static Location getLocationFromChunkLocation(int x, int y, int z, int chunkX, int chunkZ) { + return new Location(null, x + (chunkX * 16D), y, z + (chunkZ * 16D)); + } +} diff --git a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java index ba23844..a6591db 100644 --- a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java @@ -1,23 +1,21 @@ package world.bentobox.caveblock.generators; - -import java.util.ArrayList; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - import org.bukkit.Material; import org.bukkit.World; -import org.bukkit.World.Environment; -import org.bukkit.block.data.BlockData; +import org.bukkit.generator.BiomeProvider; +import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.WorldInfo; - -import world.bentobox.bentobox.BentoBox; import world.bentobox.caveblock.CaveBlock; import world.bentobox.caveblock.Settings; +import world.bentobox.caveblock.generators.populators.EntitiesPopulator; +import world.bentobox.caveblock.generators.populators.FlatBiomeProvider; +import world.bentobox.caveblock.generators.populators.MaterialPopulator; +import world.bentobox.caveblock.generators.populators.NewMaterialPopulator; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; /** * Class ChunkGeneratorWorld ... @@ -25,155 +23,81 @@ import world.bentobox.caveblock.Settings; * @author BONNe * Created on 27.01.2019 */ -public class ChunkGeneratorWorld extends ChunkGenerator -{ - private CaveBlock addon; - private Settings settings; - private Map map = new EnumMap<>(Environment.class); - private final Random r = new Random(); - private Map> ores = new EnumMap<>(Environment.class); +public class ChunkGeneratorWorld extends ChunkGenerator { + // --------------------------------------------------------------------- + // Section: Variables + // --------------------------------------------------------------------- + + private final CaveBlock addon; + private final Settings settings; + private final List blockPopulators; + private BiomeProvider biomeProvider; // --------------------------------------------------------------------- // Section: Constructor // --------------------------------------------------------------------- - /** * @param addon - CaveBlock object */ - public ChunkGeneratorWorld(CaveBlock addon) - { - super(); + public ChunkGeneratorWorld(CaveBlock addon) { this.addon = addon; this.settings = addon.getSettings(); - // Source https://minecraft.fandom.com/wiki/Blob - List worldOres = new ArrayList<>(); - worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); - worldOres.add(new Ore(-64, 64, Material.LAPIS_ORE, 1, 7, true)); - worldOres.add(new Ore(-64, 30, Material.GOLD_ORE, 2, 9, true)); - worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); - worldOres.add(new Ore(-64, 16, Material.REDSTONE_ORE, 8, 8, true)); - worldOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); - worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); - worldOres.add(new Ore(0, 79, Material.ANDESITE,5, 33, false)); - worldOres.add(new Ore(0, 79, Material.DIORITE,5, 33, false)); - worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); - worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); - worldOres.add(new Ore(0, 96, Material.COPPER_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 320, Material.IRON_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - ores.put(Environment.NORMAL, worldOres); - List netherOres = new ArrayList<>(); - netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); - netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); - netherOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.BASALT, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.FIRE, 8 , 33, false)); - netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8 , 33, false)); - netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - netherOres.add(new Ore(-64, 320, Material.LAVA, 8 , 33, false)); - netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8 , 33, false)); - netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); - netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); - netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); - ores.put(Environment.NETHER, netherOres); - List endOres = new ArrayList<>(); - endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); - endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); - endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - ores.put(Environment.THE_END, endOres); + this.blockPopulators = new ArrayList<>(2); + reload(); } - // --------------------------------------------------------------------- // Section: Methods // --------------------------------------------------------------------- - @Override - public void generateNoise(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { - switch(worldInfo.getEnvironment()) { - default: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.STONE); - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 7, 16, Material.DEEPSLATE); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - case NETHER: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.NETHERRACK); - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 34, 16, Material.SOUL_SAND); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - case THE_END: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.END_STONE); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - } - - // Generate ores - for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { - for (Ore o: ores.get(worldInfo.getEnvironment())) { - if (y > o.minY() && y < o.maxY() && r.nextInt(100) <= o.chance()) { - pasteBlob(chunkData, y, o); - if (o.cont()) { - break; - } - } - } - - } + private Material getGroundCeilMaterial(World.Environment environment) { + return switch (environment) { + case NETHER -> this.settings.isNetherRoof() ? Material.BEDROCK : this.settings.getNetherMainBlock(); + case THE_END -> this.settings.isEndFloor() ? Material.BEDROCK : this.settings.getEndMainBlock(); + default -> this.settings.isNormalFloor() ? Material.BEDROCK : this.settings.getNormalMainBlock(); + }; } - private void pasteBlob(ChunkData chunkData, int y, Ore o) { - //int blobSize = (int) (((double)r.nextInt(o.blob()) / 3) + 1); - int blobSize = 1; - int offset = r.nextInt(16); - for (int x = Math.max(0, offset - blobSize); x < Math.min(16, offset + blobSize); x++) { - for (int z = Math.max(0, offset - blobSize); z < Math.min(16, offset + blobSize); z++) { - for (int yy = Math.max(chunkData.getMinHeight(), y - blobSize); yy < Math.min(chunkData.getMaxHeight(),y + blobSize); yy++) { - BlockData bd = chunkData.getBlockData(x, yy, z); - if (bd.getMaterial().isSolid() && r.nextBoolean()) { - chunkData.setBlock(x, yy, z, o.material()); - } - } - } - } - } - - /* - @Override - public void generateSurface(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { - //BentoBox.getInstance().logDebug("generateSurface " + x + " " + z + " " + chunkData); + private Material getBaseMaterial(World.Environment environment) { + return switch (environment) { + case NETHER -> this.settings.getNetherMainBlock(); + case THE_END -> this.settings.getEndMainBlock(); + default -> this.settings.getNormalMainBlock(); + }; } @Override - public void generateBedrock(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { - //BentoBox.getInstance().logDebug("generateBedrock " + x + " " + z + " " + chunkData); - } - @Override - public void generateCaves(WorldInfo worldInfo, Random random, int x, int z, ChunkData chunkData) { - //BentoBox.getInstance().logDebug("generateCaves " + x + " " + z + " " + chunkData); - } - */ - /** - * This method sets if given coordinates can be set as spawn location - */ - @Override - public boolean canSpawn(World world, int x, int z) - { - return true; + public void generateBedrock(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int minHeight = worldInfo.getMinHeight(); + Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); + chunkData.setRegion(0, minHeight, 0, 16, minHeight + 1, 16, material); } @Override - public boolean shouldGenerateNoise() { - return false; + public void generateSurface(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); + Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); + chunkData.setRegion(0, worldHeight - 1, 0, 16, worldHeight, 16, material); + } + + @Override + public void generateNoise(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int minHeight = worldInfo.getMinHeight(); + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); + Material material = getBaseMaterial(worldInfo.getEnvironment()); + chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, material); + } + + @Override + public List getDefaultPopulators(final World world) { + return this.blockPopulators; + } + + @Override + public BiomeProvider getDefaultBiomeProvider(WorldInfo worldInfo) { + return biomeProvider; } @Override @@ -188,9 +112,22 @@ public class ChunkGeneratorWorld extends ChunkGenerator @Override public boolean shouldGenerateCaves() { - return true; + return this.settings.isNewMaterialGenerator(); } + /** + * Called when config is reloaded + */ + public void reload() { + this.blockPopulators.clear(); + if (this.settings.isNewMaterialGenerator()) { + this.blockPopulators.add(new NewMaterialPopulator()); + } else { + this.blockPopulators.add(new MaterialPopulator(this.addon)); + } + this.blockPopulators.add(new EntitiesPopulator(this.addon)); + this.biomeProvider = new FlatBiomeProvider(this.addon); + } } diff --git a/src/main/java/world/bentobox/caveblock/generators/Ore.java b/src/main/java/world/bentobox/caveblock/generators/Ore.java index 7f2b6c0..24d76a5 100644 --- a/src/main/java/world/bentobox/caveblock/generators/Ore.java +++ b/src/main/java/world/bentobox/caveblock/generators/Ore.java @@ -3,14 +3,14 @@ package world.bentobox.caveblock.generators; import org.bukkit.Material; /** - * @author tastybento - * @param minY minimum Y level this ore should appear - * @param minY maximum Y level this ore should appear + * @param minY minimum Y level this ore should appear + * @param minY maximum Y level this ore should appear * @param material Material - * @param chance chance - * @param blob maximum size of blob to generate - * @param cont whether the generator should continue to try to make other ores at this level after making this one + * @param chance chance + * @param blob maximum size of blob to generate + * @param cont whether the generator should continue to try to make other ores at this level after making this one + * @author tastybento */ -public record Ore (int minY, int maxY, Material material, int chance, int blob, boolean cont){ +public record Ore(int minY, int maxY, Material material, int chance, int blob, boolean cont) { } diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java index 4c95ec2..0b71ce3 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java @@ -1,52 +1,80 @@ package world.bentobox.caveblock.generators.populators; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.stream.Collectors; - -import org.bukkit.Chunk; +import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.World; import org.bukkit.World.Environment; -import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.generator.BlockPopulator; +import org.bukkit.generator.LimitedRegion; +import org.bukkit.generator.WorldInfo; import org.bukkit.util.BoundingBox; - import world.bentobox.bentobox.util.Pair; import world.bentobox.caveblock.CaveBlock; +import world.bentobox.caveblock.Utils; +import java.util.*; +import java.util.stream.Collectors; /** - * This class populates generated chunk with entites by random chance. + * This class populates generated chunk with entities by random chance. */ -public class EntitiesPopulator extends BlockPopulator -{ +public class EntitiesPopulator extends BlockPopulator { + + // --------------------------------------------------------------------- + // Section: Variables + // --------------------------------------------------------------------- + + /** + * Water entities + */ + private static final List WATER_ENTITIES = Arrays.asList(EntityType.GUARDIAN, + EntityType.SQUID, + EntityType.COD, + EntityType.SALMON, + EntityType.PUFFERFISH, + EntityType.TROPICAL_FISH, + EntityType.DROWNED, + EntityType.DOLPHIN); + /** + * CaveBlock addon. + */ + private final CaveBlock addon; + /** + * Map that contains chances for spawning per environment. + */ + private Map chances; + /** + * World height + */ + private int worldHeight; + + // --------------------------------------------------------------------- + // Section: Constructor + // --------------------------------------------------------------------- /** * This is default constructor + * * @param addon CaveBlock addon. */ - public EntitiesPopulator(CaveBlock addon) - { + public EntitiesPopulator(CaveBlock addon) { this.addon = addon; this.loadSettings(); } + // --------------------------------------------------------------------- + // Section: Methods + // --------------------------------------------------------------------- /** * This method load chances per environment. */ private void loadSettings() { // Set up chances - chances = new HashMap<>(); + chances = new EnumMap<>(Environment.class); // Normal chances.put(Environment.NORMAL, new Chances(this.getEntityMap(addon.getSettings().getNormalBlocks()), addon.getSettings().getNormalMainBlock())); // Nether @@ -54,43 +82,49 @@ public class EntitiesPopulator extends BlockPopulator // End chances.put(Environment.THE_END, new Chances(this.getEntityMap(addon.getSettings().getEndBlocks()), addon.getSettings().getEndMainBlock())); // Other settings - worldHeight = addon.getSettings().getWorldDepth() - 1; + worldHeight = addon.getSettings().getWorldDepth(); } - /** * This method populates chunk with entities. - * @param world World where population must be. - * @param random Randomness - * @param chunk Chunk were populator operates. + * + * @param worldInfo World where population must be. + * @param random Randomness + * @param chunkX X coordinate of chunk + * @param chunkZ Z coordinate of chunk + * @param limitedRegion Region where population operates. */ @Override - public void populate(World world, Random random, Chunk chunk) - { - for (Map.Entry> entry : chances.get(world.getEnvironment()).entityChanceMap.entrySet()) - { - for (int subY = 0; subY < worldHeight; subY += 16) - { + public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) { + int minHeight = worldInfo.getMinHeight(); + int height = Math.min(worldInfo.getMaxHeight(), worldHeight) - 1; + + for (Map.Entry, Boolean>> entry : chances.get(worldInfo.getEnvironment()).entityChanceMap.entrySet()) { + Pair value = entry.getValue().x; + boolean hasAI = entry.getValue().z; + for (int subY = minHeight; subY < height; subY += 16) { // Use double so chance can be < 1 - if (random.nextDouble() * 100 < entry.getValue().x) - { - int y = Math.min(worldHeight - 2, subY + random.nextInt(15)); + if (random.nextDouble() * 100 < value.x) { + int y = Math.min(height - 2, subY + random.nextInt(15)); // Spawn only in middle of chunk because bounding box will grow out from here - this.tryToPlaceEntity(world, chunk.getBlock(7, y, 7), entry.getKey(), chances.get(world.getEnvironment()).mainMaterial); + this.tryToPlaceEntity( + worldInfo, Utils.getLocationFromChunkLocation(7, y, 7, chunkX, chunkZ), limitedRegion, + entry.getKey(), hasAI, + chances.get(worldInfo.getEnvironment()).mainMaterial + ); } } } } - /** * This method returns Entity frequently and pack size map. + * * @param objectList List with objects that contains data. * @return Map that contains entity, its rarity and pack size. */ - private Map> getEntityMap(List objectList) - { - Map> entityMap = new HashMap<>(objectList.size()); + private Map, Boolean>> getEntityMap(List objectList) { + Map, Boolean>> entityMap = new EnumMap<>(EntityType.class); Map entityTypeMap = Arrays.stream(EntityType.values()). collect(Collectors.toMap(Enum::name, @@ -100,128 +134,86 @@ public class EntitiesPopulator extends BlockPopulator // wrong material object. objectList.stream(). - filter(object -> object.startsWith("ENTITY")). - map(object -> object.split(":")). - filter(splitString -> splitString.length == 4). - forEach(splitString -> { - EntityType entity = entityTypeMap.getOrDefault(splitString[1], null); + filter(object -> object.startsWith("ENTITY")). + map(object -> object.split(":")). + filter(splitString -> splitString.length >= 4). + forEach(splitString -> { + EntityType entity = entityTypeMap.getOrDefault(splitString[1], null); + boolean hasAI = splitString.length <= 4 || Boolean.parseBoolean(splitString[4]); - if (entity != null) - { - entityMap.put(entity, - new Pair<>(Double.parseDouble(splitString[2]), Integer.parseInt(splitString[3]))); - } - }); + if (entity != null) { + entityMap.put(entity, + new Pair<>( + new Pair<>(Double.parseDouble(splitString[2]), Integer.parseInt(splitString[3])), + hasAI + ) + ); + } + }); return entityMap; } /** * Places entities if there is room for them. - * @param world - World were mob must be spawned. - * @param block - Block that was chosen by random. - * @param entity - Entity that must be spawned. + * + * @param worldInfo - World were mob must be spawned. + * @param location - Location that was chosen by random. + * @param limitedRegion - Region where entity must be spawned. + * @param entityType - Entity that must be spawned. + * @param hasAI - If entity has AI. * @param originalMaterial - replacement material. */ - private void tryToPlaceEntity(World world, Block block, EntityType entity, Material originalMaterial) - { - if (block.getType().equals(originalMaterial)) { - // Spawn entity - Entity e = world.spawnEntity(block.getLocation().add(0.5, 0, 0.5), entity); - if (e instanceof LivingEntity) { - // Do not despawn - ((LivingEntity)e).setRemoveWhenFarAway(false); - } - // Make space for entity based on the entity's size - BoundingBox bb = e.getBoundingBox(); + private void tryToPlaceEntity(WorldInfo worldInfo, Location location, LimitedRegion limitedRegion, EntityType entityType, boolean hasAI, Material originalMaterial) { + if (!limitedRegion.isInRegion(location)) return; + if (!limitedRegion.getType(location).equals(originalMaterial)) return; - for (int x = (int) Math.floor(bb.getMinX()); x < bb.getMaxX(); x++) { - for (int z = (int) Math.floor(bb.getMinZ()); z < bb.getMaxZ(); z++) { - int y = (int) Math.floor(bb.getMinY()); - Block b = world.getBlockAt(x, y, z); - for (; y < bb.getMaxY(); y++) { - if (addon.getSettings().isDebug()) { - addon.log("DEBUG: Entity spawn: " + world.getName() + " " + x + " " + y + " " + z + " " + e.getType()); - } - b = world.getBlockAt(x, y, z); - if (!b.getType().equals(originalMaterial)) { - // Cannot place entity - e.remove(); - return; - } - b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.AIR); + Entity entity = limitedRegion.spawnEntity(location, entityType); + if (entity instanceof LivingEntity livingEntity) { + livingEntity.setAI(hasAI); + livingEntity.setRemoveWhenFarAway(false); + } + + BoundingBox bb = entity.getBoundingBox(); + for (int x = (int) Math.floor(bb.getMinX()); x < bb.getMaxX(); x++) { + for (int z = (int) Math.floor(bb.getMinZ()); z < bb.getMaxZ(); z++) { + int y = (int) Math.floor(bb.getMinY()); + if (!limitedRegion.isInRegion(x, y, z)) { + entity.remove(); + return; + } + + for (; y <= bb.getMaxY(); y++) { + if (addon.getSettings().isDebug()) { + addon.log("DEBUG: Entity spawn: " + worldInfo.getName() + " " + x + " " + y + " " + z + " " + entity.getType()); } - // Add air block on top for all water entities (required for dolphin, okay for others) - if (WATER_ENTITIES.contains(entity) && b.getRelative(BlockFace.UP).getType().equals(originalMaterial)) { - b.getRelative(BlockFace.UP).setType(Material.CAVE_AIR); + + if (!limitedRegion.isInRegion(x, y, z) || !limitedRegion.getType(x, y, z).equals(originalMaterial)) { + // Cannot place entity + entity.remove(); + return; } + limitedRegion.setType(x, y, z, WATER_ENTITIES.contains(entityType) ? Material.WATER : Material.AIR); + } + // Add air block on top for all water entities (required for dolphin, okay for others) + if (WATER_ENTITIES.contains(entityType) && limitedRegion.isInRegion(x, y, z) && limitedRegion.getType(x, y, z).equals(originalMaterial)) { + limitedRegion.setType(x, y, z, Material.CAVE_AIR); } } } } - // --------------------------------------------------------------------- // Section: Private Classes // --------------------------------------------------------------------- - /** * Chances class to store chances for environments and main material + * + * @param entityChanceMap - contains chances for each entity, and the boolean indicates that entity should have AI. + * @param mainMaterial - material on which entity can replace. */ - private class Chances - { - /** - * @param entityChanceMap - contains chances for each entity. - * @param mainMaterial - material on which entity can replace. - */ - Chances(Map> entityChanceMap, Material mainMaterial) - { - this.entityChanceMap = entityChanceMap; - this.mainMaterial = mainMaterial; - } - - - /** - * Map that contains chances for entity to spawn. - */ - final Map> entityChanceMap; - - /** - * Main material that can be replaced. - */ - final Material mainMaterial; + private record Chances(Map, Boolean>> entityChanceMap, + Material mainMaterial) { } - - - // --------------------------------------------------------------------- - // Section: Variables - // --------------------------------------------------------------------- - - /** - * CaveBlock addon. - */ - private CaveBlock addon; - - /** - * Map that contains chances for spawning per environment. - */ - private Map chances; - - /** - * World height - */ - private int worldHeight; - - /** - * Water entities - */ - private final static List WATER_ENTITIES = Arrays.asList(EntityType.GUARDIAN, - EntityType.SQUID, - EntityType.COD, - EntityType.SALMON, - EntityType.PUFFERFISH, - EntityType.TROPICAL_FISH, - EntityType.DROWNED, - EntityType.DOLPHIN); } diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/FlatBiomeProvider.java b/src/main/java/world/bentobox/caveblock/generators/populators/FlatBiomeProvider.java new file mode 100644 index 0000000..a701cb5 --- /dev/null +++ b/src/main/java/world/bentobox/caveblock/generators/populators/FlatBiomeProvider.java @@ -0,0 +1,48 @@ +package world.bentobox.caveblock.generators.populators; + +import org.bukkit.World; +import org.bukkit.block.Biome; +import org.bukkit.generator.BiomeProvider; +import org.bukkit.generator.WorldInfo; +import world.bentobox.caveblock.CaveBlock; +import world.bentobox.caveblock.Settings; + +import java.util.Collections; +import java.util.List; + +public class FlatBiomeProvider extends BiomeProvider { + private final Settings settings; + + // --------------------------------------------------------------------- + // Section: Constructor + // --------------------------------------------------------------------- + + /** + * @param addon - CaveBlock object + */ + public FlatBiomeProvider(CaveBlock addon) { + this.settings = addon.getSettings(); + } + + // --------------------------------------------------------------------- + // Section: Methods + // --------------------------------------------------------------------- + + private Biome getBiome(World.Environment environment) { + return switch (environment) { + case NETHER -> this.settings.getDefaultNetherBiome(); + case THE_END -> this.settings.getDefaultTheEndBiome(); + default -> this.settings.getDefaultBiome(); + }; + } + + @Override + public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) { + return getBiome(worldInfo.getEnvironment()); + } + + @Override + public List getBiomes(WorldInfo worldInfo) { + return Collections.singletonList(getBiome(worldInfo.getEnvironment())); + } +} diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java index 7b0233b..c2b42d9 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/MaterialPopulator.java @@ -1,47 +1,67 @@ - package world.bentobox.caveblock.generators.populators; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World.Environment; +import org.bukkit.generator.BlockPopulator; +import org.bukkit.generator.LimitedRegion; +import org.bukkit.generator.WorldInfo; +import world.bentobox.bentobox.util.Pair; +import world.bentobox.caveblock.CaveBlock; +import world.bentobox.caveblock.Utils; -import java.util.HashMap; +import java.util.EnumMap; import java.util.List; import java.util.Map; import java.util.Random; -import org.bukkit.Chunk; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.World.Environment; -import org.bukkit.block.Block; -import org.bukkit.generator.BlockPopulator; - -import world.bentobox.bentobox.util.Pair; -import world.bentobox.caveblock.CaveBlock; - - /** - * This class allows to fill given chunk with necessary blocks. + * This class allows filling given chunk with necessary blocks. */ -public class MaterialPopulator extends BlockPopulator -{ +public class MaterialPopulator extends BlockPopulator { + + // --------------------------------------------------------------------- + // Section: Variables + // --------------------------------------------------------------------- + + /** + * CaveBlock addon. + */ + private final CaveBlock addon; + /** + * Map that contains chances for spawning per environment. + */ + private Map chances; + /** + * World height + */ + private int worldHeight; + + // --------------------------------------------------------------------- + // Section: Constructor + // --------------------------------------------------------------------- /** * This is default constructor + * * @param addon CaveBlock addon. */ - public MaterialPopulator(CaveBlock addon) - { + public MaterialPopulator(CaveBlock addon) { this.addon = addon; // Load settings this.loadSettings(); } + // --------------------------------------------------------------------- + // Section: Methods + // --------------------------------------------------------------------- /** * Loads chances for Material Populator */ private void loadSettings() { // Set up chances - chances = new HashMap<>(); + chances = new EnumMap<>(Environment.class); // Normal chances.put(Environment.NORMAL, new Chances(this.getMaterialMap(addon.getSettings().getNormalBlocks()), addon.getSettings().getNormalMainBlock())); // Nether @@ -49,84 +69,71 @@ public class MaterialPopulator extends BlockPopulator // End chances.put(Environment.THE_END, new Chances(this.getMaterialMap(addon.getSettings().getEndBlocks()), addon.getSettings().getEndMainBlock())); // Other settings - worldHeight = addon.getSettings().getWorldDepth() - 1; + worldHeight = addon.getSettings().getWorldDepth(); } - /** * This method populates chunk with blocks. - * @param world World where population must be. - * @param random Randomness - * @param chunk Chunk were populator operates. + * + * @param worldInfo World where population must be. + * @param random Randomness + * @param chunkX X coordinate of chunk + * @param chunkZ Z coordinate of chunk + * @param limitedRegion Region were populator operates. */ @Override - public void populate(World world, Random random, Chunk chunk) - { - Chances chances = this.chances.get(world.getEnvironment()); + public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) { + int minHeight = worldInfo.getMinHeight(); + int height = Math.min(worldInfo.getMaxHeight(), worldHeight) - 1; + Chances envChances = this.chances.get(worldInfo.getEnvironment()); + for (Map.Entry> entry : envChances.materialChanceMap.entrySet()) { + for (int subY = minHeight + 1; subY < height; subY += 16) { + if (random.nextDouble() * 100 >= entry.getValue().x) { + continue; + } - for (Map.Entry> entry : chances.materialChanceMap.entrySet()) - { - for (int subY = 1; subY < worldHeight; subY += 16) - { - if (random.nextDouble() * 100 < entry.getValue().x) - { + // Blocks must be 1 away from edge to avoid adjacent chunk loading + Location location = Utils.getLocationFromChunkLocation( + random.nextInt(13) + 1, + Math.min(height - 2, subY + random.nextInt(15)), + random.nextInt(13) + 1, + chunkX, chunkZ); - // Blocks must be 1 away from edge to avoid adjacent chunk loading - int x = random.nextInt(13) + 1; - int z = random.nextInt(13) + 1; - int y = Math.min(worldHeight - 2, subY + random.nextInt(15)); - /* - * TODO: remove - if (addon.getSettings().isDebug()) { - addon.log("DEBUG: Material: " + world.getName() + " " + x + " " + y + " " + z + " " + entry.getKey()); + if (!limitedRegion.isInRegion(location)) { + continue; + } + + Material material = limitedRegion.getType(location); + if (!material.equals(envChances.mainMaterial)) { + continue; + } + + int packSize = random.nextInt(entry.getValue().z); + boolean continuePlacing = true; + while (continuePlacing) { + if (!material.equals(entry.getKey())) { + limitedRegion.setType(location, entry.getKey()); + packSize--; } - */ - Block block = chunk.getBlock(x, y, z); - if (block.getType().equals(chances.mainMaterial)) - { - int packSize = random.nextInt(entry.getValue().z); - - boolean continuePlacing = true; - - while (continuePlacing) - { - if (!block.getType().equals(entry.getKey())) - { - // Set type without physics is required otherwise server goes into an infinite loop - block.setType(entry.getKey(), false); - packSize--; - } - - // The direction chooser - switch (random.nextInt(5)) - { - case 0: - x = Math.min(15, x + 1); - break; - case 1: - y = Math.min(worldHeight - 2, y + 1); - break; - case 2: - z = Math.min(15, z + 1); - break; - case 3: - x = Math.max(0, x - 1); - break; - case 4: - y = Math.max(1, y - 1); - break; - case 5: - z = Math.max(0, z - 1); - break; - } - - block = chunk.getBlock(x, y, z); - - continuePlacing = packSize > 0 && (block.getType().equals(chances.mainMaterial) || - block.getType().equals(entry.getKey())); + switch (random.nextInt(6)) { + case 0 -> location.setX(location.getX() + 1); + case 1 -> location.setY(location.getY() + 1); + case 2 -> location.setZ(location.getZ() + 1); + case 3 -> location.setX(location.getX() - 1); + case 4 -> location.setY(location.getY() - 1); + case 5 -> location.setZ(location.getZ() - 1); + default -> { + continuePlacing = false; + continue; } } + + continuePlacing = packSize > 0 && limitedRegion.isInRegion(location) && location.getY() > minHeight; + if (continuePlacing) { + material = limitedRegion.getType(location); + continuePlacing = material.equals(envChances.mainMaterial) || material.equals(entry.getKey()); + } } } } @@ -134,84 +141,42 @@ public class MaterialPopulator extends BlockPopulator /** * This method returns material frequently and pack size map. + * * @param objectList List with objects that contains data. * @return Map that contains material, its rarity and pack size. */ - private Map> getMaterialMap(List objectList) - { - Map> materialMap = new HashMap<>(objectList.size()); + private Map> getMaterialMap(List objectList) { + Map> materialMap = new EnumMap<>(Material.class); // wrong material object. objectList.stream(). - filter(object -> object.startsWith("MATERIAL")). - map(object -> object.split(":")). - filter(splitString -> splitString.length == 4). - forEach(splitString -> { - Material material = Material.getMaterial(splitString[1]); - // Material must be a block otherwise the chunk cannot be populated - if (material != null && material.isBlock()) - { - materialMap.put(material, - new Pair<>(Double.parseDouble(splitString[2]), Integer.parseInt(splitString[3]))); - } else { - addon.logError("Could not parse MATERIAL in config.yml: " + splitString[1] + " is not a valid block."); - } - }); + filter(object -> object.startsWith("MATERIAL")). + map(object -> object.split(":")). + filter(splitString -> splitString.length == 4). + forEach(splitString -> { + Material material = Material.getMaterial(splitString[1]); + // Material must be a block otherwise the chunk cannot be populated + if (material != null && material.isBlock()) { + materialMap.put(material, + new Pair<>(Double.parseDouble(splitString[2]), Integer.parseInt(splitString[3]))); + } else { + addon.logError("Could not parse MATERIAL in config.yml: " + splitString[1] + " is not a valid block."); + } + }); return materialMap; } - // --------------------------------------------------------------------- // Section: Private Classes // --------------------------------------------------------------------- - /** * Chances class to store chances for environments and main material + * + * @param materialChanceMap - contains chances for each material. + * @param mainMaterial - material on which material can replace. */ - private class Chances - { - /** - * @param materialChanceMap - contains chances for each material. - * @param mainMaterial - material on which material can replace. - */ - Chances(Map> materialChanceMap, Material mainMaterial) - { - this.materialChanceMap = materialChanceMap; - this.mainMaterial = mainMaterial; - } - - - /** - * Map that contains chances for entity to spawn. - */ - final Map> materialChanceMap; - - /** - * Main material that can be replaced. - */ - final Material mainMaterial; + private record Chances(Map> materialChanceMap, Material mainMaterial) { } - - - // --------------------------------------------------------------------- - // Section: Variables - // --------------------------------------------------------------------- - - - /** - * CaveBlock addon. - */ - private CaveBlock addon; - - /** - * Map that contains chances for spawning per environment. - */ - private Map chances; - - /** - * World height - */ - private int worldHeight; } diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java new file mode 100644 index 0000000..8838939 --- /dev/null +++ b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java @@ -0,0 +1,96 @@ +package world.bentobox.caveblock.generators.populators; + +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.generator.BlockPopulator; +import org.bukkit.generator.LimitedRegion; +import org.bukkit.generator.WorldInfo; +import world.bentobox.caveblock.Utils; +import world.bentobox.caveblock.generators.Ore; + +import java.util.*; + +public class NewMaterialPopulator extends BlockPopulator { + private final Map> ores = new EnumMap<>(World.Environment.class); + + public NewMaterialPopulator() { + // Source https://minecraft.fandom.com/wiki/Blob + List worldOres = new ArrayList<>(); + worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); + worldOres.add(new Ore(-64, 64, Material.LAPIS_ORE, 1, 7, true)); + worldOres.add(new Ore(-64, 30, Material.GOLD_ORE, 2, 9, true)); + worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); + worldOres.add(new Ore(-64, 16, Material.REDSTONE_ORE, 8, 8, true)); + worldOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); + worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.ANDESITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.DIORITE, 5, 33, false)); + worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); + worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); + worldOres.add(new Ore(0, 96, Material.COPPER_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.IRON_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + ores.put(World.Environment.NORMAL, worldOres); + List netherOres = new ArrayList<>(); + netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); + netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); + netherOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.BASALT, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.FIRE, 8, 33, false)); + netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8, 33, false)); + netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + netherOres.add(new Ore(-64, 320, Material.LAVA, 8, 33, false)); + netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8, 33, false)); + netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); + netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); + netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); + ores.put(World.Environment.NETHER, netherOres); + List endOres = new ArrayList<>(); + endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); + endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); + endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + ores.put(World.Environment.THE_END, endOres); + } + + @Override + public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) { + for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { + for (Ore o : ores.get(worldInfo.getEnvironment())) { + if (y > o.minY() && y < o.maxY() && random.nextInt(100) <= o.chance()) { + pasteBlob(worldInfo, random, chunkX, chunkZ, limitedRegion, y, o); + if (o.cont()) { + break; + } + } + } + } + } + + private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion, int y, Ore o) { + //int blobSize = (int) (((double)random.nextInt(o.blob()) / 3) + 1); + int blobSize = 1; + int offset = random.nextInt(16); + for (int x = Math.max(0, offset - blobSize); x < Math.min(16, offset + blobSize); x++) { + for (int z = Math.max(0, offset - blobSize); z < Math.min(16, offset + blobSize); z++) { + for (int yy = Math.max(worldInfo.getMinHeight(), y - blobSize); yy < Math.min(worldInfo.getMaxHeight(), y + blobSize); yy++) { + Location location = Utils.getLocationFromChunkLocation(x, yy, z, chunkX, chunkZ); + if (!limitedRegion.isInRegion(location)) { + continue; + } + if (limitedRegion.getType(location).isSolid() && random.nextBoolean()) { + limitedRegion.setType(location, o.material()); + } + } + } + } + } +} diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 1da2b6e..7e2cf37 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -93,6 +93,11 @@ world: # This indicate how many times block should be tried to generate. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. generation-tries: 2 + # Should we use the new material generator ? + # This will generate ores and blocks similar to how vanilla does, + # but it will override the blocks settings of each world. + # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. + use-new-material-generator: false normal: # # Make over world roof of bedrock, if false, it will be made from stone From 03a5f9bc6c99e561c9459e27344804f0eb6f8787 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 20 Dec 2021 12:22:28 -0800 Subject: [PATCH 18/33] New world gen (#70) * Uses the new 1.17.1 ChunkGenerator options * More work on the ores * Make CaveBlock a Pladdon * WWIP - added nether and end ores. * Improved generation * Support 1.18 new caves --- .../world/bentobox/caveblock/CaveBlock.java | 2 +- .../generators/ChunkGeneratorWorld.java | 200 ++++++++++-------- .../bentobox/caveblock/generators/Ore.java | 14 +- 3 files changed, 116 insertions(+), 100 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index 70dc5e9..409654b 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -34,7 +34,7 @@ public class CaveBlock extends GameModeAddon this.saveDefaultConfig(); this.loadSettings(); - this.chunkGenerator = new ChunkGeneratorWorld(this); + this.chunkGenerator = new ChunkGeneratorWorld(); // Player Command this.playerCommand = new DefaultPlayerCommand(this) diff --git a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java index a6591db..bac828f 100644 --- a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java @@ -1,17 +1,17 @@ package world.bentobox.caveblock.generators; +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.generator.BiomeProvider; -import org.bukkit.generator.BlockPopulator; +import org.bukkit.World.Environment; +import org.bukkit.block.data.BlockData; import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.WorldInfo; -import world.bentobox.caveblock.CaveBlock; -import world.bentobox.caveblock.Settings; -import world.bentobox.caveblock.generators.populators.EntitiesPopulator; -import world.bentobox.caveblock.generators.populators.FlatBiomeProvider; -import world.bentobox.caveblock.generators.populators.MaterialPopulator; -import world.bentobox.caveblock.generators.populators.NewMaterialPopulator; import java.util.ArrayList; import java.util.List; @@ -20,89 +20,115 @@ import java.util.Random; /** * Class ChunkGeneratorWorld ... * - * @author BONNe - * Created on 27.01.2019 + * @author tastybento */ public class ChunkGeneratorWorld extends ChunkGenerator { - // --------------------------------------------------------------------- - // Section: Variables - // --------------------------------------------------------------------- - - private final CaveBlock addon; - private final Settings settings; - private final List blockPopulators; - private BiomeProvider biomeProvider; - - // --------------------------------------------------------------------- - // Section: Constructor - // --------------------------------------------------------------------- - - /** - * @param addon - CaveBlock object - */ - public ChunkGeneratorWorld(CaveBlock addon) { - this.addon = addon; - this.settings = addon.getSettings(); - this.blockPopulators = new ArrayList<>(2); - - reload(); + + private static final int BLOB_SIZE = 1; + private static final Map> ORES; + static { + Map> ores = new EnumMap<>(Environment.class); + // Source https://minecraft.fandom.com/wiki/Blob + List worldOres = new ArrayList<>(); + worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); + worldOres.add(new Ore(-64, 64, Material.LAPIS_ORE, 1, 7, true)); + worldOres.add(new Ore(-64, 30, Material.GOLD_ORE, 2, 9, true)); + worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); + worldOres.add(new Ore(-64, 16, Material.REDSTONE_ORE, 8, 8, true)); + worldOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); + worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.ANDESITE,5, 33, false)); + worldOres.add(new Ore(0, 79, Material.DIORITE,5, 33, false)); + worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); + worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); + worldOres.add(new Ore(0, 96, Material.COPPER_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.IRON_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + ores.put(Environment.NORMAL, worldOres); + List netherOres = new ArrayList<>(); + netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); + netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); + netherOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.BASALT, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.FIRE, 8 , 33, false)); + netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8 , 33, false)); + netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + netherOres.add(new Ore(-64, 320, Material.LAVA, 8 , 33, false)); + netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8 , 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8 , 33, false)); + netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); + netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); + netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); + ores.put(Environment.NETHER, netherOres); + List endOres = new ArrayList<>(); + endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); + endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); + endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); + ores.put(Environment.THE_END, endOres); + ORES = Collections.unmodifiableMap(ores); } // --------------------------------------------------------------------- // Section: Methods // --------------------------------------------------------------------- - private Material getGroundCeilMaterial(World.Environment environment) { - return switch (environment) { - case NETHER -> this.settings.isNetherRoof() ? Material.BEDROCK : this.settings.getNetherMainBlock(); - case THE_END -> this.settings.isEndFloor() ? Material.BEDROCK : this.settings.getEndMainBlock(); - default -> this.settings.isNormalFloor() ? Material.BEDROCK : this.settings.getNormalMainBlock(); - }; - } - - private Material getBaseMaterial(World.Environment environment) { - return switch (environment) { - case NETHER -> this.settings.getNetherMainBlock(); - case THE_END -> this.settings.getEndMainBlock(); - default -> this.settings.getNormalMainBlock(); - }; - } - @Override - public void generateBedrock(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { - final int minHeight = worldInfo.getMinHeight(); - Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); - chunkData.setRegion(0, minHeight, 0, 16, minHeight + 1, 16, material); + public void generateNoise(WorldInfo worldInfo, Random r, int x, int z, ChunkData chunkData) { + switch(worldInfo.getEnvironment()) { + default: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.STONE); + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 7, 16, Material.DEEPSLATE); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + case NETHER: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.NETHERRACK); + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 34, 16, Material.SOUL_SAND); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + case THE_END: + chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.END_STONE); + chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); + break; + } + + // Generate ores + for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { + for (Ore o: ORES.get(worldInfo.getEnvironment())) { + if (y > o.minY() && y < o.maxY() && r.nextInt(100) <= o.chance()) { + pasteBlob(chunkData, y, o, r); + if (o.cont()) { + break; + } + } + } + + } } - @Override - public void generateSurface(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { - final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); - Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); - chunkData.setRegion(0, worldHeight - 1, 0, 16, worldHeight, 16, material); - } - - @Override - public void generateNoise(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { - final int minHeight = worldInfo.getMinHeight(); - final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); - Material material = getBaseMaterial(worldInfo.getEnvironment()); - chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, material); - } - - @Override - public List getDefaultPopulators(final World world) { - return this.blockPopulators; - } - - @Override - public BiomeProvider getDefaultBiomeProvider(WorldInfo worldInfo) { - return biomeProvider; + private void pasteBlob(ChunkData chunkData, int y, Ore o, Random r) { + int offset = r.nextInt(16); + for (int x = Math.max(0, offset - BLOB_SIZE); x < Math.min(16, offset + BLOB_SIZE); x++) { + for (int z = Math.max(0, offset - BLOB_SIZE); z < Math.min(16, offset + BLOB_SIZE); z++) { + for (int yy = Math.max(chunkData.getMinHeight(), y - BLOB_SIZE); yy < Math.min(chunkData.getMaxHeight(),y + BLOB_SIZE); yy++) { + BlockData bd = chunkData.getBlockData(x, yy, z); + if (bd.getMaterial().isSolid() && r.nextBoolean()) { + chunkData.setBlock(x, yy, z, o.material()); + } + } + } + } } @Override public boolean shouldGenerateSurface() { - return true; + return false; } @Override @@ -112,22 +138,12 @@ public class ChunkGeneratorWorld extends ChunkGenerator { @Override public boolean shouldGenerateCaves() { - return this.settings.isNewMaterialGenerator(); + return true; } - /** - * Called when config is reloaded - */ - public void reload() { - this.blockPopulators.clear(); - - if (this.settings.isNewMaterialGenerator()) { - this.blockPopulators.add(new NewMaterialPopulator()); - } else { - this.blockPopulators.add(new MaterialPopulator(this.addon)); - } - this.blockPopulators.add(new EntitiesPopulator(this.addon)); - - this.biomeProvider = new FlatBiomeProvider(this.addon); + @Override + public boolean shouldGenerateDecorations() { + return true; } + } diff --git a/src/main/java/world/bentobox/caveblock/generators/Ore.java b/src/main/java/world/bentobox/caveblock/generators/Ore.java index 24d76a5..7f2b6c0 100644 --- a/src/main/java/world/bentobox/caveblock/generators/Ore.java +++ b/src/main/java/world/bentobox/caveblock/generators/Ore.java @@ -3,14 +3,14 @@ package world.bentobox.caveblock.generators; import org.bukkit.Material; /** - * @param minY minimum Y level this ore should appear - * @param minY maximum Y level this ore should appear - * @param material Material - * @param chance chance - * @param blob maximum size of blob to generate - * @param cont whether the generator should continue to try to make other ores at this level after making this one * @author tastybento + * @param minY minimum Y level this ore should appear + * @param minY maximum Y level this ore should appear + * @param material Material + * @param chance chance + * @param blob maximum size of blob to generate + * @param cont whether the generator should continue to try to make other ores at this level after making this one */ -public record Ore(int minY, int maxY, Material material, int chance, int blob, boolean cont) { +public record Ore (int minY, int maxY, Material material, int chance, int blob, boolean cont){ } From 4a2e08c22886eab7f8b9778a511133c69e6041d0 Mon Sep 17 00:00:00 2001 From: Huynh Tien Date: Tue, 21 Dec 2021 13:14:33 +0700 Subject: [PATCH 19/33] block populators & respect world depth setting (#71) --- .../world/bentobox/caveblock/CaveBlock.java | 2 +- .../generators/ChunkGeneratorWorld.java | 219 +++++++++--------- .../populators/NewMaterialPopulator.java | 29 ++- 3 files changed, 136 insertions(+), 114 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index 409654b..70dc5e9 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -34,7 +34,7 @@ public class CaveBlock extends GameModeAddon this.saveDefaultConfig(); this.loadSettings(); - this.chunkGenerator = new ChunkGeneratorWorld(); + this.chunkGenerator = new ChunkGeneratorWorld(this); // Player Command this.playerCommand = new DefaultPlayerCommand(this) diff --git a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java index bac828f..180277b 100644 --- a/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java @@ -1,17 +1,17 @@ package world.bentobox.caveblock.generators; -import java.util.ArrayList; -import java.util.Collections; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - import org.bukkit.Material; -import org.bukkit.World.Environment; -import org.bukkit.block.data.BlockData; +import org.bukkit.World; +import org.bukkit.generator.BiomeProvider; +import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.WorldInfo; +import world.bentobox.caveblock.CaveBlock; +import world.bentobox.caveblock.Settings; +import world.bentobox.caveblock.generators.populators.EntitiesPopulator; +import world.bentobox.caveblock.generators.populators.FlatBiomeProvider; +import world.bentobox.caveblock.generators.populators.MaterialPopulator; +import world.bentobox.caveblock.generators.populators.NewMaterialPopulator; import java.util.ArrayList; import java.util.List; @@ -20,115 +20,115 @@ import java.util.Random; /** * Class ChunkGeneratorWorld ... * - * @author tastybento + * @author BONNe + * Created on 27.01.2019 */ public class ChunkGeneratorWorld extends ChunkGenerator { - - private static final int BLOB_SIZE = 1; - private static final Map> ORES; - static { - Map> ores = new EnumMap<>(Environment.class); - // Source https://minecraft.fandom.com/wiki/Blob - List worldOres = new ArrayList<>(); - worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); - worldOres.add(new Ore(-64, 64, Material.LAPIS_ORE, 1, 7, true)); - worldOres.add(new Ore(-64, 30, Material.GOLD_ORE, 2, 9, true)); - worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); - worldOres.add(new Ore(-64, 16, Material.REDSTONE_ORE, 8, 8, true)); - worldOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); - worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); - worldOres.add(new Ore(0, 79, Material.ANDESITE,5, 33, false)); - worldOres.add(new Ore(0, 79, Material.DIORITE,5, 33, false)); - worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); - worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); - worldOres.add(new Ore(0, 96, Material.COPPER_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 320, Material.IRON_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - ores.put(Environment.NORMAL, worldOres); - List netherOres = new ArrayList<>(); - netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); - netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); - netherOres.add(new Ore(0, 16, Material.GRAVEL, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.BASALT, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.FIRE, 8 , 33, false)); - netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8 , 33, false)); - netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - netherOres.add(new Ore(-64, 320, Material.LAVA, 8 , 33, false)); - netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8 , 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8 , 33, false)); - netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); - netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); - netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); - ores.put(Environment.NETHER, netherOres); - List endOres = new ArrayList<>(); - endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); - endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); - endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8 , 33, false)); - ores.put(Environment.THE_END, endOres); - ORES = Collections.unmodifiableMap(ores); + // --------------------------------------------------------------------- + // Section: Variables + // --------------------------------------------------------------------- + + private final CaveBlock addon; + private final Settings settings; + private final List blockPopulators; + private BiomeProvider biomeProvider; + private boolean isNewGenerator; + + // --------------------------------------------------------------------- + // Section: Constructor + // --------------------------------------------------------------------- + + /** + * @param addon - CaveBlock object + */ + public ChunkGeneratorWorld(CaveBlock addon) { + this.addon = addon; + this.settings = addon.getSettings(); + this.blockPopulators = new ArrayList<>(2); + + reload(); } // --------------------------------------------------------------------- // Section: Methods // --------------------------------------------------------------------- + private Material getGroundCeilMaterial(World.Environment environment) { + return switch (environment) { + case NETHER -> this.settings.isNetherRoof() ? Material.BEDROCK : this.settings.getNetherMainBlock(); + case THE_END -> this.settings.isEndFloor() ? Material.BEDROCK : this.settings.getEndMainBlock(); + default -> this.settings.isNormalFloor() ? Material.BEDROCK : this.settings.getNormalMainBlock(); + }; + } + + private Material getBaseMaterial(World.Environment environment) { + return switch (environment) { + case NETHER -> this.settings.getNetherMainBlock(); + case THE_END -> this.settings.getEndMainBlock(); + default -> this.settings.getNormalMainBlock(); + }; + } + @Override - public void generateNoise(WorldInfo worldInfo, Random r, int x, int z, ChunkData chunkData) { - switch(worldInfo.getEnvironment()) { - default: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.STONE); - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 7, 16, Material.DEEPSLATE); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - case NETHER: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.NETHERRACK); - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, 34, 16, Material.SOUL_SAND); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - case THE_END: - chunkData.setRegion(0, worldInfo.getMinHeight(), 0, 16, worldInfo.getMaxHeight(), 16, Material.END_STONE); - chunkData.setRegion(0, worldInfo.getMaxHeight() - 1, 0, 16, worldInfo.getMaxHeight(), 16, Material.BEDROCK); - break; - } + public void generateBedrock(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int minHeight = worldInfo.getMinHeight(); + Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); + chunkData.setRegion(0, minHeight, 0, 16, minHeight + 1, 16, material); + } - // Generate ores - for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { - for (Ore o: ORES.get(worldInfo.getEnvironment())) { - if (y > o.minY() && y < o.maxY() && r.nextInt(100) <= o.chance()) { - pasteBlob(chunkData, y, o, r); - if (o.cont()) { - break; + @Override + public void generateSurface(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); + Material material = getGroundCeilMaterial(worldInfo.getEnvironment()); + chunkData.setRegion(0, worldHeight - 1, 0, 16, worldHeight, 16, material); + } + + @Override + public void generateNoise(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, ChunkData chunkData) { + final int minHeight = worldInfo.getMinHeight(); + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.settings.getWorldDepth()); + final World.Environment environment = worldInfo.getEnvironment(); + if (isNewGenerator) { + switch (environment) { + case NETHER: + if (worldHeight + 1 > 34) { + chunkData.setRegion(0, minHeight + 1, 0, 16, 34, 16, Material.SOUL_SAND); + chunkData.setRegion(0, 34, 0, 16, worldHeight - 1, 16, Material.NETHERRACK); + } else { + chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, Material.NETHERRACK); } - } + break; + case THE_END: + chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, Material.END_STONE); + break; + default: + if (worldHeight + 1 > 7) { + chunkData.setRegion(0, minHeight + 1, 0, 16, 7, 16, Material.DEEPSLATE); + chunkData.setRegion(0, 7, 0, 16, worldHeight - 1, 16, Material.STONE); + } else { + chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, Material.STONE); + } + break; } - + } else { + Material material = getBaseMaterial(environment); + chunkData.setRegion(0, minHeight + 1, 0, 16, worldHeight - 1, 16, material); } } - private void pasteBlob(ChunkData chunkData, int y, Ore o, Random r) { - int offset = r.nextInt(16); - for (int x = Math.max(0, offset - BLOB_SIZE); x < Math.min(16, offset + BLOB_SIZE); x++) { - for (int z = Math.max(0, offset - BLOB_SIZE); z < Math.min(16, offset + BLOB_SIZE); z++) { - for (int yy = Math.max(chunkData.getMinHeight(), y - BLOB_SIZE); yy < Math.min(chunkData.getMaxHeight(),y + BLOB_SIZE); yy++) { - BlockData bd = chunkData.getBlockData(x, yy, z); - if (bd.getMaterial().isSolid() && r.nextBoolean()) { - chunkData.setBlock(x, yy, z, o.material()); - } - } - } - } + @Override + public List getDefaultPopulators(final World world) { + return this.blockPopulators; + } + + @Override + public BiomeProvider getDefaultBiomeProvider(WorldInfo worldInfo) { + return biomeProvider; } @Override public boolean shouldGenerateSurface() { - return false; + return true; } @Override @@ -138,12 +138,23 @@ public class ChunkGeneratorWorld extends ChunkGenerator { @Override public boolean shouldGenerateCaves() { - return true; + return this.isNewGenerator; } - @Override - public boolean shouldGenerateDecorations() { - return true; - } + /** + * Called when config is reloaded + */ + public void reload() { + this.blockPopulators.clear(); + this.isNewGenerator = this.settings.isNewMaterialGenerator(); + if (this.isNewGenerator) { + this.blockPopulators.add(new NewMaterialPopulator(this.settings.getWorldDepth())); + this.biomeProvider = null; + } else { + this.blockPopulators.add(new MaterialPopulator(this.addon)); + this.blockPopulators.add(new EntitiesPopulator(this.addon)); + this.biomeProvider = new FlatBiomeProvider(this.addon); + } + } } diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java index 8838939..cc3ef63 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java @@ -11,10 +11,15 @@ import world.bentobox.caveblock.generators.Ore; import java.util.*; +/** + * @author tastybento + */ public class NewMaterialPopulator extends BlockPopulator { - private final Map> ores = new EnumMap<>(World.Environment.class); + private static final int BLOB_SIZE = 1; + private static final Map> ORES; - public NewMaterialPopulator() { + static { + Map> ores = new EnumMap<>(World.Environment.class); // Source https://minecraft.fandom.com/wiki/Blob List worldOres = new ArrayList<>(); worldOres.add(new Ore(-64, 16, Material.DIAMOND_ORE, 1, 10, true)); @@ -59,12 +64,20 @@ public class NewMaterialPopulator extends BlockPopulator { endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); ores.put(World.Environment.THE_END, endOres); + ORES = Collections.unmodifiableMap(ores); + } + + private final int worldDepth; + + public NewMaterialPopulator(int worldDepth) { + this.worldDepth = worldDepth; } @Override public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) { - for (int y = worldInfo.getMinHeight(); y < worldInfo.getMaxHeight(); y++) { - for (Ore o : ores.get(worldInfo.getEnvironment())) { + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.worldDepth); + for (int y = worldInfo.getMinHeight(); y < worldHeight - 1; y++) { + for (Ore o : ORES.get(worldInfo.getEnvironment())) { if (y > o.minY() && y < o.maxY() && random.nextInt(100) <= o.chance()) { pasteBlob(worldInfo, random, chunkX, chunkZ, limitedRegion, y, o); if (o.cont()) { @@ -76,12 +89,10 @@ public class NewMaterialPopulator extends BlockPopulator { } private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion, int y, Ore o) { - //int blobSize = (int) (((double)random.nextInt(o.blob()) / 3) + 1); - int blobSize = 1; int offset = random.nextInt(16); - for (int x = Math.max(0, offset - blobSize); x < Math.min(16, offset + blobSize); x++) { - for (int z = Math.max(0, offset - blobSize); z < Math.min(16, offset + blobSize); z++) { - for (int yy = Math.max(worldInfo.getMinHeight(), y - blobSize); yy < Math.min(worldInfo.getMaxHeight(), y + blobSize); yy++) { + for (int x = Math.max(0, offset - BLOB_SIZE); x < Math.min(16, offset + BLOB_SIZE); x++) { + for (int z = Math.max(0, offset - BLOB_SIZE); z < Math.min(16, offset + BLOB_SIZE); z++) { + for (int yy = Math.max(worldInfo.getMinHeight(), y - BLOB_SIZE); yy < Math.min(worldInfo.getMaxHeight(), y + BLOB_SIZE); yy++) { Location location = Utils.getLocationFromChunkLocation(x, yy, z, chunkX, chunkZ); if (!limitedRegion.isInRegion(location)) { continue; From 124b4e8c0c791a1a7386bfd4bb3561cc6f6b0cd2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:40:04 -0800 Subject: [PATCH 20/33] Remove use own generator option as it isn't used. --- .../world/bentobox/caveblock/Settings.java | 21 +++---------------- src/main/resources/config.yml | 4 ---- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 67b63e4..5501717 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -166,13 +166,13 @@ public class Settings implements WorldSettings /** - * This method returns the useOwnGenerator object. - * @return the useOwnGenerator object. + * This is not an option in Caveblock + * @return false */ @Override public boolean isUseOwnGenerator() { - return useOwnGenerator; + return false; } @@ -1031,16 +1031,6 @@ public class Settings implements WorldSettings } - /** - * This method sets the useOwnGenerator object value. - * @param useOwnGenerator the useOwnGenerator object new value. - * - */ - public void setUseOwnGenerator(boolean useOwnGenerator) - { - this.useOwnGenerator = useOwnGenerator; - } - /** * This method sets the maxIslands object value. * @param maxIslands the maxIslands object new value. @@ -2183,11 +2173,6 @@ public class Settings implements WorldSettings @ConfigEntry(path = "world.cave-height") private int islandHeight = 60; - @ConfigComment("Use your own world generator for this world.") - @ConfigComment("In this case, the plugin will not generate anything.") - @ConfigEntry(path = "world.use-own-generator", experimental = true) - private boolean useOwnGenerator = true; - @ConfigComment("Maximum number of caves in the world. Set to -1 or 0 for unlimited.") @ConfigComment("If the number of caves is greater than this number, it will stop players from creating caves.") @ConfigEntry(path = "world.max-caves") diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 7e2cf37..5c6ed0e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -69,10 +69,6 @@ world: # Cave height - Lowest is 5. # It is the y coordinate of the bedrock block in the schem. cave-height: 60 - # Use your own world generator for this world. - # In this case, the plugin will not generate anything. - # /!\ This feature is experimental and might not work as expected or might not work at all. - use-own-generator: true # Maximum number of caves in the world. Set to -1 or 0 for unlimited. # If the number of caves is greater than this number, it will stop players from creating caves. max-caves: 0 From 6d21deaa1e8475a24cba504de2759620192d4c61 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:42:40 -0800 Subject: [PATCH 21/33] Fix biome compatibility --- src/main/java/world/bentobox/caveblock/Settings.java | 2 +- src/main/resources/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 5501717..2fd0d54 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -2185,7 +2185,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the overworld") @ConfigEntry(path = "world.default-biome") - private Biome defaultBiome = Biome.MOUNTAINS; + private Biome defaultBiome = Biome.PLAINS; @ConfigComment("The maximum number of players a player can ban at any one time in this game mode.") @ConfigComment("The permission caveblock.ban.maxlimit.X where X is a number can also be used per player") diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 5c6ed0e..2d85de4 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -76,7 +76,7 @@ world: # a new cave for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR default-game-mode: SURVIVAL # The default biome for the overworld - default-biome: MOUNTAINS + default-biome: PLAINS # The maximum number of players a player can ban at any one time in this game mode. # The permission caveblock.ban.maxlimit.X where X is a number can also be used per player # -1 = unlimited From 57e71ca20d1ecb4de3a47db827f573bf889d7c22 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:42:53 -0800 Subject: [PATCH 22/33] Compile to 1.18.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df0e0bb..2fbdf8b 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ UTF-8 16 - 1.17.1-R0.1-SNAPSHOT + 1.18.1-R0.1-SNAPSHOT 1.18.0-SNAPSHOT ${build.version}-SNAPSHOT From c5d29eb1c9617620bcdfa74a08c294f1bbfa7288 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:58:07 -0800 Subject: [PATCH 23/33] Ignore IntelliJ --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 231c26b..27c80ce 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ hs_err_pid* /.classpath /.project /.settings/ +/.idea/ +/CaveBlock.iml From cdc0d109146b48dce586721543042872479fd710 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:59:22 -0800 Subject: [PATCH 24/33] Fix typos, grammar. --- README.md | 11 ++++------- src/main/resources/config.yml | 4 ++-- src/main/resources/locales/en-US.yml | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dfe38c5..d754351 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ CaveBlock is an addon for BentoBox, so to run CaveBlock, you must have BentoBox ## Translation -As most of BentoBox projects, CaveBlock Addon is translatable in any language. Everyone can contribute, and translate some parts of the addon in their language via [GitLocalize](https://gitlocalize.com/repo/2968). -If your language is not in the list, please contact to developers via Discord and it will be added there. +Like most BentoBox projects, the CaveBlock Addon is translatable into any language. Everyone can contribute, and translate some parts of the addon into their language via [GitLocalize](https://gitlocalize.com/repo/2968). +If your language is not in the list, please contact the developers via Discord, and it will be added. ## Installation @@ -16,7 +16,7 @@ If your language is not in the list, please contact to developers via Discord an 1. Place this jar in the addons folder of the BentoBox plugin. 2. Restart the server. 3. The addon will create worlds and a data folder and inside the folder will be a config.yml. -4. Stop the server . +4. Stop the server. 5. Edit the config.yml how you want. 6. Delete any worlds that were created by default if you made changes that would affect them. 7. Restart the server. @@ -24,10 +24,7 @@ If your language is not in the list, please contact to developers via Discord an ## Config.yml The config.yml is similar to BSkyblock and AcidIsalnd but *not the same*. It has some additional or changed parameters, like, -instead of wrold-height it has world-depth. -It also has option to choose main block for each world, and blocks that will be occasionally replace main block, f.e. diamond ore or shulker. -It also allows to specifiy if roof and floor for each world must be generated from bedrock. - +instead of world-height it has world-depth. ### Other Add-ons diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 2d85de4..cae18c9 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -9,12 +9,12 @@ caveblock: admin: cbadmin cba # 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.13.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.13.0. default-action: go world: diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml index da089bc..b4cd412 100644 --- a/src/main/resources/locales/en-US.yml +++ b/src/main/resources/locales/en-US.yml @@ -289,6 +289,6 @@ caveblock: protection: flags: SKY_WALKER_FLAG: - description: "&5&oThis allows to enable/disable\n&5&oability to walk on the\n&5&otop of the cave world\n&5&owithout extra permissions." + description: "&5&oEnable/disable\n&5&o the ability to walk on\n&5&o the top of the cave world\n&5&o without extra permissions." name: "Sky Walker" - hint: "Allows to walk on cave ceiling." \ No newline at end of file + hint: "Allows to walk on the cave roof." \ No newline at end of file From 4702ad1b967ad3f4df3254d56987ab9788967b14 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 08:59:42 -0800 Subject: [PATCH 25/33] Overrides need NonNull annotations --- src/main/java/world/bentobox/caveblock/Settings.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 2fd0d54..e37d556 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -1697,6 +1697,7 @@ public class Settings implements WorldSettings /** * @return the onJoinCommands */ + @NonNull @Override public List getOnJoinCommands() { return onJoinCommands; @@ -1714,6 +1715,7 @@ public class Settings implements WorldSettings /** * @return the onLeaveCommands */ + @NonNull @Override public List getOnLeaveCommands() { return onLeaveCommands; From 388997531914c461c5c41addfd92ce026a6d6438 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 21 Dec 2021 09:00:28 -0800 Subject: [PATCH 26/33] JavaDoc fixes --- src/main/java/world/bentobox/caveblock/CaveBlock.java | 6 +++--- .../java/world/bentobox/caveblock/generators/Ore.java | 1 - .../caveblock/listeners/CustomHeightLimitations.java | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index 70dc5e9..452510b 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -24,7 +24,7 @@ public class CaveBlock extends GameModeAddon /** * Executes code when loading the addon. This is called before {@link #onEnable()}. This should preferably - * be used to setup configuration and worlds. + * be used to set up configuration and worlds. */ @Override public void onLoad() @@ -121,8 +121,8 @@ public class CaveBlock extends GameModeAddon /** * Make the worlds for this GameMode in this method. BentoBox will call it after onLoad() and before - * onEnable(). {@link #islandWorld} must be created and assigned, {@link #netherWorld} and {@link - * #endWorld} are optional and may be null. + * onEnable(). {@code islandWorld} must be created and assigned, {@code netherWorld} and {@code + * endWorld} are optional and may be null. */ @Override public void createWorlds() diff --git a/src/main/java/world/bentobox/caveblock/generators/Ore.java b/src/main/java/world/bentobox/caveblock/generators/Ore.java index 7f2b6c0..901bdc7 100644 --- a/src/main/java/world/bentobox/caveblock/generators/Ore.java +++ b/src/main/java/world/bentobox/caveblock/generators/Ore.java @@ -5,7 +5,6 @@ import org.bukkit.Material; /** * @author tastybento * @param minY minimum Y level this ore should appear - * @param minY maximum Y level this ore should appear * @param material Material * @param chance chance * @param blob maximum size of blob to generate diff --git a/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java b/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java index 7d4ecb9..b26e14b 100644 --- a/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java +++ b/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java @@ -16,14 +16,14 @@ import world.bentobox.caveblock.CaveBlock; /** - * This listener checks player movement. If enabled, players will be deny to get over world depth limit and + * This listener checks player movement. If enabled, players will be denied to get over world depth limit and * if alternative teleports is enabled, then falling in void also will be processed. */ public class CustomHeightLimitations implements Listener { /** * Simple constructor - * @param addon + * @param addon Addon */ public CustomHeightLimitations(CaveBlock addon) { @@ -86,7 +86,7 @@ public class CustomHeightLimitations implements Listener /** - * This method checks and returns if current player movement from location to to location should be + * This method checks and returns if current player movement from location to location should be * managed by current addon. * @param nextY NextY location for player. * @param player Player who makes movement @@ -120,10 +120,10 @@ public class CustomHeightLimitations implements Listener /** * CaveBlock addon */ - private CaveBlock addon; + private final CaveBlock addon; /** * This variable store world height. */ - private int worldHeight; + private final int worldHeight; } From 138c8f9cfb67d5881e4f66b46036768d67326998 Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Sat, 1 Jan 2022 18:47:14 -0800 Subject: [PATCH 27/33] Russian translation (#73) * Translate ru.yml via GitLocalize * Translate ru.yml via GitLocalize Co-authored-by: DraimCiDo Co-authored-by: mt-gitlocalize --- src/main/resources/locales/ru.yml | 304 ++++++++++++++++++++++++++++++ 1 file changed, 304 insertions(+) create mode 100644 src/main/resources/locales/ru.yml diff --git a/src/main/resources/locales/ru.yml b/src/main/resources/locales/ru.yml new file mode 100644 index 0000000..af6c301 --- /dev/null +++ b/src/main/resources/locales/ru.yml @@ -0,0 +1,304 @@ +--- +caveblock: + sign: + line0: "&cCaveBlock" + line1: Добро пожаловать! + line2: "[name]" + line3: Начни копать! &c<3 + informational: + to-nether: Так неудачно впасть в ад. + to-the-end: Вы достигли конца. + to-normal: Вернуться к вашей пещере. + general: + errors: + no-island: "&cУ вас нет пещеры!" + player-has-island: "&cУ этого игрока уже есть пещера!" + player-has-no-island: "&cУ этого игрока нет пещеры!" + already-have-island: "&cУ вас уже есть пещера!" + no-safe-location-found: "&cНе удалось найти безопасное место для телепортации + в пещеру." + not-owner: "&cВы не владелец этой пещеры!" + commands: + admin: + team: + add: + name-has-island: "&c[name] имеет пещеру. Сначала отмените регистрацию или + удалите её!" + success: "&b[name]&a был добавлен в пещеру игрока&b [owner]&a." + kick: + success: "&b[name]&a был выгнан из пещеры &b[owner]&a." + setowner: + description: передать владение пещеры игроку + already-owner: "&c[name] уже является владельцем этой пещеры!" + success: "&b[name]&a теперь является владельцем этой пещеры." + range: + description: Пещерный диапазон (Админ-команда) + display: + description: показать/скрыть индикаторы диапазона пещеры + hint: |- + &cКрасные барьеры &f- показывают текущий предел защищенного пещерного диапазона. + &7Серые Частицы &f- показывают максимальный предел пещеры. + &aЗеленные Частицы &f- показывают защищенный диапазон по умолчанию, если диапазон защиты пещеры отличается от него. + set: + description: устанавливает диапазон защиты пещеры + success: "&aУстановить диапазон защиты пещеры до &b[number]&a." + reset: + description: сбрасывает защищенный пещерой диапазон в мир по умолчанию + success: "&aСбросить диапазон защиты пещеры до &b[number]&a." + register: + description: зарегистрировать игрока в неизвестной пещере, в которой вы находитесь + registered-island: "&aЗарегистрирован игрок в пещере [xyz]." + already-owned: "&cПещера уже принадлежит другому игроку!" + no-island-here: "&cИ здесь нет пещеры. Подтвердите, чтобы сделать один." + in-deletion: "&cЭто пещерное пространство в настоящее время удаляется. Попробуй + позже." + cannot-make-island: "&cПещера не может быть размещена здесь, извините. Смотрите + консоль для возможных ошибок." + unregister: + description: не зарегистрирован владелец в пещере, но сохранены пещерные блоки + unregistered-island: "&aНезарегистрированный игрок из пещеры в [xyz]." + info: + description: получить информацию о том, где вы находитесь или пещера игрока + no-island: "&cВы не в пещере сейчас..." + title: "==========Информация о пещере============" + islands-in-trash: "&dИгрок имеет пещеры в мусорном ведре." + is-spawn: Этот остров является спавном. + switchto: + description: переключить пещеру игрока на пронумерованную в мусорном ведре + out-of-range: "&cНомер должен быть от 1 до [number]. Используйте &l[label] + мусорки [player] &r&c, чтобы увидеть номера пещер" + trash: + no-unowned-in-trash: "&cНе принадлежат пещеры в мусоре" + no-islands-in-trash: "&cИгрок не имеет пещер в мусорном ведре" + description: показать неиспользуемые пещеры или пещеры игрока в мусорном ведре + title: "&d===========Пещеры в корзине===========" + count: "&l&dПещера [number]:" + use-switch: "&aИспользуйте &l[label] чтобы поменять на <игрок> <номер> &r&a, + чтобы переключить игрока в пещеру в корзине" + emptytrash: + description: Очистить мусор для игрока, или все ненужные пещеры в мусоре + setrange: + description: установить диапазон пещеры игрока + range-updated: Пещерный диапазон обновлен до [number] + tp: + description: телепортироваться в пещеру игрока + getrank: + description: получить звание игрока в своей пещере + rank-is: "&aРанг - [rank] в этой пещере." + setrank: + description: установить ранг игрока в своей пещере + setspawn: + description: установить пещеру как спавн для этого мира + already-spawn: "&cЭта пещера уже спавн!" + no-island-here: "&cЗдесь нет пещеры." + confirmation: "&сВы уверены, что хотите установить эту пещеру в качестве спавна + для этого мира?" + resetflags: + description: Сброс всех пещер к настройкам флага по умолчанию в config.yml + delete: + description: удаляет пещеру игрока + cannot-delete-owner: "&cВсе члены пещеры должны быть выгнаны из пещеры перед + удалением." + deleted-island: "&aОстров на &e[xyz] &aбыл успешно удален." + island: + go: + description: телепортировать вас в вашу пещеру + teleport: "&aТелепортируем вас в вашу пещеру." + help: + description: Основная пещерная команда + create: + description: создать пещеру, используя необязательный проект (требуется разрешение) + too-many-islands: "&cВ этом мире слишком много пещер: недостаточно места для + создания вашей." + unable-create-island: "&cВашу пещеру не удалось создать, обратитесь к администратору." + creating-island: "&aСоздавается ваша пещера, пожалуйста, подождите..." + pick: "&cВыберите пещеру" + info: + description: отображать информацию о вашей пещере или пещере игрока + near: + description: показать названия соседних пещер вокруг вас + the-following-islands: "&aСледующие пещеры находятся поблизости:" + no-neighbors: "&cУ вас нет ближайших соседних пещер!" + reset: + description: перезапустите свою пещеру и удалите старую + must-remove-members: "&cВы должны удалить всех участников из своей пещеры, + прежде чем сможете ее перезапустить (/ island team kick )." + sethome: + must-be-on-your-island: "&cВы должны быть в своей пещере, чтобы установить + дом!" + home-set: "&6Ваш дом в пещере был настроен на ваше текущее местоположение." + setname: + description: установить имя для вашей пещеры + resetname: + description: сбросить имя пещеры + team: + coop: + description: Добавить игрока в вашу пещеру + uncoop: + you-are-no-longer-a-coop-member: "&cВы больше не являетесь членом кооператива + пещеры [name]" + all-members-logged-off: "&cВсе участники пещеры вышли из системы, так что + вы больше не являетесь членом кооператива пещеры [name]" + trust: + description: дать игроку звание доверенного в вашей пещере + invite: + description: пригласить игрока к вашей пещере + name-has-invited-you: "&a[name] пригласил вас к его пещере." + you-will-lose-your-island: "&сВНИМАНИЕ! Вы потеряете свою пещеру, если вы + примете!" + errors: + island-is-full: "&сВаша пещера заполнена, вы не можете пригласить кого-либо + еще." + accept: + you-joined-island: "&aВы присоединились к пещере! Используйте /[label] + информацию о команде, чтобы увидеть других участников." + name-joined-your-island: "&a[name] присоединилось к вашей пещере!" + confirmation: |- + &cВы уверены, что хотите принять это приглашение? + &c&lВы будете &nУДАЛЕНЫ &r&c с вашей пещеры! + reject: + you-rejected-invite: "&aВы отклонили приглашение присоединиться к пещере." + name-rejected-your-invite: "&c[name] отклонил ваше приглашение в пещеру!" + cancel: + description: отменить ожидающее приглашение присоединиться к вашей пещере + leave: + description: покинуть свою пещеру + left-your-island: "&c[name] вышел с вашей пещеры" + kick: + description: удалить члена из вашей пещеры + owner-kicked: "&cВладелец выгнал вас из пещеры!" + success: "&b[name]&a был изгнан из вашей пещеры." + demote: + description: понизить игрока в вашей пещере по рангу + promote: + description: повысить игрока в вашей пещере до более высокого звания + setowner: + description: передать право собственности на пещеру участнику + errors: + target-is-not-member: "&cЭтот игрок не является частью вашей пещерной + команды!" + name-is-the-owner: "&a[name] теперь является владельцем пещеры!" + you-are-the-owner: "&aТеперь вы владелец пещеры!" + ban: + description: забанить игрока из вашей пещеры + cannot-ban-more-players: "&cВы достигли предела банов, вы не можете забанить + больше игроков из своей пещеры." + player-banned: "&b[name]&c теперь заблокировано в вашей пещере." + owner-banned-you: "&b[name]&c забанили вас из своей пещеры!" + you-are-banned: "&bВы забанены в этой пещере!" + unban: + description: разблокировать игрока из вашей пещеры + player-unbanned: "&b[name]&a теперь не заблокирован в вашей пещере." + you-are-unbanned: "&b[name] &aне пускай тебя в пещеру" + banlist: + noone: "&aНикто не забанен в этой пещере." + settings: + description: настройки отображения пещеры + expel: + description: изгнать игрока из вашей пещеры + not-on-island: "&cэтот игрок не в вашей пещере!" + player-expelled-you: "&b[name]&c выгнал тебя из пещеры!" + ranks: + owner: Король гномов + sub-owner: Гном Рыцарь + member: Гном + trusted: доверенный + coop: КО-ОП + visitor: Человек + banned: Огр + protection: + flags: + ENDERMAN_GRIEFING: + description: |- + &aЭндермен может удалить + &aблоки из пещер + name: Гриферство эндермена + ENTER_EXIT_MESSAGES: + island: пещера [name] + GEO_LIMIT_MOBS: + description: |- + &aУдалиет мобов, которые уходят + &aвне защиты + &aв пещеру + name: "&eЛимит мобов в пещере" + ISLAND_RESPAWN: + description: |- + &aреспаун игрока + &aв его пещере + name: Респавн пещеры + LIQUIDS_FLOWING_OUT: + name: Жидкости текут вне пещер + description: |- + &aВключить, могут ли жидкости вытекать наружу + &aиз диапазона защиты пещеры. + LOCK: + description: Включить/Выключить жидкости + name: Замок пещеры + NATURAL_SPAWNING_OUTSIDE_RANGE: + name: Естественное существо появляется вне пределов досягаемости + description: |- + &aПереключить ли существа (животных и + &aмонстров) могут порождаться естественным путем снаружи + &aДиапазон защиты пещеры. + + &cОтметьте, что это не мешает существам + &c порождение через порождения моба или спавна + &cяйца. + OFFLINE_GROWTH: + description: |- + &aКогда выключено, растения + &aне будет расти в пещерах + &aкогда все участники не в сети. + &aМожет помочь уменьшить отставание. + name: Оффлайн Рост + OFFLINE_REDSTONE: + description: |- + &aКогда отключено, Редстоун + &aне будет работать в пещерах + &aкогда все участники не в сети. + &aМожет помочь уменьшить отставание. + name: Оффлайн Редстоун + PISTON_PUSH: + description: |- + &aРазрешить толкать поршни + &aи за пределами пещеры + name: Поршневой толчок + REMOVE_MOBS: + description: |- + &aУдалить монстров, при + &aтелепортации в пещеру + name: Удалить монстров + TREES_GROWING_OUTSIDE_RANGE: + name: Деревья, растущие вне диапазона + description: |- + &aВключить, могут ли деревья расти вне + &aДиапазона защиты пещеры или нет. + PREVENT_TELEPORT_WHEN_FALLING: + name: Предотвратить телепорт при падении + description: |- + &aПредотвращение игроков от &aтелепортации + &aснова в свою пещеру, используя команды + &aесли они падают. + hint: "&cВы не можете телепортироваться обратно в свою пещеру, пока падаете." + locked: "&cЭта пещера заперта!" + protected: "&cПещера защищена: [description]" + spawn-protected: "&cСпавн защищен: [description]" + panel: + PROTECTION: + description: |- + &aнастройки защиты + &aдля этой пещеры + SETTING: + description: |- + &aОбщие настройки + &aдля этой пещеры +protection: + flags: + SKY_WALKER_FLAG: + description: |- + &5&oЭто позволяет включить / отключить + &5&oвозможность ходить по + &5&oверхности из пещерного мира + &5&oбез дополнительных разрешений. + name: Ходящий по небу + hint: Позволяет ходить по пещерному потолку. From ca625a597141d56b19fe9ca63035c73bb4e12f79 Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Sat, 1 Jan 2022 18:47:29 -0800 Subject: [PATCH 28/33] Translate es.yml via GitLocalize (#74) Co-authored-by: zuhir --- src/main/resources/locales/es.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/locales/es.yml b/src/main/resources/locales/es.yml index 7b55d51..6d14cf6 100644 --- a/src/main/resources/locales/es.yml +++ b/src/main/resources/locales/es.yml @@ -297,4 +297,5 @@ protection: &5&ola habilidad para caminar en el &5&otecho del mundo de cuevas &5&osin permisos extra. + name: Caminante aéreo hint: Permite caminar en el techo de la cueva From 710243c420aed4fa8d2f1edae272c8e9c7df0896 Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Sun, 9 Jan 2022 11:30:59 -0800 Subject: [PATCH 29/33] Translate lv.yml via GitLocalize (#72) --- src/main/resources/locales/lv.yml | 1932 ++++++++++++++--------------- 1 file changed, 966 insertions(+), 966 deletions(-) diff --git a/src/main/resources/locales/lv.yml b/src/main/resources/locales/lv.yml index a5d476a..d25dc26 100644 --- a/src/main/resources/locales/lv.yml +++ b/src/main/resources/locales/lv.yml @@ -1,894 +1,640 @@ --- caveblock: - cave-limit-reached: "&cEsi sasniedzis savas alas grieztus! Augstāk tikt nav iespējams." + sign: + line0: "&cCaveBlock" + line1: Sveicināts! + line2: "[name]" + line3: Sāc rakt! &c<3 + informational: + to-nether: Tik neveiksmīgi iekrist ellē. + to-the-end: Tu esi sasniedzis beigas. + to-normal: Atpakaļ uz savu alu. + general: + errors: + no-island: "&cTev nav ala!" + player-has-island: "&cSpēlētājam jau ir ala!" + player-has-no-island: "&cSpēlētājam nav alas!" + already-have-island: "&cTev jau ir ala!" + no-safe-location-found: "&cNeizdevās atrast drošu vietu teleportācijas uz alas." + not-owner: "&cTu neesi šīs alas īpašnieks!" + you-must-wait: "&cTev ir jāgaida [number]s pirms vari izmantot komandu vēlreiz." + wrong-world: "&cTu neatrodies pareizajā pasaulē, lai to darītu!" + unknown-command: "&cNezināma komanda. Izmanto &b/[label] help &clai redzētu + komandas." + no-team: "&cTev nav komandas!" + offline-player: "&cŠis spēlētājs nav tiešsaitē vai neeksistē." + no-permission: "&cTev nav atļaujas rīkoties ar šo komandu (&7[permission]&c)." + general: "&cŠī komanda nav gatava/derīga. Sazinies ar administratoru." + must-be-positive-number: "&c[number] nav derīgs pozitīvs numurs." + not-in-team: "&cSpēlētājs nav tavā komandā!" + command-cancelled: "&cKomanda atcleta." + use-in-game: "&cŠī komanda ir pieejama tikai spēlē." + unknown-player: "&c[name] ir nezināms spēlētājs!" + success: "&aDarīts!" + tips: + changing-obsidian-to-lava: Pārveido obsidiānu uz lavu. Esi uzmanīgāks! + invalid: Nederīgs commands: admin: - blueprint: - bedrock-required: "&cVismaz vienam klintsakmenim ir jābūt shēmā!" - copied-blocks: "&bNokopēti [number] bloki iekš starpliktuves." - copied-percent: "&6Nokopēti [number]%" - copy: - description: kopē starpliktuvi no pos1 uz pos2 un arī ar AIR blokiem, ja - prasīts - parameters: "[air]" - copy-first: "&cKopē shēmu sākumā!" - copying: "&bKopē blokus..." - could-not-load: "&cNeizdevās ielādēt šo failu!" - could-not-save: "&cHmm, kaut kas nogāja greizi saglabājot failu: [message]" - description: manipulē ar shēmām - file-exists: "&cFails jau eksistē, vai pārrakstīt?" - list: - available-blueprints: "&aŠīs shēmas ir pieejamas ielādei:" - description: attaino visas pieejamās shēmas - no-blueprints: "&cNav shēmas iekš blueprints mapītes!" - load: - description: ielādē shēmu starpliktuvē - parameters: "" - look-at-a-block: "&cSkaties uz bloku nevariāk kā 20 bloku attālumā, lai uzstādītu." - management: - back: Atpakaļ - blueprint-instruction: | - Uzspied, lai izvēlētos, - un tad pievieno shēmu. - Labais klikšķis, lai - pārdēvētu. - description: - cancelling: Atceļ - instructions: | - Ieraksti vairāku rindiņu tekstu priekš - [name] un 'iziet' jaunā rindā, lai - pabeigtu. - quit: iziet - success: Izdevās! - edit: Uzspied, lai labotu - edit-description: Uzspied, lai labotu aprakstu - end: Beigu - instruction: Noklikšķini uz shēmu un tikai tad šeit - name: - conversation-prefix: ">" - pick-a-unique-name: Lūdzu izvēlies unikālu nosaukumu - prompt: Ieraksti vārdu vai 'iziet', lai izietu - quit: iziet - success: Izdevās! - too-long: "&cPārāk garš" - nether: Elles - new-bundle: Jauns shēmu saišķis - new-bundle-instructions: Uzspied, lai izveidotu jaunu shēmu saišķi - normal: Zemes - perm-format: "&e" - permission: Atļaujas - perm-not-required: Nav nepieciešams - perm-required: Nepieciešams - remove: Labais klikšķis, lai noņemtu - rename: Labais klikšķis, lai pārdēvētu - select-first: Izvēlies shēmu vispirms - slot: "&fVēlamā vieta [number]" - slot-instructions: | - &aKrisais klikšķis, lai palielinātu - &aLabais klikšķis, lai samazinātu - title: Shēmu saišķu pārvaldnieks - trash: Atkritne - trash-instructions: Labais klikšķis, lai dzēstu - world-instructions: | - Novieto shēmas labajā pusē - lai tās uzstādītu - world-name-syntax: "[name] pasaule" - mid-copy: "&cKopēšana vēl notiek. Pagaidi, kad tā beidzas." - need-pos1-pos2: "&cUzstādi pos1 un pos2 sākumā!" - no-such-file: "&cNav šāda faila!" - origin: - description: uzstāda shēmas sākuma punktu tavā pozīcijā - parameters: "" - paste: - description: ielīmē starpieliktuvi šajā pozīcijā - pasting: "&aIelīmē..." - pos1: - description: uzstāda pirmo stūri priekš kuboīda iekš starpieliktuves - pos2: - description: uzstāda otro stūri priekš kuboīda iekš starpieliktuves - save: - description: saglabā kopēto shēmu no starpieliktuves - parameters: "" - set-different-pos: "&cUzstādi citu pozīciju - šī jau ir uzstādīta!" - set-pos1: "&aPozīcija 1 uzstādīta uz [vector]" - set-pos2: "&aPozīcija 2 uzstādīta uz [vector]" - deaths: - description: maina nāvju skaitu spēlētājam - reset: - description: uzstāda nāvju skaitu spēlētājam uz 0 + team: + add: + name-has-island: "&c[name] jau pieder kāda ala. Atreģistrē vai izdzēs to + vispirms!" + success: "&b[name]&a ir pieveinots &b[owner]&a alai." + description: pievieno spēlētāju īpašnieka alai + parameters: "<īpašnieks> " + name-not-owner: "&c[name] nav alas īpašnieks." + kick: + success: "&b[name] &atika izmests no &b[owner]&a alas." + parameters: "" + admin-kicked: "&cAdmins tevi izmenta no komandas." + not-in-team: "&cŠis spēlētājs nav komandā." + cannot-kick-owner: "&cNevar izmest īpašnieku kamēr komandā ir citi spēlētāji." + description: izmet spēlētāju no komandas + setowner: + description: iecelt par alas īpašnieku + already-owner: "&c[name] jau ir alas īpašnieks!" + success: "&b[name]&a tagad ir šīs alas īpašnieks." parameters: "" - success: "&aSpēlētājam &b[name]&a nāvju skaits uzstādīts uz &b0&a." - set: - description: maina nāvju skaitu spēlētājam - parameters: " " - success: "&aSpēlētājam &b[name]&a nāvju skaits uzstādīts uz &b[number]&a." - delete: - cannot-delete-owner: "&cVisi spēlētāja komandas biedriem ir jābūt izmestiem - no komandas pirms alas dzēšanas." - deleted-island: "&aAla ar centru &e[xyz] &atika veiksmīgi dzēsta." - description: izdzēš spēlētāja salu - parameters: "" - emptytrash: - description: iztīra atkritni no spēlētāja salām vai salām bez īpašnieka - parameters: "[spēlētājs]" - success: "&aAtkritne ir iztīrīta." - getrank: - description: atgriež spēlētāja rangu komandā - parameters: "" - rank-is: "&aSpēlētājam ir [rank] rangs uz viņa alas." - help: - description: admin komanda - info: - banned-format: "&c[name]" - banned-players: 'Spēlētāji, kam liegts atrasties uz alas:' - deaths: 'Nāves: [number]' - description: atgriež informāciju par spēlētāja salu vai esošo pozīciju - island-coords: 'Alas kooridinātes: no [xz1] līdz [xz2]' - island-location: 'Alas centrs: [xyz]' - islands-in-trash: "&dSpēlētājam ala ir atkritnē." - island-uuid: 'UUID: [uuid]' - is-spawn: Šī ir sākuma ala - last-login: 'Pēdējā pieslēgšanās: [date]' - max-protection-range: 'Lielākā aizsardzības distance alas vēsturē: [range]' - no-island: "&cTu neesi uz alas šobrīd..." - owner: 'Īpašnieks: [owner] ([uuid])' - parameters: "" - protection-coords: 'Aizsardzības koordinātes: no [xz1] līdz [xz2]' - protection-range: 'Aizsardzības distance: [range]' - purge-protected: Ala ir aizsargāta no dzēšanas - resets-left: 'Sākšanas no jauna: [number] (Maksimālais: [total])' - team-member-format: "&b[name] [rank]" - team-members-title: 'Komandas biedri:' - team-owner-format: "&a[name] [rank]" - title: "========== Alas informācija ============" - unowned: "&cBez īpašnieka" - purge: - completed: "&aDzēšana pabeigta." - confirm: "&dRaksti &e[label] purge confirm&d, lai sāktu dzēšanu" - days-or-more: Nevar būt mazāks par 1 dienu - description: nodzēst alas kas nav aktīvas vairāk par [days] dienām - number-error: "&cParametram ir jābūt dienu skatitam." - parameters: "[days]" - protect: - description: Pārslēgt alas aizsargāšanu no dzēšanas - move-to-island: "&cSākumā pārvietojies uz alas!" - protecting: "&aDzēšanas aizsardzība aktivizēta" - unprotecting: "&aDzēšanas aizsardzība noņemta" - purgable-islands: Atrastas [number] dzēšamas alas. - purge-in-progress: "&cNotiek salu dzēšana. Izmanto '&e[label] purge stop&c', - lai atceltu." - see-console-for-status: Dzēšana uzsākta. Skati terminālī, lai redzētu satusu. - stop: - description: Apturēt uzsāktu dzēšanu. - no-purge-in-progress: "&cNav aktīvas dzēšanas!" - stopping: Apstādina dzēšanu - unowned: - description: Dzēst bezīpašnieku alas - nepieciešams apstiprinājums - unowned-islands: "&dAtrastas [number] alas" + disband: + use-disband-owner: "&cNav īpašnieks! Lieto /[label] disband [owner]." + parameters: "<īpašnieks>" + description: izformē īpašnieka komandu + success: "&b[name]&a komanda ir izformēta." + disbanded: "&cAdmins izformēja tavu komandu!" range: description: Admina alas distances komanda display: - already-off: "&cIndikātors ir jau izslēgts" - already-on: "&cIndikātors ir jau ieslēgts" description: rādīt/slēpt alas distances indikātoru - hiding: "&2Distances indikātors paslēpts" hint: |- &cBarjeras ikona &frāda pašreizējo alas aizsardzības distances limitu. &7Pelēkās daļiņas &frāda maksimālo alas distances lielumu. &aZaļās daļiņas &frāda noklusējuma aizsardzības distanci, ja pašreizējā distance no tās atšķiras. showing: "&2Distances indikātors tiek rādīts" - reset: - description: atiesta aizsardzības distanci uz pasaules noklusējuma vērtību - parameters: "" - success: "&aAlas aizsardzības distance atiestīta uz &b[number]&a." + hiding: "&2Distances indikātors paslēpts" + already-off: "&cIndikātors ir jau izslēgts" + already-on: "&cIndikātors ir jau ieslēgts" set: description: uzstāda alas aizsardzības rādiusa distanci + success: "&aAlas aizsardzības distance nomainīta uz &b[number]&a." invalid-value: not-numeric: "&c[number] nav vesels nummurs!" same-as-before: "&cAizsardzības distance jau bija uzstādīta &b[number]&c!" too-high: "&cAizsardzības distance nedrīkst būt lielāka par &b[number]&c!" too-low: "&cAizsardzības distancei jābūt lielākai par &b1&c!" parameters: " " - success: "&aAlas aizsardzības distance nomainīta uz &b[number]&a." + reset: + description: atiesta aizsardzības distanci uz pasaules noklusējuma vērtību + success: "&aAlas aizsardzības distance atiestīta uz &b[number]&a." + parameters: "" register: - already-owned: "&cAla jau pieder citam spēlētājam!" - cannot-make-island: "&cAtvaino, bet neizdevās izveidot šeit salu. Iespējams - konsulē ir kļūdas paziņojumi." description: piereģistrē spēlētāju pie alas, kurai nav īpašnieka un uz kuras tu stāvi - in-deletion: "&cŠī alas pozīcija šobrīt tiek dzēsta. Mēģini vēlāk." - no-island-here: "&cŠeit neatrodas neviena ala! Apstiprini, lai izveidotu." - parameters: "" registered-island: "&aPiereģistrē spēlētāju pie alas ar koordinātēm [xyz]." + already-owned: "&cAla jau pieder citam spēlētājam!" + no-island-here: "&cŠeit neatrodas neviena ala! Apstiprini, lai izveidotu." + in-deletion: "&cŠī alas pozīcija šobrīt tiek dzēsta. Mēģini vēlāk." + cannot-make-island: "&cAtvaino, bet neizdevās izveidot šeit salu. Iespējams + konsulē ir kļūdas paziņojumi." reserved-island: "&aAla ir rezērvēta [xyz] priekš spēlētāja." - reload: - description: pārlādēt - resetflags: - description: Atiestatī visu salu noklusējuma karodziņu iestatījumus no config.yml - success: "&aVeiksmīgi atiestatīti visi salu iestatījumi uz sākotnējām vērtībām." - resets: - description: mainīt spēlētāja 'resetus' - reset: - description: uzstāta spēlētājam 'resetus' uz 0 - parameters: "" - set: - description: uzstāda 'resetus' spēlētājam - parameters: " " - setrange: - description: uzstāda aizsardzības distanci spēlētāja alai - parameters: " " - range-updated: Aizsardzības distance uzstādīta uz [number] - setrank: - description: uzstāda spēlētājam rangu uz viņa alas - not-possible: "&cRangam ir jābūt lielākam par apmeklētāju" - parameters: " " - rank-set: "&aSpēlētājam nomainīts rangs no [from] uz [to]." - unknown-rank: "&cNezināms rangs!" - setspawn: - already-spawn: "&cŠī ala jau ir uzstādīta kā sākuma ala!" - confirmation: "&cVai tiešām vēlies uzstādīt šo salu kā sākuma salu?" - description: uzstāda kā sākuma salu šajā pasaulē visiem spēlētājiem - no-island-here: "&cŠeit nav neveinas alas." - success: "&aŠī ala ir veiksmīgi uzstādīta kā sākuma ala šajā pasaulē." - settings: - description: atver sistēmas vai spēlētāja alas iestatījumus - parameters: "[spēlētājs]" - switch: - adding: Ieslēdz aizsardzības pārkāpšanu... - description: Pārslēdz aizsardzības pārkāpšanu - op: "&cServera operātors vienmēr var pārkāpt aizsardzību." - removing: Noņem aizsardzības pārkāpšanu... + parameters: "" + unregister: + description: atreģistrē īpašnieku no alas paturot alas blokus + unregistered-island: "&aSpēlētājs atreģistrēts no alas ar koordinātēm [xyz]." + parameters: "<īpašnieks>" + info: + description: atgriež informāciju par spēlētāja salu vai esošo pozīciju + no-island: "&cTu neesi uz alas šobrīd..." + title: "========== Alas informācija ============" + islands-in-trash: "&dSpēlētājam ala ir atkritnē." + is-spawn: Šī ir sākuma ala + purge-protected: Ala ir aizsargāta no dzēšanas + team-member-format: "&b[name] [rank]" + max-protection-range: 'Lielākā aizsardzības distance alas vēsturē: [range]' + deaths: 'Nāves: [number]' + protection-range: 'Aizsardzības distance: [range]' + owner: 'Īpašnieks: [owner] ([uuid])' + island-uuid: 'UUID: [uuid]' + island-coords: 'Alas kooridinātes: no [xz1] līdz [xz2]' + island-location: 'Alas centrs: [xyz]' + protection-coords: 'Aizsardzības koordinātes: no [xz1] līdz [xz2]' + team-owner-format: "&a[name] [rank]" + parameters: "" + unowned: "&cBez īpašnieka" + last-login: 'Pēdējā pieslēgšanās: [date]' + banned-players: 'Spēlētāji, kam liegts atrasties uz alas:' + team-members-title: 'Komandas biedri:' + resets-left: 'Sākšanas no jauna: [number] (Maksimālais: [total])' + banned-format: "&c[name]" switchto: - cannot-switch: "&cPārslēgšana neizdevās! Skaties kļūdu paziņojumu konsulē." description: uzstāda spēlētāja salu kā pirmo (vai doto) atkritnē out-of-range: "&cNumuram jābūt starp 1 un [number]. Lieto &l[label] trash [player]&r&c, lai redzētu alas numuru" - parameters: " " + cannot-switch: "&cPārslēgšana neizdevās! Skaties kļūdu paziņojumu konsulē." success: "&aSpēlētāja ala veiskmīgi pārslēgta uz uzstādīto numuru." - team: - add: - description: pievieno spēlētāju īpašnieka alai - name-has-island: "&c[name] jau pieder kāda ala. Atreģistrē vai izdzēs to - vispirms!" - name-not-owner: "&c[name] nav alas īpašnieks." - parameters: "<īpašnieks> " - success: "&b[name]&a ir pieveinots &b[owner]&a alai." - disband: - description: izformē īpašnieka komandu - disbanded: "&cAdmins izformēja tavu komandu!" - parameters: "<īpašnieks>" - success: "&b[name]&a komanda ir izformēta." - use-disband-owner: "&cNav īpašnieks! Lieto /[label] disband [owner]." - kick: - admin-kicked: "&cAdmins tevi izmenta no komandas." - cannot-kick-owner: "&cNevar izmest īpašnieku kamēr komandā ir citi spēlētāji." - description: izmet spēlētāju no komandas - not-in-team: "&cŠis spēlētājs nav komandā." - parameters: "" - success: "&b[name] &atika izmests no &b[owner]&a alas." - setowner: - already-owner: "&c[name] jau ir alas īpašnieks!" - description: iecelt par alas īpašnieku - parameters: "" - success: "&b[name]&a tagad ir šīs alas īpašnieks." + parameters: " " + trash: + no-unowned-in-trash: "&cNav alas atkritnē bez īpašniekiem" + no-islands-in-trash: "&cSpēlētājam nav alas atkritnē" + description: attaino alas ar vai bez īpašniekiem, kas atrodas atkritnē + title: "&d=========== Alas atkritnē ===========" + count: "&l&dAla [number]:" + use-switch: "&aLieto &l[label] switchto [spēlētājs] &r&a, lai Pārslēdzos + uz spēlētāja salu no atkritnes." + parameters: "[spēlētājs]" + use-emptytrash: "&aLieto &l[label] emptytrash [spēlētājs]&r&a, lai iztīrītu + atkritni." + emptytrash: + description: iztīra atkritni no spēlētāja salām vai salām bez īpašnieka + parameters: "[spēlētājs]" + success: "&aAtkritne ir iztīrīta." + setrange: + description: uzstāda aizsardzības distanci spēlētāja alai + range-updated: Aizsardzības distance uzstādīta uz [number] + parameters: " " tp: description: pārvietoto uz spēlētāja salu manual: "&cNeizdevās atrast drošu nosēšanās vietu! Pārvietojies manuāli ar tp blakus &b[location]&c, lai pārbaudītu iemeslu." parameters: "" - trash: - count: "&l&dAla [number]:" - description: attaino alas ar vai bez īpašniekiem, kas atrodas atkritnē - no-islands-in-trash: "&cSpēlētājam nav alas atkritnē" - no-unowned-in-trash: "&cNav alas atkritnē bez īpašniekiem" + getrank: + description: atgriež spēlētāja rangu komandā + rank-is: "&aSpēlētājam ir [rank] rangs uz viņa alas." + parameters: "" + setrank: + description: uzstāda spēlētājam rangu uz viņa alas + not-possible: "&cRangam ir jābūt lielākam par apmeklētāju" + parameters: " " + unknown-rank: "&cNezināms rangs!" + rank-set: "&aSpēlētājam nomainīts rangs no [from] uz [to]." + setspawn: + description: uzstāda kā sākuma salu šajā pasaulē visiem spēlētājiem + already-spawn: "&cŠī ala jau ir uzstādīta kā sākuma ala!" + no-island-here: "&cŠeit nav neveinas alas." + confirmation: "&cVai tiešām vēlies uzstādīt šo salu kā sākuma salu?" + success: "&aŠī ala ir veiksmīgi uzstādīta kā sākuma ala šajā pasaulē." + resetflags: + description: Atiestatī visu salu noklusējuma karodziņu iestatījumus no config.yml + success: "&aVeiksmīgi atiestatīti visi salu iestatījumi uz sākotnējām vērtībām." + delete: + description: izdzēš spēlētāja salu + cannot-delete-owner: "&cVisi spēlētāja komandas biedriem ir jābūt izmestiem + no komandas pirms alas dzēšanas." + deleted-island: "&aAla ar centru &e[xyz] &atika veiksmīgi dzēsta." + parameters: "" + purge: + completed: "&aDzēšana pabeigta." + purgable-islands: Atrastas [number] dzēšamas alas. + protect: + protecting: "&aDzēšanas aizsardzība aktivizēta" + description: Pārslēgt alas aizsargāšanu no dzēšanas + unprotecting: "&aDzēšanas aizsardzība noņemta" + move-to-island: "&cSākumā pārvietojies uz alas!" + see-console-for-status: Dzēšana uzsākta. Skati terminālī, lai redzētu satusu. + confirm: "&dRaksti &e[label] purge confirm&d, lai sāktu dzēšanu" + description: nodzēst alas kas nav aktīvas vairāk par [days] dienām + parameters: "[days]" + unowned: + description: Dzēst bezīpašnieku alas - nepieciešams apstiprinājums + unowned-islands: "&dAtrastas [number] alas" + days-or-more: Nevar būt mazāks par 1 dienu + purge-in-progress: "&cNotiek salu dzēšana. Izmanto '&e[label] purge stop&c', + lai atceltu." + stop: + no-purge-in-progress: "&cNav aktīvas dzēšanas!" + stopping: Apstādina dzēšanu + description: Apturēt uzsāktu dzēšanu. + number-error: "&cParametram ir jābūt dienu skatitam." + blueprint: + save: + parameters: "" + description: saglabā kopēto shēmu no starpieliktuves + management: + description: + success: Izdevās! + instructions: | + Ieraksti vairāku rindiņu tekstu priekš + [name] un 'iziet' jaunā rindā, lai + pabeigtu. + cancelling: Atceļ + quit: iziet + name: + success: Izdevās! + too-long: "&cPārāk garš" + pick-a-unique-name: Lūdzu izvēlies unikālu nosaukumu + prompt: Ieraksti vārdu vai 'iziet', lai izietu + quit: iziet + conversation-prefix: ">" + world-instructions: | + Novieto shēmas labajā pusē + lai tās uzstādītu + slot-instructions: | + &aKrisais klikšķis, lai palielinātu + &aLabais klikšķis, lai samazinātu + trash: Atkritne + trash-instructions: Labais klikšķis, lai dzēstu + normal: Zemes + title: Shēmu saišķu pārvaldnieks + blueprint-instruction: | + Uzspied, lai izvēlētos, + un tad pievieno shēmu. + Labais klikšķis, lai + pārdēvētu. + back: Atpakaļ + remove: Labais klikšķis, lai noņemtu + select-first: Izvēlies shēmu vispirms + new-bundle: Jauns shēmu saišķis + perm-format: "&e" + edit-description: Uzspied, lai labotu aprakstu + rename: Labais klikšķis, lai pārdēvētu + slot: "&fVēlamā vieta [number]" + new-bundle-instructions: Uzspied, lai izveidotu jaunu shēmu saišķi + instruction: Noklikšķini uz shēmu un tikai tad šeit + nether: Elles + permission: Atļaujas + perm-required: Nepieciešams + end: Beigu + edit: Uzspied, lai labotu + world-name-syntax: "[name] pasaule" + perm-not-required: Nav nepieciešams + copy-first: "&cKopē shēmu sākumā!" + file-exists: "&cFails jau eksistē, vai pārrakstīt?" + copying: "&bKopē blokus..." + load: + description: ielādē shēmu starpliktuvē + parameters: "" + look-at-a-block: "&cSkaties uz bloku nevariāk kā 20 bloku attālumā, lai uzstādītu." + copy: + description: kopē starpliktuvi no pos1 uz pos2 un arī ar AIR blokiem, ja + prasīts + parameters: "[air]" + copied-percent: "&6Nokopēti [number]%" + list: + description: attaino visas pieejamās shēmas + no-blueprints: "&cNav shēmas iekš blueprints mapītes!" + available-blueprints: "&aŠīs shēmas ir pieejamas ielādei:" + pos1: + description: uzstāda pirmo stūri priekš kuboīda iekš starpieliktuves + set-pos2: "&aPozīcija 2 uzstādīta uz [vector]" + copied-blocks: "&bNokopēti [number] bloki iekš starpliktuves." + set-different-pos: "&cUzstādi citu pozīciju - šī jau ir uzstādīta!" + could-not-load: "&cNeizdevās ielādēt šo failu!" + bedrock-required: "&cVismaz vienam klintsakmenim ir jābūt shēmā!" + origin: + description: uzstāda shēmas sākuma punktu tavā pozīcijā + mid-copy: "&cKopēšana vēl notiek. Pagaidi, kad tā beidzas." + could-not-save: "&cHmm, kaut kas nogāja greizi saglabājot failu: [message]" + paste: + description: ielīmē starpieliktuvi šajā pozīcijā + pasting: "&aIelīmē..." + parameters: "" + pos2: + description: uzstāda otro stūri priekš kuboīda iekš starpieliktuves + need-pos1-pos2: "&cUzstādi pos1 un pos2 sākumā!" + set-pos1: "&aPozīcija 1 uzstādīta uz [vector]" + description: manipulē ar shēmām + no-such-file: "&cNav šāda faila!" + deaths: + reset: + parameters: "" + success: "&aSpēlētājam &b[name]&a nāvju skaits uzstādīts uz &b0&a." + description: uzstāda nāvju skaitu spēlētājam uz 0 + set: + success: "&aSpēlētājam &b[name]&a nāvju skaits uzstādīts uz &b[number]&a." + parameters: " " + description: maina nāvju skaitu spēlētājam + description: maina nāvju skaitu spēlētājam + settings: + description: atver sistēmas vai spēlētāja alas iestatījumus parameters: "[spēlētājs]" - title: "&d=========== Alas atkritnē ===========" - use-emptytrash: "&aLieto &l[label] emptytrash [spēlētājs]&r&a, lai iztīrītu - atkritni." - use-switch: "&aLieto &l[label] switchto [spēlētājs] &r&a, lai Pārslēdzos - uz spēlētāja salu no atkritnes." - unregister: - description: atreģistrē īpašnieku no alas paturot alas blokus - parameters: "<īpašnieks>" - unregistered-island: "&aSpēlētājs atreģistrēts no alas ar koordinātēm [xyz]." + why: + parameters: "" + description: ieslēdz/izslēdz kļūdu atrašanas paziņojumus konsulē + turning-on: Ieslēdz kļūdu atrašanas ziņojumus priekš [name]. + turning-off: Izslēdz kļūdu atrašanas ziņojumus priekš [name]. + reload: + description: pārlādēt + switch: + op: "&cServera operātors vienmēr var pārkāpt aizsardzību." + removing: Noņem aizsardzības pārkāpšanu... + description: Pārslēdz aizsardzības pārkāpšanu + adding: Ieslēdz aizsardzības pārkāpšanu... + resets: + reset: + description: uzstāta spēlētājam 'resetus' uz 0 + parameters: "" + description: mainīt spēlētāja 'resetus' + set: + description: uzstāda 'resetus' spēlētājam + parameters: " " version: description: attaino BentoBox un papildinājumu versijas - why: - description: ieslēdz/izslēdz kļūdu atrašanas paziņojumus konsulē - parameters: "" - turning-off: Izslēdz kļūdu atrašanas ziņojumus priekš [name]. - turning-on: Ieslēdz kļūdu atrašanas ziņojumus priekš [name]. world: description: Pārvaldīt pasaules iestatījumus - bentobox: - about: - description: parādīt autortiesības un licenses informāciju - catalog: - description: parādīt papildinājumu katalogu - description: BentoBox admina komandas - locale: - description: veikt valodas faila analīzi - see-console: |- - &aPārbaudi izdrukas, lai redzētu trūkstošos tulkojumus. - &aŠī komanda var atgiezt pārāk daudz teksta, lai to rādītu sarakstē... - manage: - description: parādīt pārvaldīšanas paneli - migrate: - addons: "&6Pārceļ papildinājumus" - class: "&6Pārceļ [description]" - description: Migrē no vienas datubāzes uz citu - migrated: "&aMigrācija pabeigta!" - names: "&6Pārceļ vārdus" - players: "&6Pārceļ spēlētājus" - reload: - addon: "&6Pārlādē &b[name]&2." - addon-reloaded: "&b[name] &2pārlādēts." - addons-reloaded: "&2Papildinājumu pārlādēti." - description: parlādēt iestatījumus, papildinājumus (ja atbalstīts) un valodas - locales-reloaded: "&2Valodas faili pārlādēti." - settings-reloaded: "&2Iestatījumi pārlādēti." - unknown-addon: "&2Nezināms papildinājums!" - warning: "&cUzmanību: Pārlādēšana var izraisīt nestabilitāti, tādēļ, ja saskarieties - ar problēmām, pārstartējiet serveri." - version: - addon-syntax: "&2[name] &3[version] &7(&3[state]&7)" - database: "&2Databāze: &3[database]" - description: parādīt BentoBox un papildinājumu versijas - game-world: "&2[name] &7(&3[addon]&7): &aOverworld&7, &r[nether_color]Nether&7, - &r[end_color]End" - loaded-addons: 'Ielādētie Papildinājumi:' - loaded-game-worlds: 'Ielādētās spēles pasaules:' - plugin-version: "&2BentoBox versija: &3[version]" - server: "&2Darbojas uz &3[name] [version]&2." - confirmation: - confirm: "&cIevadi komandu atkārtoti &b[seconds]s&c laikā, lai apstiprinātu." - previous-request-cancelled: "&6Iepriekšējais apstiprinājumu pieprasījums ir - apturēts." - request-cancelled: "&cApstiprinājuma noilgums - &bpieprasījums apturēts." - delay: - moved-so-command-cancelled: "&cTu pakustējies. Teleportēšana atcelta!" - previous-command-cancelled: "&cIepriekšēja komanda tika atcelta!" - stand-still: "&6Apstājies! Teleportēšana notiks pēc [seconds] sekundēm" - help: - console: Konsole - description: Palīdzības komanda - end: "&7=================================" - header: "&7=========== &c[label] palīdzība &7===========" - parameters: "[command]" - syntax: "&b[usage] &a[parameters]&7: &e[description]" - syntax-no-parameters: "&b[usage]&7: &e[description]" + help: + description: admin komanda island: - about: - description: Par šo režīmu - ban: - cannot-ban: "&cTu nevari liegt šim spēlētājam atrasties uz alas." - cannot-ban-member: "&cIzmet spēlētāju no komandas un tikai tad tu varēsi viņam - liegt šeit atrasties." - cannot-ban-more-players: "&cTu esi sasniedzis liegumu skaita limitu. Tu vairs - nevienam neko liegt nevari." - cannot-ban-yourself: "&cTu nevari liegt atrasties uz alas pats sev!" - description: liegt spēlētājam atrasties uz tavas alas - owner-banned-you: "&b[name]&c tev liedza atrasties uz viņa alas!" - parameters: "" - player-already-banned: "&cSpēlētājam jau ir liegums atrasties uz alas." - player-banned: "&b[name]&c tika liegts atrasties uz tavas alas." - you-are-banned: "&bTev ir liegts atrasties uz šīs alas!" - banlist: - description: saraksts ar spēlētājiem, kam liegts atrasties uz alas - names: "&c[line]" - noone: "&aSaraksts ir tukšs." - the-following: "&bSekojošajiem spēlētājiem ir liegums atrasties uz alas:" - you-can-ban: "&bTev vēl ir iespēja liegt &e[number] &bspēlētājiem atrasties - uz tavas alas." - create: - creating-island: "&aTiek veidota tava ala. Uzgaidi mirklīti..." - description: izveido salu, ar iespēju izmantot shēmas (nepieciešamas atļaujas) - parameters: "" - pick: "&aIzvēlies alas veidu" - pick-world: "&cIzvēkies pasauli no [worlds]." - too-many-islands: "&cŠajā pasaulē ir sasniegts salu limits. Tavai alai nav - vietas." - unable-create-island: "&cNeizdevās izveidot tavu salu, ziņo par kļūdu administratoram." - unknown-blueprint: "&cŠī shēma nav ielādēta vai tā neeksistē." - expel: - cannot-ban-member: "&cTu nevari izraidīt komandas biedrus!" - cannot-expel: "&cŠis spēlētājs nevar tikt izraidīts." - cannot-expel-yourself: "&cTu nevari izraidīt pats sevi!" - description: izraida spēlētāju no alas - not-on-island: "&cŠis spēlētājs nav uz tavas alas!" - parameters: "" - player-expelled-you: "&b[name]&c izraidīja tevi no alas!" - success: "&aTu izmeti spēlētāju &b[name] &ano savas alas." go: description: pārvieto tevi uz tavu salu - parameters: "[mājas numurs]" teleport: "&aTu tiec pārvietots uz savu salu." + parameters: "[mājas numurs]" teleported: "&aEsi pārvietots uz savu salu &e#[number]." tip: "&bRaksti /[label] help &apēc palīdzības." help: description: Galvenā alas komanda pick-world: "&cNorādai pasauli no [worlds]" + create: + description: izveido salu, ar iespēju izmantot shēmas (nepieciešamas atļaujas) + too-many-islands: "&cŠajā pasaulē ir sasniegts salu limits. Tavai alai nav + vietas." + unable-create-island: "&cNeizdevās izveidot tavu salu, ziņo par kļūdu administratoram." + creating-island: "&aTiek veidota tava ala. Uzgaidi mirklīti..." + pick: "&aIzvēlies alas veidu" + unknown-blueprint: "&cŠī shēma nav ielādēta vai tā neeksistē." + parameters: "" + pick-world: "&cIzvēkies pasauli no [worlds]." info: description: parāda informāciju par tavu vai spēlētāja salu parameters: "" - language: - description: valodu izvēle near: description: Rāda alas īpašniekus, kas ir tev apkārt - east: Austrumos - no-neighbors: "&cTava alai blakus nav neviena ala ar īpašnieku!" - north: Ziemeļos - south: Dienvidos - syntax: "&6[direction]- &a[name]" the-following-islands: "&aSekojošās alas ir tev apkārt:" + no-neighbors: "&cTava alai blakus nav neviena ala ar īpašnieku!" + south: Dienvidos west: Rietumos + syntax: "&6[direction]- &a[name]" + north: Ziemeļos + east: Austrumos reset: description: pārstartē salu vai izdzēš iepriekšējo must-remove-members: "&cTev nepieciešams izmest visus spēlētājus no komandas pirms vari pārstartēt salu (/island team kick )." + resets-left: "&cTev palikuši [number] restarti" none-left: "&cTu esi sasniedzis restartu limitu!" parameters: "" - resets-left: "&cTev palikuši [number] restarti" - resetname: - description: noņemt alas nosaukumu sethome: - description: uzstāda teleportācijas mājas punktu - home-set: "&6Tavas alas mājas punkts uzstādīts šajā punktā." must-be-on-your-island: "&cTev nepieciešams būt uz savas alas!" + home-set: "&6Tavas alas mājas punkts uzstādīts šajā punktā." nether: confirmation: "&cVai tiešām vēlies uzstādīt mājas punktu Ellē?" not-allowed: "&cTev nav atļaujas uzstādīt mājas punktu Ellē." - num-homes: "&cMājas var būt no 1 līdz [number]." - parameters: "[mājas numurs]" the-end: - confirmation: "&cVai tiešām vēlies uzstādīt mājas punktu Beigās?" not-allowed: "&cTev nav atļaujas uzstādīt mājas punktu Beigās." + confirmation: "&cVai tiešām vēlies uzstādīt mājas punktu Beigās?" + num-homes: "&cMājas var būt no 1 līdz [number]." + description: uzstāda teleportācijas mājas punktu + parameters: "[mājas numurs]" setname: description: uzstāda nosaukumu tavai alai - name-too-long: "&cPārāk garšs. Maksimālais izmērs ir [number] simboli." - name-too-short: "&cPārāk īss. Minimālais izmērs ir [number] simboli." parameters: "" - settings: - description: attaino alas iestatījumus - spawn: - description: pārvieto tevi uz sākumu - no-spawn: "&cŠai pasaulei nav sākums." - teleporting: "&aTu tiec pārvietots uz sākumu." + name-too-short: "&cPārāk īss. Minimālais izmērs ir [number] simboli." + name-too-long: "&cPārāk garšs. Maksimālais izmērs ir [number] simboli." + resetname: + description: noņemt alas nosaukumu team: coop: - already-has-rank: "&cSpēlētājam jau ir šis rangs!" - cannot-coop-yourself: "&cTu nevari uzlikt sev šo rangu!" description: uzstādīt spēlētājam sabiedrotā rangu - parameters: "" - success: "&aSabiedrotā rangs uzstādīts spēlētājam &b[name]." + cannot-coop-yourself: "&cTu nevari uzlikt sev šo rangu!" you-are-a-coop-member: "&2Tu esi uzstādīts kā sabiedrotajs spēlētājam [name]" - demote: - description: samazina spēlētāja komandas rangu - errors: - cant-demote-yourself: "&cTu nevari pazemināt rangu pats sev!" - failure: "&cSpēlētājs jau sasniedzis zemāko rangu!" parameters: "" - success: "&aSpēlētājs [name] tika pazemināts uz [rank]" - description: pārvaldīt savu komandu - info: - description: parādīt detalizētu informāciju par tavu komandu + already-has-rank: "&cSpēlētājam jau ir šis rangs!" + success: "&aSabiedrotā rangs uzstādīts spēlētājam &b[name]." + uncoop: + you-are-no-longer-a-coop-member: "&cTu vairs neesi sabiedrotais [name] salā." + all-members-logged-off: "&cVisi alas spēlētāji ir izgājuši, tā ka tu vairs + neesi sabiedrotais [name] salā." + player-not-cooped: "&cSpēlētājs nav tavs sabiedrotais!" + cannot-uncoop-yourself: "&cTu nevari noņemt sev sabiedrotā rangu!" + cannot-uncoop-member: "&cTu nevari noņemt šo rangu komandas spēlētājam!" + success: "&b[name] &avairs nav sabiedrotais uz tavas alas." + parameters: "" + description: noņemt spēlētājam sabiedrotā rangu + cannot-coop-yourself: "&cTu nevari uzlikt sev šo rangu!" + trust: + description: uzstādīt spēlētājam uzticams rangu + parameters: "" + members-trusted: "&cKomandas biedriem jau ir šis rangs!" + you-are-trusted: "&2Spēlētājs [name] tev uzticas!" + trust-in-yourself: "&cTu jau sev esi uzticams!" + player-already-trusted: "&cSpēlētājam jau ir šis rangs!" + success: "&aUzticamā rangs uzstādīts spēlētājam &b[name]&a." invite: + description: uzaicini spēlētāju pievienoties tavai alai + name-has-invited-you: "&a[name] ielūdza tevi pievienoties viņa komandai." + you-will-lose-your-island: "&cUZMANĪBU! Tava ala tiks iznīcināta, ja pievienosies + komandai!" + errors: + island-is-full: "&cTava komanda ir pilna, tu vairs nevari ielūgt jaunus + spēlētājus." + cooldown: "&cTu nevari sūtīt ielūgumu šim spēlētājam vēl [number] sekundes" + already-on-team: "&cŠis spēlētājs jau ir tavā komandā!" + you-already-are-in-team: "&cTu jau esi komandā!" + cannot-invite-self: "&cTu nevari ielūgt pats sevi!" + none-invited-you: "&cNeviens tevi nav ielūdzis :c." + invalid-invite: "&cAtvaino, bet ielūgums vairāk nav derīgs!" accept: + you-joined-island: "&aTu pievienojies komandai! Raksti /[label] team info, + lai redzētu savus komandas biedrus." + name-joined-your-island: "&a[name] pievienojās tavai komandai!" confirmation: |- &cVai tiešām vēlies akceptēt šo ielūgumu? &c&lTava ala tiks iznīcināta! description: akceptēt ielūgumu - name-joined-your-island: "&a[name] pievienojās tavai komandai!" - you-joined-island: "&aTu pievienojies komandai! Raksti /[label] team info, - lai redzētu savus komandas biedrus." + reject: + you-rejected-invite: "&aTu noraidīji ielūgumu pievienoties komandai." + name-rejected-your-invite: "&c[name] noraidīja ielūgumu pievienoties komandai!" + description: noraidīt ielūgumu cancel: description: atcelt nosūtītos ielūgumus - description: uzaicini spēlētāju pievienoties tavai alai - errors: - already-on-team: "&cŠis spēlētājs jau ir tavā komandā!" - cannot-invite-self: "&cTu nevari ielūgt pats sevi!" - cooldown: "&cTu nevari sūtīt ielūgumu šim spēlētājam vēl [number] sekundes" - invalid-invite: "&cAtvaino, bet ielūgums vairāk nav derīgs!" - island-is-full: "&cTava komanda ir pilna, tu vairs nevari ielūgt jaunus - spēlētājus." - none-invited-you: "&cNeviens tevi nav ielūdzis :c." - you-already-are-in-team: "&cTu jau esi komandā!" - invitation-sent: "&aIelūgums nosūtīts [name]" - name-has-invited-you: "&a[name] ielūdza tevi pievienoties viņa komandai." - parameters: "" - reject: - description: noraidīt ielūgumu - name-rejected-your-invite: "&c[name] noraidīja ielūgumu pievienoties komandai!" - you-rejected-invite: "&aTu noraidīji ielūgumu pievienoties komandai." removing-invite: "&cIelūgumu atsauc" + parameters: "" + invitation-sent: "&aIelūgums nosūtīts [name]" + you-can-invite: "&aTu vari ielūgt vēl [number] spēlētājus." to-accept-or-reject: "&aRaksti /[label] team accept, lai pievienotos komandai vai /[label] team reject, lai noraidītu ielūgumu" - you-can-invite: "&aTu vari ielūgt vēl [number] spēlētājus." - you-will-lose-your-island: "&cUZMANĪBU! Tava ala tiks iznīcināta, ja pievienosies - komandai!" - kick: - cannot-kick: "&cTu nevari izmest pats sevi!" - description: izmest spēlētāju no tavas alas - owner-kicked: "&cAlas īpašnieks izmeta tevi no alas!" - parameters: "" - success: "&b[name] &atika izmests no šīs alas." leave: - cannot-leave: "&cĪpašnieks nevar pamest komandu! Nodod salu citam vai izmet - visus no komandas." description: pamest savu komandu left-your-island: "&c[name] &cpameta tavu komandu!" success: "&aTu pameti šo salu." + cannot-leave: "&cĪpašnieks nevar pamest komandu! Nodod salu citam vai izmet + visus no komandas." + kick: + description: izmest spēlētāju no tavas alas + owner-kicked: "&cAlas īpašnieks izmeta tevi no alas!" + success: "&b[name] &atika izmests no šīs alas." + cannot-kick: "&cTu nevari izmest pats sevi!" + parameters: "" + demote: + description: samazina spēlētāja komandas rangu + failure: "&cSpēlētājs jau sasniedzis zemāko rangu!" + success: "&aSpēlētājs [name] tika pazemināts uz [rank]" + parameters: "" + errors: + cant-demote-yourself: "&cTu nevari pazemināt rangu pats sev!" promote: description: paaugstina spēlētāja komandas rangu - failure: "&cSpēlētājs jau sasniedzis augstāko rangu!" parameters: "" success: "&aSpēlētājs [name] tika paaugstināts līdz [rank]" + failure: "&cSpēlētājs jau sasniedzis augstāko rangu!" setowner: description: nodod salu citam komandas spēlētājam errors: + target-is-not-member: "&cŠis spēlētājs nav tavā komandā!" cant-transfer-to-yourself: "&cTu nevari atdot salu sev! &7(&oPēc idejas, tu vari, bet mēs nevēlamies darīt nejēdzīgas lietas.&r&7)" - target-is-not-member: "&cŠis spēlētājs nav tavā komandā!" name-is-the-owner: "&a[name] tagad ir alas īpašnieks!" - parameters: "" you-are-the-owner: "&aTu tagad esi šīs alas īpašnieks!" - trust: - description: uzstādīt spēlētājam uzticams rangu - members-trusted: "&cKomandas biedriem jau ir šis rangs!" parameters: "" - player-already-trusted: "&cSpēlētājam jau ir šis rangs!" - success: "&aUzticamā rangs uzstādīts spēlētājam &b[name]&a." - trust-in-yourself: "&cTu jau sev esi uzticams!" - you-are-trusted: "&2Spēlētājs [name] tev uzticas!" - uncoop: - all-members-logged-off: "&cVisi alas spēlētāji ir izgājuši, tā ka tu vairs - neesi sabiedrotais [name] salā." - cannot-coop-yourself: "&cTu nevari uzlikt sev šo rangu!" - cannot-uncoop-member: "&cTu nevari noņemt šo rangu komandas spēlētājam!" - cannot-uncoop-yourself: "&cTu nevari noņemt sev sabiedrotā rangu!" - description: noņemt spēlētājam sabiedrotā rangu - parameters: "" - player-not-cooped: "&cSpēlētājs nav tavs sabiedrotais!" - success: "&b[name] &avairs nav sabiedrotais uz tavas alas." - you-are-no-longer-a-coop-member: "&cTu vairs neesi sabiedrotais [name] salā." untrust: - cannot-untrust-member: "&cTu nevari noņemt šo rangu komandas spēlētājam!" - cannot-untrust-yourself: "&cTu nevari noņemt sev šo rangu!" - description: noņemt spēlētājam uzticams rangu parameters: "" + cannot-untrust-yourself: "&cTu nevari noņemt sev šo rangu!" player-not-trusted: "&cSpēlētājam nav šis rangs!" + cannot-untrust-member: "&cTu nevari noņemt šo rangu komandas spēlētājam!" success: "&b[name] &avairs nav uzticamais uz tavas alas." + description: noņemt spēlētājam uzticams rangu you-are-no-longer-trusted: "&cSpēlētājs [name] vairs tev neuzticas!" - unban: - cannot-unban-yourself: "&cTu nevari noņemt liegumu pats sev!" - description: noņemt liegumu spēlētājam būt uz tavas alas + description: pārvaldīt savu komandu + info: + description: parādīt detalizētu informāciju par tavu komandu + ban: + description: liegt spēlētājam atrasties uz tavas alas + cannot-ban-more-players: "&cTu esi sasniedzis liegumu skaita limitu. Tu vairs + nevienam neko liegt nevari." + player-banned: "&b[name]&c tika liegts atrasties uz tavas alas." + owner-banned-you: "&b[name]&c tev liedza atrasties uz viņa alas!" + you-are-banned: "&bTev ir liegts atrasties uz šīs alas!" + cannot-ban: "&cTu nevari liegt šim spēlētājam atrasties uz alas." + cannot-ban-member: "&cIzmet spēlētāju no komandas un tikai tad tu varēsi viņam + liegt šeit atrasties." + cannot-ban-yourself: "&cTu nevari liegt atrasties uz alas pats sev!" parameters: "" - player-not-banned: "&cSpēlētājam nav lieguma atrasties uz alas." + player-already-banned: "&cSpēlētājam jau ir liegums atrasties uz alas." + unban: + description: noņemt liegumu spēlētājam būt uz tavas alas player-unbanned: "&b[name]&a ir noņemts liegums būt uz tavas alas." you-are-unbanned: "&b[name]&a noņēma liegumu atrasties uz viņa alas!" - general: - errors: - already-have-island: "&cTev jau ir ala!" - command-cancelled: "&cKomanda atcleta." - general: "&cŠī komanda nav gatava/derīga. Sazinies ar administratoru." - must-be-positive-number: "&c[number] nav derīgs pozitīvs numurs." - no-island: "&cTev nav ala!" - no-permission: "&cTev nav atļaujas rīkoties ar šo komandu (&7[permission]&c)." - no-safe-location-found: "&cNeizdevās atrast drošu vietu teleportācijas uz alas." - no-team: "&cTev nav komandas!" - not-in-team: "&cSpēlētājs nav tavā komandā!" - not-owner: "&cTu neesi šīs alas īpašnieks!" - offline-player: "&cŠis spēlētājs nav tiešsaitē vai neeksistē." - player-has-island: "&cSpēlētājam jau ir ala!" - player-has-no-island: "&cSpēlētājam nav alas!" - unknown-command: "&cNezināma komanda. Izmanto &b/[label] help &clai redzētu - komandas." - unknown-player: "&c[name] ir nezināms spēlētājs!" - use-in-game: "&cŠī komanda ir pieejama tikai spēlē." - wrong-world: "&cTu neatrodies pareizajā pasaulē, lai to darītu!" - you-must-wait: "&cTev ir jāgaida [number]s pirms vari izmantot komandu vēlreiz." - invalid: Nederīgs - success: "&aDarīts!" - tips: - changing-obsidian-to-lava: Pārveido obsidiānu uz lavu. Esi uzmanīgāks! + player-not-banned: "&cSpēlētājam nav lieguma atrasties uz alas." + parameters: "" + cannot-unban-yourself: "&cTu nevari noņemt liegumu pats sev!" + banlist: + noone: "&aSaraksts ir tukšs." + description: saraksts ar spēlētājiem, kam liegts atrasties uz alas + names: "&c[line]" + you-can-ban: "&bTev vēl ir iespēja liegt &e[number] &bspēlētājiem atrasties + uz tavas alas." + the-following: "&bSekojošajiem spēlētājiem ir liegums atrasties uz alas:" + settings: + description: attaino alas iestatījumus + expel: + description: izraida spēlētāju no alas + not-on-island: "&cŠis spēlētājs nav uz tavas alas!" + player-expelled-you: "&b[name]&c izraidīja tevi no alas!" + cannot-expel-yourself: "&cTu nevari izraidīt pats sevi!" + cannot-ban-member: "&cTu nevari izraidīt komandas biedrus!" + parameters: "" + cannot-expel: "&cŠis spēlētājs nevar tikt izraidīts." + success: "&aTu izmeti spēlētāju &b[name] &ano savas alas." + spawn: + description: pārvieto tevi uz sākumu + no-spawn: "&cŠai pasaulei nav sākums." + teleporting: "&aTu tiec pārvietots uz sākumu." + language: + description: valodu izvēle + about: + description: Par šo režīmu + bentobox: + reload: + settings-reloaded: "&2Iestatījumi pārlādēti." + warning: "&cUzmanību: Pārlādēšana var izraisīt nestabilitāti, tādēļ, ja saskarieties + ar problēmām, pārstartējiet serveri." + addon: "&6Pārlādē &b[name]&2." + locales-reloaded: "&2Valodas faili pārlādēti." + description: parlādēt iestatījumus, papildinājumus (ja atbalstīts) un valodas + addon-reloaded: "&b[name] &2pārlādēts." + unknown-addon: "&2Nezināms papildinājums!" + addons-reloaded: "&2Papildinājumu pārlādēti." + migrate: + description: Migrē no vienas datubāzes uz citu + players: "&6Pārceļ spēlētājus" + addons: "&6Pārceļ papildinājumus" + names: "&6Pārceļ vārdus" + migrated: "&aMigrācija pabeigta!" + class: "&6Pārceļ [description]" + version: + game-world: "&2[name] &7(&3[addon]&7): &aOverworld&7, &r[nether_color]Nether&7, + &r[end_color]End" + database: "&2Databāze: &3[database]" + description: parādīt BentoBox un papildinājumu versijas + loaded-addons: 'Ielādētie Papildinājumi:' + loaded-game-worlds: 'Ielādētās spēles pasaules:' + plugin-version: "&2BentoBox versija: &3[version]" + server: "&2Darbojas uz &3[name] [version]&2." + addon-syntax: "&2[name] &3[version] &7(&3[state]&7)" + about: + description: parādīt autortiesības un licenses informāciju + description: BentoBox admina komandas + catalog: + description: parādīt papildinājumu katalogu + manage: + description: parādīt pārvaldīšanas paneli + locale: + description: veikt valodas faila analīzi + see-console: |- + &aPārbaudi izdrukas, lai redzētu trūkstošos tulkojumus. + &aŠī komanda var atgiezt pārāk daudz teksta, lai to rādītu sarakstē... + confirmation: + request-cancelled: "&cApstiprinājuma noilgums - &bpieprasījums apturēts." + previous-request-cancelled: "&6Iepriekšējais apstiprinājumu pieprasījums ir + apturēts." + confirm: "&cIevadi komandu atkārtoti &b[seconds]s&c laikā, lai apstiprinātu." + help: + syntax: "&b[usage] &a[parameters]&7: &e[description]" + parameters: "[command]" + console: Konsole + syntax-no-parameters: "&b[usage]&7: &e[description]" + description: Palīdzības komanda + end: "&7=================================" + header: "&7=========== &c[label] palīdzība &7===========" + delay: + stand-still: "&6Apstājies! Teleportēšana notiks pēc [seconds] sekundēm" + moved-so-command-cancelled: "&cTu pakustējies. Teleportēšana atcelta!" + previous-command-cancelled: "&cIepriekšēja komanda tika atcelta!" + ranks: + owner: Īpašnieks + sub-owner: Apakšīpašnieks + member: Biedrs + trusted: Uzticams + coop: Sabiedrotais + visitor: Apmeklētājs + banned: Aizliegtais + admin: Administrators + mod: Moderators protection: - command-is-banned: Komanda nav atļauta apmeklētājiem flags: - ANIMAL_SPAWN: - description: Pārslēdz radīšanu - name: Dzīvnieku radīšana - ANVIL: - description: Pārslēdz izmantošanu - hint: Laktas lietošana atslēgta - name: Laktas - ARMOR_STAND: - description: Pārslēdz izmantošanu - hint: Bruņu statīva lietošana atslēgta - name: Bruņu statīvi - BEACON: - description: Pārslēdz izmantošanu - hint: Signāluguņa lietošana atslēgta - name: Signāluguņi - BED: - description: Pārslēdz izmantošanu - hint: Gultas lietošana atslēgta - name: Gultas - BOAT: - description: Pārslēdz laivas izmantošanu - hint: Laivu lietošana atslēgta - name: Laivas - BREAK_BLOCKS: - description: Pārslēdz plēšanu - hint: Bloku plēšana atslēgta - name: Bloku plēšana - BREEDING: - description: Pārslēdz vairošanu - hint: Dzīvnieku vairošana ir aizsargāta - name: Dzīvnieku vairošana - BREWING: - description: Pārslēdz izmantošanu - hint: Brūvēšana nav atļauta - name: Brūvēšanas satīvi - BUCKET: - description: Pārslēdz izmantošanu - hint: Spaiņu lietošana nav atļauta - name: Spaiņi - BUTTON: - description: Pārslēdz pogu izmantošanu - hint: Pogu spiešana nav atļauta - name: Pogas - CHEST_DAMAGE: - description: Pārslēdz lāžu bojāšanu no sprādzieniem - name: Lāžu bojāšana - CHORUS_FRUIT: - description: Pārslēdz teleportāciju - hint: Teleportācija nav atļauta - name: Kora augļi - CLEAN_SUPER_FLAT: - description: |- - &aIeslēdz, lai notīrītu - &asuper-plakanos gabalus - &asalu pasaulēs - name: Notīrīt plakanos gabalus - COARSE_DIRT_TILLING: - description: |- - &aPārslēdz rupjās zemes - &aapstrādāšanu un podzola - &asaplēšanu, lai iegūtu - &amelnzemi - hint: Rupjās zemes apstrādāšana nav atļauta - name: Rupjās zemes apstrādāšana - COLLECT_LAVA: - description: |- - &aPārslēdz lavas savākšanu - &a(pārraksta Spaiņu lietošanu) - hint: Lavas savākšana nav atļauta - name: Savākt lavu - COLLECT_WATER: - description: |- - &aPārslēdz ūdens savākšanu - &a(pārraksta Spaiņu lietošanu) - hint: Ūdens savākšana nav atļauta - name: Ūdens savākšana - COMMAND_RANKS: - description: "&aKonfigurēt komandas rangus" - name: "&eKomandas Rangi" - CONTAINER: - description: |- - &aPārslēdz lādes, šulkera kastes, - &apuķupodu atvēršanu. - - &7Citi konteineri tiek apstrādāti - &7ar citiem karogiem. - hint: Konteineru atvēršana nav atļauta - name: Kontaineri - CRAFTING: - description: Pārslēdz izmantošanu - hint: Darbagaldu lietošana nav atļauta - name: Darbagaldi - CREEPER_DAMAGE: - description: Pārslēdz krīpera bojājumus - name: Krīpera bojājumi - CREEPER_GRIEFING: - description: Pārslēdz krīpera postījumus - hint: Krīpera postījumi ir atslēgti - name: Krīpera postījumi - CROP_TRAMPLE: - description: Pārslēdz augu nomīdīšanu - hint: Augu nomīdīšana ir atslēgta - name: Augu nomīdīšana - DISPENSER: - description: Pārslēdz izšāvēju izmantošanu - hint: Izšāvēju lietošana nav atļauta - name: Izšāvēji - DOOR: - description: Pārslēdz durvju izmantošanu - hint: Durvju lietošana nav atļauta - name: Durvju izmantošana - DRAGON_EGG: - description: |- - &aNeatļauj aiztikt pūķa olas. - - &cŠis liedz tās nolikt vai - &csaplēst. - hint: Pūķa olu lietošana nav atļauta - name: Pūķa ola - DROPPER: - description: Pārslēdz izmetēju izmantošanu - hint: Izmetēju lietošana nav atļauta - name: Izmetēji - DYE: - description: Pārslēdz iespēju izmantot krāsas - hint: Krāsu lietošana šeit nav atļauta - name: Krāsu lietošana - EGGS: - description: Pārslēdz olu mētāšanu - hint: Olu mētāšana nav atļauta - name: Olu mētāšana - ELYTRA: - description: Pārslēdz deltaplāna lietošanu - hint: Deltaplāna lietošana nav atļauta - name: Deltaplāns - ENCHANTING: - description: Pārslēdz burvestību galda lietošanu - hint: Burvestību galda lietošana nav atļauta - name: Burvestību galds - ENDER_CHEST: - description: Pārslēdz Ender lāžu veidošanu/lietošanu - hint: Ender lādes ir izslēgtas šaja pasaulē - name: Ender lādes - ENDERMAN_DEATH_DROP: - description: |- - &aEndermeni nometīs jebkuru - &abloku, kuru viņi tur, kad - &atiek nogalināti - name: Endermena nāves nomešana ENDERMAN_GRIEFING: description: |- &aEndermeni var paņemt &ajebkuru bloku uz alas name: Endermena bloku celšana - ENDER_PEARL: - description: Pārslēdz Ender pērļu lietošanu - hint: Ender pērļu lietošana nav atļauta - name: Ender Pērles - END_PORTAL: - description: |- - &aPārslēdz iespēju izmantot - &aBeigu protālu - hint: Beigu portālu lietošana nav atļauta - name: Beigu Portāls ENTER_EXIT_MESSAGES: - description: Attaino ieejas/izejas ziņu island: "[name] ala" - name: Ieejas/Izejas ziņa now-entering: "&bTu ieej [name] salā" + name: Ieejas/Izejas ziņa + description: Attaino ieejas/izejas ziņu now-leaving: "&bTu pamet [name] salu" - EXPERIENCE_BOTTLE_THROWING: - description: Pārslēdz pieredzes pudeļu mešanu - hint: Pieredžu pudeļu mešana nav atļauta - name: Pieredzes pudeļu mešana - EXPERIENCE_PICKUP: - description: |- - &aPārslēdz iespēju savākt - &apieredzes lodītes. - hint: Tu nevari savākt pieredzes lodītes - name: Pieredzes savākšana - FIRE_BURNING: - description: |- - &aPārslēdz vai uguns var - &anodedzināt blokus. - name: Bloku degšana - FIRE_EXTINGUISH: - description: Pārslēdz uguns nodzēšanu - hint: Uguns nodzēšana nav atļauta - name: Uguns nodzēšana - FIRE_IGNITE: - description: |- - &aPārslēdz vai uguns var tikt - &aaizdedzināta no briesmoņiem, - &alavas vai zibens. - name: Uguns aizdegšanās - FIRE_SPREAD: - description: |- - &aPārslēdz vai uguns var - &aizplatīties uz blakusesošajiem - &ablokiem. - name: Uguns izplatīšanās - FISH_SCOOPING: - description: Pārslēdz iespēju zivis iesmelt spaiņos - hint: Zivju iesmelšana nav atļauta - name: Zivju iesmelšana - FLINT_AND_STEEL: - description: |- - &aĻauj spēlētājiem aizdedzināt - &auguni izmantojot karmu un - &adzelzi vai ugunsbumbas. - hint: Karma un dzelzs un ugunsbumbas lietošana nav atļauta - name: Karms un dzelzs - FROST_WALKER: - description: |- - &aPārslēdz iespēju izmantot - &aala staigātāja maģiju. - hint: Ala staigātājs šeit nav atļauts - name: Ala staigātājs - FURNACE: - description: Pārslēdz iespēju lietot krāsnis - hint: Krāsns lietošana nav atļauta - name: Krāsns - GATE: - description: Pārslēdz iespēju lietot vārtus - hint: Vārtu lietošana nav atļauta - name: Vārti GEO_LIMIT_MOBS: description: |- &aNoņemt visas būtnes, kas &apamet alas aizsardzības &alaukumu name: "&eIerobežot būtnes iekš alas" - HOPPER: - description: Pārslēdz piltuvju izmantošanu - hint: Piltuvju lietošana nav atļauta - name: Piltuves - HURT_ANIMALS: - description: Pārslēdz iespēju ievainot dzīvniekus - hint: Dzīvnieku ievainošana nav atļauta - name: Ievainot dzīvniekus - HURT_MONSTERS: - description: Pārslēdz iespēju ievainot briesmoņus - hint: Briesmoņu ievainošana nav atļauta - name: Ievainot briesmoņus - HURT_VILLAGERS: - description: |- - &aPārslēdz iespēju ievainot - &aciemata iedzīvotājus - hint: Ciemata ievainošana ievainošana nav atļauta - name: Ievainot ciematniekus - INVINCIBLE_VISITORS: - description: |- - &aPārslēdz neuzveicamos - &aapmeklētājus - hint: "&cApmeklētāji ir aizsargāti" - name: "&eNeuzveicamie apmeklētāji" ISLAND_RESPAWN: description: |- &aSpēlētāji parādīsies uz alas &apēc nāves name: Parādīšanās uz alas - ITEM_DROP: - description: Pārslēdz priekšmetu nomešanu - hint: Priekšmeti nevar tikt nomesti - name: Priekšmetu nomešana - ITEM_FRAME_DAMAGE: - description: |- - &aPārslēdz iespēju briesmoņiem - &abojāt priekšmeta rāmjus. - name: Priekšmetu rāmju bojāšana - ITEM_FRAME: - description: |- - &aPārslēdz iespēju izmantot - &apriekšmeta rāmjus - hint: Priekšmeta rāmju lietošana nav atļauta - name: Priekšmetu rāmis - ITEM_PICKUP: - description: Pārslēdz priekšmetu pacelšanu - hint: Priekšmeti nevar tikt pacelti - name: Priekšmetu pacelšana - JUKEBOX: - description: Pārslēdz plašu atskaņotāja lietošanu - hint: Plašu atskaņotājus lietot nav atļauts - name: Plašu atskaņotājs - LEAF_DECAY: - description: Pārslēdz dabīgo lapu pūšanu - name: Lapu pūšana - LEASH: - description: Pārslēdz pavadu lietošanu - name: Pavadi - LEVER: - description: Pārslēdz sviras lietošanu - hint: Sviras lietošana nav atļauta - name: Sviras LIQUIDS_FLOWING_OUT: + name: Šķīdumu plūšana ārpus alas description: |- &aPārslēdz iespēju šķīdumiem plūst ārpus &aalas aizsardzības laukumam. @@ -900,33 +646,11 @@ caveblock: &cvarēs tecēt vertikāli, taču tie &cneizplatīsies horizontālā virzienā, &cja novietoti ārpus aizsardzības laukuma. - name: Šķīdumu plūšana ārpus alas LOCK: description: Pārslēdz alas aizslēgšanu name: Aizslēgt salu - MILKING: - description: Pārslēdz iespēju slaukt govis - hint: Govju slaukšana nav atļauta - name: Slaukšana - MINECART: - description: Pārslēdz iespēju lietot vagonus - hint: Vagonu lietošana nav atļauta - name: Vagoni - MONSTER_SPAWN: - description: Pārslēdz briesmoņu rašanos - name: Briesmoņu rašanās - MOUNT_INVENTORY: - description: |- - &aPārslēdz iespēju lietot - &aatvērt uzliekamos - &akonteinerus uz dzīvniekiem - hint: Pieeja uzliekamajiem konteineriem nav atļauta - name: Uzliekamie konteineri - NAME_TAG: - description: Pārslēdz birku lietošanu - hint: Birkas lietošana nav atļauta - name: Birka NATURAL_SPAWNING_OUTSIDE_RANGE: + name: Dabīgā radību rašanās ārpus alas description: |- &aPārslēdz iespēju radībām (dzīvniekiem &aun briesmoņiem) dabīgi rasties ārpus @@ -935,25 +659,6 @@ caveblock: &cŅem vērā, ka tas neapturēs radību &crašanos no radību izsacuējiem vai &cradīšanas olām. - name: Dabīgā radību rašanās ārpus alas - NETHER_PORTAL: - description: |- - &aPārslēdz iespēju izmantot - &aelles protālu - hint: Elles portālu lietošana nav atļauta - name: Elles Portāls - NOTE_BLOCK: - description: Pārslēdz iespēju lietot nošu blokus - hint: Nošu blokus lietot nav atļauts - name: Nošu bloks - OBSIDIAN_SCOOPING: - description: | - &aPārslēdz iespēju ar tukšu spaini - &aiesmelt obsidiānu, pārvēršot to - &aatpakaļ par lavu. - &aAizsargā iesācējus. - &aSamazina sākšanas no jauna. - name: Obsidiāna smelšana OFFLINE_GROWTH: description: |- &aKad ir izslēgts, augi neaugs uz @@ -974,12 +679,124 @@ caveblock: &aĻauj virzulim izstumt &ablokus ārpus alas name: Bloku izbīdīšana - PLACE_BLOCKS: + REMOVE_MOBS: description: |- - &aPārslēdz iespēju novietot blokus + &aNoņemt briesmoņus, kad + &aspēlētājs teleportējas &auz alas. - hint: Bloku likšana nav atļauta - name: Bloku nolikšana + name: Noņemt briesmoņus + TREES_GROWING_OUTSIDE_RANGE: + name: Koku augšana ārpus alas + description: |- + &aPārslēdz iespēju kokiem izaugt pāri alas + &aaizsardzības robežai. + &aŠis ne tikai aizsargās koku izaudzēšanu + &aaiz alas robežas, bet arī lapu un + &astumbru augšanu ārpus alas. + PREVENT_TELEPORT_WHEN_FALLING: + name: Liegt teleportus kritienos + description: |- + &aNeļauj spēlētājam izmantot teleporta + &afunkcionalitāti, kamēr viņš krīt. + hint: "&cTu nevari teleportēties, kamēr krīti." + RIDING: + name: Jāšana uz dzīvniekiem + description: |- + &aPārslēdz iespēju spēlētājiem + &ajāt uz dzīviekiem. + hint: Jāšana uz dzīvniekiem nav atļauta + ENDER_PEARL: + description: Pārslēdz Ender pērļu lietošanu + name: Ender Pērles + hint: Ender pērļu lietošana nav atļauta + FLINT_AND_STEEL: + hint: Karma un dzelzs un ugunsbumbas lietošana nav atļauta + description: |- + &aĻauj spēlētājiem aizdedzināt + &auguni izmantojot karmu un + &adzelzi vai ugunsbumbas. + name: Karms un dzelzs + SHEARING: + name: Cirpšana + description: |- + &aPārslēdz iespēju spēlētājiem + &acirpt aitas vai Mušmires. + hint: Cirpšana nav atļauta + DROPPER: + hint: Izmetēju lietošana nav atļauta + description: Pārslēdz izmetēju izmantošanu + name: Izmetēji + ANIMAL_SPAWN: + name: Dzīvnieku radīšana + description: Pārslēdz radīšanu + BUCKET: + description: Pārslēdz izmantošanu + name: Spaiņi + hint: Spaiņu lietošana nav atļauta + FROST_WALKER: + name: Ala staigātājs + hint: Ala staigātājs šeit nav atļauts + description: |- + &aPārslēdz iespēju izmantot + &aala staigātāja maģiju. + ENDERMAN_DEATH_DROP: + description: |- + &aEndermeni nometīs jebkuru + &abloku, kuru viņi tur, kad + &atiek nogalināti + name: Endermena nāves nomešana + ITEM_FRAME_DAMAGE: + name: Priekšmetu rāmju bojāšana + description: |- + &aPārslēdz iespēju briesmoņiem + &abojāt priekšmeta rāmjus. + CREEPER_GRIEFING: + name: Krīpera postījumi + description: Pārslēdz krīpera postījumus + hint: Krīpera postījumi ir atslēgti + BEACON: + name: Signāluguņi + description: Pārslēdz izmantošanu + hint: Signāluguņa lietošana atslēgta + TURTLE_EGGS: + hint: Bruņurupuča olas nevar tikt saplēstas! + name: Bruņurupuča olas + description: |- + &aPārslēdz iespēju saplēst + &abruņurupuča olas. + CHEST_DAMAGE: + description: Pārslēdz lāžu bojāšanu no sprādzieniem + name: Lāžu bojāšana + MILKING: + name: Slaukšana + hint: Govju slaukšana nav atļauta + description: Pārslēdz iespēju slaukt govis + EGGS: + name: Olu mētāšana + hint: Olu mētāšana nav atļauta + description: Pārslēdz olu mētāšanu + TNT_DAMAGE: + description: |- + &aĻauj Dinamītam un Vagonam + &aar dinamītu saplēst blokus + &aun bojāt radības un objektus. + name: Dinamīta bojājumi + DYE: + description: Pārslēdz iespēju izmantot krāsas + name: Krāsu lietošana + hint: Krāsu lietošana šeit nav atļauta + CONTAINER: + name: Kontaineri + description: |- + &aPārslēdz lādes, šulkera kastes, + &apuķupodu atvēršanu. + + &7Citi konteineri tiek apstrādāti + &7ar citiem karogiem. + hint: Konteineru atvēršana nav atļauta + COMMAND_RANKS: + description: "&aKonfigurēt komandas rangus" + name: "&eKomandas Rangi" POTION_THROWING: description: |- &aPārslēdz iespēju mest dziras. @@ -987,155 +804,327 @@ caveblock: &agan ilgstošās dziras. hint: Bloku mešana nav atļauta name: Dziru mešana - PRESSURE_PLATE: + CREEPER_DAMAGE: + name: Krīpera bojājumi + description: Pārslēdz krīpera bojājumus + FIRE_BURNING: + name: Bloku degšana description: |- - &aPārslēdz iespēju izmantot - &aspiedienu plāksnes - hint: Spiedienu plāksnes lietošana nav atļauta - name: Spiediena plāksne - PREVENT_TELEPORT_WHEN_FALLING: - description: |- - &aNeļauj spēlētājam izmantot teleporta - &afunkcionalitāti, kamēr viņš krīt. - hint: "&cTu nevari teleportēties, kamēr krīti." - name: Liegt teleportus kritienos - PVP_END: - description: |- - &cIeslēgt/Izslēgt spēlētājs - &cpret spēlētāja režīmu (PVP) - &cBeigu pasaulē. - hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Beigu pasaulē" - name: Biegu pasaules PVP - PVP_NETHER: - description: |- - &cIeslēgt/Izslēgt spēlētājs - &cpret spēlētāja režīmu (PVP) - &cEllē. - hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Ellē" - name: Elles PVP - PVP_OVERWORLD: - active: "&cSpēlētāji var viens otram izdarīt bojājumus uz šīs alas!" - description: |- - &cIeslēgt/Izslēgt spēlētājs - &cpret spēlētāja režīmu (PVP) - &cVirszemē. - hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Virszemē" - name: Virszemes PVP - REDSTONE: - description: |- - &aPārslēdz iespēju izmantot - &asarkanakmens lietas - hint: Sarkanakmens lietas nav atļauts lietot - name: Sarkanakmens lietas - REMOVE_END_EXIT_ISLAND: - description: |- - &aAptur Beigu portāla ģenerēšanu - &auz alas, kas atrodas 0,0 - &akoordinātēs - name: Beigu izejas protāls - REMOVE_MOBS: - description: |- - &aNoņemt briesmoņus, kad - &aspēlētājs teleportējas - &auz alas. - name: Noņemt briesmoņus - RIDING: - description: |- - &aPārslēdz iespēju spēlētājiem - &ajāt uz dzīviekiem. - hint: Jāšana uz dzīvniekiem nav atļauta - name: Jāšana uz dzīvniekiem - SHEARING: - description: |- - &aPārslēdz iespēju spēlētājiem - &acirpt aitas vai Mušmires. - hint: Cirpšana nav atļauta - name: Cirpšana - SPAWN_EGGS: - description: |- - &aPārslēdz iespēju mest - &aradīšanas olas. - hint: Radīšanas olu mešana nav atļauta - name: Radīšanas olas - TNT_DAMAGE: - description: |- - &aĻauj Dinamītam un Vagonam - &aar dinamītu saplēst blokus - &aun bojāt radības un objektus. - name: Dinamīta bojājumi - TNT: - description: Pārslēdz Dinamīta bojājumus - name: Dinamīta bojājumi - TNT_PRIMING: - description: |- - &aNeļauj aizdedzināt dinamītu. - &aŠī opcija nepārraksta Karma - &aun Dzelzs lietošanas opcijas. - hint: Aizdedzināt dinamītu nav atļauts - name: Dinamīta aizdedzināšana - TRADING: - description: |- - &aPārslēdz iespēju tirogties - &aar ciemata iedzīvotājiem. - hint: Tirgošanās ar ciemata iedzīvotājiem nav atļauta - name: Tirgošanās - TRAPDOOR: - description: |- - &aPārslēdz iespēju izmantot - &alūkas. - hint: Lūku lietošana nav atļauta - name: Lūka - TREES_GROWING_OUTSIDE_RANGE: - description: |- - &aPārslēdz iespēju kokiem izaugt pāri alas - &aaizsardzības robežai. - &aŠis ne tikai aizsargās koku izaudzēšanu - &aaiz alas robežas, bet arī lapu un - &astumbru augšanu ārpus alas. - name: Koku augšana ārpus alas - TURTLE_EGGS: - description: |- - &aPārslēdz iespēju saplēst - &abruņurupuča olas. - hint: Bruņurupuča olas nevar tikt saplēstas! - name: Bruņurupuča olas + &aPārslēdz vai uguns var + &anodedzināt blokus. WITHER_DAMAGE: description: |- &aĻauj katlem saplēst blokus &aun bojāt radības. name: Pārslēgt + LEVER: + hint: Sviras lietošana nav atļauta + description: Pārslēdz sviras lietošanu + name: Sviras + BOAT: + name: Laivas + hint: Laivu lietošana atslēgta + description: Pārslēdz laivas izmantošanu + CROP_TRAMPLE: + name: Augu nomīdīšana + description: Pārslēdz augu nomīdīšanu + hint: Augu nomīdīšana ir atslēgta + FIRE_IGNITE: + name: Uguns aizdegšanās + description: |- + &aPārslēdz vai uguns var tikt + &aaizdedzināta no briesmoņiem, + &alavas vai zibens. + COARSE_DIRT_TILLING: + name: Rupjās zemes apstrādāšana + description: |- + &aPārslēdz rupjās zemes + &aapstrādāšanu un podzola + &asaplēšanu, lai iegūtu + &amelnzemi + hint: Rupjās zemes apstrādāšana nav atļauta + DOOR: + name: Durvju izmantošana + description: Pārslēdz durvju izmantošanu + hint: Durvju lietošana nav atļauta + NAME_TAG: + hint: Birkas lietošana nav atļauta + name: Birka + description: Pārslēdz birku lietošanu + PRESSURE_PLATE: + hint: Spiedienu plāksnes lietošana nav atļauta + description: |- + &aPārslēdz iespēju izmantot + &aspiedienu plāksnes + name: Spiediena plāksne + TNT_PRIMING: + hint: Aizdedzināt dinamītu nav atļauts + description: |- + &aNeļauj aizdedzināt dinamītu. + &aŠī opcija nepārraksta Karma + &aun Dzelzs lietošanas opcijas. + name: Dinamīta aizdedzināšana + TNT: + description: Pārslēdz Dinamīta bojājumus + name: Dinamīta bojājumi + HOPPER: + description: Pārslēdz piltuvju izmantošanu + name: Piltuves + hint: Piltuvju lietošana nav atļauta + INVINCIBLE_VISITORS: + hint: "&cApmeklētāji ir aizsargāti" + name: "&eNeuzveicamie apmeklētāji" + description: |- + &aPārslēdz neuzveicamos + &aapmeklētājus + END_PORTAL: + name: Beigu Portāls + hint: Beigu portālu lietošana nav atļauta + description: |- + &aPārslēdz iespēju izmantot + &aBeigu protālu + FURNACE: + hint: Krāsns lietošana nav atļauta + name: Krāsns + description: Pārslēdz iespēju lietot krāsnis + PVP_OVERWORLD: + name: Virszemes PVP + active: "&cSpēlētāji var viens otram izdarīt bojājumus uz šīs alas!" + hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Virszemē" + description: |- + &cIeslēgt/Izslēgt spēlētājs + &cpret spēlētāja režīmu (PVP) + &cVirszemē. + BED: + description: Pārslēdz izmantošanu + hint: Gultas lietošana atslēgta + name: Gultas + REDSTONE: + description: |- + &aPārslēdz iespēju izmantot + &asarkanakmens lietas + name: Sarkanakmens lietas + hint: Sarkanakmens lietas nav atļauts lietot + COLLECT_WATER: + name: Ūdens savākšana + hint: Ūdens savākšana nav atļauta + description: |- + &aPārslēdz ūdens savākšanu + &a(pārraksta Spaiņu lietošanu) + JUKEBOX: + hint: Plašu atskaņotājus lietot nav atļauts + name: Plašu atskaņotājs + description: Pārslēdz plašu atskaņotāja lietošanu + FISH_SCOOPING: + description: Pārslēdz iespēju zivis iesmelt spaiņos + hint: Zivju iesmelšana nav atļauta + name: Zivju iesmelšana + FIRE_EXTINGUISH: + hint: Uguns nodzēšana nav atļauta + name: Uguns nodzēšana + description: Pārslēdz uguns nodzēšanu + NETHER_PORTAL: + hint: Elles portālu lietošana nav atļauta + description: |- + &aPārslēdz iespēju izmantot + &aelles protālu + name: Elles Portāls + ELYTRA: + name: Deltaplāns + hint: Deltaplāna lietošana nav atļauta + description: Pārslēdz deltaplāna lietošanu + HURT_ANIMALS: + description: Pārslēdz iespēju ievainot dzīvniekus + hint: Dzīvnieku ievainošana nav atļauta + name: Ievainot dzīvniekus + SPAWN_EGGS: + name: Radīšanas olas + description: |- + &aPārslēdz iespēju mest + &aradīšanas olas. + hint: Radīšanas olu mešana nav atļauta + ENDER_CHEST: + description: Pārslēdz Ender lāžu veidošanu/lietošanu + name: Ender lādes + hint: Ender lādes ir izslēgtas šaja pasaulē + ITEM_DROP: + hint: Priekšmeti nevar tikt nomesti + description: Pārslēdz priekšmetu nomešanu + name: Priekšmetu nomešana + ITEM_PICKUP: + description: Pārslēdz priekšmetu pacelšanu + name: Priekšmetu pacelšana + hint: Priekšmeti nevar tikt pacelti + CRAFTING: + description: Pārslēdz izmantošanu + hint: Darbagaldu lietošana nav atļauta + name: Darbagaldi + BREEDING: + name: Dzīvnieku vairošana + description: Pārslēdz vairošanu + hint: Dzīvnieku vairošana ir aizsargāta + GATE: + name: Vārti + hint: Vārtu lietošana nav atļauta + description: Pārslēdz iespēju lietot vārtus + MOUNT_INVENTORY: + description: |- + &aPārslēdz iespēju lietot + &aatvērt uzliekamos + &akonteinerus uz dzīvniekiem + name: Uzliekamie konteineri + hint: Pieeja uzliekamajiem konteineriem nav atļauta + HURT_VILLAGERS: + name: Ievainot ciematniekus + hint: Ciemata ievainošana ievainošana nav atļauta + description: |- + &aPārslēdz iespēju ievainot + &aciemata iedzīvotājus + MINECART: + hint: Vagonu lietošana nav atļauta + description: Pārslēdz iespēju lietot vagonus + name: Vagoni + COLLECT_LAVA: + hint: Lavas savākšana nav atļauta + description: |- + &aPārslēdz lavas savākšanu + &a(pārraksta Spaiņu lietošanu) + name: Savākt lavu + DRAGON_EGG: + name: Pūķa ola + description: |- + &aNeatļauj aiztikt pūķa olas. + + &cŠis liedz tās nolikt vai + &csaplēst. + hint: Pūķa olu lietošana nav atļauta + TRADING: + name: Tirgošanās + description: |- + &aPārslēdz iespēju tirogties + &aar ciemata iedzīvotājiem. + hint: Tirgošanās ar ciemata iedzīvotājiem nav atļauta + CLEAN_SUPER_FLAT: + name: Notīrīt plakanos gabalus + description: |- + &aIeslēdz, lai notīrītu + &asuper-plakanos gabalus + &asalu pasaulēs + DISPENSER: + hint: Izšāvēju lietošana nav atļauta + name: Izšāvēji + description: Pārslēdz izšāvēju izmantošanu + ANVIL: + name: Laktas + hint: Laktas lietošana atslēgta + description: Pārslēdz izmantošanu + MONSTER_SPAWN: + name: Briesmoņu rašanās + description: Pārslēdz briesmoņu rašanos + BUTTON: + description: Pārslēdz pogu izmantošanu + hint: Pogu spiešana nav atļauta + name: Pogas + EXPERIENCE_BOTTLE_THROWING: + hint: Pieredžu pudeļu mešana nav atļauta + description: Pārslēdz pieredzes pudeļu mešanu + name: Pieredzes pudeļu mešana + CHORUS_FRUIT: + hint: Teleportācija nav atļauta + description: Pārslēdz teleportāciju + name: Kora augļi + FIRE_SPREAD: + description: |- + &aPārslēdz vai uguns var + &aizplatīties uz blakusesošajiem + &ablokiem. + name: Uguns izplatīšanās + PVP_NETHER: + description: |- + &cIeslēgt/Izslēgt spēlētājs + &cpret spēlētāja režīmu (PVP) + &cEllē. + name: Elles PVP + hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Ellē" + REMOVE_END_EXIT_ISLAND: + name: Beigu izejas protāls + description: |- + &aAptur Beigu portāla ģenerēšanu + &auz alas, kas atrodas 0,0 + &akoordinātēs + TRAPDOOR: + name: Lūka + description: |- + &aPārslēdz iespēju izmantot + &alūkas. + hint: Lūku lietošana nav atļauta + LEASH: + description: Pārslēdz pavadu lietošanu + name: Pavadi + PVP_END: + description: |- + &cIeslēgt/Izslēgt spēlētājs + &cpret spēlētāja režīmu (PVP) + &cBeigu pasaulē. + name: Biegu pasaules PVP + hint: "&cSpēlētājs nevar izdarīt bojājumus citam spēlētājam Beigu pasaulē" + EXPERIENCE_PICKUP: + name: Pieredzes savākšana + description: |- + &aPārslēdz iespēju savākt + &apieredzes lodītes. + hint: Tu nevari savākt pieredzes lodītes + OBSIDIAN_SCOOPING: + name: Obsidiāna smelšana + description: | + &aPārslēdz iespēju ar tukšu spaini + &aiesmelt obsidiānu, pārvēršot to + &aatpakaļ par lavu. + &aAizsargā iesācējus. + &aSamazina sākšanas no jauna. + ARMOR_STAND: + name: Bruņu statīvi + hint: Bruņu statīva lietošana atslēgta + description: Pārslēdz izmantošanu + BREAK_BLOCKS: + description: Pārslēdz plēšanu + name: Bloku plēšana + hint: Bloku plēšana atslēgta + ITEM_FRAME: + description: |- + &aPārslēdz iespēju izmantot + &apriekšmeta rāmjus + hint: Priekšmeta rāmju lietošana nav atļauta + name: Priekšmetu rāmis + BREWING: + name: Brūvēšanas satīvi + hint: Brūvēšana nav atļauta + description: Pārslēdz izmantošanu + PLACE_BLOCKS: + hint: Bloku likšana nav atļauta + name: Bloku nolikšana + description: |- + &aPārslēdz iespēju novietot blokus + &auz alas. + ENCHANTING: + description: Pārslēdz burvestību galda lietošanu + hint: Burvestību galda lietošana nav atļauta + name: Burvestību galds + HURT_MONSTERS: + name: Ievainot briesmoņus + description: Pārslēdz iespēju ievainot briesmoņus + hint: Briesmoņu ievainošana nav atļauta + NOTE_BLOCK: + description: Pārslēdz iespēju lietot nošu blokus + hint: Nošu blokus lietot nav atļauts + name: Nošu bloks + LEAF_DECAY: + name: Lapu pūšana + description: Pārslēdz dabīgo lapu pūšanu locked: "&cŠī ala ir slēgta!" + protected: "&cAla ir aizsargāta: [description]" + spawn-protected: "&cSākuma ala ir aizsargāta: [description]" panel: - flag-item: - allowed-rank: "&3- &a" - blocked-rank: "&3- &c" - description-layout: | - &a[description] - - &7Atļauts priekš: - menu-layout: "&a[description]" - minimal-rank: "&3- &2" - name-layout: "&a[name]" - setting-active: "&aAktīvs" - setting-cooldown: "&cIestatījumu maiņa ir ierobežota." - setting-disabled: "&cIzslēgts" - setting-layout: | - &a[description] - - &7Šībrīža iestatījumi: [setting] - mode: - advanced: - description: "&aSatur saprātīga daudzuma iestatījumus." - name: "&6Advancētie iestatījumi" - basic: - description: "&aSatur biežāk lietotos iestatījumus." - name: "&aBāzes iestatījumi" - click-to-switch: "&eUzspied&a, lai pārslēgtos uz &r[next]&r&a." - expert: - description: "&aSatur visus iestatījumus." - name: "&cEksperta iestatījumi" - next: Nākošā Lapa - previous: Iepriekšējā Lapa PROTECTION: description: |- &aAizsardzības iestatījumi @@ -1146,37 +1135,48 @@ caveblock: &aĢenerālie iestatījumi &apriekš šīs alas title: "&6Iestatījumi" + flag-item: + allowed-rank: "&3- &a" + setting-active: "&aAktīvs" + description-layout: | + &a[description] + + &7Atļauts priekš: + setting-layout: | + &a[description] + + &7Šībrīža iestatījumi: [setting] + name-layout: "&a[name]" + minimal-rank: "&3- &2" + menu-layout: "&a[description]" + setting-disabled: "&cIzslēgts" + blocked-rank: "&3- &c" + setting-cooldown: "&cIestatījumu maiņa ir ierobežota." + WORLD_SETTING: + title: "&b[world_name] &6Iestatījumi" + description: "&aSpēles režīma iestatījumi" + mode: + click-to-switch: "&eUzspied&a, lai pārslēgtos uz &r[next]&r&a." + basic: + name: "&aBāzes iestatījumi" + description: "&aSatur biežāk lietotos iestatījumus." + expert: + description: "&aSatur visus iestatījumus." + name: "&cEksperta iestatījumi" + advanced: + name: "&6Advancētie iestatījumi" + description: "&aSatur saprātīga daudzuma iestatījumus." WORLD_DEFAULTS: description: | &aAizsardzības iestatījumi kuri ir &aaktīvi, ja spēlētājs ir ārpus &asavas alas title: "&b[world_name] &6Pasaules aizsardzība" - WORLD_SETTING: - description: "&aSpēles režīma iestatījumi" - title: "&b[world_name] &6Iestatījumi" - protected: "&cAla ir aizsargāta: [description]" - spawn-protected: "&cSākuma ala ir aizsargāta: [description]" + next: Nākošā Lapa + previous: Iepriekšējā Lapa + command-is-banned: Komanda nav atļauta apmeklētājiem world-protected: "&cPasaule aizsargāta: [description]" - ranks: - admin: Administrators - banned: Aizliegtais - coop: Sabiedrotais - member: Biedrs - mod: Moderators - owner: Īpašnieks - sub-owner: Apakšīpašnieks - trusted: Uzticams - visitor: Apmeklētājs - sign: - line0: "&cCaveBlock" - line1: Sveicināts! - line2: "[name]" - line3: Sāc rakt! &c<3 - informational: - to-nether: Tik neveiksmīgi iekrist ellē. - to-the-end: Tu esi sasniedzis beigas. - to-normal: Atpakaļ uz savu alu. + cave-limit-reached: "&cEsi sasniedzis savas alas grieztus! Augstāk tikt nav iespējams." protection: flags: SKY_WALKER_FLAG: @@ -1184,5 +1184,5 @@ protection: &5&oĻauj pārslēgt iespēju &5&ostaigāt pa kartes griestiem &5&obez papildus atļaujām. - hint: Ļauj staigāt pa kartes jumtu. name: Jumta staigātājs + hint: Ļauj staigāt pa kartes jumtu. From 486e95c3166331ed07553bf672b698bec83b489e Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 28 Jan 2022 12:27:01 +0200 Subject: [PATCH 30/33] Return missing error message. Somehow the error message was lost when added more "island" to "cave" replacements. Reported in Discord. --- src/main/resources/locales/en-US.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/locales/en-US.yml b/src/main/resources/locales/en-US.yml index b4cd412..b9eb138 100644 --- a/src/main/resources/locales/en-US.yml +++ b/src/main/resources/locales/en-US.yml @@ -24,6 +24,7 @@ caveblock: already-have-island: "&cYou already have a cave!" no-safe-location-found: "&cCould not find a safe spot to teleport you to on the cave." not-owner: "&cYou are not the owner of your cave!" + cave-limit-reached: "&c You have reached the top of your cave. You cannot get higher!" commands: # Parameters in <> are required, parameters in [] are optional admin: @@ -291,4 +292,4 @@ protection: SKY_WALKER_FLAG: description: "&5&oEnable/disable\n&5&o the ability to walk on\n&5&o the top of the cave world\n&5&o without extra permissions." name: "Sky Walker" - hint: "Allows to walk on the cave roof." \ No newline at end of file + hint: "Allows to walk on the cave roof." From 7caa688aa0d2f36e68cb39fbc1225ead369f98f3 Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 28 Jan 2022 12:28:39 +0200 Subject: [PATCH 31/33] Fixes incorrect error message path. There were 2 different error message paths to the same text. Reported in Discord. --- .../bentobox/caveblock/listeners/CustomHeightLimitations.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java b/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java index b26e14b..c9d60b3 100644 --- a/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java +++ b/src/main/java/world/bentobox/caveblock/listeners/CustomHeightLimitations.java @@ -53,7 +53,7 @@ public class CustomHeightLimitations implements Listener // Prevent to get over world height if (nextY >= this.worldHeight) { - User.getInstance(player).sendMessage("caveblock.cave-limit-reached"); + User.getInstance(player).sendMessage("caveblock.general.errors.cave-limit-reached"); event.setCancelled(true); } } From 18e4694129c2d289f4c14c92e976c4462962ba31 Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 28 Jan 2022 12:52:08 +0200 Subject: [PATCH 32/33] Add spigot-plugin-annotations dependency. --- pom.xml | 8 +++++++- .../java/world/bentobox/caveblock/CaveBlockPladdon.java | 8 ++++++++ src/main/resources/plugin.yml | 8 -------- 3 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 src/main/resources/plugin.yml diff --git a/pom.xml b/pom.xml index 2fbdf8b..a5f3780 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 16 1.18.1-R0.1-SNAPSHOT - 1.18.0-SNAPSHOT + 1.19.0 ${build.version}-SNAPSHOT @@ -114,6 +114,12 @@ ${spigot.version} provided + + org.spigotmc + plugin-annotations + 1.2.3-SNAPSHOT + provided + world.bentobox bentobox diff --git a/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java index 6408f9c..a340bf3 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java @@ -1,8 +1,16 @@ package world.bentobox.caveblock; +import org.bukkit.plugin.java.annotation.dependency.Dependency; +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 = "Pladdon", version = "1.0") +@ApiVersion(ApiVersion.Target.v1_18) +@Dependency(value = "BentoBox") public class CaveBlockPladdon extends Pladdon { @Override diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 51cf0ff..0000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: Pladdon -main: world.bentobox.caveblock.CaveBlockPladdon -version: ${version} -api-version: 1.17 -description: A CaveBlock Plugin -author: tastybento -depend: - - BentoBox From 7bbcd40df2429739a51496d861d9d203b67d2bee Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 28 Jan 2022 12:53:49 +0200 Subject: [PATCH 33/33] Set default biome to "DRIPSTONE_CAVES" caves in overworld. Change default biome detection with Enums#getIfPresent and use THE_VOID as default biome if presented value does not exist. --- src/main/java/world/bentobox/caveblock/CaveBlock.java | 2 -- src/main/java/world/bentobox/caveblock/Settings.java | 6 +++--- src/main/resources/addon.yml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlock.java b/src/main/java/world/bentobox/caveblock/CaveBlock.java index 452510b..bd5a261 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlock.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlock.java @@ -314,6 +314,4 @@ public class CaveBlock extends GameModeAddon * String for the end world. */ private static final String THE_END = "_the_end"; - - } diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index e37d556..5d7e9ee 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -2187,7 +2187,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the overworld") @ConfigEntry(path = "world.default-biome") - private Biome defaultBiome = Biome.PLAINS; + private Biome defaultBiome = Enums.getIfPresent(Biome.class, "DRIPSTONE_CAVES").or(Biome.THE_VOID); @ConfigComment("The maximum number of players a player can ban at any one time in this game mode.") @ConfigComment("The permission caveblock.ban.maxlimit.X where X is a number can also be used per player") @@ -2251,7 +2251,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)") @ConfigEntry(path = "world.nether.biome", since = "1.14.0") - private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER").or(Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.BADLANDS)); + private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.THE_VOID); @ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn") @ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)") @@ -2299,7 +2299,7 @@ public class Settings implements WorldSettings @ConfigComment("The default biome for the end world (this may affect what mobs can spawn)") @ConfigEntry(path = "world.end.biome", since = "1.14.0") - private Biome defaultTheEndBiome = Biome.THE_END; + private Biome defaultTheEndBiome = Enums.getIfPresent(Biome.class, "THE_END").or(Biome.THE_VOID); @ConfigEntry(path = "world.end.dragon-spawn", experimental = true) private boolean dragonSpawn = false; diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 0efbc91..13f8edf 100644 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: CaveBlock main: world.bentobox.caveblock.CaveBlock version: ${version}${build.number} -api-version: 1.13.0 +api-version: 1.19.0 metrics: true repository: "BentoBoxWorld/CaveBlock" icon: "STONE_PICKAXE"