Update forge 1.13.2 version

This commit is contained in:
Mike Primm 2019-04-27 15:58:07 -05:00
parent 57fa00b7c3
commit 60c9d8b66c
4 changed files with 14 additions and 18 deletions

View File

@ -18,7 +18,7 @@ apply plugin: 'eclipse'
dependencies {
compile project(":DynmapCore")
compile project(":DynmapCoreAPI")
minecraft 'net.minecraftforge:forge:1.13.2-25.0.74'
minecraft 'net.minecraftforge:forge:1.13.2-25.0.191'
}
sourceCompatibility = 1.8
@ -33,16 +33,12 @@ repositories {
}
minecraft {
mappings channel: 'snapshot', version: '20180921-1.13'
mappings channel: 'snapshot', version: '20190415-1.13.2'
runs {
server {
workingDirectory project.file('run').canonicalPath
}
}
replaceIn "Version.java"
replace "@VERSION@", project.version + '-' + project.ext.buildNumber
replace "@BUILD_NUMBER@", project.ext.buildNumber
}
project.archivesBaseName = "${project.archivesBaseName}-forge-1.13.2"

View File

@ -124,7 +124,7 @@ public class ChunkSnapshot
this.captureFulltime = 0;
this.hmap = nbt.getIntArray("HeightMap");
this.sectionCnt = worldheight / 16;
if (nbt.hasKey("InhabitedTime")) {
if (nbt.contains("InhabitedTime")) {
this.inhabitedTicks = nbt.getLong("InhabitedTime");
}
else {
@ -150,7 +150,7 @@ public class ChunkSnapshot
this.section[secnum] = cursect;
DynmapBlockState[] states = cursect.states;
// JEI format
if (sec.hasKey("Palette")) {
if (sec.contains("Palette")) {
int[] p = sec.getIntArray("Palette");
// Palette is list of state values, where Blocks=bit 11-4 of index, Data=bit 3-0
byte[] msb_bytes = sec.getByteArray("Blocks");
@ -179,7 +179,7 @@ public class ChunkSnapshot
}
// Get any additional ID data
byte[] addid = null;
if (sec.hasKey("Add")) { /* If additional data, add it */
if (sec.contains("Add")) { /* If additional data, add it */
addid = sec.getByteArray("Add");
if (addid.length < (BLOCKS_PER_SECTION / 2)) {
addid = Arrays.copyOf(addid, (BLOCKS_PER_SECTION / 2));
@ -187,7 +187,7 @@ public class ChunkSnapshot
}
// Check for NEID additional additional ID data
byte[] addid2 = null;
if (sec.hasKey("Add2")) { /* If additional data (NEID), add it */
if (sec.contains("Add2")) { /* If additional data (NEID), add it */
addid2 = sec.getByteArray("Add2");
if (addid2.length < (BLOCKS_PER_SECTION / 2)) {
addid2 = Arrays.copyOf(addid2, (BLOCKS_PER_SECTION / 2));
@ -195,7 +195,7 @@ public class ChunkSnapshot
}
// Get meta nibble data
byte[] bd = null;
if (sec.hasKey("Data")) {
if (sec.contains("Data")) {
bd = sec.getByteArray("Data");
if (bd.length < (BLOCKS_PER_SECTION / 2)) {
bd = Arrays.copyOf(bd, (BLOCKS_PER_SECTION / 2));
@ -230,13 +230,13 @@ public class ChunkSnapshot
}
}
cursect.emitlight = sec.getByteArray("BlockLight");
if (sec.hasKey("SkyLight")) {
if (sec.contains("SkyLight")) {
cursect.skylight = sec.getByteArray("SkyLight");
}
}
/* Get biome data */
this.biome = new int[COLUMNS_PER_CHUNK];
if (nbt.hasKey("Biomes")) {
if (nbt.contains("Biomes")) {
byte[] b = nbt.getByteArray("Biomes");
if (b != null) {
for (int i = 0; i < b.length; i++) {

View File

@ -1452,8 +1452,8 @@ public class DynmapPlugin
loadWorlds();
/* Initialized the currently loaded worlds */
if(server.func_212370_w() != null) {
for (WorldServer world : server.func_212370_w()) {
if(server.getWorlds() != null) {
for (WorldServer world : server.getWorlds()) {
ForgeWorld w = this.getWorld(world);
/*NOTYET - need rest of forge
if(DimensionManager.getWorld(world.provider.getDimensionId()) == null) { // If not loaded

View File

@ -1163,7 +1163,7 @@ public class ForgeMapChunkCache extends MapChunkCache
HashMap<String, Object> vmap = new HashMap<String, Object>();
for (Object t : tc.keySet()) {
String st = (String) t;
INBTBase tg = tc.getTag(st);
INBTBase tg = tc.get(st);
vmap.put(st, getNBTValue(tg));
}
val = vmap;
@ -1257,7 +1257,7 @@ public class ForgeMapChunkCache extends MapChunkCache
if(te_fields != null) {
vals.clear();
for(String id: te_fields) {
INBTBase v = tc.getTag(id); /* Get field */
INBTBase v = tc.get(id); /* Get field */
if(v != null) {
Object val = getNBTValue(v);
if(val != null) {
@ -1312,7 +1312,7 @@ public class ForgeMapChunkCache extends MapChunkCache
if (vis) { // If visible
NBTTagCompound nbt = new NBTTagCompound();
try {
writechunktonbt.invoke(cps.chunkLoader, cps.provideChunk(chunk.x, chunk.z, false, false), w, nbt);
writechunktonbt.invoke(cps.chunkLoader, cps.getChunk(chunk.x, chunk.z, false, false), w, nbt);
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException e) {
} catch (InvocationTargetException e) {