
//GUI
var of=0;
var ctx=com.mojang.minecraftpe.MainActivity.currentMainActivity.get() 
var ad=android.app.AlertDialog.Builder
ctx.runOnUiThread(new java.lang.Runnable({ 
run: function(){ 
try{
var d=new ad(ctx)
d.setNegativeButton("知道了",new android.content.DialogInterface.OnClickListener(){
onClick: function(dia,w){
}})
d.setTitle("更新日志及作者想说的话")
d.setMessage("更新日志:\n新增物品28个\n分别为3种食物\n4种方块，删除粘液块，添加矿物生成器\n21种物品，矿物侦测器可用\n新的GUI界面\n修复矿物生成太快,挖掘矿物掉落等BUG\n谢谢大家对我的大力支持\n作者的话:\n感谢大家下更多物品JS\n谢谢大家的支持。\n如果有BUG，请加群 133467131 『星茫』工作室反馈 或直接加作者QQ 1257704245进行反馈\n大家请开心游玩吧!⊙ω⊙")
d.show()
}catch(e){print(e)}
}}))







function newLevel()
{
clientMessage("§4欢迎使用ksjs的js(是不是有些拗口)。。。\n工作室 群号 133467131 ")
矿物生成(224,2,12)
矿物生成(225,2,16)
}

//添加食物&
ModPE.setFoodItem(800, "混沌之血", 0, 10, "混沌之血",1);
ModPE.setFoodItem(801,"生羊肉", 0,4, "生羊肉",64);
ModPE.setFoodItem(802,"熟羊肉", 0,8, "熟羊肉",64);
ModPE.setFoodItem(803,"纯净腐肉", 0,4, "纯净腐肉",64);
//添加物品
ModPE.setItem(708,"s",0 ,"爆炸之剑",1)
 ModPE.setItem(709,"f",0 ,"火焰之剑",1)
ModPE.setItem(710,"h",0 ,"圣·魔枪(必杀)",1)
 ModPE.setItem(711,"smdhmfp",0 ,"混沌之瓶",1)
ModPE.setItem(712,"血滴",0 ,"血滴",64)
 ModPE.setItem(714,"混沌水滴",0 ,"混沌水滴",16)
ModPE.setItem(715,"混沌之瓶",0 ,"空瓶",16)
ModPE.setItem(716,"破碎之杖",0 ,"破碎之杖",1)
ModPE.setItem(717,"晶石",0 ,"晶石",64)
ModPE.setItem(718,"火要素",0 ,"火要素",64)
ModPE.setItem(719,"火晶石",0 ,"火晶石",64)
ModPE.setItem(720,"晶石棒",0 ,"晶石棒",64)
ModPE.setItem(721,"晶石剑",0 ,"晶石剑",1)
ModPE.setItem(722,"燃烧的晶石剑",0 ,"燃烧的晶石剑",1)
ModPE.setItem(723,"冰霜锭",0 ,"冰霜锭",64)
ModPE.setItem(724,"矿物探测器",0 ,"矿物探测器",1)
ModPE.setItem(725,"一摊浓稠的血液",0 ,"一摊浓稠的血液",64)
ModPE.setItem(726,"sb",0 ,"TNT跟随器",1)
ModPE.setItem(727,"liandao",1,"嗜血影镰",1)
ModPE.setItem(729,"齿轮镐",1,"齿轮镐",1)
ModPE.setItem(730,"齿轮1",0,"齿轮",1)
//添加盔甲
/* ArmorType.helmet头盔
 胸甲 ArmorType.chestplate
 靴子 ArmorType.boots
 裤子 ArmorType.leggings
Item.defineArmor(542, "水仙护腿", 0, "水仙护腿","armor/水仙套装_2.png", 防御值, 耐久度, ArmorType.leggings);
*/
Item.defineArmor(900, "头盔1", 0, "晶石头盔","armor/晶石_1.png", 5, 200, ArmorType.helmet );
Item.defineArmor(901, "胸甲1", 0, "晶石胸甲","armor/晶石_1.png", 6, 200, ArmorType.chestplate );
Item.defineArmor(902, "裤子1", 0, "晶石裤子","armor/晶石_10.png", 5, 200, ArmorType.leggings );
Item.defineArmor(903, "鞋子1", 0, "晶石靴子","armor/晶石_10.png", 4, 200, ArmorType.boots );
//下面是合成公式
 Item.addShapedRecipe (708,1,0,["aaa","bcb","ddd"],["a",46,0,"c",276,0,"b",46,0,"d",46,0]);
