-
Notifications
You must be signed in to change notification settings - Fork 2
/
Trash Can v1.0vanilla.js
22 lines (18 loc) · 782 Bytes
/
Trash Can v1.0vanilla.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Trash Can Mod v1.0
//by wilco375
//Don't share or redistribute this mod using the Github link, instead, use this link: http://adf.ly/nyKsz
var TrashCanId = 122
Block.defineBlock(TrashCanId,"Trash Can", [["piston_bottom",0],["piston_inner",0],["piston_bottom",0],["piston_bottom",0],["piston_bottom",0],["piston_bottom",0]] ,20,false,0)
Block.setShape(TrashCanId,0.125,0,0.125,0.875,0.875,0.875)
Block.setDestroyTime(TrashCanId, 6)
Block.setColor(TrashCanId,[0x999999])
Item.addCraftRecipe(TrashCanId,1,0,[54,1,0,4,5,0,1,3,0])
Item.setCategory(TrashCanId,8,0);
function useItem(x,y,z,itemId,blockId,side){
if(blockId == TrashCanId){
if(itemId == 0){
clientMessage("You aren't holding anything")}
else{
preventDefault()
Player.clearInventorySlot(Player.getSelectedSlotId())}
}}