Merge branch 'mc/1.13'

This commit is contained in:
Blue (Lukas Rieger) 2020-04-06 16:56:35 +02:00
commit 88ab4b2eb8
26 changed files with 773 additions and 39 deletions

View File

@ -15,7 +15,3 @@ jobs:
run: ./gradlew test
- name: Build with Gradle
run: ./gradlew build
- uses: actions/upload-artifact@v1
with:
name: artifact
path: build/libs/BlueMap.jar

View File

@ -11,5 +11,34 @@ repositories {
dependencies {
shadow "org.bukkit:bukkit:1.15.2-R0.1-SNAPSHOT"
compile group: 'org.bstats', name: 'bstats-bukkit-lite', version: '1.5'
compile project(':BlueMapCommon')
compile (project(':BlueMapCommon')) {
//exclude dependencies provided by bukkit
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'org.yaml', module: 'snakeyaml'
}
}
build.dependsOn shadowJar {
destinationDir = file '../build/release'
archiveFileName = "BlueMap-${version}-bukkit.jar"
relocate 'com.flowpowered.math', 'de.bluecolored.shadow.flowpowered.math'
relocate 'com.typesafe.config', 'de.bluecolored.shadow.typesafe.config'
relocate 'net.querz.nbt', 'de.bluecolored.shadow.querz.nbt'
relocate 'ninja.leaping.configurate', 'de.bluecolored.shadow.ninja.leaping.configurate'
relocate 'org.apache.commons.io', 'de.bluecolored.shadow.apache.commons.io'
relocate 'org.apache.commons.lang3', 'de.bluecolored.shadow.apache.commons.lang3'
relocate 'org.bstats.bukkit', 'de.bluecolored.shadow.bstats.bukkit'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'plugin.yml'
expand (
version: project.version
)
}
}

View File

@ -26,7 +26,7 @@ public class BukkitCommandSource implements CommandSource {
return;
}
delegate.sendMessage(text.toFormattingCodedString('§'));
delegate.sendMessage(text.toPlainString());
});
}

View File

@ -1,7 +1,7 @@
name: BlueMap
description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)"
main: de.bluecolored.bluemap.bukkit.BukkitPlugin
version: 0.5.1
version: ${version}
author: "Blue (TBlueF / Lukas Rieger)"
authors: [Blue (TBlueF / Lukas Rieger)]
website: "https://github.com/BlueMap-Minecraft"

View File

@ -2,3 +2,22 @@ dependencies {
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile project(':BlueMapCommon')
}
jar {
manifest {
attributes 'Main-Class' : "de.bluecolored.bluemap.cli.BlueMapCLI"
}
}
build.dependsOn shadowJar {
destinationDir = file '../build/release'
archiveFileName = "BlueMap-${version}-cli.jar"
relocate 'com.google', 'de.bluecolored.bluemap.google'
relocate 'com.flowpowered', 'de.bluecolored.bluemap.flowpowered'
relocate 'com.typesafe', 'de.bluecolored.bluemap.typesafe'
relocate 'net.querz', 'de.bluecolored.bluemap.querz'
relocate 'ninja', 'de.bluecolored.bluemap.ninja'
relocate 'org.apache', 'de.bluecolored.bluemap.apache'
relocate 'org.yaml', 'de.bluecolored.bluemap.yaml'
}

View File