Item.addShapedRecipe(709,1,0,[
"aaa",
"aba",
"aaa"
],["a",87,0,"b",276,0])
Item.addShapedRecipe(710,1,0,[
"ab",
"",
""
],["a",708,0,"b",709,0])
Item.addShapedRecipe(715,3,0,[
" a ",
"b b",
" b "
],["a",5,0,"b",20,0])
Item.addShapedRecipe(716,1,0,[
"ab",
"",
""
],["a",729,0,"b",278,0])
Item.addShapedRecipe(724,1,0,["abc",
"ded",
"fgh"],["a",14,0,"b",15,0 ,"c",16,0 ,"d",102,0 ,"e",53,0 ,"f",73,0 ,"g",129,0 ,"h",21,0])
Item.addShapedRecipe(726,1,0,[
"aaa",
"aba",
"aaa"
],["a",46,0,"b",270,0])
Item.addShapedRecipe(727,1,0,[
"aba",
" c ",
" c "
],["a",712,0,"b",49,0,"c",280,0])
Item.addShapedRecipe(729,1,0,[
"aaa",
" b ",
" b "
],["a",730,0,"b",280,0])

Item.addShapedRecipe(730,1,0,[
" a ",
"aba",
" a "
],["a",265,0,"b",717,0])
Item.addShapedRecipe(800,1,0,["ab","",""],["a",725,0,"b",711,0]);
Item.addShapedRecipe(711,1,0,["ab","",""],["a",714,0,"b",715,0]);
 Item.addShapedRecipe (719,1,0,["","bc ",""],["b",718,0,"c",717,0]);
Item.addShapedRecipe (720,1,0,["a  ","b  ",""],["a",717,0,"b",718,0]);
Item.addShapedRecipe (721,1,0,[" a "," b "," c "],["a",717,0,"c",717,0,"b",720,0]);
Item.addShapedRecipe (722,1,0,[" a "," b "," c "],["a",719,0,"c",719,0,"b",720,0]);
Item.addShapedRecipe (725,1,0,["aaa","bbb","ccc"],["a",712,0,"c",712,0,"b",712,0]);

