-
Notifications
You must be signed in to change notification settings - Fork 2
/
Trash Can v0.8.5vanilla.js
42 lines (37 loc) · 2.25 KB
/
Trash Can v0.8.5vanilla.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//Trash Can Mod v0.8.5vanilla
//by wilco375
var TrashCanId = 122
Block.defineBlock(TrashCanId,"Trash Can", [["piston_botton",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){
preventDefault()
pi = Player.getCarriedItem()
pic = Player.getCarriedItemCount() * -1
pid = Player.getCarriedItemData()
if(itemId >= 256 && itemId <= 259){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId >= 283 && itemId <= 286){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId >= 290 && itemId <= 294){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId >= 298 && itemId <= 317){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId >= 326 && itemId <= 330){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId >= 354 && itemId <= 355){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId == 261 || itemId == 324 || itemId == 333 || itemId == 335){
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete non-stackable items (at this moment)")}
else if(itemId == 0){
clientMessage("You aren't holding anything")}
else if(pic != -64){
Player.addItemInventory(pi,pic,pid)}
else if(pic == -64){
preventDefault()
clientMessage("Sorry, due to Minecraft PE script not working correctly, it's not possible to delete a stack of items (at this moment)")
}}}