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

Java LiquidDictionary类代码示例

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

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



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

示例1: drawGuiContainerForegroundLayer

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的package包/类
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
	//tileEntity.worldObj.markBlockForUpdate(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
	super.drawGuiContainerForegroundLayer(mouseX, mouseY);
	LiquidTank tank = tileEntity.tank;
	if(tank.containsValidLiquid()) {
		LiquidStack liquid = tank.getLiquid();
		fontRenderer.drawString("Liquid:", 30, 30, 4210752);
		fontRenderer.drawString(LiquidDictionary.findLiquidName(liquid), 30, 40, 4210752);
		
		fontRenderer.drawString("Stored:", 30, 70, 4210752);
		fontRenderer.drawString(((Integer)liquid.amount).toString(), 30, 80, 4210752);
	} else {
		fontRenderer.drawString("Liquid:", 30, 30, 4210752);
		fontRenderer.drawString("None", 30, 40, 4210752);
	}		
}
 
开发者ID:lendrick,项目名称:deep-storage-tanks,代码行数:19,代码来源:GuiDeepStorageTank.java


示例2: EventHandler

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的package包/类
public EventHandler() {
	MinecraftForge.EVENT_BUS.register(this);
	
	for (Entry<String, LiquidStack> entry : LiquidDictionary.getLiquids().entrySet()) {
		onLiquidRegister(new LiquidRegisterEvent(entry.getKey(), entry.getValue()));
	}
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:8,代码来源:EventHandler.java


示例3: createLiquidData

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的package包/类
public static LiquidContainerData createLiquidData(String ident, LiquidStack stillLiquid, ItemStack filled, ItemStack container) {
	LiquidStack still = LiquidDictionary.getOrCreateLiquid(ident, stillLiquid);
	return new LiquidContainerData(still, filled, container);
}
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:5,代码来源:LiquidHelper.java


示例4: OilGeneratorTileEntity

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的package包/类
public OilGeneratorTileEntity() {
	inv = new ItemStack[1];
	this.requiredLiquid = LiquidDictionary.getLiquid("oil", 1);
	internalLiquidTank = new LiquidTank(requiredLiquid,
			FUEL_CAPACITY_MILLIBUCKET, this);
}
 
开发者ID:lirelent,项目名称:Oilcraft,代码行数:7,代码来源:OilGeneratorTileEntity.java


示例5: initialize

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的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


示例6: preInit

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的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


示例7: add

import net.minecraftforge.liquids.LiquidDictionary; //导入依赖的package包/类
/**
 * the new liquid {@link ToGenerateLiquid} contains all the needed
 * information about how you want your new liquid to be placed in the world.
 * This adds the liquid to the list of liquids to be generated in the world.
 * If you've already added this liquid it will overwrite the previously
 * added one.
 * 
 * @param newLiquid
 *            the new liquid we want in the world
 * @param name
 *            the name to register this liquid with in
 *            {@link LiquidDictionary}
 */
public void add(ToGenerateLiquid newLiquid, String name) {
	if (!this.toGenerateLiquids.contains(newLiquid)) {
		// this means that this liquid has never been added before and needs
		// to be added to the liquid dictionary
		LiquidDictionary.getOrCreateLiquid(name, new LiquidStack(
				newLiquid.blockId, 1));
	} else {
		this.toGenerateLiquids.remove(newLiquid);
	}
	this.toGenerateLiquids.add(newLiquid);
}
 
开发者ID:lirelent,项目名称:Oilcraft,代码行数:25,代码来源:ReplaceWithLiquidWorldGen.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ScoreboardScore类代码示例发布时间:2022-05-22
下一篇:
Java Tuple9类代码示例发布时间: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