Item.addShapedRecipe(901,1,0,[
"a a",
"aaa",
"aaa"
],["a",717,0])
Item.addShapedRecipe(900,1,0,[
"aaa",
"a a",
""
],["a",717,0])
Item.addShapedRecipe(902,1,0,[
"aaa",
"a a",
"a a"
],["a",717,0])
Item.addShapedRecipe(903,1,0,[
"",
"a a",
"a a"
],["a",717,0])
//武器作用
//点击触发部分
function useItem(x,y,z,itemid,blockId)
{
if(itemid==716)
{
Level.destroyBlock(x,y,z,true)
}
if(itemid==708)
{
preventDefault();
Player.setHealth(1000);
explode(x,y,z,10*10);
}
if(itemid==709){
for(var b1=0;b1<18;b1++){
for(var b2=0;b2<10;b2++){
setTile(x+b2,y,z+b1,51)
}}
setTile( getPlayerX(), getPlayerY(), getPlayerZ(),0)
}
if(itemid==727){
Entity.setPosition(getPlayerEnt(),x,y+3,z)
}
if(itemid==724)
{
    var m = 0;
    var t = 0;
    var j = 0;
    var q = 0;
    var h = 0;
    var z = 0;
    var l = 0;
    for(var i = y; i > 0; i--)
    {
        if(getTile(x, i, z) == 14) j++;
        if(getTile(x, i, z) == 15) t++;
        if(getTile(x, i, z) == 16) m++;
        if(getTile(x, i, z) == 56) z++;
        if(getTile(x, i, z) == 21) q++;
        if(getTile(x, i, z) == 129) l++;
        if(getTile(x, i, z) == 73) h++;
        
        clientMessage("地下有" + m + "个煤矿");
        clientMessage("地下有" + t + "个铁矿");
        clientMessage("地下有" + j + "个金矿");
        clientMessage("地下有" + z+ "个钻石矿");
        clientMessage("地下有" + q+ "个青金石矿");
        clientMessage("地下有" + h+ "个红石矿");
        clientMessage("地下有" + l+ "个绿宝石矿");

    }
}}
//变为工具形态
Item.setHandEquipped(708,true);
Item.setHandEquipped(709,true);
Item.setHandEquipped(710,true);
Item.setHandEquipped(716,true);
Item.setHandEquipped(721,true);
Item.setHandEquipped(722,true);
Item.setHandEquipped(727,true);
Item.setHandEquipped(729,true);
//物品添加(创造)
Player.
addItemCreativeInv(708,1);
Player.
addItemCreativeInv(709,1);
Player.
addItemCreativeInv(710,1);
Player.
addItemCreativeInv(711,1);
Player.
addItemCreativeInv(712,1);
Player.
addItemCreativeInv(803,1);
Player.
addItemCreativeInv(802,1);
Player.
addItemCreativeInv(801,1);
Player.
addItemCreativeInv(800,1);
Player.
addItemCreativeInv(714,1);
Player.
addItemCreativeInv(715,1);
Player.
addItemCreativeInv(716,1);
Player.
addItemCreativeInv(717,1);
Player.
addItemCreativeInv(718,1);
Player.
addItemCreativeInv(719,1);
Player.
addItemCreativeInv(720,1);
Player.
addItemCreativeInv(721,1);
Player.
addItemCreativeInv(722,1);
Player.
addItemCreativeInv(723,1);
Player.
addItemCreativeInv(724,1);
Player.
addItemCreativeInv(725,1);
Player.
addItemCreativeInv(726,1);
Player.
addItemCreativeInv(727,1);
Player.
addItemCreativeInv(729,1);
Player.
addItemCreativeInv(730,1);
Player.
addItemCreativeInv(225,1);
Player.
addItemCreativeInv(224,1);
Player.
addItemCreativeInv(900,1);
Player.
addItemCreativeInv(901,1);
Player.
addItemCreativeInv(902,1)
Player.
addItemCreativeInv(903,1);
//添加方块
Block.defineBlock(225,"晶石矿","晶石矿",0,true,0);
Block.defineBlock(224,"冰霜矿","冰霜矿",0,true,0);
//设置方块挖掘时间
Block.setDestroyTime(225,10)
Block.setDestroyTime(224,10)
//熔炉配方
Item.addFurnaceRecipe(225,717,0);
Item.addFurnaceRecipe(224,723,0);
Item.addFurnaceRecipe(801,802,0);
Item.addFurnaceRecipe(367,803,0);
//物品掉落
function deathHook(attacker,entity)
{
 var x=Entity.getX(entity)
 var y=Entity.getY(entity)
 var z=Entity.getZ(entity)
if(Entity.getEntityTypeId(entity)==10||Entity.getEntityTypeId(entity)==11||Entity.getEntityTypeId(entity)==12||Entity.getEntityTypeId(entity)==13||Entity.getEntityTypeId(entity)==14||Entity.getEntityTypeId(entity)==15||Entity.getEntityTypeId(entity)==16||Entity.getEntityTypeId(entity)==17)
{
Level.dropItem(x,y,z,1,712,1,0)
}
if(Entity.getEntityTypeId(entity)==13){
Level.dropItem(x,y,z,1,801,1,0)
}}
function attackHook(player,entity){
if(getCarriedItem()==710){
Entity.setHealth(entity,0)
}
if(getCarriedItem()==722){
sh(entity,41)
Entity.setFireTicks(entity,10)
}
if(getCarriedItem()==721){
sh(entity,26)
}
if(getCarriedItem()==727){
var heal = Entity.getHealth(entity)/2;
Entity.setHealth(player,Entity.getHealth(player)+heal);
}
if(getCarriedItem()==727){
sh(entity,22)
}}


























