geforkt von Mirrors/FastAsyncWorldEdit
Merge branch 'master' into feature/piston-commands
Dieser Commit ist enthalten in:
Commit
e06c8b84b4
@ -1,4 +1,4 @@
|
||||
![WorldEdit](http://static.sk89q.com/readme/worldedit.png)
|
||||
![WorldEdit](worldedit-logo.png)
|
||||
=========
|
||||
|
||||
WorldEdit is Minecraft mod that turns Minecraft into an in-game map editor (sorta, kinda).
|
||||
|
@ -69,15 +69,6 @@ artifactory {
|
||||
ivy = false
|
||||
}
|
||||
}
|
||||
|
||||
resolve {
|
||||
repository {
|
||||
repoKey = 'repo'
|
||||
username = "${artifactory_user}"
|
||||
password = "${artifactory_password}"
|
||||
maven = true
|
||||
}
|
||||
}
|
||||
}
|
||||
artifactoryPublish.skip = true
|
||||
|
||||
|
@ -287,13 +287,10 @@ public class MCEditSchematicReader extends NBTSchematicReader {
|
||||
case "ArmorStand": return "armor_stand";
|
||||
case "CaveSpider": return "cave_spider";
|
||||
case "MinecartChest": return "chest_minecart";
|
||||
case "MinecartCommandBlock": return "commandblock_minecart";
|
||||
case "DragonFireball": return "dragon_fireball";
|
||||
case "ThrownEgg": return "egg";
|
||||
case "EnderCrystal": return "ender_crystal";
|
||||
case "EnderDragon": return "ender_dragon";
|
||||
case "ThrownEnderpearl": return "ender_pearl";
|
||||
case "EyeOfEnderSignal": return "eye_of_ender_signal";
|
||||
case "FallingSand": return "falling_block";
|
||||
case "FireworksRocketEntity": return "fireworks_rocket";
|
||||
case "MinecartFurnace": return "furnace_minecart";
|
||||
@ -317,9 +314,29 @@ public class MCEditSchematicReader extends NBTSchematicReader {
|
||||
case "VillagerGolem": return "villager_golem";
|
||||
case "WitherBoss": return "wither";
|
||||
case "WitherSkull": return "wither_skull";
|
||||
case "ThrownExpBottle": return "xp_bottle";
|
||||
case "XPOrb": return "xp_orb";
|
||||
case "PigZombie": return "zombie_pigman";
|
||||
case "XPOrb":
|
||||
case "xp_orb":
|
||||
return "experience_orb";
|
||||
case "ThrownExpBottle":
|
||||
case "xp_bottle":
|
||||
return "experience_bottle";
|
||||
case "EyeOfEnderSignal":
|
||||
case "eye_of_ender_signal":
|
||||
return "eye_of_ender";
|
||||
case "EnderCrystal":
|
||||
case "ender_crystal":
|
||||
return "end_crystal";
|
||||
case "fireworks_rocket": return "firework_rocket";
|
||||
case "MinecartCommandBlock":
|
||||
case "commandblock_minecart":
|
||||
return "command_block_minecart";
|
||||
case "snowman": return "snow_golem";
|
||||
case "villager_golem": return "iron_golem";
|
||||
case "evocation_fangs": return "evoker_fangs";
|
||||
case "evocation_illager": return "evoker";
|
||||
case "vindication_illager": return "vindicator";
|
||||
case "illusion_illager": return "illusioner";
|
||||
default: return id;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* WorldEdit, a Minecraft world manipulation toolkit
|
||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
||||
* Copyright (C) WorldEdit team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit.util.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
public class ResourceLoader {
|
||||
|
||||
private ResourceLoader() {
|
||||
}
|
||||
|
||||
public static URL getResource(Class clazz, String name) throws IOException {
|
||||
URL url = clazz.getResource(name);
|
||||
if (url == null) {
|
||||
try {
|
||||
return new URL("modjar://worldedit/" + clazz.getName().substring(0, clazz.getName().lastIndexOf('.')).replace(".", "/") + "/"
|
||||
+ name);
|
||||
} catch (Exception e) {
|
||||
// Not forge.
|
||||
}
|
||||
throw new IOException("Could not find " + name);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@ import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import com.sk89q.worldedit.util.io.ResourceLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -74,7 +75,7 @@ public class BundledBlockData {
|
||||
GsonBuilder gsonBuilder = new GsonBuilder();
|
||||
gsonBuilder.registerTypeAdapter(Vector3.class, new VectorAdapter());
|
||||
Gson gson = gsonBuilder.create();
|
||||
URL url = BundledBlockData.class.getResource("blocks.json");
|
||||
URL url = ResourceLoader.getResource(BundledBlockData.class, "blocks.json");
|
||||
if (url == null) {
|
||||
throw new IOException("Could not find blocks.json");
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import com.sk89q.worldedit.util.io.ResourceLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -74,7 +75,7 @@ public class BundledItemData {
|
||||
GsonBuilder gsonBuilder = new GsonBuilder();
|
||||
gsonBuilder.registerTypeAdapter(Vector3.class, new VectorAdapter());
|
||||
Gson gson = gsonBuilder.create();
|
||||
URL url = BundledItemData.class.getResource("items.json");
|
||||
URL url = ResourceLoader.getResource(BundledItemData.class,"items.json");
|
||||
if (url == null) {
|
||||
throw new IOException("Could not find items.json");
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import com.sk89q.worldedit.util.io.ResourceLoader;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
@ -74,7 +75,7 @@ public class LegacyMapper {
|
||||
GsonBuilder gsonBuilder = new GsonBuilder();
|
||||
gsonBuilder.registerTypeAdapter(Vector3.class, new VectorAdapter());
|
||||
Gson gson = gsonBuilder.disableHtmlEscaping().create();
|
||||
URL url = LegacyMapper.class.getResource("legacy.json");
|
||||
URL url = ResourceLoader.getResource(LegacyMapper.class, "legacy.json");
|
||||
if (url == null) {
|
||||
throw new IOException("Could not find legacy.json");
|
||||
}
|
||||
|
BIN
worldedit-logo.png
Normale Datei
BIN
worldedit-logo.png
Normale Datei
Binäre Datei nicht angezeigt.
Nachher Breite: | Höhe: | Größe: 8.9 KiB |
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren