本帖最后由 Thiocyanate 于 2016-2-2 13:04 编辑
呵呵,终于放假了!
大家久等了,这次我主要介绍如何制作新的楼梯与台阶
新的楼梯:
1.在blocks文件夹里面创建一个js文件,然后再用NotePad++打开,不用我多说了吧!
2.输入下列代码:
/*IronStairs.js*/
name = "IronStairs";
material = "rock";
stepSound = "stone";
creativeTab = "buildingBlocks";
hardness[0] = 30;
resistance[0] = 600;
toolClass[0] = "pickaxe";
harvestLevel[0] = 3;
textureFileXP[0] = "/iron_block.png";
textureFileXN[0] = "/iron_block.png";
textureFileYP[0] = "/iron_block.png";
textureFileYN[0] = "/iron_block.png";
textureFileZP[0] = "/iron_block.png";
textureFileZN[0] = "/iron_block.png";
addToCreative[0] = true;
另外说一下,如果材质要的是原版的,要在图片前面加个/号
3.代码讲解:resistance这个属性定义了方块的抗爆炸性 (就只有这个了。。。。)
4.脚本文件设置:
语言文件不用多说了吧。。。主要是脚本文件,
因为是楼梯,所以蓝色框框里面的是stairs
5.打开游戏试试看吧!
怎么样,厉害吧?
新的台阶:
1.在blocks文件夹里面创建一个js文件,然后再用NotePad++打开,不用我多说了吧!
2.输入下列代码:
/*IronSlab.js*/
name = "IronSlab";
material = "rock";
stepSound = "stone";
creativeTab = "buildingBlocks";
doubleSlabBlock[0] = "MyMod:myDoubleSlab";
doubleSlabMeta[0] = 0;
hardness[0] = 30;
resistance[0] = 600;
toolClass[0] = "pickaxe";
harvestLevel[0] = 3;
textureFileXP[0] = "/iron_block.png";
textureFileXN[0] = "/iron_block.png";
textureFileYP[0] = "/iron_block.png";
textureFileYN[0] = "/iron_block.png";
textureFileZP[0] = "/iron_block.png";
textureFileZN[0] = "/iron_block.png";
addToCreative[0] = true;
3.代码讲解:
doubleSlabBlock这个属性定义了一个在另一个板上放置时所创建的块的名称。如果这个属性没有设置, 就不能创建一个双板,也就是双层台阶,
示例
doubleSlabBlock[0] = "MyMod:myDoubleSlab";
doubleSlabBlock[7] = "MyMod:anotherDoubleSlab";
███████████████████████████████████████████████████████████████████████████
doubleSlabMeta
这个属性定义方块的元数据doubleSlabId 示例
// 默认值
doubleSlabMeta[0] = 0;
// ...
doubleSlabMeta[7] = 0;
doubleSlabMeta[0] = 5;
doubleSlabMeta[7] = 8;
4.双层台阶设置,需要再创建一个文件,输入下列代码:
/*DoubleIronSlab.js*/
name = "DoubleIronSlab";
material = "iron";
stepSound = "metal";
creativeTab = "buildingBlocks";
drop[0] = "Creator:IronSlab 2";
hardness[0] = 30;
resistance[0] = 600;
toolClass[0] = "pickaxe";
harvestLevel[0] = 2;
textureFileXP[0] = "/iron_block.png";
textureFileXN[0] = "/iron_block.png";
textureFileYP[0] = "/iron_block.png";
textureFileYN[0] = "/iron_block.png";
textureFileZP[0] = "/iron_block.png";
textureFileZN[0] = "/iron_block.png";
addToCreative[0] = true;
你们也可以设置是否掉落物品。。
5.脚本设置:
语言的自己弄,一样的
红框里面输入的是slab,因为它是台阶,
绿色框框里面输入normal,因为双层台阶已经是一个普通的方块了
6.可以打开游戏了!~
好啦,这次就介绍到这,下次要介绍如何制作新的按钮和踏板,ヾ( ̄▽ ̄)Bye~Bye~
初始页地址,有教程目录:http://www.zuimc.com/thread-39587-1-1.html |