net.minecraft.item.Item.setContainerItem()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中net.minecraft.item.Item.setContainerItem()方法的一些代码示例,展示了Item.setContainerItem()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.setContainerItem()方法的具体详情如下:
包路径:net.minecraft.item.Item
类名称:Item
方法名:setContainerItem

Item.setContainerItem介绍

暂无

代码示例

代码示例来源:origin: Vazkii/Quark

@Override
public void postInit(FMLPostInitializationEvent event) {
  Items.DRAGON_BREATH.setContainerItem(null);
}

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

MbArrows = new ItemMBArrow().setUnlocalizedName(MODID + itemNames[9]).setCreativeTab(customTab).setContainerItem(Items.ARROW);
for(int i = 0; i < ItemMBArrow.arrows.length; i++){
  QuiverArrowRegistry.addArrowToRegistry(MbArrows, i, ItemMBArrow.arrows[i]);

代码示例来源:origin: squeek502/VeganOption

@Override
public void create()
{
  appleSauce = new ItemFoodContainered(3, 1f, false)
    .setUnlocalizedName(ModInfo.MODID + ".appleSauce")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "apple_sauce")
    .setContainerItem(Items.BOWL);
  GameRegistry.register(appleSauce);
  potatoStarch = new Item()
    .setUnlocalizedName(ModInfo.MODID + ".potatoStarch")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "potato_starch");
  GameRegistry.register(potatoStarch);
  plasticEgg = new ItemThrowableGeneric(EntityPlasticEgg.class)
    .setUnlocalizedName(ModInfo.MODID + ".plasticEgg")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "plastic_egg");
  GameRegistry.register(plasticEgg);
  EntityRegistry.registerModEntity(EntityPlasticEgg.class, "plasticEgg", ContentHelper.ENTITYID_PLASTIC_EGG, ModInfo.MODID, 80, 1, true);
}

代码示例来源:origin: squeek502/VeganOption

@Override
public void create()
{
  fluidSoapSolution = new Fluid("fluid_soap_solution", new ResourceLocation(ModInfo.MODID_LOWER, "blocks/soap_solution_still"), new ResourceLocation(ModInfo.MODID_LOWER, "blocks/soap_solution_flow"));
  FluidRegistry.registerFluid(fluidSoapSolution);
  blockFluidSoapSolution = new BlockFluidClassic(fluidSoapSolution, Material.WATER)
    .setUnlocalizedName(ModInfo.MODID + ".fluidSoapSolution")
    .setRegistryName(ModInfo.MODID_LOWER, "fluidSoapSolution");
  fluidSoapSolution.setBlock(blockFluidSoapSolution);
  fluidSoapSolution.setUnlocalizedName(blockFluidSoapSolution.getUnlocalizedName());
  GameRegistry.register(blockFluidSoapSolution);
  GameRegistry.register(new ItemBlock(blockFluidSoapSolution).setRegistryName(blockFluidSoapSolution.getRegistryName()));
  soapSolution = new ItemSoapSolution()
    .setUnlocalizedName(ModInfo.MODID + ".soapSolution")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "soapSolution")
    .setContainerItem(Items.GLASS_BOTTLE);
  GameRegistry.register(soapSolution);
  FluidContainerRegistry.registerFluidContainer(new FluidStack(fluidSoapSolution, Fluid.BUCKET_VOLUME), new ItemStack(soapSolution), new ItemStack(soapSolution.getContainerItem()));
  frozenBubble = new ItemFrozenBubble()
    .setUnlocalizedName(ModInfo.MODID + ".frozenBubble")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "frozenBubble");
  GameRegistry.register(frozenBubble);
  EntityRegistry.registerModEntity(EntityBubble.class, "bubble", ContentHelper.ENTITYID_BUBBLE, ModInfo.MODID, 80, 1, true);
}

代码示例来源:origin: squeek502/VeganOption

@Override
public void create()
{
  oilPresser = new ItemStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE);
  seedSunflower = new ItemFood(1, 0.05f, false)
    .setUnlocalizedName(ModInfo.MODID + ".seedSunflower")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "seedsSunflower");
  GameRegistry.register(seedSunflower);
  fluidVegetableOil = new Fluid("fluid_oil_vegetable", new ResourceLocation(ModInfo.MODID_LOWER, "blocks/vegetable_oil_still"), new ResourceLocation(ModInfo.MODID_LOWER, "blocks/vegetable_oil_flow"));
  FluidRegistry.registerFluid(fluidVegetableOil);
  fluidBlockVegetableOil = new BlockFluidClassic(fluidVegetableOil, Material.WATER)
    .setUnlocalizedName(ModInfo.MODID + ".fluidOilVegetable")
    .setRegistryName(ModInfo.MODID_LOWER, "fluidOilVegetable");
  fluidVegetableOil.setBlock(fluidBlockVegetableOil);
  fluidVegetableOil.setUnlocalizedName(fluidBlockVegetableOil.getUnlocalizedName());
  GameRegistry.register(fluidBlockVegetableOil);
  GameRegistry.register(new ItemBlock(fluidBlockVegetableOil).setRegistryName(fluidBlockVegetableOil.getRegistryName()));
  oilVegetable = new Item()
    .setUnlocalizedName(ModInfo.MODID + ".oilVegetable")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "oilVegetable")
    .setContainerItem(Items.GLASS_BOTTLE);
  GameRegistry.register(oilVegetable);
  FluidContainerRegistry.registerFluidContainer(new FluidStack(fluidVegetableOil, Fluid.BUCKET_VOLUME), new ItemStack(oilVegetable), new ItemStack(oilVegetable.getContainerItem()));
}

代码示例来源:origin: squeek502/VeganOption

.setCreativeTab(VeganOption.creativeTab)
  .setRegistryName(ModInfo.MODID_LOWER, "inkVegetableOilBlack")
  .setContainerItem(Items.GLASS_BOTTLE);
GameRegistry.register(blackVegetableOilInk);
  .setCreativeTab(VeganOption.creativeTab)
  .setRegistryName(ModInfo.MODID_LOWER, "inkVegetableOilWhite")
  .setContainerItem(Items.GLASS_BOTTLE);
GameRegistry.register(whiteVegetableOilInk);

相关文章

微信公众号

最新文章

更多