-
Notifications
You must be signed in to change notification settings - Fork 2
/
Trash Can v0.8.js
38 lines (35 loc) · 2.14 KB
/
Trash Can v0.8.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
//Trash Can Mod v0.8
//by wilco375
//Texture from Extra Utilities by RWTema
var TrashCanId = 122
Block.defineBlock(TrashCanId,"Trash Can", [["endframe_eye",0],["endframe_side",0],["end_stone",0],["end_stone",0],["end_stone",0],["end_stone",0]] ,1,false,0)
Block.setShape(TrashCanId,0.125,0,0.125,0.875,0.875,0.875)
Block.setDestroyTime(TrashCanId, 6)
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)")
}}}