当前位置: 首页>>代码示例>>Java>>正文


Java LiquidContainerRegistry类代码示例

本文整理汇总了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;未经允许,请勿转载。