Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
.classpath
.settings/**
.project
.idea/
*.iml
dependency-reduced-pom.xml
37 changes: 17 additions & 20 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,81 @@

wormBehavior:
wormType: Simplexworm

#Amount of octaves in simplex function determining worm movement
xMovementOctaveCount: 3
yMovementOctaveCount: 3
zMovementOctaveCount: 3

#Amplitudes for Simplex functions determining worm movement
xSpreadAmplitude: 2.0
ySpreadAmpltitude: 2.0
zSpreadAmpltitude: 2.0

#Threshhold inside which the worm wont move
xSpreadThreshHold: 0.0
ySpreadThreshHold: 0.05
zSpreadThreshHold: 0.0

#Frequency for Simplex functions determining worm movement
xSpreadFrequency: 0.08
ySpreadFrequency: 0.16
zSpreadFrequency: 0.08

#Seed used for Simplex generator to calculate movement in each dimension, -1 for random seed
xSeed: -1
ySeed: -1
zSeed: -1

caveFormingBehavior:
formingType: SimplexSphere

#Lower bound of the range in which all blocks in the given direction are cleared around the center cave block
xLowerRadiusBound: 2
yLowerRadiusBound: 2
zLowerRadiusBound: 2

#Lower bound of the range in which all blocks in the given direction are cleared around the center cave block
xUpperRadiusBound: 6
yUpperRadiusBound: 6
zUpperRadiusBound: 6

#Frequency of the Simplex function determining the range in which all blocks in the given direction are cleared around the center cave block
xFrequency: 0.1
yFrequency: 0.1
zFrequency: 0.1

#Amount of octaves of the Simplex function determining the range in which all blocks in the given direction are cleared around the center cave block
xOctaves: 3
yOctaves: 3
zOctaves: 3

#Additional slices besides the main one which will be cleared out in each 2 dimensional level
xzSlices: 0
xySlices: 0
yzSlices: 0

#What to do if a block, which is affected by gravity is above a block to remove:
#0 Means the block will be cleared, ignoring the fact it will create a flying block
#1 Means the block wont be cleared
#2 Means the block will be moved upwards to replace the falling block
fallingBlockBehavior: 2

fallingBlockReplacement: SANDSTONE

#Materials that wont be replaced when generating caves, use spigot material identifiers here
ignoreMaterials:
- BEDROCK

#Seed used for the generator determining spread for each dimension, -1 for random seed
xSeed: -1
ySeed: -1
zSeed: -1

#Material with which the emptied out space is replaced, use identifiers as specified here:
#https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html (Default: AIR)
fillMaterial: AIR

#Whether spoofed block breaks are sent to hidden ore when removing blocks
useHiddenOre: true


distribution:
area:
type: ELLIPSE
Expand Down Expand Up @@ -164,6 +161,6 @@ distribution:
# xOffSet: 1
# yOffSet: 0
# zOffSet: -2

caveSystemSeed: -1
seed: -1
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ${project.name}
main: com.github.maxopoly.caveworm.Caveworm
author: Maxopoly
version: ${project.version}
depend: [CivModCore]
api-version: 1.13
commands:
cwgen:
permission: cw.op
Expand Down
36 changes: 6 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.github.maxopoly.caveworm.executable.CavewormMain</mainClass>
</manifest>
</archive>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
</plugins>
Expand All @@ -61,20 +49,8 @@
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>Spigot</artifactId>
<version>1.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>vg.civcraft.mc.civmodcore</groupId>
<artifactId>CivModCore</artifactId>
<version>1.4.42</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.devotedmc</groupId>
<artifactId>hiddenore</artifactId>
<version>1.2.1</version>
<artifactId>spigot</artifactId>
<version>1.21.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -85,8 +61,8 @@
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>Jenkins-repo</id>
<url>http://build.civcraft.co:8080/plugin/repository/everything/</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</project>
79 changes: 0 additions & 79 deletions src/main/java/com/github/maxopoly/caveworm/CaveWormAPI.java

This file was deleted.

83 changes: 46 additions & 37 deletions src/main/java/com/github/maxopoly/caveworm/Caveworm.java
Original file line number Diff line number Diff line change
@@ -1,58 +1,67 @@
package com.github.maxopoly.caveworm;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;

import org.spigotmc.AsyncCatcher;

import com.github.maxopoly.caveworm.commands.CavewormCommandHandler;
import com.github.maxopoly.caveworm.distribution.GlobalDistributor;
import com.github.maxopoly.caveworm.external.HiddenOreManager;
import org.bukkit.plugin.java.JavaPlugin;

import vg.civcraft.mc.civmodcore.ACivMod;

public class Caveworm extends ACivMod {
import java.util.logging.Level;

public class Caveworm extends JavaPlugin {
private static WormConfig config;
private static Caveworm instance;
private static HiddenOreManager hiddenOreManager;

public void onEnable() {
instance = this;
handle = new CavewormCommandHandler();
config = new WormConfig();
refreshConfig();
if (config.useHiddenOre()) {
if (Bukkit.getPluginManager().isPluginEnabled("HiddenOre")) {
hiddenOreManager = new HiddenOreManager();
} else {
warning("Attempted to send block break events to HiddenOre according to config, but it seems like HiddenOre isn't loaded on this server");
}
}
AsyncCatcher.enabled = false;
instance = this;

new CavewormCommandHandler(this);

config = new WormConfig();
refreshConfig();
}

@Override
protected String getPluginName() {
return "Caveworm";
/**
* Simple WARNING level logging.
*/
public void warning(String message) {
getLogger().log(Level.WARNING, message);
}

public static WormConfig getWormConfig() {
return config;
/**
* Simple INFO level logging
*/
public void info(String message) {
getLogger().log(Level.INFO, message);
}

public static Caveworm getInstance() {
return instance;
/**
* Live activatable debug message (using plugin's config.yml top level debug tag to decide) at
* INFO level.
* <p>
* Skipped if DebugLog is false.
*/
public void debug(String message) {
// if (isDebugEnabled()) { TODO
// getLogger().log(Level.INFO, message);
// }
}

public static HiddenOreManager getHiddenOreManager() {
return hiddenOreManager;
/**
* Simple SEVERE level logging.
*/
public void severe(String message) {
getLogger().log(Level.SEVERE, message);
}

public void refreshConfig() {
saveDefaultConfig();
reloadConfig();
config.parse(this, getConfig());
public static WormConfig getWormConfig() {
return config;
}

}
public static Caveworm getInstance() {
return instance;
}

public void refreshConfig() {
saveDefaultConfig();
reloadConfig();
config.parse(this, getConfig());
}
}
Loading