物品命令:/give @p fjt:color 1
本模组的终极武器,但是由于部分问题,在游戏内的物品名是“颜色:%s.name”,语言文件内的名称则是“无尽彩虹之剑”。
试着攻击敌人会删除其实体,如果攻击到敌人还会将其血量设置为0,并且还会将其传送至虚空。
如果攻击被拦截,那么将只会移除其在本地客户端的渲染。
附源代码:
public void initElements() {
this.elements.items.add(() -> ((Item)(new ItemSword(EnumHelper.addToolMaterial("COLOR", 99999, 0, 99999.0F, 99995.0F, 99999)) {
public Multimap<String, AttributeModifier> func_111205_h(EntityEquipmentSlot slot) {
Multimap<String, AttributeModifier> multimap = super.func_111205_h(slot);
if (slot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.field_111264_e.func_111108_a(), new AttributeModifier(field_111210_e, "Weapon modifier",
func_150931_i(), 0));
multimap.put(SharedMonsterAttributes.field_188790_f.func_111108_a(), new AttributeModifier(field_185050_h, "Weapon modifier", 95.0D, 0));
}
return multimap;
}
public Set<String> getToolClasses(ItemStack stack) {
HashMap<Object, Object> ret = new HashMap<>();
ret.put("sword", Integer.valueOf(99999));
return ret.keySet();
}
public boolean func_77644_a(ItemStack itemstack, EntityLivingBase entity, EntityLivingBase entity2) {
super.func_77644_a(itemstack, entity, entity2);
int x = (int)entity.field_70165_t;
int y = (int)entity.field_70163_u;
int z = (int)entity.field_70161_v;
World world = entity.field_70170_p;
Map<Object, Object> $_dependencies = new HashMap<>();
$_dependencies.put("entity", entity);
ProcedureColorDangShiTiBeiGongJuJiZhongShi.executeProcedure($_dependencies);
return true;
}
}).func_77655_b("color").setRegistryName("color")).func_77637_a(TabFoodprotect.tab));
}
资料分类: | 武器 |