function modTick(){

if(Player.getCarriedItem()==726){
var x=Entity.getX(getPlayerEnt()),y=Entity.getY(getPlayerEnt())-2,z=Entity.getZ(getPlayerEnt());
setTile(x,y,z,46);
 x=Entity.getX(getPlayerEnt())
y=Entity.getY(getPlayerEnt())-2
z=Entity.getZ(getPlayerEnt())+1
setTile(x,y,z,46);
}

if(Player.getCarriedItem()==727){
for(var p=0;p<100;p++){
var px=getPlayerX()
var py=getPlayerY()
 var pz=getPlayerZ() 
var sin=Math.sin(p+6+Math.PI/180)*1
var cos=Math.cos(p+6+Math.PI/180)*1
Level.addParticle(18,px+sin,py-1.5,pz+cos,0,0,0,100)
}}
if(Player.getArmorSlot(0)==900&&Player.getArmorSlot(1)==901&&Player.getArmorSlot(2)==902&&Player.getArmorSlot(3)==903)
 {
 Entity.addEffect(getPlayerEnt(),  MobEffect.damageBoost , 99*20, 3, false, true)
 }
var itm=getCarriedItem()
if(itm==729){
Block.setDestroyTime(200,0.07)
Block.setDestroyTime(201,0.07)
Block.setDestroyTime(202,0.07)
Block.setDestroyTime(1,0.07)
Block.setDestroyTime(4,0.07)
Block.setDestroyTime(14,0.07)
Block.setDestroyTime(15,0.07)
Block.setDestroyTime(16,0.07)
Block.setDestroyTime(21,0.07)
Block.setDestroyTime(22,0.07)
Block.setDestroyTime(24,0.07)
Block.setDestroyTime(41,0.07)
Block.setDestroyTime(42,0.07)
Block.setDestroyTime(43,0.07)
Block.setDestroyTime(44,0.07)
Block.setDestroyTime(45,0.07)
Block.setDestroyTime(48,0.07)
Block.setDestroyTime(49,0.65)
Block.setDestroyTime(52,0.19)
Block.setDestroyTime(56,0.09)
Block.setDestroyTime(57,0.09)
Block.setDestroyTime(61,0.09)
Block.setDestroyTime(62,0.09)
Block.setDestroyTime(67,0.09)
Block.setDestroyTime(71,0.09)
Block.setDestroyTime(73,0.09)
Block.setDestroyTime(74,0.09)
Block.setDestroyTime(79,0.09)
Block.setDestroyTime(87,0.09)
Block.setDestroyTime(98,0.09)
Block.setDestroyTime(101,0.09)
Block.setDestroyTime(108,0.09)
Block.setDestroyTime(109,0.09)
Block.setDestroyTime(112,0.09)
Block.setDestroyTime(113,0.09)
Block.setDestroyTime(114,0.09)
Block.setDestroyTime(116,0.09)
Block.setDestroyTime(117,0.09)
Block.setDestroyTime(121,0.09)
Block.setDestroyTime(128,0.09)
Block.setDestroyTime(129,0.09)
Block.setDestroyTime(133,0.1)
Block.setDestroyTime(139,0.09)
Block.setDestroyTime(145,0.09)
Block.setDestroyTime(149,0.09)
Block.setDestroyTime(152,0.11)
Block.setDestroyTime(153,0.11)
Block.setDestroyTime(155,0.09)
Block.setDestroyTime(156,0.09)
Block.setDestroyTime(159,0.09)
Block.setDestroyTime(172,0.09)
Block.setDestroyTime(173,0.11)
Block.setDestroyTime(174,0.09)
Block.setDestroyTime(245,0.09)
Block.setDestroyTime(246,11)
Block.setDestroyTime(247,0.09)
Block.setDestroyTime(167,0.11)
Block.setDestroyTime(225,2.2)
Block.setDestroyTime(224,2.2)
}
//非手持镐子
if(itm!=729){
 Block.setDestroyTime(7,-1);
Block.setDestroyTime(1,2.1)
Block.setDestroyTime(4,2.1)
Block.setDestroyTime(14,2.2)
Block.setDestroyTime(15,2.2)
Block.setDestroyTime(16,2.2)
Block.setDestroyTime(21,2.2)
Block.setDestroyTime(22,2.2)
Block.setDestroyTime(24,2.2)
Block.setDestroyTime(41,2.2)
Block.setDestroyTime(42,2.2)
Block.setDestroyTime(43,2.2)
Block.setDestroyTime(44,2.2)
Block.setDestroyTime(45,2.2)
Block.setDestroyTime(48,2.2)
Block.setDestroyTime(49,50)
Block.setDestroyTime(52,2)
Block.setDestroyTime(56,2.5)
Block.setDestroyTime(57,2.7)
Block.setDestroyTime(61,2.4)
Block.setDestroyTime(62,2.4)
Block.setDestroyTime(67,2.2)
Block.setDestroyTime(71,2.25)
Block.setDestroyTime(73,2.2)
Block.setDestroyTime(74,2.2)
Block.setDestroyTime(79,2.2)
Block.setDestroyTime(87,2.25)
Block.setDestroyTime(98,2.25)
Block.setDestroyTime(101,2.2)
Block.setDestroyTime(108,2.25)
Block.setDestroyTime(109,2.25)
Block.setDestroyTime(112,2.25)
Block.setDestroyTime(113,2.25)
Block.setDestroyTime(114,2.25)
Block.setDestroyTime(116,2.6)
Block.setDestroyTime(117,2.25)
Block.setDestroyTime(121,2.2)
Block.setDestroyTime(128,2.2)
Block.setDestroyTime(129,2.25)
Block.setDestroyTime(133,2.6)
Block.setDestroyTime(139,2.25)
Block.setDestroyTime(145,2.2)
Block.setDestroyTime(149,2.25)
Block.setDestroyTime(152,2.6)
Block.setDestroyTime(153,2.6)
Block.setDestroyTime(155,2.25)
Block.setDestroyTime(156,2.2)
Block.setDestroyTime(159,2.25)
Block.setDestroyTime(172,2.25)
Block.setDestroyTime(173,2)
Block.setDestroyTime(174,2.2)
Block.setDestroyTime(245,2)
Block.setDestroyTime(246,50)
Block.setDestroyTime(247,2.2)
Block.setDestroyTime(225,10)
Block.setDestroyTime(247,10)
}
}
function destroyBlock(x,y,z)
{
if(getTile(x,y,z)==225)
{
preventDefault()
setTile(x,y,z,0)
Level.dropItem(x,y,z,0,717,1,0)
}
if(getTile(x,y,z)==224)
{
preventDefault()
setTile(x,y,z,0)
Level.dropItem(x,y,z,0,723,1,0)
}
//丢到破坏方块钩子内使用
//不得转载给其他人，不可以转载！
//转载需经过同意，并且要注明作者

if(getCarriedItem()==508||getCarriedItem()==703||getCarriedItem()==708||getCarriedItem()==713||getCarriedItem()==718|| getCarriedItem()==730)
{
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,4,1,0);
}
}
if(Player.getPointedBlockData()==1&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,2);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,3);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,3);
}

