Update 1.12.2

This commit is contained in:
Mike Primm 2022-02-21 14:32:14 -06:00
parent f27fbc9f3e
commit 50e6317fa9
3 changed files with 16 additions and 22 deletions

View File

@ -1,9 +1,7 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral() mavenCentral()
maven {url = "https://oss.sonatype.org/content/repositories/snapshots/"} maven { url = "https://repo.spongepowered.org/maven" }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
@ -16,7 +14,7 @@ apply plugin: 'eclipse'
eclipse { eclipse {
project { project {
name = "Dynmap(Forge-1.12.2)" name = "Dynmap(Forge-Legacy-1.12.2)"
} }
} }
@ -32,18 +30,14 @@ targetCompatibility = 1.8
ext.buildNumber = System.getenv().BUILD_NUMBER ?: "Dev" ext.buildNumber = System.getenv().BUILD_NUMBER ?: "Dev"
repositories { repositories {
maven { mavenCentral() // Maven Central
name = 'forge' maven { url = 'https://repo.spongepowered.org/maven' } // SpongePowered
url = 'http://files.minecraftforge.net/maven' maven { url = 'https://jitpack.io/' } // JitPack
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
} }
minecraft { minecraft {
version = "1.12.2-14.23.4.2705" version = "1.12.2-14.23.5.2847"
mappings = "snapshot_20171031" mappings = "snapshot_20180814"
runDir = 'run' runDir = 'run'
replaceIn "Version.java" replaceIn "Version.java"
replace "@VERSION@", project.version + '-' + project.ext.buildNumber replace "@VERSION@", project.version + '-' + project.ext.buildNumber

View File

@ -188,7 +188,7 @@ public class DynmapPlugin
Log.warning("Exception caught reading unique ID for block " + i); Log.warning("Exception caught reading unique ID for block " + i);
} }
if (ui != null) { if (ui != null) {
String bn = ui.getResourceDomain() + ":" + ui.getResourcePath(); String bn = ui.getNamespace() + ":" + ui.getPath();
// Only do defined names, and not "air" // Only do defined names, and not "air"
if (!bn.equals(DynmapBlockState.AIR_BLOCK)) { if (!bn.equals(DynmapBlockState.AIR_BLOCK)) {
DynmapBlockState basebs = null; DynmapBlockState basebs = null;
@ -251,7 +251,7 @@ public class DynmapPlugin
return Item.getItemById(id); return Item.getItemById(id);
} }
public static final String getBlockUnlocalizedName(Block b) { public static final String getBlockUnlocalizedName(Block b) {
String s = b.getUnlocalizedName(); String s = b.getTranslationKey();
if (s.startsWith("tile.")) { if (s.startsWith("tile.")) {
s = s.substring(5); s = s.substring(5);
} }
@ -1057,7 +1057,7 @@ public class DynmapPlugin
int i = Block.getIdFromBlock(b); int i = Block.getIdFromBlock(b);
ResourceLocation ui = Block.REGISTRY.getNameForObject(b); ResourceLocation ui = Block.REGISTRY.getNameForObject(b);
if (ui != null) { if (ui != null) {
map.put(i, ui.getResourceDomain() + ":" + ui.getResourcePath()); map.put(i, ui.getNamespace() + ":" + ui.getPath());
} }
} }
return map; return map;
@ -1103,7 +1103,7 @@ public class DynmapPlugin
Log.warning("Exception caught reading unique ID for block " + i); Log.warning("Exception caught reading unique ID for block " + i);
} }
if (ui != null) { if (ui != null) {
map.put(ui.getResourceDomain() + ":" + ui.getResourcePath(), i); map.put(ui.getNamespace() + ":" + ui.getPath(), i);
} }
} }
return map; return map;
@ -1124,7 +1124,7 @@ public class DynmapPlugin
Log.warning("Exception caught reading unique ID for item " + i); Log.warning("Exception caught reading unique ID for item " + i);
} }
if (ui != null) { if (ui != null) {
map.put(ui.getResourceDomain() + ":" + ui.getResourcePath(), i - 256); map.put(ui.getNamespace() + ":" + ui.getPath(), i - 256);
} }
} }
return map; return map;
@ -1756,7 +1756,7 @@ public class DynmapPlugin
if(!onchunkpopulate) return; if(!onchunkpopulate) return;
World w = event.getWorld(); World w = event.getWorld();
if(!(w instanceof WorldServer)) return; if(!(w instanceof WorldServer)) return;
Chunk c = w.getChunkFromChunkCoords(event.getChunkX(), event.getChunkZ()); Chunk c = w.getChunk(event.getChunkX(), event.getChunkZ());
int ymin = 0, ymax = 0; int ymin = 0, ymax = 0;
if(c != null) { if(c != null) {
ForgeWorld fw = getWorld(event.getWorld(), false); ForgeWorld fw = getWorld(event.getWorld(), false);

View File

@ -194,7 +194,7 @@ public class ForgeWorld extends DynmapWorld
public int getHighestBlockYAt(int x, int z) public int getHighestBlockYAt(int x, int z)
{ {
if(world != null) { if(world != null) {
return world.getChunkFromChunkCoords(x >> 4, z >> 4).getHeightValue(x & 15, z & 15); return world.getChunk(x >> 4, z >> 4).getHeightValue(x & 15, z & 15);
} }
else else
return -1; return -1;