• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LiquidContainerRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraftforge.liquids.LiquidContainerRegistry的典型用法代码示例。如果您正苦于以下问题:Java LiquidContainerRegistry类的具体用法?Java LiquidContainerRegistry怎么用?Java LiquidContainerRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LiquidContainerRegistry类属于net.minecraftforge.liquids包,在下文中一共展示了LiquidContainerRegistry类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: injectLiquidContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static void injectLiquidContainer(LiquidContainerData container, ItemStack remnant, int chance) {
	LiquidContainerRegistry.registerLiquid(container);

	if (RecipeManagers.squeezerManager != null) {
		if (!container.container.getItem().hasContainerItem())
			if (remnant != null) {
				RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { container.filled }, container.stillLiquid, remnant, chance);
			} else {
				RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] { container.filled }, container.stillLiquid);
			}
	}

	if (RecipeManagers.bottlerManager != null) {
		RecipeManagers.bottlerManager.addRecipe(5, container.stillLiquid, container.container, container.filled);
	}
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:17,代码来源:LiquidHelper.java


示例2: getEmptyContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static LiquidContainerData getEmptyContainer(ItemStack empty, LiquidStack liquid) {
	for (LiquidContainerData cont : LiquidContainerRegistry.getRegisteredLiquidContainerData())
		if (cont.stillLiquid.isLiquidEqual(liquid) && cont.container.isItemEqual(empty))
			return cont;

	return null;
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:8,代码来源:LiquidHelper.java


示例3: SlotLiquidContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public SlotLiquidContainer(IInventory iinventory, int i, int j, int k, boolean isEmpty) {
	super(iinventory, i, j, k);

	this.isEmpty = isEmpty;
	ArrayList container = new ArrayList();

	for (LiquidContainerData cont : LiquidContainerRegistry.getRegisteredLiquidContainerData())
		if (isEmpty) {
			container.add(cont.container);
		} else {
			container.add(cont.filled);
		}

	this.items = container.toArray();
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:16,代码来源:SlotLiquidContainer.java


示例4: IronEngineFuel

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public IronEngineFuel(int liquidId, float powerPerCycle, int totalBurningTime) {
	this(new LiquidStack(liquidId, LiquidContainerRegistry.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:4,代码来源:IronEngineFuel.java


示例5: isEmptyLiquidData

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static boolean isEmptyLiquidData() {
	return LiquidContainerRegistry.getRegisteredLiquidContainerData().length <= 0;
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:4,代码来源:LiquidHelper.java


示例6: isEmptyContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static boolean isEmptyContainer(ItemStack empty) {
	return LiquidContainerRegistry.isEmptyContainer(empty);
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:4,代码来源:LiquidHelper.java


示例7: getLiquidContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static LiquidContainerData getLiquidContainer(ItemStack container) {
	for (LiquidContainerData cont : LiquidContainerRegistry.getRegisteredLiquidContainerData())
		if (cont.filled.isItemEqual(container))
			return cont;
	return null;
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:7,代码来源:LiquidHelper.java


示例8: initialize

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static void initialize(){
    crudeEridiumLiquid = LiquidDictionary.getOrCreateLiquid("Crude Eridium", new LiquidStack(BL2Blocks.crudeEridiumStill, 1));
    
    LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Crude Eridium", LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(
            BL2Items.bucketCrudeEridium), new ItemStack(Item.bucketEmpty)));
}
 
开发者ID:lombax5832,项目名称:BL2,代码行数:7,代码来源:BL2Liquid.java


示例9: preInit

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();

    IDsHelper.runConfiguration(config);

    config.save();
    TextureAnimationConverter.convertTxtToPngMCMeta();
    BlocksHelper.setupBlocks();
    ItemsHelper.setupItems();
    proxy.init();
    LocaleHelper.loadLanguages();

    craftingRecipes();
    smeltingRecipes();

    GameRegistry.registerWorldGenerator(new WorldGenStructures());
    GameRegistry.registerWorldGenerator(new WorldGenOres());
    GameRegistry.registerFuelHandler(new FuelHandler());
    
    NetworkRegistry.instance().registerGuiHandler(instance, guihandler);

    GameRegistry.registerTileEntity(TileEntityLavaFurnace.class, "GeothermalOven");
    GameRegistry.registerTileEntity(TileEntityResearcher.class, "Researcher");
    GameRegistry.registerTileEntity(TileEntityLogger.class, "Logger");

    ResearchHandler.instance().setResearchValue(ItemsHelper.siliconIngot.itemID, true);
    ResearchHandler.instance().initResearchHandler();

    EntityRegistry.registerModEntity(EntityRobot.class, "Robot", 1, this, 80, 3, true);
    EntityRegistry.registerModEntity(EntityScientist.class, "Scientist", 2, this, 80, 3, true);

    registerEntityEgg(EntityRobot.class, 0x4A4849, 0x000000);
    registerEntityEgg(EntityScientist.class, 0xfff, 0x9c37bc);

    MinecraftForge.EVENT_BUS.register(new ConcreteBucketHandler());
    
    concreteLiquid = LiquidDictionary.getOrCreateLiquid("Concrete",  new LiquidStack(BlocksHelper.liquidConcreteStill,
            LiquidContainerRegistry.BUCKET_VOLUME));

    LiquidContainerRegistry.registerLiquid(new LiquidContainerData(LiquidDictionary.getLiquid("Concrete", LiquidContainerRegistry.BUCKET_VOLUME),
            new ItemStack(ItemsHelper.bucketConcrete), new ItemStack(Item.bucketEmpty)));
}
 
开发者ID:sciguy1121,项目名称:Community-Mod-1,代码行数:45,代码来源:CommunityMod.java


示例10: registerLiquidContainer

import net.minecraftforge.liquids.LiquidContainerRegistry; //导入依赖的package包/类
public static void registerLiquidContainer() {
	LiquidContainerRegistry.registerLiquid(new LiquidContainerData(new LiquidStack(Block.waterStill, LiquidContainerRegistry.BUCKET_VOLUME / 8), new ItemStack(condensedPotion, PotionData.WATER_META), new ItemStack(condensedPotion, PotionData.EMPTY_VIAL_META)));
}
 
开发者ID:DarthFeder,项目名称:Reliquary,代码行数:4,代码来源:XRItems.java



注:本文中的net.minecraftforge.liquids.LiquidContainerRegistry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RegistryStrategy类代码示例发布时间:2022-05-22
下一篇:
Java TimeLimitedRunner类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap