自定义部件类型
导论
导入
创建一个材料类型
实例脚本
#loader contenttweaker
import mods.contenttweaker.MaterialSystem;
val ourType = MaterialSystem.createPartType("cool_type", function(materialPart){
});
//Use the new type to create a Part
val ourPart = mods.contenttweaker.MaterialSystem.getPartBuilder().setName("cool_part").setPartType(ourType).build();
//Create a new Material and register the newly created part.
val ourMaterial = MaterialSystem.getMaterialBuilder().setName("Lawrencium").setColor(15426660).build();
ourMaterial.registerPart(ourPart);最后更新于