/data/tutorialmod/recipes/diamond_from_infusing.json { "type": "tutorialmod:gem_infusing", "ingredients": [ { "item": "minecraft:stick" } ], "output": { "item": "minecraft:diamond" } } 接下来修改我们...
public classRedStoneSwordextendsItem{publicRedStoneSword(Properties properties){super(properties);}@Override public ActionResult<ItemStack>use(World world,PlayerEntity player,Hand hand){ItemStack stack=player.getItemInHand(hand);// 获取玩家手中的物品player.addEffect(newEffectInstance(Effects.HEALTH_BOOST,40...
Returns a set of tags associated with this item stack.Returns string[]hasComponenthasComponent(componentId: string): booleanReturns true if the specified component is present on this item stack.ParameterscomponentId: string The identifier of the component (e.g., 'minecraft:food') to retrieve. ...
[Mod技巧] 末影..Ender源于Minecraft(我的世界原版)中,它被译为‘末影’。最常见的就是生存中熟知的末影人(Enderman),在众多模组中Ender这词往往与空间以及传送密切先关。另外,IO在英文中则是指
success(stack); // 执行的动作 } } 第二步,在Items类里面注册我们的物品 public static final RegistryObject<Item> RED_STONE_SWORD = register("red_stone_sword", () -> new RedStoneSword(new Item.Properties().tab(ItemGroup.TAB_COMBAT).stacksTo(1).defaultDurability(100))); 下面这行代码的意思...
Changes to minecraft:item options: minecraft:item 选项的改变: Field value has been renamed to item 域value 现在被重命名为 item Field item now also accepts plain item name to represent item stack with default components 域item 现在可以接受单独的物品名称来表示物品的默认状态 ...
EnchantmentHelper.getEnchantmentLevel(Enchantment enchID, ItemStack stack) enchID 需要检测的附魔对象 stack 需要检测的物品,可以从player对象上拿到 return 返回附魔等级,若无返回0 通过AttackEntityEvent 事件实现引爆在近战武器上的效果 @SubscribeEventpublicstaticvoidonPlayerAttack(AttackEntityEventevent){ ...
minecraft:max_stack_sizedetermines how many of an item can be stacked together. Parameters NameDefault ValueTypeDescription value64IntegerHow many of an item that can be stacked together. Comentarios ¿Le ha resultado útil esta página?
For modders: While I do patch most common patterns of "maximum slot limits" in inventories, I may not be able to catch more advanced ones.Items.AIR.getItemStackLimit();is your friend! For modpack developers: Make sure to read the scripting system documentation above. ...
mod.addRecipe(config.getItemId("rawRiceId")+"1",1,2,296,281);这里加的就不是BlockId了而是ItemId,表示是物品的id,而mod.addBlock也变成了mod.addItem,表示往游戏里面添加的不是方块而是物品,然后添加物品的方式是”food”,表示添加的是食物,能添加的还有其他种类,可以在document的Items.htm里面找到。mod...