mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2024-11-27 12:25:44 +01:00
commit
bde6c494b1
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -11,21 +11,22 @@ jobs:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: 17
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
|
46
README.md
46
README.md
@ -3,14 +3,54 @@
|
||||
[![Discord](https://img.shields.io/discord/272499714048524288.svg?logo=discord)](https://discord.bentobox.world)
|
||||
[![Build Status](https://ci.codemc.org/buildStatus/icon?job=BentoBoxWorld/CaveBlock)](https://ci.codemc.org/job/BentoBoxWorld/job/CaveBlock/)
|
||||
|
||||
CaveBlock is an addon for BentoBox, so to run CaveBlock, you must have BentoBox installed. It is not a Bukkit plugin and trying to use it as one will not work.
|
||||
# Welcome to CaveBlock for BentoBox!
|
||||
|
||||
## Translation
|
||||
🌌 **Embark on a Subterranean Adventure!**
|
||||
|
||||
CaveBlock is an enthralling GameMode addon for BentoBox, designed to take your Minecraft experience to new depths. In this unique underground world, every adventure, challenge, and mystery lies beneath the surface.
|
||||
|
||||
<img src=https://github.com/BentoBoxWorld/CaveBlock/assets/4407265/af407f94-1943-4e27-96e1-d3e2ed33330f width="400">
|
||||
|
||||
## What is CaveBlock?
|
||||
|
||||
CaveBlock transforms the familiar Minecraft landscape into a vast underground realm. As a player, you begin your journey in a modest cave, equipped with only essential items. Your mission is to mine, explore, and expand your subterranean domain.
|
||||
|
||||
### Key Features:
|
||||
|
||||
- **Start Small, Dream Big:** Begin in a small cave and use your mining skills to expand your territory.
|
||||
- **Treasure Hunting:** Delve deeper to discover hidden treasures and rare resources.
|
||||
- **Beware of the Dark:** Monsters lurk in the shadows. Prepare for encounters with creatures of the deep.
|
||||
- **Build and Craft:** Utilize your resources to craft tools, build structures, and create your own underground empire.
|
||||
|
||||
## Getting Started with CaveBlock
|
||||
|
||||
CaveBlock is an addon for BentoBox, a Bukkit plugin for Minecraft. To dive into this underground adventure, you'll need to have BentoBox installed on your Minecraft server.
|
||||
|
||||
### Installation:
|
||||
|
||||
1. **Install BentoBox:** Make sure BentoBox is installed and running on your server.
|
||||
2. **Download CaveBlock:** Get the CaveBlock addon from the [official download site](https://download.bentobox.world). Or download from the releases in this repo.
|
||||
3. **Add to BentoBox:** Place the CaveBlock file in your BentoBox addons folder.
|
||||
4. **Restart Your Server:** Once installed, restart your server to activate CaveBlock.
|
||||
|
||||
### Dive Into the Depths!
|
||||
|
||||
Are you ready to explore the unknown and carve out your own piece of the underground world? Download CaveBlock now and start your subterranean adventure!
|
||||
|
||||
🔍 **Stay Updated:** For the latest updates, follow our [Discord](https://discord.gg/tqQbNA5X9A).
|
||||
|
||||
---
|
||||
|
||||
*Note: CaveBlock is constantly being updated with new features and improvements. Keep an eye on our release notes for the latest enhancements.*
|
||||
|
||||
**Happy Mining!** 🌐🛠️👾
|
||||
|
||||
## Translations
|
||||
|
||||
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
|
||||
## Full Installation Instructions
|
||||
|
||||
0. Install BentoBox and run it on the server at least once to create its data folders.
|
||||
1. Place this jar in the addons folder of the BentoBox plugin.
|
||||
|
8
pom.xml
8
pom.xml
@ -45,12 +45,12 @@
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>17</java.version>
|
||||
<!-- More visible way how to change dependency versions -->
|
||||
<spigot.version>1.19.4-R0.1-SNAPSHOT</spigot.version>
|
||||
<bentobox.version>1.23.0</bentobox.version>
|
||||
<spigot.version>1.20.2-R0.1-SNAPSHOT</spigot.version>
|
||||
<bentobox.version>2.5.0-SNAPSHOT</bentobox.version>
|
||||
<!-- Revision variable removes warning about dynamic version -->
|
||||
<revision>${build.version}-SNAPSHOT</revision>
|
||||
<!-- This allows to change between versions and snapshots. -->
|
||||
<build.version>1.18.0</build.version>
|
||||
<build.version>1.19.0</build.version>
|
||||
<build.number>-LOCAL</build.number>
|
||||
<sonar.organization>bentobox-world</sonar.organization>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
@ -229,7 +229,7 @@
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.3</version>
|
||||
<version>0.8.10</version>
|
||||
<configuration>
|
||||
<append>true</append>
|
||||
<excludes>
|
||||
|
@ -7,8 +7,13 @@ import world.bentobox.bentobox.api.addons.Pladdon;
|
||||
|
||||
public class CaveBlockPladdon extends Pladdon {
|
||||
|
||||
private Addon addon;
|
||||
|
||||
@Override
|
||||
public Addon getAddon() {
|
||||
return new CaveBlock();
|
||||
if (addon == null) {
|
||||
addon = new CaveBlock();
|
||||
}
|
||||
return addon;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,22 @@
|
||||
package world.bentobox.caveblock.generators.populators;
|
||||
|
||||
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.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.*;
|
||||
|
||||
/**
|
||||
* @author tastybento
|
||||
*/
|
||||
@ -75,6 +81,11 @@ public class NewMaterialPopulator extends BlockPopulator {
|
||||
|
||||
private final int worldDepth;
|
||||
|
||||
/**
|
||||
* @param worldDepth - Depth. If depth is set smaller than the world height,
|
||||
* then the area above will be empty. Should not be less than
|
||||
* cave height.
|
||||
*/
|
||||
public NewMaterialPopulator(int worldDepth) {
|
||||
this.worldDepth = worldDepth;
|
||||
}
|
||||
@ -82,7 +93,7 @@ public class NewMaterialPopulator extends BlockPopulator {
|
||||
@Override
|
||||
public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) {
|
||||
final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.worldDepth);
|
||||
for (int y = worldInfo.getMinHeight(); y < worldHeight - 1; y++) {
|
||||
for (int y = worldInfo.getMinHeight() + 1; 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);
|
||||
@ -94,11 +105,13 @@ public class NewMaterialPopulator extends BlockPopulator {
|
||||
}
|
||||
}
|
||||
|
||||
private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion, int y, Ore o) {
|
||||
private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion,
|
||||
int y, Ore o) {
|
||||
int offset = random.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(worldInfo.getMinHeight(), y - BLOB_SIZE); yy < Math.min(worldInfo.getMaxHeight(), y + BLOB_SIZE); yy++) {
|
||||
for (int yy = Math.max(worldInfo.getMinHeight() + 1, y - BLOB_SIZE); yy < Math
|
||||
.min(worldInfo.getMaxHeight() - 1, y + BLOB_SIZE); yy++) {
|
||||
Location location = Utils.getLocationFromChunkLocation(x, yy, z, chunkX, chunkZ);
|
||||
if (!limitedRegion.isInRegion(location)) {
|
||||
continue;
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: CaveBlock
|
||||
main: world.bentobox.caveblock.CaveBlock
|
||||
version: ${version}${build.number}
|
||||
api-version: 1.23.0
|
||||
api-version: 2.5.0
|
||||
metrics: true
|
||||
repository: "BentoBoxWorld/CaveBlock"
|
||||
icon: "STONE_PICKAXE"
|
||||
|
@ -1,4 +1,4 @@
|
||||
# CaveBlock Configuration 1.15.0-SNAPSHOT-LOCAL
|
||||
# CaveBlock Configuration ${version}
|
||||
caveblock:
|
||||
command:
|
||||
# Cave Command. What command users will run to access their cave.
|
||||
@ -72,6 +72,11 @@ world:
|
||||
# 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
|
||||
# The number of concurrent caves a player can have
|
||||
# A value of 0 will use the BentoBox config.yml default
|
||||
concurrent-caves: 0
|
||||
# Disallow team members from having their own caves.
|
||||
disallow-team-member-caves: true
|
||||
# The default game mode for this world. Players will be set to this mode when they create
|
||||
# a new cave for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
|
||||
default-game-mode: SURVIVAL
|
||||
@ -241,9 +246,9 @@ world:
|
||||
create-obsidian-platform: false
|
||||
# Mob white list - these mobs will NOT be removed when logging in or doing /cave
|
||||
remove-mobs-whitelist:
|
||||
- ZOMBIE_VILLAGER
|
||||
- WITHER
|
||||
- ENDERMAN
|
||||
- ZOMBIE_VILLAGER
|
||||
# World flags. These are boolean settings for various flags for this world
|
||||
flags:
|
||||
CREEPER_DAMAGE: true
|
||||
@ -278,88 +283,9 @@ world:
|
||||
# MEMBER = 500
|
||||
# SUB-OWNER = 900
|
||||
# OWNER = 1000
|
||||
default-cave-flags:
|
||||
HURT_ANIMALS: 500
|
||||
DRAGON_EGG: 500
|
||||
REDSTONE: 500
|
||||
BUCKET: 500
|
||||
LOCK: 0
|
||||
ENDER_PEARL: 500
|
||||
DOOR: 500
|
||||
BREAK_HOPPERS: 500
|
||||
FURNACE: 500
|
||||
ANVIL: 500
|
||||
MINECART: 500
|
||||
FISH_SCOOPING: 500
|
||||
END_PORTAL: 500
|
||||
BREEDING: 500
|
||||
HURT_VILLAGERS: 500
|
||||
FROST_WALKER: 500
|
||||
TURTLE_EGGS: 500
|
||||
COLLECT_LAVA: 500
|
||||
BREAK_SPAWNERS: 500
|
||||
LEVER: 500
|
||||
ELYTRA: 0
|
||||
CAKE: 500
|
||||
RIDING: 500
|
||||
HURT_MONSTERS: 0
|
||||
NAME_TAG: 500
|
||||
ARMOR_STAND: 500
|
||||
TRADING: 0
|
||||
EGGS: 500
|
||||
ITEM_DROP: 0
|
||||
NOTE_BLOCK: 0
|
||||
FLINT_AND_STEEL: 500
|
||||
NETHER_PORTAL: 500
|
||||
LECTERN: 500
|
||||
CROP_TRAMPLE: 500
|
||||
ITEM_PICKUP: 0
|
||||
BREWING: 500
|
||||
DROPPER: 500
|
||||
TNT_PRIMING: 500
|
||||
COLLECT_WATER: 500
|
||||
BUTTON: 500
|
||||
FIRE_EXTINGUISH: 500
|
||||
COMMAND_RANKS: 500
|
||||
BEACON: 500
|
||||
TRAPDOOR: 500
|
||||
PRESSURE_PLATE: 0
|
||||
EXPERIENCE_BOTTLE_THROWING: 500
|
||||
DYE: 500
|
||||
ITEM_FRAME: 500
|
||||
PLACE_BLOCKS: 500
|
||||
CRAFTING: 0
|
||||
SHEARING: 500
|
||||
ENCHANTING: 0
|
||||
BOAT: 500
|
||||
SPAWN_EGGS: 500
|
||||
BED: 500
|
||||
MILKING: 0
|
||||
DISPENSER: 500
|
||||
GATE: 0
|
||||
EXPERIENCE_PICKUP: 500
|
||||
HOPPER: 500
|
||||
LEASH: 500
|
||||
MOUNT_INVENTORY: 500
|
||||
BREAK_BLOCKS: 500
|
||||
CHORUS_FRUIT: 500
|
||||
CONTAINER: 500
|
||||
JUKEBOX: 500
|
||||
POTION_THROWING: 500
|
||||
default-cave-flags: {}
|
||||
# These are the default settings for new caves
|
||||
default-cave-settings:
|
||||
PVP_END: false
|
||||
PVP_NETHER: false
|
||||
LEAF_DECAY: true
|
||||
MONSTER_SPAWNERS_SPAWN: true
|
||||
TNT_DAMAGE: true
|
||||
ANIMAL_NATURAL_SPAWN: true
|
||||
MONSTER_NATURAL_SPAWN: true
|
||||
FIRE_IGNITE: true
|
||||
FIRE_SPREAD: true
|
||||
FIRE_BURNING: true
|
||||
ANIMAL_SPAWNERS_SPAWN: true
|
||||
PVP_OVERWORLD: false
|
||||
default-cave-settings: {}
|
||||
# These settings/flags are hidden from users
|
||||
# Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings
|
||||
hidden-flags: []
|
||||
|
Loading…
Reference in New Issue
Block a user