if(Player.getPointedBlockData()==4&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,4);
}

if(Player.getPointedBlockData()==5&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,5);
}

if(Player.getPointedBlockData()==6&&getTile(x,y,z)==1)
{
Level.dropItem(x,y,z,0,1,1,6);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==4)
{
Level.dropItem(x,y,z,0,4,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==16)
{
Level.dropItem(x,y,z,0,16,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==23)
{
Level.dropItem(x,y,z,0,23,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==24)
{
Level.dropItem(x,y,z,0,24,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==24)
{
Level.dropItem(x,y,z,0,24,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==24)
{
Level.dropItem(x,y,z,0,24,1,2);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==29)
{
Level.dropItem(x,y,z,0,29,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==33)
{
Level.dropItem(x,y,z,0,33,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,1);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,3);
}

if(Player.getPointedBlockData()==4&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,4);
}

if(Player.getPointedBlockData()==5&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,5);
}

if(Player.getPointedBlockData()==6&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,6);
}

if(Player.getPointedBlockData()==7&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,44,2,7);
}

if(Player.getPointedBlockData()==8&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,43,1,8);
}

if(Player.getPointedBlockData()==9&&getTile(x,y,z)==43)
{
Level.dropItem(x,y,z,0,43,1,9);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,1);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,3);
}

if(Player.getPointedBlockData()==4&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,4);
}

if(Player.getPointedBlockData()==5&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,5);
}

if(Player.getPointedBlockData()==6&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,6);
}

