From d5544ed9c78d73129970510d9c9caa629a470de5 Mon Sep 17 00:00:00 2001 From: arpruss Date: Fri, 19 Jun 2015 20:45:32 -0500 Subject: [PATCH] 0.29 --- RaspberryJamMod.iss | 2 +- build.gradle | 2 +- go.sh | 4 +- python2-scripts.zip | Bin 251920 -> 253261 bytes python3-scripts.zip | Bin 178852 -> 180190 bytes python3-scripts/mcpipy/__init__.py | 0 python3-scripts/mcpipy/digitalclock.py | 4 + python3-scripts/mcpipy/mandelbulb.py | 21 ++-- python3-scripts/mcpipy/vehicle.py | 105 ++++++++++++++++++ .../raspberryjammod/APIHandler.java | 35 +++++- .../raspberryjammod/MCEventHandler.java | 2 + .../raspberryjammod/RaspberryJamMod.java | 2 +- .../raspberryjammod/SetBlockState.java | 6 +- .../raspberryjammod/SetBlocksState.java | 7 +- 14 files changed, 170 insertions(+), 20 deletions(-) delete mode 100644 python3-scripts/mcpipy/__init__.py create mode 100644 python3-scripts/mcpipy/vehicle.py diff --git a/RaspberryJamMod.iss b/RaspberryJamMod.iss index 14e8b61..7aa0b11 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.28" +#define MyAppVersion "0.29" #define MyAppPublisher "Omega Centauri Software" #define MyAppURL "http://github.com/arpruss/raspberryjammod" diff --git a/build.gradle b/build.gradle index 78d014b..08ff5bb 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "0.28" +version = "0.29" group= "mobi.omegacentauri.raspberryjammod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "RaspberryJamMod" diff --git a/go.sh b/go.sh index e7fb512..b3a58d8 100755 --- a/go.sh +++ b/go.sh @@ -1,4 +1,6 @@ +./zip.sh rm build/libs/* ./gradlew.bat --offline build mv build/libs/Raspberr* build/libs/RaspberryJamMod.jar -cp build/libs/RaspberryJamMod.jar $APPDATA/.minecraft/mods/ \ No newline at end of file +cp build/libs/RaspberryJamMod.jar $APPDATA/.minecraft/mods/ +./makesetup.sh diff --git a/python2-scripts.zip b/python2-scripts.zip index da21787d73a11898c0dedee493e7c4c7826cf0cd..7bd31f30938e01105a3e9be5cacd59b2a9941be1 100755 GIT binary patch delta 4610 zcmZu#c|4Tg+n$*-C`E)U*~-|Yw-hz3JVSoVJ?vU6y#c4iyf*K^jO3fLggI2i$=w&U zI(Wrt4@b4nN|ilH4ukuFl};nthC`pEwC(lLC!+j#yTqvo8@8o~S5mkIqu(z(8EsG5 zaSepM9^R1jWD$y3V{Z*+=!$DUh-wl!+0aE1);IHdgmoR0`pq$J*m-+GdoF4|TUX^K znIL0Q^#4X;^x#E8DjCQ)toXLUJT=RJMw!?yenIGZofX^iaof?|RfL;-Vc&x|g)ag_QZU z57D>u8_#mE@_O+VayPEadM2wyYPD1MC!WRlsVzQbb*4AsD9XAVd(gI4v>3kf?ANFP zp0dSZd{T4w;@yp%4NN7I>gIi%L1A@dzov0a^Q^?1A5L<-$%ie*-^&%PYVoLV`R{6< zeseN(53(=)+=mL&j*Lg5{}F>^sFYLwdX@ zB-tV#u-b6M*G)IEu-vJAY{r?;L9KQ=3=2Xw=|ed5A~^KWl^l8)84Sha;(q0&HpOfX zQWQ!P&T3)kpkOUHMtU3t>cc}|oB`%Ke#vuZjDBV1jlW}>f}k1oC<*^*v>%tNNOJJn zd)#v@tM%f~e`k)(IhVg26rX1sUB7tbwje9|PPi){QYE_(WJOui&(>ncX+r|FVhd2T7SWl-p+SKX>Jn`GbN=;higyEvivKG&>QnP>cix5Loh z$8SsaIf_!u={_0%f!RKP$>rjOmnRqMXya!W8`zlCt0BRGpIPajj8yOv*PyN^Qq=LSLVnJaVpOXN$#!rjvApfB0nkDZ+72Otm9beS< zY^iD;fdUVS&qcD#v1^scx97914e>KGfQilm;*jD3x9wd-Asi8I&ud7$0V4C#y# zz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fH`#!!`ozo_F0JR|LjHhOdg}uK+w*M@m*C>x$B7>*i0?i;jw)gL?5LzVkU4%w#kao4}37 zHpH^{9Gsx{hyrwu7*L`bkIzb;hs#V+{qq!`;W_?TaAmbG%%x4x)@c+w`&s)W0Qy1# z@K+ZW@4UDsu?^5I9q?MBI=>MeF1Y}e zW^>CPGb0fqit82wZu+^{SXeK&F$fL#H92apytyX|)zo#i#KTF;qXQX%5#hh-jWBgqa$rAF6G0K?bq(CD@T7Sb1a4-- z3)LSM6Tg!$qn9{fI_WhtOfk94Vg`p7*6F5Y(Y;hzLwQzOi0Zf)YH zN7T^z8PgzH9~}H-_cDkzT1^yt@iosTOTLqY@iW>7~Y2-yaZHrpyCsMJ-EtI5dI30Mhk;~AHd6@Aseoy F{RfBD%}M|O diff --git a/python3-scripts/mcpipy/__init__.py b/python3-scripts/mcpipy/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python3-scripts/mcpipy/digitalclock.py b/python3-scripts/mcpipy/digitalclock.py index b4d31f9..deab7b9 100644 --- a/python3-scripts/mcpipy/digitalclock.py +++ b/python3-scripts/mcpipy/digitalclock.py @@ -1,3 +1,7 @@ +# +# Code under the MIT license by Alexander Pruss +# + from mc import * import text import datetime diff --git a/python3-scripts/mcpipy/mandelbulb.py b/python3-scripts/mcpipy/mandelbulb.py index 754c6a7..6bf5283 100755 --- a/python3-scripts/mcpipy/mandelbulb.py +++ b/python3-scripts/mcpipy/mandelbulb.py @@ -7,7 +7,7 @@ # Options for half: south, north, east, west, up, down from mc import * -import mcpi.settings +import mcpi.settings as settings import cmath import time import sys @@ -34,6 +34,7 @@ half = sys.argv[3].lower()[0] palette = list(reversed([WOOL_WHITE,HARDENED_CLAY_STAINED_WHITE,WOOL_PINK,WOOL_LIGHT_GRAY,WOOL_LIGHT_BLUE,WOOL_MAGENTA,WOOL_PURPLE,HARDENED_CLAY_STAINED_LIGHT_BLUE,HARDENED_CLAY_STAINED_LIGHT_GRAY,HARDENED_CLAY_STAINED_MAGENTA,HARDENED_CLAY_STAINED_PINK,HARDENED_CLAY_STAINED_RED,WOOL_RED,REDSTONE_BLOCK,HARDENED_CLAY_STAINED_ORANGE,WOOL_ORANGE,HARDENED_CLAY_STAINED_YELLOW,WOOL_YELLOW,WOOL_LIME,HARDENED_CLAY_STAINED_LIME,HARDENED_CLAY_STAINED_PURPLE,HARDENED_CLAY_STAINED_CYAN,WOOL_CYAN,WOOL_BLUE,HARDENED_CLAY_STAINED_BLUE,WOOL_GRAY,HARDENED_CLAY_STAINED_GREEN,WOOL_GREEN,HARDENED_CLAY_STAINED_BROWN,WOOL_BROWN,HARDENED_CLAY_STAINED_GRAY,WOOL_BLACK])); +if settings.isPE: def calculate(pos): x,z,y = pos[0],pos[1],pos[2] @@ -86,23 +87,23 @@ def toBulb(centerMC,centerBulb,scale,x,y,z): def draw(): count = 0 - rangeX = list(range(cornerMC.x, cornerMC.x+size)) - rangeY = list(range(cornerMC.y, cornerMC.y+size)) - rangeZ = list(range(cornerMC.z, cornerMC.z+size)) + rangeX = range(cornerMC.x, cornerMC.x+size) + rangeY = range(cornerMC.y, cornerMC.y+size) + rangeZ = range(cornerMC.z, cornerMC.z+size) if not half is None: if half == 'w': - rangeX = list(range(cornerMC.x, cornerMC.x+size/2)) + rangeX = range(cornerMC.x, cornerMC.x+size/2) elif half == 'e': - rangeX = list(range(cornerMC.x+size/2, cornerMC.x+size)) + rangeX = range(cornerMC.x+size/2, cornerMC.x+size) elif half == 'n': - rangeZ = list(range(cornerMC.z, cornerMC.z+size/2)) + rangeZ = range(cornerMC.z, cornerMC.z+size/2) elif half == 's': - rangeZ = list(range(cornerMC.z+size/2, cornerMC.z+size)) + rangeZ = range(cornerMC.z+size/2, cornerMC.z+size) elif half == 'u': - rangeY = list(range(cornerMC.y+size/2, cornerMC.y+size)) + rangeY = range(cornerMC.y+size/2, cornerMC.y+size) elif half == 'd': - rangeY = list(range(cornerMC.y, cornerMC.y+size/2)) + rangeY = range(cornerMC.y, cornerMC.y+size/2) for mcX in rangeX: for mcY in rangeY: diff --git a/python3-scripts/mcpipy/vehicle.py b/python3-scripts/mcpipy/vehicle.py new file mode 100644 index 0000000..3364230 --- /dev/null +++ b/python3-scripts/mcpipy/vehicle.py @@ -0,0 +1,105 @@ +# +# Code under the MIT license by Alexander Pruss +# + +# +# Make a moving vehicle out of whatever the player is standing on, within a set distance +# + +from mc import * +import time +import sys + +try: + MAX_DISTANCE_FROM_PLAYER = int(sys.argv[0]) +except: + MAX_DISTANCE_FROM_PLAYER = 25 + +# the following blocks do not count as part of the vehicle +SKIP = set((AIR.id,WATER_FLOWING.id,WATER_STATIONARY.id,GRASS.id,DIRT.id,LAVA_FLOWING.id,LAVA_STATIONARY.id)) + +def scan(dict,startPos,curPos=None): + global highWater + if curPos is not None: + block = mc.getBlockWithData(curPos[0]+startPos[0],curPos[1]+startPos[1],curPos[2]+startPos[2]) + + if block.id in SKIP: + if (block.id == WATER_STATIONARY.id or block.id == WATER_FLOWING.id) and (highWater is None or highWater < curPos[1]+startPos[1]): + highWater = curPos[1]+startPos[1] + return + else: + dict[curPos] = block + else: + curPos = (0,0,0) + + for x in range(-1,2): + for y in range(-1,2): + for z in range(-1,2): + pos = (x+curPos[0],y+curPos[1],z+curPos[2]) + if ( pos not in dict and abs(pos[0]) <= MAX_DISTANCE_FROM_PLAYER and + abs(pos[1]) <= MAX_DISTANCE_FROM_PLAYER and + abs(pos[2]) <= MAX_DISTANCE_FROM_PLAYER ): + scan(dict,startPos,pos) + +def rotate(dict, amount): + if amount == 0: + return dict + out = {} + if amount == 1: + for pos in dict: + out[(-pos[2],pos[1],pos[0])] = dict[pos] + elif amount == 2: + for pos in dict: + out[(-pos[0],pos[1],-pos[2])] = dict[pos] + else: + for pos in dict: + out[(pos[2],pos[1],-pos[0])] = dict[pos] + return out + +def translate(base,x,y,z): + out = {} + for pos in base: + out[(x+pos[0],y+pos[1],z+pos[2])] = base[pos] + return out + +mc = Minecraft() + +vehiclePos = mc.player.getTilePos() +vehicleRotation = int(round(mc.player.getRotation() / 90.)) % 4 + +highWater = None +baseVehicle = {} +mc.postToChat("Scanning") +scan(baseVehicle,(vehiclePos.x,vehiclePos.y,vehiclePos.z)) +mc.postToChat("Number of blocks: "+str(len(baseVehicle))) +if len(baseVehicle) == 0: + mc.postToChat("Make a vehicle and then stand on it when starting this script.") + exit() +else: + mc.postToChat("Now walk around.") + +oldVehicle = translate(baseVehicle,vehiclePos.x,vehiclePos.y,vehiclePos.z) +oldPos = vehiclePos +oldRotation = vehicleRotation + +while True: + vehiclePos = mc.player.getTilePos() + vehicleRotation = int(round(mc.player.getRotation() / 90.)) % 4 + if vehicleRotation != oldRotation: + baseVehicle = rotate(baseVehicle,(vehicleRotation-oldRotation)%4) + if vehiclePos != oldPos or vehicleRotation != oldRotation: + newVehicle = translate(baseVehicle,vehiclePos.x,vehiclePos.y,vehiclePos.z) + todo = {} + for pos in oldVehicle: + if pos not in newVehicle: + todo[pos] = WATER_FLOWING.id if highWater is not None and pos[1] <= highWater else AIR.id + for pos in newVehicle: + block = newVehicle[pos] + if pos not in oldVehicle or oldVehicle[pos] != block: + todo[pos] = block + for pos in todo: + mc.setBlock(pos,todo[pos]) + oldVehicle = newVehicle + oldPos = vehiclePos + oldRotation = vehicleRotation + time.sleep(0.25) diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java b/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java index 561d715..7327aaf 100755 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/APIHandler.java @@ -196,7 +196,22 @@ else if (cmd.equals(SETBLOCK)) { BlockPos pos = getBlockPosition(scan); short id = scan.nextShort(); short meta = scan.hasNextShort() ? scan.nextShort() : 0; - eventHandler.queueBlockAction(new SetBlockState(pos, id, meta)); + String tagString = getRest(scan); + + SetBlockState setState; + + if (tagString.length() > 0) { + try { + setState = new SetBlockNBT(pos, id, meta, JsonToNBT.func_180713_a(tagString)); + } catch (NBTException e) { + setState = new SetBlockState(pos, id, meta); + } + } + else { + setState = new SetBlockState(pos, id, meta); + } + + eventHandler.queueBlockAction(setState); } else if (cmd.equals(SETBLOCKS)) { BlockPos pos1 = getBlockPosition(scan); @@ -204,7 +219,23 @@ else if (cmd.equals(SETBLOCKS)) { short id = scan.nextShort(); short meta = scan.hasNextShort() ? scan.nextShort() : 0; - eventHandler.queueBlockAction(new SetBlocksState(pos1, pos2, id, meta)); + + String tagString = getRest(scan); + + SetBlocksState setState; + + if (tagString.length() > 0) { + try { + setState = new SetBlocksNBT(pos1, pos2, id, meta, JsonToNBT.func_180713_a(tagString)); + } catch (NBTException e) { + setState = new SetBlocksState(pos1, pos2, id, meta); + } + } + else { + setState = new SetBlocksState(pos1, pos2, id, meta); + } + + eventHandler.queueBlockAction(setState); } else if (cmd.equals(PLAYERGETPOS)) { entityGetPos(clientPlayer); diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/MCEventHandler.java b/src/main/java/mobi/omegacentauri/raspberryjammod/MCEventHandler.java index 2732e93..100d76d 100755 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/MCEventHandler.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/MCEventHandler.java @@ -14,9 +14,11 @@ import net.minecraft.event.ClickEvent; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.IChatComponent; diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java b/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java index 6b4a530..f02b6b3 100644 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/RaspberryJamMod.java @@ -41,7 +41,7 @@ public class RaspberryJamMod { public static final String MODID = "raspberryjammod"; - public static final String VERSION = "0.28"; + public static final String VERSION = "0.29"; public static final String NAME = "Raspberry Jam Mod"; private APIServer mcc; private PythonExternalCommand pythonExternalCommand = null; diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlockState.java b/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlockState.java index e427d39..e1c20e8 100755 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlockState.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlockState.java @@ -24,10 +24,12 @@ public SetBlockState(BlockPos pos, short id, short meta) { public void execute(World world) { IBlockState oldState = world.getBlockState(pos); Block oldBlock = oldState.getBlock(); + + if (null != world.getTileEntity(pos)) + world.removeTileEntity(pos); if (Block.getIdFromBlock(oldBlock) != (int)id || - oldBlock.getMetaFromState(oldState) != (int)meta || - world.getTileEntity(pos) != null) + oldBlock.getMetaFromState(oldState) != (int)meta ) world.setBlockState(pos, Block.getBlockById(id).getStateFromMeta(meta), 3); // Maybe the update code should be 2? I don't really know. } diff --git a/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlocksState.java b/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlocksState.java index e9ae29d..57a304e 100755 --- a/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlocksState.java +++ b/src/main/java/mobi/omegacentauri/raspberryjammod/SetBlocksState.java @@ -43,9 +43,12 @@ public void execute(World world) { IBlockState oldState = world.getBlockState(here); Block oldBlock = oldState.getBlock(); + if (world.getTileEntity(here) != null) { + world.removeTileEntity(here); + } + if (Block.getIdFromBlock(oldBlock) != intId || - oldBlock.getMetaFromState(oldState) != intMeta || - world.getTileEntity(here) != null) { + oldBlock.getMetaFromState(oldState) != intMeta) { world.setBlockState(here, Block.getBlockById(intId).getStateFromMeta(intMeta), 3); } }