diff --git a/110/build.gradle b/110/build.gradle index ade4ee2..f0aa8c5 100644 --- a/110/build.gradle +++ b/110/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/111/build.gradle b/111/build.gradle index 6484cc0..40943d9 100644 --- a/111/build.gradle +++ b/111/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/112/build.gradle b/112/build.gradle index 0ffb1dc..19a35a7 100644 --- a/112/build.gradle +++ b/112/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/112/fast.sh b/112/fast.sh index 63b3d0d..40b0b08 100644 --- a/112/fast.sh +++ b/112/fast.sh @@ -6,7 +6,7 @@ for x in src/main/java/mobi/omegacentauri/raspberryjammod/*.java ; do sed -i -f fix.sed $x done rm build/libs/Raspberr*.jar 2> /dev/null -sh gradlew build +sh gradlew --offline build # --offline build rm build/libs/Raspberry*ources.jar 2> /dev/null mv build/libs/Raspberr* build/libs/RaspberryJamMod.jar 2> /dev/null @@ -17,7 +17,11 @@ if [ "$1" != "noinstall" ] then mkdir $APPDATA/.minecraft/mods mkdir $APPDATA/.minecraft/mods/1.12 + mkdir $APPDATA/.minecraft/mods/1.12.1 + mkdir $APPDATA/.minecraft/mods/1.12.2 cp build/libs/RaspberryJamMod.jar $APPDATA/.minecraft/mods/1.12/ + cp build/libs/RaspberryJamMod.jar $APPDATA/.minecraft/mods/1.12.1/ + cp build/libs/RaspberryJamMod.jar $APPDATA/.minecraft/mods/1.12.2/ else echo Skipping mod installation. fi diff --git a/19/build.gradle b/19/build.gradle index ce3ce55..9dc554b 100644 --- a/19/build.gradle +++ b/19/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/19/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java b/19/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java index 169b37a..2b5658b 100644 --- a/19/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java +++ b/19/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java @@ -666,7 +666,7 @@ else if (cmd.equals(GETHEIGHT)) { } } - h -= serverWorlds[0].getSpawnPoint().getY(); + h -= Location.getOrigin(serverWorlds[0]).getY(); sendLine(h); } diff --git a/19/src/main/java/mobi/omegacentauri/raspberryjammod/Location.java b/19/src/main/java/mobi/omegacentauri/raspberryjammod/Location.java index 982a727..1579681 100644 --- a/19/src/main/java/mobi/omegacentauri/raspberryjammod/Location.java +++ b/19/src/main/java/mobi/omegacentauri/raspberryjammod/Location.java @@ -9,6 +9,7 @@ public class Location extends BlockPos { World world; static final int WORLD_SPACING = 2000; static final int WORLD_SPACING_HALF = WORLD_SPACING/2; + static BlockPos zeroPoint = new BlockPos(0,0,0); // Altitudes for world number i are >-WORLD_SPACING_HALF-WORLD_SPACING*i and // <= WORLD_SPACING_HALF-WORLD_SPACING*i, with altitude 0 being at -WORLD_SPACING*i. @@ -53,25 +54,32 @@ static public double encodeAltitude(int worldIndex, double y) { super(x,y,z); this.world = world; } + + public static BlockPos getOrigin(World w) { + if (RaspberryJamMod.absoluteCoordinates) + return zeroPoint; + else + return w.getSpawnPoint(); + } static Location decodeLocation(World[] serverWorlds, int x, int y, int z) { World w = getWorldByEncodedAltitude(serverWorlds, y); - BlockPos spawnPos = w.getSpawnPoint(); - return new Location(w, x+spawnPos.getX(), (int)decodeAltitude(y)+spawnPos.getY(), z+spawnPos.getZ()); + BlockPos originPos = getOrigin(w); + return new Location(w, x+originPos.getX(), (int)decodeAltitude(y)+originPos.getY(), z+originPos.getZ()); } static Vec3w decodeVec3w(World[] serverWorlds, double x, double y, double z) { World w = getWorldByEncodedAltitude(serverWorlds, y); - BlockPos spawnPos = w.getSpawnPoint(); - return new Vec3w(w, x+spawnPos.getX(), (int)decodeAltitude(y)+spawnPos.getY(), z+spawnPos.getZ()); + BlockPos originPos = getOrigin(w); + return new Vec3w(w, x+originPos.getX(), (int)decodeAltitude(y)+originPos.getY(), z+originPos.getZ()); } public static Vec3d encodeVec3(World[] serverWorlds, World w, Vec3d pos) { for (int i = 0 ; i < serverWorlds.length ; i++) { if (serverWorlds[i] == w) { - BlockPos spawnPos = w.getSpawnPoint(); - return new Vec3d(pos.xCoord-spawnPos.getX(), encodeAltitude(i, pos.yCoord-spawnPos.getY()), - pos.zCoord-spawnPos.getZ()); + BlockPos originPos = getOrigin(w); + return new Vec3d(pos.xCoord-originPos.getX(), encodeAltitude(i, pos.yCoord-originPos.getY()), + pos.zCoord-originPos.getZ()); } } return pos; @@ -80,8 +88,8 @@ public static Vec3d encodeVec3(World[] serverWorlds, World w, Vec3d pos) { public static Vec3i encodeVec3i(World[] serverWorlds, World w, int x, int y, int z) { for (int i = 0 ; i < serverWorlds.length ; i++) { if (serverWorlds[i] == w) { - BlockPos spawnPos = w.getSpawnPoint(); - return new Vec3i(x-spawnPos.getX(), encodeAltitude(i, y-spawnPos.getY()), z-spawnPos.getZ()); + BlockPos originPos = getOrigin(w); + return new Vec3i(x-originPos.getX(), encodeAltitude(i, y-originPos.getY()), z-originPos.getZ()); } } return new Vec3i(x,y,z); diff --git a/19/src/main/java/mobi/omegacentauri/raspberryjammod/Permission.java b/19/src/main/java/mobi/omegacentauri/raspberryjammod/Permission.java index d20d4aa..547e368 100644 --- a/19/src/main/java/mobi/omegacentauri/raspberryjammod/Permission.java +++ b/19/src/main/java/mobi/omegacentauri/raspberryjammod/Permission.java @@ -1,5 +1,6 @@ package mobi.omegacentauri.raspberryjammod; +import net.minecraft.util.math.BlockPos; import java.util.ArrayList; import java.util.List; @@ -70,13 +71,15 @@ public void add(String s) { if (relative) { if (world == null) { for (World w : worlds) { - add(w,x1+w.getSpawnPoint().getX(),z1+w.getSpawnPoint().getZ(), - x2+w.getSpawnPoint().getX(),z2+w.getSpawnPoint().getZ(), permitted); + BlockPos origin = Location.getOrigin(w); + add(w,x1+origin.getX(),z1+origin.getZ(), + x2+origin.getX(),z2+origin.getZ(), permitted); } } else { - add(world,x1+world.getSpawnPoint().getX(),z1+world.getSpawnPoint().getZ(), - x2+world.getSpawnPoint().getX(),z2+world.getSpawnPoint().getZ(), + BlockPos origin = Location.getOrigin(world); + add(world,x1+origin.getX(),z1+origin.getZ(), + x2+origin.getX(),z2+origin.getZ(), permitted); } } diff --git a/19/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java b/19/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java index 45fb4e8..b6ec3e4 100644 --- a/19/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java +++ b/19/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java @@ -55,7 +55,7 @@ public class RaspberryJamMod { public static final String MODID = "raspberryjammod"; - public static final String VERSION = "0.92"; + public static final String VERSION = "0.94"; public static final String NAME = "Raspberry Jam Mod"; private APIServer fullAPIServer = null; private PythonExternalCommand pythonExternalCommand = null; @@ -83,6 +83,7 @@ public class RaspberryJamMod public static boolean noFallDamage = false; public static boolean noInWallDamage = false; public static boolean globalImmutable = false; + public static boolean absoluteCoordinates = false; public static volatile boolean noNameTags = false; public static final int NOMINAL_VERSION = 1009000; @@ -136,6 +137,7 @@ public static void synchronizeConfig() { noFallDamage = configFile.getBoolean("Disable Fall Damage", Configuration.CATEGORY_GENERAL, false, "Disable fall damage"); noInWallDamage = configFile.getBoolean("Disable Stuck-In-Wall Damage", Configuration.CATEGORY_GENERAL, false, "Disable stuck-in-wall damage"); globalImmutable = configFile.getBoolean("Immutability Setting Is Global", Configuration.CATEGORY_GENERAL, false, "Immutability setting applies to all players"); + absoluteCoordinates = configFile.getBoolean("Absolute Coordinates", Configuration.CATEGORY_GENERAL, false, "Use absolute coordinates in scripts"); // clientOnlyPortNumber = configFile.getInt("Port Number for Client-Only API", Configuration.CATEGORY_GENERAL, 0, 0, 65535, "Client-only API port number (normally 0)"); if (configFile.hasChanged()) diff --git a/194/build.gradle b/194/build.gradle index 7bf94c5..2f632d3 100644 --- a/194/build.gradle +++ b/194/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/RaspberryJamMod.iss b/RaspberryJamMod.iss index 6e50885..08e72c5 100755 --- a/RaspberryJamMod.iss +++ b/RaspberryJamMod.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "RaspberryJamMod" -#define MyAppVersion "0.92" +#define MyAppVersion "0.93" #define MyAppPublisher "Omega Centauri Software" #define MyAppURL "http://github.com/arpruss/raspberryjammod" @@ -66,6 +66,8 @@ Source: "110\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft Source: "111\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft\mods\1.11\" Source: "111\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft\mods\1.11.2\" Source: "112\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft\mods\1.12\" +Source: "112\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft\mods\1.12.1\" +Source: "112\build\libs\RaspberryJamMod.jar"; DestDir: "{userappdata}\.minecraft\mods\1.12.2\" Source: "py27\*"; Excludes: "py27\Lib\site-packages\pip\*"; DestDir: "{userappdata}\.minecraft\python27"; Flags: createallsubdirs recursesubdirs ignoreversion; Components: Python\Python27\Interpreter Source: "py3\*"; Excludes: "py3\Lib\site-packages\pip\*"; DestDir: "{userappdata}\.minecraft\python3"; Flags: createallsubdirs recursesubdirs ignoreversion; Components: Python\Python3\Interpreter Source: "config27\raspberryjammod.cfg"; DestDir: "{userappdata}\.minecraft\config"; Flags: confirmoverwrite; Components: Python\Python27\Interpreter\Config @@ -94,9 +96,11 @@ Type: files; Name: "{userappdata}\.minecraft\mods\1.10.2\RaspberryJamMod*.jar"; Type: files; Name: "{userappdata}\.minecraft\mods\1.11\RaspberryJamMod*.jar"; Components: Mod Type: files; Name: "{userappdata}\.minecraft\mods\1.11.2\RaspberryJamMod*.jar"; Components: Mod Type: files; Name: "{userappdata}\.minecraft\mods\1.12\RaspberryJamMod*.jar"; Components: Mod +Type: files; Name: "{userappdata}\.minecraft\mods\1.12.1\RaspberryJamMod*.jar"; Components: Mod +Type: files; Name: "{userappdata}\.minecraft\mods\1.12.2\RaspberryJamMod*.jar"; Components: Mod [Messages] -WelcomeLabel2=MAKE SURE YOU HAVE FORGE FOR MINECRAFT (versions 1.8-1.12 supported) ALREADY INSTALLED. Otherwise, this won't work. +WelcomeLabel2=MAKE SURE YOU HAVE FORGE FOR MINECRAFT (versions 1.8-1.12.2 supported) ALREADY INSTALLED. Otherwise, this won't work. ConfirmUninstall=Are you sure you want to completely remove %1 and all of its components? (Note that the scripts in the mcpipy folder of your Minecraft folder should NOT get deleted, however, in case you made changes.) [Icons] diff --git a/build.gradle b/build.gradle index 06ef8b1..d3d9a9b 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "0.92" +version = "0.94" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/mods.zip b/mods.zip index 5f6c559..a581789 100644 Binary files a/mods.zip and b/mods.zip differ diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java b/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java index 69ce546..4788244 100644 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java @@ -54,7 +54,7 @@ public class RaspberryJamMod { public static final String MODID = "raspberryjammod"; - public static final String VERSION = "0.92"; + public static final String VERSION = "0.94"; public static final String NAME = "Raspberry Jam Mod"; private APIServer fullAPIServer = null; private PythonExternalCommand pythonExternalCommand = null;