@ -25,7 +25,6 @@ import com.flowpowered.math.vector.Vector2i;
import de.bluecolored.bluemap.common.MapType;
import de.bluecolored.bluemap.common.RenderManager;
import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface;
import de.bluecolored.bluemap.core.BlueMap;
import de.bluecolored.bluemap.core.config.ConfigManager;
import de.bluecolored.bluemap.core.config.MainConfig;
import de.bluecolored.bluemap.core.config.MainConfig.MapConfig;
@ -48,7 +47,6 @@ public class Plugin {
public static final String PLUGIN_ID = "bluemap";
public static final String PLUGIN_NAME = "BlueMap";
public static final String PLUGIN_VERSION = BlueMap.VERSION;
private static Plugin instance;

View File

@ -49,7 +49,7 @@ public class Text {
if (hoverText != null) {
sb.append(quote("hoverEvent")).append(":{");
sb.append(quote("action")).append(":").append(quote("show_text")).append(',');
sb.append(quote("value")).append(":").append(quote(hoverText.toFormattingCodedString('§')));
sb.append(quote("value")).append(":").append(quote(hoverText.toFormattingCodedString('\u00a7')));
sb.append("},");
}
@ -131,7 +131,7 @@ public class Text {
private String escape(String value) {
value = value.replace("\\", "\\\\");
value = value.replace("\"", "\\\"");
value = value.replace("§", "\\u00a7");
value = value.replace("\u00a7", "\\u00a7");
value = value.replace("\n", "\\n");
return value;
}

View File

@ -16,6 +16,16 @@ dependencies {
testCompile 'junit:junit:4.12'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'core.json'
expand (
version: project.version
)
}
}
node {
version = '12.14.1'
download = true

View File

@ -1,7 +1,24 @@
package de.bluecolored.bluemap.core;
import java.io.IOException;
import de.bluecolored.bluemap.core.logger.Logger;
import ninja.leaping.configurate.gson.GsonConfigurationLoader;
public class BlueMap {
public static final String VERSION = "0.5.1";
public static final String VERSION;
static {
String version = "DEV";
try {
version = GsonConfigurationLoader.builder().setURL(BlueMap.class.getResource("/core.json")).build().load().getNode("version").getString("DEV");
} catch (IOException ex) {
Logger.global.logError("Failed to load core.json from resources!", ex);
}
if (version.equals("${version}")) version = "DEV";
VERSION = version;
}
}

View File

@ -0,0 +1,3 @@
{
"version": "${version}"
}

58
BlueMapForge/build.gradle Normal file
View File

@ -0,0 +1,58 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven/' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
minecraft {
mappings channel: 'snapshot', version: '20190719-1.14.3'
}
configurations {
compile.extendsFrom include
}
dependencies {
minecraft 'net.minecraftforge:forge:1.15.2-31.1.0'
include project(':BlueMapCommon')
}
build.dependsOn shadowJar {
destinationDir = file '../build/release'
archiveFileName = "BlueMap-${version}-forge.jar"
configurations = [project.configurations.include]
relocate 'com.google', 'de.bluecolored.bluemap.google'
relocate 'com.flowpowered', 'de.bluecolored.bluemap.flowpowered'
relocate 'com.typesafe', 'de.bluecolored.bluemap.typesafe'
relocate 'net.querz', 'de.bluecolored.bluemap.querz'
relocate 'ninja', 'de.bluecolored.bluemap.ninja'
relocate 'org.apache.commons', 'de.bluecolored.bluemap.apache.commons'
relocate 'org.yaml', 'de.bluecolored.bluemap.yaml'
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info','META-INF/mods.toml'
expand (
version: project.version
)
}
}
afterEvaluate {
reobf {
shadowJar {
mappings = createMcpToSrg.output
}
}
}

View File

@ -0,0 +1,20 @@
package de.bluecolored.bluemap.forge;
import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource;
import de.bluecolored.bluemap.common.plugin.text.Text;
import net.minecraft.util.text.ITextComponent;
public class ForgeCommandSource implements CommandSource {
private net.minecraft.command.CommandSource delegate;
public ForgeCommandSource(net.minecraft.command.CommandSource delegate) {
this.delegate = delegate;
}
@Override
public void sendMessage(Text text) {
delegate.sendFeedback(ITextComponent.Serializer.fromJson(text.toJSONString()), false);
}
}

View File

@ -0,0 +1,133 @@
package de.bluecolored.bluemap.forge;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.LiteralMessage;
import com.mojang.brigadier.arguments.ArgumentType;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandExceptionType;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import de.bluecolored.bluemap.common.plugin.Commands;
import de.bluecolored.bluemap.common.plugin.Plugin;
import de.bluecolored.bluemap.common.plugin.text.Text;
import de.bluecolored.bluemap.common.plugin.text.TextColor;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.server.permission.PermissionAPI;
public class ForgeCommands {
private ForgeMod mod;
private Plugin bluemap;
private Commands commands;
public ForgeCommands(ForgeMod mod, Plugin bluemap) {
this.mod = mod;
this.bluemap = bluemap;
this.commands = bluemap.getCommands();
}
public void registerCommands(CommandDispatcher<CommandSource> dispatcher) {
LiteralArgumentBuilder<CommandSource> base = literal("bluemap");
base.executes(c -> {
if (!checkPermission(c, "bluemap.status")) return 0;
commands.executeRootCommand(new ForgeCommandSource(c.getSource()));
return 1;
});
base.then(literal("reload")).executes(c -> {
if (!checkPermission(c, "bluemap.reload")) return 0;
commands.executeReloadCommand(new ForgeCommandSource(c.getSource()));
return 1;
});
base.then(literal("pause")).executes(c -> {
if (!checkPermission(c, "bluemap.pause")) return 0;
commands.executePauseCommand(new ForgeCommandSource(c.getSource()));
return 1;
});
base.then(literal("resume")).executes(c -> {
if (!checkPermission(c, "bluemap.resume")) return 0;
commands.executeResumeCommand(new ForgeCommandSource(c.getSource()));
return 1;
});
Command<CommandSource> renderCommand = c -> {
if (!checkPermission(c, "bluemap.render")) return 0;
String worldName = null;
try {
c.getArgument("world", String.class);
} catch (IllegalArgumentException ex) {}
int blockRadius = -1;
try {
c.getArgument("block-radius", Integer.class);
} catch (IllegalArgumentException ex) {}
PlayerEntity player = null;
try {
player = c.getSource().asPlayer();
} catch (CommandSyntaxException ex) {}
if (player == null) {
if (worldName == null) throw new SimpleCommandExceptionType(new LiteralMessage("There is no world with this name: " + worldName)).create();
} else {
}
return 1;
};
base.then(literal("render")).executes(renderCommand);
base.then(literal("render")).then(argument("world", StringArgumentType.word())).executes(renderCommand);
base.then(literal("render")).then(argument("block-radius", IntegerArgumentType.integer(0))).executes(renderCommand);
base.then(literal("render")).then(argument("world", StringArgumentType.word())).then(argument("block-radius", IntegerArgumentType.integer(0))).executes(renderCommand);
dispatcher.register(base);
}
private boolean checkPermission(CommandContext<CommandSource> command, String permission) {
ForgeCommandSource cs = new ForgeCommandSource(command.getSource());
boolean hasPermission = false;
try {
if (PermissionAPI.hasPermission(command.getSource().asPlayer(), permission)) {
hasPermission = true;
}
} catch (CommandSyntaxException ex) {
if (command.getSource().hasPermissionLevel(2)) {
hasPermission = true;
}
}
if (!hasPermission) {
cs.sendMessage(Text.of(TextColor.RED, "You don't have the permissions to use this command!"));
}
return hasPermission;
}
public static LiteralArgumentBuilder<CommandSource> literal(String name){
return LiteralArgumentBuilder.<CommandSource>literal(name);
}
public static <S extends CommandSource, T> RequiredArgumentBuilder<S, T> argument(String name, ArgumentType<T> type){
return RequiredArgumentBuilder.<S, T>argument(name, type);
}
}

View File

@ -0,0 +1,139 @@
package de.bluecolored.bluemap.forge;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.apache.logging.log4j.LogManager;
import de.bluecolored.bluemap.common.plugin.Plugin;
import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener;
import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface;
import de.bluecolored.bluemap.core.logger.Logger;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
@Mod(Plugin.PLUGIN_ID)
public class ForgeMod implements ServerInterface {
private Plugin bluemap;
private Map<String, UUID> worldUUIDs;
private ForgeCommands commands;
public ForgeMod() {
Logger.global = new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME));
this.bluemap = new Plugin("forge", this);
this.commands = new ForgeCommands(this, bluemap);
this.worldUUIDs = new HashMap<>();
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void onServerStarting(FMLServerStartingEvent event) {
this.worldUUIDs.clear();
for (ServerWorld world : event.getServer().getWorlds()) {
try {
registerWorld(world);
} catch (IOException e) {
Logger.global.logError("Failed to register world: " + world.getProviderName(), e);
}
try {
world.save(null, false, false);
} catch (Throwable t) {
Logger.global.logError("Failed to save world: " + world.getProviderName(), t);
}
}
this.commands.registerCommands(event.getCommandDispatcher());
new Thread(() -> {
try {
Logger.global.logInfo("Loading...");
bluemap.load();
if (bluemap.isLoaded()) Logger.global.logInfo("Loaded!");
} catch (Throwable t) {
Logger.global.logError("Failed to load!", t);
}
}).start();
}
private void registerWorld(ServerWorld world) throws IOException {
getUUIDForWorld(world);
}
@SubscribeEvent
public void onServerStopping(FMLServerStoppingEvent event) {
Logger.global.logInfo("Stopping...");
bluemap.unload();
Logger.global.logInfo("Saved and stopped!");
}
@Override
public void registerListener(ServerEventListener listener) {
// TODO Auto-generated method stub
}
@Override
public void unregisterAllListeners() {
// TODO Auto-generated method stub
}
@Override
public UUID getUUIDForWorld(File worldFolder) throws IOException {
synchronized (worldUUIDs) {
String key = worldFolder.getCanonicalPath();
UUID uuid = worldUUIDs.get(key);
if (uuid == null) {
throw new IOException("There is no world with this folder loaded: " + worldFolder.getPath());
}
return uuid;
}
}
public UUID getUUIDForWorld(ServerWorld world) throws IOException {
synchronized (worldUUIDs) {
String key = getFolderForWorld(world).getPath();
UUID uuid = worldUUIDs.get(key);
if (uuid == null) {
uuid = UUID.randomUUID();
worldUUIDs.put(key, uuid);
}
return uuid;
}
}
private File getFolderForWorld(ServerWorld world) throws IOException {
File worldFolder = world.getSaveHandler().getWorldDirectory();
int dimensionId = world.getDimension().getType().getId();
if (dimensionId != 0) {
worldFolder = new File(worldFolder, "DIM" + dimensionId);
}
return worldFolder.getCanonicalFile();
}
@Override
public File getConfigFolder() {
return new File("config/bluemap");
}
}

View File

@ -0,0 +1,69 @@
/*
* This file is part of BlueMapSponge, licensed under the MIT License (MIT).
*
* Copyright (c) Blue (Lukas Rieger) <https://bluecolored.de>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package de.bluecolored.bluemap.forge;
import org.apache.logging.log4j.Logger;
import de.bluecolored.bluemap.core.logger.AbstractLogger;
public class Log4jLogger extends AbstractLogger {
private Logger out;
public Log4jLogger(Logger out) {
this.out = out;
}
@Override
public void logError(String message, Throwable throwable) {
out.error(message, throwable);
}
@Override
public void logWarning(String message) {
out.warn(message);
}
@Override
public void logInfo(String message) {
out.info(message);
}
@Override
public void logDebug(String message) {
if (out.isDebugEnabled()) out.debug(message);
}
@Override
public void noFloodDebug(String message) {
if (out.isDebugEnabled()) super.noFloodDebug(message);
}
@Override
public void noFloodDebug(String key, String message) {
if (out.isDebugEnabled()) super.noFloodDebug(key, message);
}
}

View File

@ -0,0 +1,25 @@
modLoader="javafml"
loaderVersion="[28,)"
issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues"
[[mods]]
modId="bluemap"
version="${version}"
displayName="BlueMap"
displayURL="https://github.com/BlueMap-Minecraft/BlueMap"
authors="Blue (TBlueF, Lukas Rieger)"
description='''
A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)
'''
[[dependencies.bluemap]]
modId="forge"
mandatory=true
versionRange="[28,)"
ordering="NONE"
side="SERVER"
[[dependencies.bluemap]]
modId="minecraft"
mandatory=true
versionRange="[1.15.2]"
ordering="NONE"
side="SERVER"

View File

@ -0,0 +1,11 @@
accept-download: false
metrics: true
renderThreadCount: -2
data: "bluemap"
webroot: "bluemap/web"
useCookies: true
webserver {
enabled: true
port: 8100
maxConnectionCount: 100
}

View File

@ -0,0 +1,166 @@
## ##
## BlueMap ##
## ##
## by Blue (Lukas Rieger) ##
## http://bluecolored.de/ ##
## ##
# By changing the setting (accept-download) below to TRUE you are indicating that you have accepted mojang's EULA (https://account.mojang.com/documents/minecraft_eula),
# you confirm that you own a license to Minecraft (Java Edition)
# and you agree that BlueMap will download and use this file for you: %minecraft-client-url%
# (Alternatively you can download the file yourself and store it here: <data>/minecraft-client-%minecraft-client-version%.jar)
# This file contains resources that belong to mojang and you must not redistribute it or do anything else that is not compliant with mojang's EULA.
# BlueMap uses resources in this file to generate the 3D-Models used for the map and texture them. (BlueMap will not work without those resources.)
# %datetime-iso%
accept-download: false
# This changes the amount of threads that BlueMap will use to render the maps.
# A higher value can improve render-speed but could impact performance on the host machine.
# This should be always below or equal to the number of available processor-cores.
# Zero or a negative value means the amount of of available processor-cores subtracted by the value.
# (So a value of -2 with 6 cores results in 4 render-processes)
# Default is -2
renderThreadCount: -2
# If this is true, BlueMap might send really basic metrics reports containg only the implementation-type and the version that is being used to https://metrics.bluecolored.de/bluemap/
# This allows me to track the basic usage of BlueMap and helps me stay motivated to further develop this tool! Please leave it on :)
# An example report looks like this: {"implementation":"forge","version":"%version%"}
metrics: true
# The folder where bluemap saves data-files it needs during runtime or to save e.g. the render-progress to resume it later.
data: "bluemap"
# The webroot of the website that displays the map.
webroot: "bluemap/web"
# Unncomment this to override the path where bluemap stores the data-files.
# Default is "<webroot>/data"
#webdata: "path/to/data/folder"
# If the web-application should use cookies to save the configurations of a user.
useCookies: true
webserver {
# With this setting you can disable the integrated web-server.
# This is usefull if you want to only render the map-data for later use, or if you setup your own webserver.
# Default is enabled
enabled: true
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# If you only want to access it locally use "localhost".
#ip: "localhost"
#ip: "127.0.0.1"
# The port that the webserver listenes to.
# Default is 8100
port: 8100
# Max number of simultaneous connections that the webserver allows
# Default is 100
maxConnectionCount: 100
}
# This is an array with multiple configured maps.
# You can define multiple maps, for different worlds with different render-settings here
maps: [
{
# The id of this map
# Should only contain word-charactes: [a-zA-Z0-9_]
# Changing this value breaks your existing renders.
id: "world"
# The name of this map
# This defines the display name of this map, you can change this at any time.
# Default is the id of this map
name: "World"
# The path to the save-folder of the world to render.
world: "world"
# The position on the world where the map will be centered if you open it.
# You can change this at any time.
# This defaults to the world-spawn if you don't set it.
#startPos: [500, -820]
# The color of thy sky as a hex-color
# You can change this at any time.
# Default is "#7dabff"
skyColor: "#7dabff"
# Defines the ambient light-strength that every block is recieving, regardless of the sunlight/blocklight.
# 0 is no ambient light, 1 is fully lighted.
# You can change this at any time.
# Default is 0
ambientLight: 0
# If this is false, BlueMap tries to omit all blocks that are not visible from above-ground.
# More specific: Block-Faces that have a sunlight/skylight value of 0 are removed.
# This improves the performance of the map on slower devices by a lot, but might cause some blocks to disappear that should normally be visible.
# Changing this value requires a re-render of the map.
# Default is false
renderCaves: false
# With the below values you can limit the map-render.
# This can be used to ignore the nethers ceiling or render only a certain part of a world.
# Changing this values might require a re-render of the map, already rendered tiles outside the limits will not be deleted.
# Default is no min or max value (= infinite bounds)
#minX: -4000
#maxX: 4000
#minZ: -4000
#maxZ: 4000
#minY: 50
#maxY: 126
# Using this, BlueMap pretends that every Block out of the defined render-bounds is AIR,
# this means you can see the blocks where the world is cut (instead of having a see-through/xray view).
# This has only an effect if you set some render-bounds above.
# Changing this value requires a re-render of the map.
# Default is true
renderEdges: true
# With this set to true, the generated files for this world are compressed using gzip to save A LOT of space.
# Files will be only 5% as big with compression!
# Note: If you are using NGINX or Apache to host your map, you can configure them to serve the compressed files directly.
# This is much better than disabling the compression.
# Changing this value requires a re-render of the map.
# Default is true
useCompression: true
}
# Here another example for the End-Map
# Things we don't want to change from default we can just omit
{
id: "end"
name: "End"
world: "world/DIM1"
# We dont want a blue sky in the end
skyColor: "#080010"
# In the end is no sky-light, so we need to enable this or we won't see anything.
renderCaves: true
# Same here, we don't want a dark map. But not completely lighted, so we see the effect of e.g torches.
ambientLight: 0.6
}
# Here another example for the Nether-Map
{
id: "nether"
name: "Nether"
world: "world/DIM-1"
skyColor: "#290000"
renderCaves: true
ambientLight: 0.6
# We slice the whole world at y:90 so every block above 90 will be air.
# This way we don't render the nethers ceiling.
maxY: 90
renderEdges: true
}
]

View File

@ -0,0 +1,14 @@
[
{
"modid": "bluemap",
"name": "BlueMap",
"version": "${version}",
"description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)",
"url": "https://github.com/BlueMap-Minecraft",
"authorList": [
"Blue (TBlueF, Lukas Rieger)"
],
"dependencies": [],
"requiredMods": []
}
]

View File

@ -1,5 +1,35 @@
dependencies {
shadow "org.spongepowered:spongeapi:7.1.0-SNAPSHOT"
compile group: 'org.bstats', name: 'bstats-sponge-lite', version: '1.5'
compile project(':BlueMapCommon')
compile (project(':BlueMapCommon')) {
//exclude dependencies provided by sponge
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'org.apache.commons', module: 'commons-lang3'
exclude group: 'com.flowpowered', module: 'flow-math'
exclude group: 'ninja.leaping.configurate', module: 'configurate-hocon'
exclude group: 'ninja.leaping.configurate', module: 'configurate-gson'
exclude group: 'ninja.leaping.configurate', module: 'configurate-yaml'
}
}
build.dependsOn shadowJar {
destinationDir = file '../build/release'
archiveFileName = "BlueMap-${version}-sponge.jar"
relocate 'net.querz.nbt', 'de.bluecolored.shadow.querz.nbt'
relocate 'org.apache.commons.io', 'de.bluecolored.shadow.apache.commons.io'
minimize()
}
processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand (
version: project.version
)
}
}

View File

@ -52,8 +52,7 @@ import net.querz.nbt.NBTUtil;
id = Plugin.PLUGIN_ID,
name = Plugin.PLUGIN_NAME,
authors = { "Blue (Lukas Rieger)" },
description = "This plugin provides a fully 3D map of your world for your browser!",
version = Plugin.PLUGIN_VERSION
description = "This plugin provides a fully 3D map of your world for your browser!"
)
public class SpongePlugin implements ServerInterface {

View File

@ -2,7 +2,7 @@
{
"modid": "bluemap",
"name": "BlueMap",
"version": "0.5.1",
"version": "${version}",
"description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)",
"url": "https://github.com/BlueMap-Minecraft",
"authorList": [

View File

@ -22,8 +22,8 @@ If you have a question, help others using BlueMap or get the latest news and inf
If you have git installed, simply use the command `git clone https://github.com/BlueMap-Minecraft/BlueMap.git` to clone BlueMap.
### Build
In order to build BlueMap you simply need to run the `./gradlew build` command in BlueMap's root directory.
You can find the compiled JAR file in `./build/libs`.
In order to build BlueMap you simply need to run the `./gradlew clean build` command in BlueMap's root directory.
You can find the compiled JAR files in `./build/release`.
### Issues / Suggestions
You found a bug, have another issue or a suggestion? Please create an issue [here](https://github.com/BlueMap-Minecraft/BlueMap/issues)!

View File

@ -5,43 +5,37 @@ plugins {
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven {
name 'sponge'
url 'http://repo.spongepowered.org/maven'
url 'http://repo.spongepowered.org/maven/'
}
maven {
name 'CodeMC'
url 'https://repo.codemc.org/repository/maven-public'
url 'https://repo.codemc.org/repository/maven-public/'
}
maven {
url = 'https://files.minecraftforge.net/maven/'
}
}
compileJava.options.compilerArgs.add '-parameters'
compileTestJava.options.compilerArgs.add '-parameters'
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
}
dependencies {
compile project(':BlueMapCLI')
compile project(':BlueMapBukkit')
//compile project(':BlueMapSponge')
}
assemble.dependsOn shadowJar {
relocate 'org.bstats.bukkit', 'de.bluecolored.bluemap.bstats.bukkit'
baseName = 'BlueMap'
version = null
classifier = null
group = 'de.bluecolored.bluemap'
version = '0.5.1-mc1.13'
}
jar {
manifest {
attributes 'Main-Class' : "de.bluecolored.bluemap.cli.BlueMapCLI"
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

2
gradle.properties Normal file
View File

@ -0,0 +1,2 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

View File

@ -4,9 +4,11 @@ include ':BlueMapCLI'
include ':BlueMapCommon'
include ':BlueMapSponge'
include ':BlueMapBukkit'
include ':BlueMapForge'
project(':BlueMapCore').projectDir = "$rootDir/BlueMapCore" as File
project(':BlueMapCLI').projectDir = "$rootDir/BlueMapCLI" as File
project(':BlueMapCommon').projectDir = "$rootDir/BlueMapCommon" as File
project(':BlueMapSponge').projectDir = "$rootDir/BlueMapSponge" as File
project(':BlueMapBukkit').projectDir = "$rootDir/BlueMapBukkit" as File
project(':BlueMapBukkit').projectDir = "$rootDir/BlueMapBukkit" as File
project(':BlueMapForge').projectDir = "$rootDir/BlueMapForge" as File