本文整理汇总了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);
}
}
示例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()));
}
}
示例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);
}
示例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);
}
示例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)));
}
示例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)));
}
示例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);
}