Custom Items:

Create a file with an ending of ".item" in the folder "config\customItems".


The file MUST include 4 things:

name=Your itemname
id=Your itemid. The id shouldnt be lower then 512, otherwise it wont work
iconfile=The name of the file for the icon
type=type of the item(default,food,axe,pickaxe,shovel,hoe,sword)


And then you can add optional things:

maxstack=The maximum stack size. Not for food and tools. Default is 1.

healamount=How much should the food heal. 2 means one heart. Only for food. Default is 1.

duration=How many uses a tool have. Default is 64.

efficiency=How fast a tool mines. Wood has 2 Diamond 8. Default is 4.

damage=How many damage a tool does to a monster. Wood is 0, Diamond is 3. Default is 0.

rightclick=Here you can add functions, they're called when you rightclick the item on a block.

blockdestroyed=Here you can add functions, they're called when you destroy a block with the item.


The functions are devided by a semilocon (;)

Functions for rightclick:

	setblock(offsetX,offsetY,offsetZ,id,damage) 
		Set a block with the offset from the block you clicked.
		If offsetY = 1 then it will set the block above the one which is clicked.
	dropitem(id,quantity,damage)
		Drops a item out of the player. This adds items and dont throw them out of the inventory,

Functions for blockdestroyed:
	dropitem(id,quantity,damage)


Example:

name=Obsidian Pickaxe
id=2345
iconfile=ObsidianPickaxe.png
type=pickaxe
duration=5000
efficiency=9
damage=5
rightclick=setblock(0,1,0,5);setblock(0,2,0,5);dropitem(1,55,0)
blockdestroyed=dropitem(3,5,0)



custom Blocks


Create a file with an ending of ".block" in the folder "config\customBlock".

name=Your blockname

id=Your blockid. The id should be lower than 256, otherwise it wont work

texturefile=The name of the file for the blocktexture

material=material of the block(grass,ground,wood,rock,iron,cloth,sand,glass)


And then you can add optional things:

type=The type of the block (normal,fence,stairs,door,slab). Default is normal.

redstoneonly=Only for doors. Set to true if the can only opened by redstone. Default is false.

texturefilebottom=required for doors. It'S the bottom texture of the door.

doubleslabid=The id of a block, which is produced when you place a slab above another. If this isnt set up you cant place one slab aboce the other.

stepsound=Can be wood,gravel,grass,stone,metal,cloth. Default is stone

hardness=How long it takes to harcest the block. Obsidian is 10, dirt is 0.5. Default is 1.

resistance=resistance against explosions. Obisidian is 2000, stone is 10. Default is 0.

light=How many light the block emits. This is a value between 0 and 1. Glowstone is 1, torch is 0.9375. Default is 0.

opacity=how many light goes through the block. This is a value between 0 and 255. 0 means it goes all light through, 255 means nothing goes through the block. Default is 255.

iddropped=Which id should the block drop when destroyed. Default is its own id.

quantitydropped=How many items/blocks the block drops when destroyed. Default is 1.

destroyed=Here you can add functions, they're called when the block is destroyed by a player.

clicked=Here you can add functions, they're called when you click the block

neighborchanged=Here you can add functions, they're called when a block next to the block is changing.

added=Here you can add functions, they're called when the block is placed.


The functions are devided by a semilocon (;)

Functions for destroyed:

	setblock(offsetX,offsetY,offsetZ,id,damage) 
		Set a block with the offset from the block you clicked.
		If offsetY = 1 then it will set the block above the one which is clicked.


Functions for clicked:

	setblock(offsetX,offsetY,offsetZ,id,damage) 
		Set a block with the offset from the block you clicked.
		If offsetY = 1 then it will set the block above the one which is clicked.
	dropitem(id,quantity,damage)
		Drops a item out of the player. This adds items and dont throw them out of the inventory,

Functions for neighborchanged:
	
	setblock(offsetX,offsetY,offsetZ,id,damage) 
		Set a block with the offset from the block you clicked.
		If offsetY = 1 then it will set the block above the one which is clicked.

Functions for added:

	setblock(offsetX,offsetY,offsetZ,id,damage) 
		Set a block with the offset from the block you clicked.
		If offsetY = 1 then it will set the block above the one which is clicked.


Example:

name=Wood Generator
id=170
texturefile=WoodGenerator.png
material=iron
stepsound=metal
hardness=2
resistance=5
light=0.5
opacity=255
clicked=setblock(0,1,0,17)