Fixed a bug in Drone.js for prisms using Oak stairs (gable end used spruce not oak)
Added a new optional modification to GuiIngame class to show mouse pos and block info for block under mouse.
This commit is contained in:
parent
9ce85bb5b3
commit
88cafd6ee2
2 changed files with 678 additions and 662 deletions
14
drone.js
14
drone.js
|
@ -171,6 +171,13 @@ var Drone = {
|
||||||
// commands in a new script file and load it using /js load()
|
// commands in a new script file and load it using /js load()
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
// ==========
|
||||||
|
//
|
||||||
|
// x - The Drone's position along the west-east axis (x increases as you move east)
|
||||||
|
// y - The Drone's position along the vertical axis (y increses as you move up)
|
||||||
|
// z - The Drone's position along the north-south axis (z increases as you move south)
|
||||||
|
// dir - The Drone's direction 0 is east, 1 is south , 2 is west and 3 is north.
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
// Implementation
|
// Implementation
|
||||||
|
@ -225,7 +232,7 @@ var Drone = {
|
||||||
this.x = coords.x;
|
this.x = coords.x;
|
||||||
this.y = coords.y;
|
this.y = coords.y;
|
||||||
this.z = coords.z;
|
this.z = coords.z;
|
||||||
this.dir = coords.dir;
|
this.dir = coords.dir%4;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
@ -263,7 +270,7 @@ var Drone = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (block == 68){
|
if (block == 68){
|
||||||
meta = Drone.PLAYER_SIGN_FACING[this.dir];
|
meta = Drone.PLAYER_SIGN_FACING[this.dir%4];
|
||||||
this.back();
|
this.back();
|
||||||
}
|
}
|
||||||
putSign(message,this.x,this.y,this.z,block,meta);
|
putSign(message,this.x,this.y,this.z,block,meta);
|
||||||
|
@ -342,7 +349,7 @@ var Drone = {
|
||||||
this.fwd(f).up(f).cuboid(se,w).down(f).back(f);
|
this.fwd(f).up(f).cuboid(se,w).down(f).back(f);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Drone.STAIRBLOCKS = {53: 5 // oak wood
|
Drone.STAIRBLOCKS = {53: '5:0' // oak wood
|
||||||
,67: 4 // cobblestone
|
,67: 4 // cobblestone
|
||||||
,108: 45 // brick
|
,108: 45 // brick
|
||||||
,109: 98 // stone brick
|
,109: 98 // stone brick
|
||||||
|
@ -411,7 +418,6 @@ var Drone = {
|
||||||
this.fwd();
|
this.fwd();
|
||||||
d2++;
|
d2++;
|
||||||
}
|
}
|
||||||
print("uc=" +uc + ",dc=" + dc);
|
|
||||||
this.back(d);
|
this.back(d);
|
||||||
}else{
|
}else{
|
||||||
var c = 0;
|
var c = 0;
|
||||||
|
|
10
optional/GuiIngame.patch
Normal file
10
optional/GuiIngame.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
466a467,475
|
||||||
|
> //
|
||||||
|
> // wph 20121231 show the block id and metadata for in-focus block
|
||||||
|
> //
|
||||||
|
> MovingObjectPosition omo = this.mc.objectMouseOver;
|
||||||
|
> if (omo != null){
|
||||||
|
> int bi = this.mc.theWorld.getBlockId(omo.blockX,omo.blockY,omo.blockZ);
|
||||||
|
> int md = this.mc.theWorld.getBlockMetadata(omo.blockX,omo.blockY,omo.blockZ);
|
||||||
|
> this.drawString(var8,"Mouse:" + omo.blockX + ", " + omo.blockY + ", " + omo.blockZ + " block data value: " + bi + ":" + md,2,112,14737632);
|
||||||
|
> }
|
Reference in a new issue