Skip to content

Instantly share code, notes, and snippets.

@Pwootage
Pwootage / gist:1396569
Created November 27, 2011 00:10
Color codes
/**
* Represents black
*/
BLACK(0x0),
/**
* Represents dark blue
*/
DARK_BLUE(0x1),
/**
* Represents dark green
-----------------------------------------------------
COMMA_PARENTHESIS_WHITESPACE
-----------
Use of whitespace before comma and before/after parentheses
-----------------------------------------------------
-----------------------------------------------------
DOUBLE_PUNCTUATION
-----------
Use of two consecutive dots or commas
-----------------------------------------------------
0100100101000011010000010110011101001001010010000100001000110001010110010110110101111000011100000101100101111001010000100011001001100010001100100110110001101011010010010100100001001110011010000110010001101101010101100100010001100001010010000101011001110101011000010111100101101000010110000110001000110011010010100111001101011010010000110100001000110011011000100011001101001010011100110101101001000011011101110110011101010001001100100110100000110001011000100110110101110011011001110101100100110010011010000011000101100010011011010111001101110000010001000101000101101111011001110100100101000011010000010110011101001001010000110100000101100111010010010100100001010010011011110110001101101101001110010011001101100011011110010100001001001010010101000011000001010110001101000101100100110010010101100111011101100100010001110110110001110110011000100110011100110000010010110100100101000011010000010110011101001001010010000111001101001110010000110110100101000001011001110100100101000011010000010100101001100011011011010101011000110000
enable:true
enablemp:true
give-command:/give {1}:{3} {2} {0}
save-name1:1
save-name2:2
save-name3:3
save-name4:4
save-name5:5
save-name6:6
save-name7:7
updateMana = function()
{
pPos = player.getPosition();
if (world.getLightValue(pPos.x, pPos.y, pPos.z) > 3)
{
generateMana();
}
else
{
loseMana();
@Pwootage
Pwootage / gist:1119286
Created August 2, 2011 00:06
Arrow puzzle noteblock->lightstone then trigger nearby memory blocks
pinv = player.getInventory()
redck = 4
var ppos = player.getPosition();
var px = Math.round(ppos.x);
var py = Math.round(ppos.y);
var pz = Math.round(ppos.z);
for each (var entity in player.getEntitiesWithinRange(50))
{
if(entity.classType == "Arrow")
function fakeFan(xmin, xmax, zmin, zmax, ypos)
{
var ppos = player.getPosition();
if (ppos.x > xmin && ppos.x < xmax+1) {
if (ppos.z > zmin && ppos.z < xmax+1) {
if (ppos.y > ypos) {
dist = (ppos.y - ypos) + 0.4;
var pvel = player.getVelocity();
if (dist < 4) {
player.setVelocity(pvel.x, pvel.y + ((0.07 * ((4-dist)))-0.04), pvel.z);
//x,y,zOffset are either -4, 0, or 4, depending on fan facing.
if (!(e instanceof ju)) //e = Entity, ju = EntityFallingSand
{
double dist = e.h(i + 0.5D, j + 0.5D, k + 0.5D) * Math.abs(xOffset + yOffset + zOffset) / 4.0D;//e.h = distance from entity
e.d(0.07000000000000001D * xOffset / dist, 0.07000000000000001D * yOffset / dist, 0.07000000000000001D * zOffset / dist);//e.d = add velocity
if (((e instanceof gs)) && (((gs)e).usingUmbrella()))//gs = EntityPlayer
{
e.d(0.07000000000000001D * xOffset / dist, 0.07000000000000001D * yOffset / dist, 0.07000000000000001D * zOffset / dist);
}
var posx = -146;
var posy = 64;
var posz = 67;
var ppos = player.getPosition();
if (ppos.x > posx && ppos.x < posx+1)
{
if (ppos.z > posz && ppos.z < posz+1)
{
/* 242 */ if (!debug)
/* */ {
/* */ try
/* */ {
/* 246 */ Class.forName("mod_TooManyItems");
/* 247 */ HashSet excludeIds = (HashSet)ModLoader.getPrivateValue(TMIConfig.class, null, "excludeIds");
/* 248 */ excludeIds.add(Integer.valueOf(IronBubble.bf));
/* 249 */ excludeIds.add(Integer.valueOf(PigSlayer.bf));
/* 250 */ excludeIds.add(Integer.valueOf(VampireBlade.bf));
/* 251 */ excludeIds.add(Integer.valueOf(NatureStaff.bf));