-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into minimap-drawing
- Loading branch information
Showing
17 changed files
with
245 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,6 @@ whitelist.json | |
*.ipr | ||
*.iws | ||
src/main/resources/mixins.*.json | ||
dependencies/voxelmap*.jar | ||
/data/ | ||
*.bat |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath 'de.undercouch:gradle-download-task:4.1.2' | ||
} | ||
} | ||
|
||
import de.undercouch.gradle.tasks.download.Download | ||
|
||
def voxelMapFile = file("data/voxelmap_1.7.0b.jar") | ||
def voxelMapFileDeobf = file("dependencies/voxelmap_1.7.0b-deobf.jar") | ||
|
||
task getVoxelMap(type: Download) { | ||
onlyIf { | ||
!voxelMapFile.exists() | ||
} | ||
src "https://media.forgecdn.net/files/2462/146/mod_voxelMap_1.7.0b_for_1.7.10.litemod" //direct link to VoxelMap on CurseForge | ||
dest voxelMapFile | ||
mustRunAfter "deobfBinJar" | ||
mustRunAfter "repackMinecraft" | ||
} | ||
|
||
task deobfVoxelMap(dependsOn: getVoxelMap, type: Exec) { | ||
onlyIf { | ||
!voxelMapFileDeobf.exists() | ||
} | ||
// VoxelMap uese Notch names, so we have to deobfuscate them | ||
// Source for the BON2 version used: https://github.com/glowredman/BON2/tree/Official | ||
commandLine 'java', '-jar', 'BON2-2.5.0.CUSTOM-all.jar', '--inputJar', voxelMapFile, '--outputJar', voxelMapFileDeobf, '--mcVer', '1.7.10', '--mappingsVer', 'stable_12-1.7.10', '--notch' | ||
} | ||
|
||
tasks.setupCIWorkspace.dependsOn deobfVoxelMap | ||
tasks.setupDevWorkspace.dependsOn deobfVoxelMap | ||
tasks.setupDecompWorkspace.dependsOn deobfVoxelMap | ||
tasks.compileJava.dependsOn deobfVoxelMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+439 KB
...WorldMap_1.14.1.10_Forge_1.7.10-deobf.jar → ...WorldMap_1.14.1.11_Forge_1.7.10-deobf.jar
Binary file not shown.
Binary file renamed
BIN
+725 KB
...s_Minimap_21.10.11_Forge_1.7.10-deobf.jar → ...s_Minimap_21.10.14_Forge_1.7.10-deobf.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/com/sinthoras/visualprospecting/hooks/ProspectingNotificationEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.sinthoras.visualprospecting.hooks; | ||
|
||
import com.sinthoras.visualprospecting.database.OreVeinPosition; | ||
import com.sinthoras.visualprospecting.database.UndergroundFluidPosition; | ||
|
||
import cpw.mods.fml.common.eventhandler.Event; | ||
|
||
public class ProspectingNotificationEvent extends Event { | ||
|
||
@Override | ||
public boolean isCancelable() { | ||
return false; | ||
} | ||
|
||
public static class OreVein extends ProspectingNotificationEvent { | ||
|
||
private final OreVeinPosition position; | ||
|
||
public OreVein(OreVeinPosition position) { | ||
this.position = position; | ||
} | ||
|
||
public OreVeinPosition getPosition() { | ||
return this.position; | ||
} | ||
|
||
} | ||
|
||
public static class UndergroundFluid extends ProspectingNotificationEvent { | ||
|
||
private final UndergroundFluidPosition position; | ||
|
||
public UndergroundFluid(UndergroundFluidPosition position) { | ||
this.position = position; | ||
} | ||
|
||
public UndergroundFluidPosition getPosition() { | ||
return this.position; | ||
} | ||
|
||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
...java/com/sinthoras/visualprospecting/integration/voxelmap/IWaypointManagerReflection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.sinthoras.visualprospecting.integration.voxelmap; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import com.sinthoras.visualprospecting.VP; | ||
import com.thevoxelbox.voxelmap.interfaces.IWaypointManager; | ||
|
||
public class IWaypointManagerReflection { | ||
|
||
private static Method getCurrentSubworldDescriptor; | ||
|
||
public static String getCurrentSubworldDescriptor(IWaypointManager obj, boolean arg) { | ||
try { | ||
return (String) getCurrentSubworldDescriptor.invoke(obj, arg); | ||
} catch (Exception e) { | ||
VP.error("Could not invoke IWaypointManager#if. If it failed due to a NullPointerException, look for an error message starting with \"Getting the method IWaypointManager#if failed\" further up."); | ||
e.printStackTrace(); | ||
} | ||
return ""; | ||
} | ||
|
||
static { | ||
try { | ||
getCurrentSubworldDescriptor = IWaypointManager.class.getMethod("if", boolean.class); | ||
} catch (Exception e) { | ||
VP.error("Getting the method IWaypointManager#if failed, any calls to IWaypointManagerReflection#getCurrentSubworldDescriptor will return an empty String."); | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.