if(Player.getPointedBlockData()==7&&getTile(x,y,z)==44)
{
Level.dropItem(x,y,z,0,44,1,7);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==45)
{
Level.dropItem(x,y,z,0,45,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==48)
{
Level.dropItem(x,y,z,0,48,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==61)
{
Level.dropItem(x,y,z,0,61,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==62)
{
Level.dropItem(x,y,z,0,61,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==67)
{
Level.dropItem(x,y,z,0,67,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==70)
{
Level.dropItem(x,y,z,0,70,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==71)
{
Level.dropItem(x,y,z,0,330,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==87)
{
Level.dropItem(x,y,z,0,87,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==98)
{
Level.dropItem(x,y,z,0,98,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==98)
{
Level.dropItem(x,y,z,0,98,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==98)
{
Level.dropItem(x,y,z,0,98,1,2);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==98)
{
Level.dropItem(x,y,z,0,98,1,3);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==101)
{
Level.dropItem(x,y,z,0,101,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==108)
{
Level.dropItem(x,y,z,0,108,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==109)
{
Level.dropItem(x,y,z,0,109,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==112)
{
Level.dropItem(x,y,z,0,112,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==113)
{
Level.dropItem(x,y,z,0,113,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==114)
{
Level.dropItem(x,y,z,0,114,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==116)
{
Level.dropItem(x,y,z,0,116,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==117)
{
Level.dropItem(x,y,z,0,379,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==118)
{
Level.dropItem(x,y,z,0,380,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==121)
{
Level.dropItem(x,y,z,0,121,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==128)
{
Level.dropItem(x,y,z,0,128,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==139)
{
Level.dropItem(x,y,z,0,139,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==139)
{
Level.dropItem(x,y,z,0,139,1,1);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==145)
{
Level.dropItem(x,y,z,0,145,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==145)
{
Level.dropItem(x,y,z,0,145,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==145)
{
Level.dropItem(x,y,z,0,145,1,2);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==147)
{
Level.dropItem(x,y,z,0,147,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==148)
{
Level.dropItem(x,y,z,0,148,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==152)
{
Level.dropItem(x,y,z,0,152,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==153)
{
Level.dropItem(x,y,z,0,406,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==154)
{
Level.dropItem(x,y,z,0,154,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==155)
{
Level.dropItem(x,y,z,0,155,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==155)
{
Level.dropItem(x,y,z,0,155,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==155)
{
Level.dropItem(x,y,z,0,155,1,2);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==155)
{
Level.dropItem(x,y,z,0,155,1,3);
}

if(Player.getPointedBlockData()==4&&getTile(x,y,z)==155)
{
Level.dropItem(x,y,z,0,155,1,4);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==156)
{
Level.dropItem(x,y,z,0,156,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==158)
{
Level.dropItem(x,y,z,0,158,1,0);
}

if(Player.getPointedBlockData()==1&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,1);
}

if(Player.getPointedBlockData()==2&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,2);
}

if(Player.getPointedBlockData()==3&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,3);
}

if(Player.getPointedBlockData()==4&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,4);
}

if(Player.getPointedBlockData()==5&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,5);
}

if(Player.getPointedBlockData()==6&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,6);
}

if(Player.getPointedBlockData()==7&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,7);
}

if(Player.getPointedBlockData()==8&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,8);
}

if(Player.getPointedBlockData()==9&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,9);
}

if(Player.getPointedBlockData()==10&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,10);
}

if(Player.getPointedBlockData()==11&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,11);
}

if(Player.getPointedBlockData()==12&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,12);
}

if(Player.getPointedBlockData()==13&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,13);
}

if(Player.getPointedBlockData()==14&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,14);
}

if(Player.getPointedBlockData()==15&&getTile(x,y,z)==159)
{
Level.dropItem(x,y,z,0,159,1,15);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==172)
{
Level.dropItem(x,y,z,0,172,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==173)
{
Level.dropItem(x,y,z,0,173,1,0);
}




//破坏矿石［石—水晶］
if(getCarriedItem()==508||getCarriedItem()==708||getCarriedItem()==713||getCarriedItem()==723)
{
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==15)
{
Level.dropItem(x,y,z,0,15,1,0);
}
}
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
Level.dropItem(x,y,z,0,351,1,4);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
Level.dropItem(x,y,z,0,351,1,4);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
Level.dropItem(x,y,z,0,351,2,4);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
if(Math.random()*100<50)
{
Level.dropItem(x,y,z,0,351,2,4);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
if(Math.random()*100<50)
{
Level.dropItem(x,y,z,0,351,1,4);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==21)
{
if(Math.random()*100<50)
{
Level.dropItem(x,y,z,0,351,2,4);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==22)
{
Level.dropItem(x,y,z,0,22,1,0);
}


if(Player.getPointedBlockData()==0&&getTile(x,y,z)==42)
{
Level.dropItem(x,y,z,0,42,1,0);
}


//破坏矿石［铁—水晶］
if(getCarriedItem()==508||getCarriedItem()==713||getCarriedItem()==723)
{
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==14)
{
Level.dropItem(x,y,z,0,14,1,0);
}
}
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==41)
{
Level.dropItem(x,y,z,0,41,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==22)
{
Level.dropItem(x,y,z,0,22,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==56)
{
Level.dropItem(x,y,z,0,264,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==57)
{
Level.dropItem(x,y,z,0,57,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==73)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==73)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==73)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==73)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==73)
{
if(Math.random()*100<65)
{
Level.dropItem(x,y,z,0,331,1,0);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==74)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==74)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==74)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==74)
{
Level.dropItem(x,y,z,0,331,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==74)
{
if(Math.random()*100<65)
{
Level.dropItem(x,y,z,0,331,1,0);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==129)
{
Level.dropItem(x,y,z,0,388,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==133)
{
Level.dropItem(x,y,z,0,133,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==200)
{
Level.dropItem(x,y,z,0,505,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==201)
{
Level.dropItem(x,y,z,0,511,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==202)
{
Level.dropItem(x,y,z,0,512,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==220)
{
Level.dropItem(x,y,z,0,220,1,0);
}

//破坏矿石［钻石—水晶］
if(getCarriedItem()==508||getCarriedItem()==723)
{
if(Player.getPointedBlockData()==0&&getTile(x,y,z)==49)
{
Level.dropItem(x,y,z,0,49,1,0);
}}
//铲子
if(getCarriedItem()==507||getCarriedItem()==702||getCarriedItem()==707||getCarriedItem()==712||getCarriedItem()==717||getCarriedItem()==722)
{

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==78)
{
Level.dropItem(x,y,z,0,332,1,0);
}
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==80)
{
Level.dropItem(x,y,z,0,332,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==80)
{
Level.dropItem(x,y,z,0,332,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==80)
{
Level.dropItem(x,y,z,0,332,1,0);
}

if(Player.getPointedBlockData()==0&&getTile(x,y,z)==80)
{
Level.dropItem(x,y,z,0,332,1,0);
}
}

//作者贴吧id：落叶于水
//作者盒子id：611919
//作者QQ号：3332006778
//放置到您的js后请注明作者！不然视为侵权行为！





function 矿物生成(id,几率,高度) 
{
var 矿石判断=0;
var 生成判断=Math.round(Math.random())*3;
if(矿石判断<几率)
{
矿石x=getPlayerX()-Math.random()*512;
矿石y=Math.random()*高度;
矿石z=getPlayerZ()-Math.random()*512;
}
if(getTile(矿石x,矿石y,矿石z)==1&&矿石判断<几率)
{
setTile(矿石x,矿石y,矿石z,id);
setTile(矿石x,矿石y,矿石z-1,id);
}

if(生成判断==0)
{
setTile(矿石x-1,矿石y-1,矿石z,id);
setTile(矿石x-1,矿石y,矿石z+1,id);
setTile(矿石x,矿石y-1,矿石z,id);
}
else if(生成判断==3)
{
setTile(矿石x+1,矿石y-1,矿石z,id);
setTile(矿石x+1,矿石y,矿石z,id);
setTile(矿石x,矿石y,矿石z-1,id);
}
}
function sh(e,x){
var h=Entity.getHealth(e)
if(h<=x&&h>0){
Entity.setHealth(e,1)
}
else{
Entity.setHealth(e,h-x)
}
}
function 镐子(){
Block.setDestroyTime(1,0.1);//石头
Block.setDestroyTime(4,0.1);//原石
Block.setDestroyTime(16,0.1);//煤
Block.setDestroyTime(173,0.1);//煤块
Block.setDestroyTime(15,0.1);//铁
Block.setDestroyTime(42,0.1);//铁块
Block.setDestroyTime(21,0.1);//青金石
Block.setDestroyTime(22,0.1);//青金石块
Block.setDestroyTime(73,0.1);//红石
Block.setDestroyTime(74,0.1);//红石
Block.setDestroyTime(152,0.1);//红石块
Block.setDestroyTime(14,0.1);//金
Block.setDestroyTime(41,0.1);//金块
Block.setDestroyTime(56,0.1);//钻
Block.setDestroyTime(57,0.1);//钻块
Block.setDestroyTime(133,0.1);//绿宝石
Block.setDestroyTime(61,0.1);//熔炉
Block.setDestroyTime(62,0.1);//熔炉
Block.setDestroyTime(245,0.1);//切石机
Block.setDestroyTime(139,0.1);//原石墙
Block.setDestroyTime(43,0.1);//石台阶
Block.setDestroyTime(246,0.1);//黑曜石
Block.setDestroyTime(121,0.1);//末地石
Block.setDestroyTime(225,1);
Block.setDestroyTime(224,1.5);}
