Skip to content

Instantly share code, notes, and snippets.

var pos = player.getPosition();
var x = Math.floor(pos.x);
var y = Math.floor(pos.y) - 2;
var z = Math.floor(pos.z);
var idUnderneath = world.getBlockID(x,y,z);
var metaUnderneath = world.getMetadata(x,y,z);
@Pwootage
Pwootage / light_clycler.js
Created July 13, 2011 23:40
Light cycler
try
{
directions[0] = directions[0];
}
catch (exception)
{
directions = new Array();
for (i = 0; i < 16; i++)
{
directions[i] = 1;
@Pwootage
Pwootage / gist:1075302
Created July 11, 2011 04:09
Push a block
if (hitBlock != null)
{
blockID = world.getBlockID(hitBlock.x, hitBlock.y, hitBlock.z);
pushid = 12;
iceid = 79;
triggerid = 201;
if (blockID == pushid)
{
//moneyLimit = 500
//Set that in the onload script!
if(pinv.getItemInSlot(35) != null)
{
if(pinv.getItemInSlot(35).getItemID() != 353)
{
for(i=0;i<35;i++)
{
if(pinv.getItemInSlot(i) == null)