Added Jenkinsfile and updated package naming.

This commit is contained in:
Harrison Deng 2022-12-04 05:09:04 +00:00
parent 1702fe7472
commit 21ce300b08
69 changed files with 246 additions and 201 deletions

View File

@ -1,3 +1,7 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
"java.configuration.updateBuildConfiguration": "automatic",
"cSpell.words": [
"islandsurvivalcraft",
"Minecraft"
]
}

8
.vscode/tasks.json vendored
View File

@ -26,7 +26,7 @@
"type": "shell",
"options": {"cwd": "${workspaceFolder}/test-server/"},
"args": ["-ExecutionPolicy", "Bypass", "-File", "./delete_worlds.ps1"],
"command": "powershell",
"command": "pwsh",
"problemMatcher": []
},
{
@ -35,7 +35,7 @@
"type": "shell",
"args": ["-ExecutionPolicy", "Bypass", "-File", "./load_build.ps1"],
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell",
"command": "pwsh",
"problemMatcher": [],
"presentation": {
"echo": true,
@ -53,7 +53,7 @@
"runOptions": {"instanceLimit": 1},
"args": ["-ExecutionPolicy", "Bypass", "-File", "./start_process.ps1"],
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell",
"command": "pwsh",
"problemMatcher": [],
"group": "test",
"presentation": {
@ -70,7 +70,7 @@
"type": "shell",
"args": ["-ExecutionPolicy", "Bypass", "-File", "./end_process.ps1"],
"options": {"cwd": "${workspaceFolder}/test-server/"},
"command": "powershell",
"command": "pwsh",
"problemMatcher": [],
"group": "test",
"presentation": {

27
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,27 @@
pipeline {
agent any
stages {
stage ("Install") {
steps {
sh 'mamba env update --file environment.yml'
sh 'echo "mamba activate islandsurvivalcraft" >> ~/.bashrc'
sh "mvn validate"
}
}
stage ("Build") {
steps {
sh "mvn compile"
}
}
stage ("Test") {
steps {
sh "mvn -Dmaven.test.skip=false test"
}
}
stage ("Package") {
steps {
sh "mvn package"
}
}
}
}

6
environment.yml Normal file
View File

@ -0,0 +1,6 @@
name: islandsurvivalcraft
channels:
- conda-forge
dependencies:
- openjdk=11.0.*
- maven=3.8.*

View File

@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ca.recrown.islandsurvivalcraft</groupId>
<groupId>net.reslate.islandsurvivalcraft</groupId>
<artifactId>IslandSurvivalCraft</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
@ -53,10 +53,12 @@
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.test.skip>true</maven.test.skip>
</properties>
</project>

View File

@ -1,5 +0,0 @@
package ca.recrown.islandsurvivalcraft.persistence;
public enum Settings {
}

View File

@ -1,5 +0,0 @@
package ca.recrown.islandsurvivalcraft.utilities.datatypes;
public class Reference<T> {
public T value;
}

View File

@ -1,7 +0,0 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
public interface CoordinateValidatable {
public boolean validate(Point2 point);
}

View File

@ -1,7 +0,0 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
public interface NodeComparable {
public int compare(Point2 current, Point2 other);
}

View File

@ -1,5 +0,0 @@
package ca.recrown.islandsurvivalcraft.world.generation;
public enum GeneratorModes {
UNIQUE
}

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft;
package net.reslate.islandsurvivalcraft;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@ -11,10 +11,10 @@ import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import ca.recrown.islandsurvivalcraft.interaction.commands.CommandProcessor;
import ca.recrown.islandsurvivalcraft.interaction.items.ItemVariantManager;
import ca.recrown.islandsurvivalcraft.world.WorldInfoManager;
import ca.recrown.islandsurvivalcraft.world.generation.GeneratorModes;
import net.reslate.islandsurvivalcraft.interaction.commands.CommandProcessor;
import net.reslate.islandsurvivalcraft.interaction.items.ItemVariantManager;
import net.reslate.islandsurvivalcraft.world.WorldInfoManager;
import net.reslate.islandsurvivalcraft.world.generation.GeneratorModes;
public class IslandSurvivalCraft extends JavaPlugin implements Listener {
private PluginManager pluginManager;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.commands;
package net.reslate.islandsurvivalcraft.interaction.commands;
import java.util.Arrays;
@ -7,7 +7,7 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
public class CommandProcessor implements CommandExecutor {
private IslandSurvivalCraft islandSurvivalCraft;

View File

@ -1,8 +1,8 @@
package ca.recrown.islandsurvivalcraft.interaction.commands;
package net.reslate.islandsurvivalcraft.interaction.commands;
import ca.recrown.islandsurvivalcraft.interaction.commands.runnables.IslandCommand;
import net.reslate.islandsurvivalcraft.interaction.commands.runnables.IslandCommand;
import ca.recrown.islandsurvivalcraft.interaction.commands.runnables.*;
import net.reslate.islandsurvivalcraft.interaction.commands.runnables.*;
public enum RegisteredCommands {
ISLAND(new IslandCommand()),

View File

@ -1,8 +1,8 @@
package ca.recrown.islandsurvivalcraft.interaction.commands.runnables;
package net.reslate.islandsurvivalcraft.interaction.commands.runnables;
import org.bukkit.command.CommandSender;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
public interface CommandRunnable {
/**

View File

@ -1,10 +1,10 @@
package ca.recrown.islandsurvivalcraft.interaction.commands.runnables;
package net.reslate.islandsurvivalcraft.interaction.commands.runnables;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import ca.recrown.islandsurvivalcraft.interaction.commands.RegisteredCommands;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.interaction.commands.RegisteredCommands;
public class HelpCommand implements CommandRunnable {
private String helpMessage;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.commands.runnables;
package net.reslate.islandsurvivalcraft.interaction.commands.runnables;
import java.util.HashSet;
import java.util.Set;
@ -11,11 +11,11 @@ import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.WorldInfo;
import ca.recrown.islandsurvivalcraft.world.Information.IslandInformation;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.WorldInfo;
import net.reslate.islandsurvivalcraft.world.Information.IslandInformation;
public class IslandCommand implements CommandRunnable {
private IslandSurvivalCraft islandSurvivalCraft;

View File

@ -1,10 +1,10 @@
package ca.recrown.islandsurvivalcraft.interaction.commands.runnables;
package net.reslate.islandsurvivalcraft.interaction.commands.runnables;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
public class ValueCommand implements CommandRunnable {
private IslandSurvivalCraft isc;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.items;
package net.reslate.islandsurvivalcraft.interaction.items;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -8,7 +8,7 @@ import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
public interface ItemVariant {
/**

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.items;
package net.reslate.islandsurvivalcraft.interaction.items;
import java.nio.charset.StandardCharsets;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.items;
package net.reslate.islandsurvivalcraft.interaction.items;
import java.util.Collection;
import java.util.HashMap;
@ -28,7 +28,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.meta.ItemMeta;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
public class ItemVariantManager implements Listener {
private final IslandSurvivalCraft islandSurvivalCraft;

View File

@ -1,6 +1,6 @@
package ca.recrown.islandsurvivalcraft.interaction.items;
package net.reslate.islandsurvivalcraft.interaction.items;
import ca.recrown.islandsurvivalcraft.interaction.items.variations.*;
import net.reslate.islandsurvivalcraft.interaction.items.variations.*;
public enum RegisteredItemVariants {
ISLAND_MAP(new IslandMapItem())

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.interaction.items.variations;
package net.reslate.islandsurvivalcraft.interaction.items.variations;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
@ -18,14 +18,14 @@ import org.bukkit.map.MapView;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
import ca.recrown.islandsurvivalcraft.interaction.items.ItemVariant;
import ca.recrown.islandsurvivalcraft.interaction.items.ItemVariantIdentifier;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.WorldInfo;
import ca.recrown.islandsurvivalcraft.world.Information.IslandInformation;
import ca.recrown.islandsurvivalcraft.world.Information.IslandInformationManager;
import net.reslate.islandsurvivalcraft.IslandSurvivalCraft;
import net.reslate.islandsurvivalcraft.interaction.items.ItemVariant;
import net.reslate.islandsurvivalcraft.interaction.items.ItemVariantIdentifier;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.WorldInfo;
import net.reslate.islandsurvivalcraft.world.Information.IslandInformation;
import net.reslate.islandsurvivalcraft.world.Information.IslandInformationManager;
import java.awt.Color;

View File

@ -0,0 +1,5 @@
package net.reslate.islandsurvivalcraft.persistence;
public enum Settings {
}

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities;
package net.reslate.islandsurvivalcraft.utilities;
import java.util.ArrayList;
import java.util.HashMap;
@ -7,7 +7,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class GeneralUtilities {
public final static int CHUNK_SIZE = 16;

View File

@ -1,11 +1,11 @@
package ca.recrown.islandsurvivalcraft.utilities.biomes;
package net.reslate.islandsurvivalcraft.utilities.biomes;
import java.util.Arrays;
import org.bukkit.block.Biome;
import ca.recrown.islandsurvivalcraft.utilities.weighting.Weightable;
import ca.recrown.islandsurvivalcraft.utilities.weighting.WeightedSelector;
import net.reslate.islandsurvivalcraft.utilities.weighting.Weightable;
import net.reslate.islandsurvivalcraft.utilities.weighting.WeightedSelector;
public enum BiomeClassifications implements Weightable {
SNOWY(0.2f, new OceanBiomeInfo(Biome.FROZEN_OCEAN, Biome.COLD_OCEAN, Biome.DEEP_FROZEN_OCEAN),

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.biomes;
package net.reslate.islandsurvivalcraft.utilities.biomes;
import org.bukkit.block.Biome;

View File

@ -1,8 +1,8 @@
package ca.recrown.islandsurvivalcraft.utilities.biomes;
package net.reslate.islandsurvivalcraft.utilities.biomes;
import org.bukkit.block.Biome;
import ca.recrown.islandsurvivalcraft.utilities.weighting.Weightable;
import net.reslate.islandsurvivalcraft.utilities.weighting.Weightable;
public class LandBiomeInfo implements Weightable, BiomeInfo {
private final Biome biome;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.biomes;
package net.reslate.islandsurvivalcraft.utilities.biomes;
import org.bukkit.block.Biome;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.caching;
package net.reslate.islandsurvivalcraft.utilities.caching;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.caching;
package net.reslate.islandsurvivalcraft.utilities.caching;
import java.util.concurrent.locks.ReentrantLock;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.caching;
package net.reslate.islandsurvivalcraft.utilities.caching;
class CacheValue<KeyType, ValueType> {
/**

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.datatypes;
package net.reslate.islandsurvivalcraft.utilities.datatypes;
import java.util.Objects;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.datatypes;
package net.reslate.islandsurvivalcraft.utilities.datatypes;
import java.util.Objects;

View File

@ -0,0 +1,5 @@
package net.reslate.islandsurvivalcraft.utilities.datatypes;
public class Reference<T> {
public T value;
}

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.datatypes;
package net.reslate.islandsurvivalcraft.utilities.datatypes;
import java.util.Objects;

View File

@ -1,7 +1,7 @@
package ca.recrown.islandsurvivalcraft.utilities.drawing;
package net.reslate.islandsurvivalcraft.utilities.drawing;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
public class Circle {
public final Point2 center;

View File

@ -1,11 +1,11 @@
package ca.recrown.islandsurvivalcraft.utilities.drawing;
package net.reslate.islandsurvivalcraft.utilities.drawing;
import java.util.HashSet;
import java.util.LinkedList;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
public class Flooder {
private final Point2 start;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.noise;
package net.reslate.islandsurvivalcraft.utilities.noise;
import java.util.Random;

View File

@ -0,0 +1,7 @@
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public interface CoordinateValidatable {
public boolean validate(Point2 point);
}

View File

@ -1,10 +1,10 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Queue;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class DepthFirstSearch {
private final HashSet<Node> checkedNodes;

View File

@ -1,6 +1,6 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class LinkedCoordinateValidator implements CoordinateValidatable {
private final CoordinateValidatable[] CoordinateValidatables;

View File

@ -1,6 +1,6 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class Node extends Point2 implements Comparable<Point2> {
private final NodeComparable nodeComparable;

View File

@ -0,0 +1,7 @@
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public interface NodeComparable {
public int compare(Point2 current, Point2 other);
}

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.weighting;
package net.reslate.islandsurvivalcraft.utilities.weighting;
public interface Weightable {
public float getWeight();

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.weighting;
package net.reslate.islandsurvivalcraft.utilities.weighting;
import java.util.Random;
import java.util.TreeMap;

View File

@ -1,13 +1,13 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import java.util.Random;
import org.bukkit.block.Biome;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeClassifications;
import ca.recrown.islandsurvivalcraft.utilities.biomes.LandBiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.biomes.OceanBiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeClassifications;
import net.reslate.islandsurvivalcraft.utilities.biomes.LandBiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.biomes.OceanBiomeInfo;
public class BiomeMap {
private final SimplexOctaveGenerator noise;
@ -23,7 +23,7 @@ public class BiomeMap {
}
/**
* Attempts to procure a biome that helps transitionfrom one biome to another biome
* Attempts to procure a biome that helps transition from one biome to another biome
* for given biome.
* @param from the biome to transition from.
* @return the resulting transition biome.

View File

@ -1,10 +1,10 @@
package ca.recrown.islandsurvivalcraft.world.Information;
package net.reslate.islandsurvivalcraft.world.Information;
import java.util.Collections;
import java.util.Set;
import java.util.UUID;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class IslandInformation {
private final Set<Point2> chunkSpan;

View File

@ -1,8 +1,8 @@
package ca.recrown.islandsurvivalcraft.world.Information;
package net.reslate.islandsurvivalcraft.world.Information;
import java.util.HashSet;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class IslandInformationBuilder {
private final HashSet<Point2> islandCoordinates = new HashSet<>();

View File

@ -1,14 +1,14 @@
package ca.recrown.islandsurvivalcraft.world.Information;
package net.reslate.islandsurvivalcraft.world.Information;
import java.lang.Thread.State;
import java.util.HashSet;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
public class IslandInformationManager implements Runnable {
private final IslandWorldMap islandMap;

View File

@ -1,14 +1,14 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import java.util.Random;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Reference;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.DepthFirstSearch;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Reference;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.DepthFirstSearch;
public class IslandWorldMap {
private final float SHALLOW_PORTION = 0.06f;

View File

@ -1,11 +1,11 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import java.util.Random;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
public class TemperatureMap {

View File

@ -1,11 +1,11 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import java.util.Random;
import org.bukkit.World;
import ca.recrown.islandsurvivalcraft.world.Information.IslandInformationManager;
import ca.recrown.islandsurvivalcraft.world.generation.chunks.IslandWorldChunkGenerator;
import net.reslate.islandsurvivalcraft.world.Information.IslandInformationManager;
import net.reslate.islandsurvivalcraft.world.generation.chunks.IslandWorldChunkGenerator;
public class WorldInfo {
private final WorldInfoManager manager;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import java.util.concurrent.ConcurrentHashMap;
@ -11,9 +11,9 @@ import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.ChunkUnloadEvent;
import org.bukkit.generator.ChunkGenerator;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.generation.GeneratorModes;
import ca.recrown.islandsurvivalcraft.world.generation.chunks.IslandWorldChunkGenerator;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.generation.GeneratorModes;
import net.reslate.islandsurvivalcraft.world.generation.chunks.IslandWorldChunkGenerator;
public class WorldInfoManager implements Listener {
public final ConcurrentHashMap<String, WorldInfo> worldInformation = new ConcurrentHashMap<>();

View File

@ -0,0 +1,5 @@
package net.reslate.islandsurvivalcraft.world.generation;
public enum GeneratorModes {
UNIQUE
}

View File

@ -1,11 +1,11 @@
package ca.recrown.islandsurvivalcraft.world.generation.biomes;
package net.reslate.islandsurvivalcraft.world.generation.biomes;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.BiomeMap;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import ca.recrown.islandsurvivalcraft.world.TemperatureMap;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.BiomeMap;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.world.TemperatureMap;
public interface BiomeGenerator {

View File

@ -1,15 +1,15 @@
package ca.recrown.islandsurvivalcraft.world.generation.biomes;
package net.reslate.islandsurvivalcraft.world.generation.biomes;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Reference;
import ca.recrown.islandsurvivalcraft.utilities.drawing.Flooder;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import ca.recrown.islandsurvivalcraft.world.BiomeMap;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import ca.recrown.islandsurvivalcraft.world.TemperatureMap;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Reference;
import net.reslate.islandsurvivalcraft.utilities.drawing.Flooder;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import net.reslate.islandsurvivalcraft.world.BiomeMap;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.world.TemperatureMap;
public class UniqueBiomeGenerator implements BiomeGenerator {

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.world.generation.chunks;
package net.reslate.islandsurvivalcraft.world.generation.chunks;
import java.util.Random;
import java.util.concurrent.ExecutorService;
@ -13,21 +13,21 @@ import org.bukkit.block.data.BlockData;
import org.bukkit.event.Listener;
import org.bukkit.generator.ChunkGenerator;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.biomes.LandBiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.biomes.OceanBiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.BiomeMap;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import ca.recrown.islandsurvivalcraft.world.TemperatureMap;
import ca.recrown.islandsurvivalcraft.world.WorldInfo;
import ca.recrown.islandsurvivalcraft.world.generation.GeneratorModes;
import ca.recrown.islandsurvivalcraft.world.generation.biomes.BiomeGenerator;
import ca.recrown.islandsurvivalcraft.world.generation.biomes.UniqueBiomeGenerator;
import ca.recrown.islandsurvivalcraft.world.generation.shaders.WorldHeightShader;
import ca.recrown.islandsurvivalcraft.world.generation.shaders.WorldLayerShader;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.biomes.LandBiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.biomes.OceanBiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.BiomeMap;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.world.TemperatureMap;
import net.reslate.islandsurvivalcraft.world.WorldInfo;
import net.reslate.islandsurvivalcraft.world.generation.GeneratorModes;
import net.reslate.islandsurvivalcraft.world.generation.biomes.BiomeGenerator;
import net.reslate.islandsurvivalcraft.world.generation.biomes.UniqueBiomeGenerator;
import net.reslate.islandsurvivalcraft.world.generation.shaders.WorldHeightShader;
import net.reslate.islandsurvivalcraft.world.generation.shaders.WorldLayerShader;
public class IslandWorldChunkGenerator extends ChunkGenerator implements Listener {
private final int BEDROCK_HEIGHT = 5;

View File

@ -1,12 +1,12 @@
package ca.recrown.islandsurvivalcraft.world.generation.shaders;
package net.reslate.islandsurvivalcraft.world.generation.shaders;
import java.util.Random;
import org.bukkit.block.Biome;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
public class WorldHeightShader {
private final IslandWorldMap mapper;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.world.generation.shaders;
package net.reslate.islandsurvivalcraft.world.generation.shaders;
import java.util.Random;
@ -7,9 +7,9 @@ import org.bukkit.block.Biome;
import org.bukkit.block.data.BlockData;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Vector3;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Vector3;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
@SuppressWarnings("unused")
public class WorldLayerShader {

View File

@ -1,5 +1,5 @@
name: IslandSurvivalCraft
main: ca.recrown.islandsurvivalcraft.IslandSurvivalCraft
main: net.reslate.islandsurvivalcraft.IslandSurvivalCraft
version: 1.0.0
author: Reslate
description: Adds the gamemode IslandSurvivalCraft.

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities;
package net.reslate.islandsurvivalcraft.utilities;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
/**
* Unit test for simple App.

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.caching;
package net.reslate.islandsurvivalcraft.utilities.caching;
import static org.junit.Assert.assertSame;
import static org.junit.jupiter.api.Assertions.assertEquals;

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.drawing;
package net.reslate.islandsurvivalcraft.utilities.drawing;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@ -13,8 +13,8 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.pathfinding.CoordinateValidatable;
@TestInstance(Lifecycle.PER_CLASS)
public class FloodFillTest {

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.utilities.pathfinding;
package net.reslate.islandsurvivalcraft.utilities.pathfinding;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
/**
* Unit test for simple App.

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.world;
package net.reslate.islandsurvivalcraft.world;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
@TestInstance(Lifecycle.PER_CLASS)
public class IslandWorldMapTest {

View File

@ -1,4 +1,4 @@
package ca.recrown.islandsurvivalcraft.world.generation.biomes;
package net.reslate.islandsurvivalcraft.world.generation.biomes;
import static org.junit.jupiter.api.Assertions.assertFalse;
@ -18,13 +18,13 @@ import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import ca.recrown.islandsurvivalcraft.utilities.GeneralUtilities;
import ca.recrown.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import ca.recrown.islandsurvivalcraft.utilities.caching.Cache;
import ca.recrown.islandsurvivalcraft.utilities.datatypes.Point2;
import ca.recrown.islandsurvivalcraft.world.BiomeMap;
import ca.recrown.islandsurvivalcraft.world.IslandWorldMap;
import ca.recrown.islandsurvivalcraft.world.TemperatureMap;
import net.reslate.islandsurvivalcraft.utilities.GeneralUtilities;
import net.reslate.islandsurvivalcraft.utilities.biomes.BiomeInfo;
import net.reslate.islandsurvivalcraft.utilities.caching.Cache;
import net.reslate.islandsurvivalcraft.utilities.datatypes.Point2;
import net.reslate.islandsurvivalcraft.world.BiomeMap;
import net.reslate.islandsurvivalcraft.world.IslandWorldMap;
import net.reslate.islandsurvivalcraft.world.TemperatureMap;
@TestInstance(Lifecycle.PER_CLASS)
public class UniqueBiomeGeneratorTest {

View File

@ -1,8 +1,9 @@
if (Test-Path ./pid.temp) {
$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1
if (Test-Path ./test-server.pid) {
$sID = Get-Item -Path ./test-server.pid | Get-Content -Tail 1
if (Get-Process -Id $sID -ErrorAction SilentlyContinue) {
Stop-Process -Id $sID
}
Remove-Item "./pid.temp"
}
Remove-Item "./test-server.pid"
} else {
Write-Output "Couldn't find running server to stop."
}

View File

@ -1,2 +1,3 @@
New-Item -Path .\plugins -ItemType Directory -Force
write-Output "Attempting to copy plugin jar to plugins folder..."
copy-Item -Path "..\target\IslandSurvivalCraft*.jar" -Destination "plugins\IslandSurvivalCraft.jar"

View File

@ -1,6 +1,10 @@
if (!(Test-Path -Path "paper.jar" -PathType Leaf)) {
Invoke-WebRequest -Uri "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar" -OutFile "paper.jar"
}
write-Output "Attempting to start Paper test server."
$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper.jar", "nogui" -PassThru
$SID = $SID.Id
write-Output "Process started. PID is: $SID"
$SID | Out-File -FilePath "pid.temp"
$SID | Out-File -FilePath "test-server.pid"