Skip to content

Instantly share code, notes, and snippets.

@peacestorm
peacestorm / Button background color.js
Last active January 15, 2016 11:57
Button background color
yourButton.getBackground().setColorFilter(android.graphics.Color.parseColor("#000000"), android.graphics.PorterDuff.Mode.MULTIPLY);
@peacestorm
peacestorm / Block.defineBlock().js
Last active August 29, 2015 14:20
Block.defineBlock()
Block.defineBlock(12,"Sand",[["sand",1],["sand",1],["sand",1],["sand",1],["sand",1],["sand",1],["sand",0],["sand",0],["sand",0],["sand",0],["sand",0],["sand",0]],type,transparency,rendertype);
@peacestorm
peacestorm / gist:ae8eb107a309ffbfc568
Last active August 29, 2015 14:20
Block.defineBlock() with data values
Block.defineBlock(170,"Block name here",[["bottomtexture"],["toptexture"],["sidetexture"],["sidetexture"],["sidetexture"],["sidetexture"]/*<-- This will be used for the id 170 with data 0, and this will be used for the id 170 with data 1 -->*/,["bottomtexture"],["toptexture"],["sidetexture"],["sidetexture"],["sidetexture"],["sidetexture"]],type,transparency,rendertype);