Java 类cpw.mods.fml.common.IFuelHandler 实例源码

项目:ExtraUtilities    文件:ItemHeatingCoil.java   
public ItemHeatingCoil() {
    super(1500000, 1500000, 75000);
    GameRegistry.registerFuelHandler((IFuelHandler)this);
    this.setMaxStackSize(1);
    this.setTextureName("extrautils:heatingElement");
    this.setUnlocalizedName("extrautils:heatingElement");
    this.setCreativeTab((CreativeTabs)ExtraUtils.creativeTabExtraUtils);
}
项目:InformationCraft    文件:CraftingLoader.java   
private static void registerFuel()
{
    GameRegistry.registerFuelHandler(new IFuelHandler()
    {
        @Override
        public int getBurnTime(ItemStack fuel)
        {
            return Items.diamond != fuel.getItem() ? 0 : 12800;
        }
    });
}
项目:TRHS_Club_Mod_2016    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:CauldronGit    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:Cauldron    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:Cauldron    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:Cauldron    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:RuneCraftery    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:RuneCraftery    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:BetterNutritionMod    文件:GameRegistry.java   
public static int getFuelValue(ItemStack itemStack)
{
    int fuelValue = 0;
    for (IFuelHandler handler : fuelHandlers)
    {
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    }
    return fuelValue;
}
项目:PneumaticCraft    文件:PneumaticCraft.java   
public void registerFuel(final ItemStack fuelStack, final int fuelValue){
    GameRegistry.registerFuelHandler(new IFuelHandler(){
        @Override
        public int getBurnTime(ItemStack fuel){
            return fuel != null && fuel.isItemEqual(fuelStack) ? fuelValue : 0;
        }
    });
}
项目:Nucleum-Omnium    文件:FuelAdding.java   
public static void init()
{
    String[] fuelEdits = NucleumOmnium.getConfig().fuelEdits;

    for (String edit : fuelEdits)
    {
        String[] split = edit.split(":");

        int fuelLevel = Integer.parseInt(split[split.length - 1]);

        if (Arrays.asList(OreDictionary.getOreNames()).contains(split[0]))
        {
            fuelSet.add(new ItemStackOrOreDictEntry(split[0], fuelLevel));
        }
        else
        {
            int id = Integer.parseInt(split[0]);
            int meta = OreDictionary.WILDCARD_VALUE;
            if (split.length == 3) meta = Integer.parseInt(split[1]);

            fuelSet.add(new ItemStackOrOreDictEntry(new ItemStack(id, 1, meta), fuelLevel));
        }
    }

    GameRegistry.registerFuelHandler(new IFuelHandler()
    {
        @Override
        public int getBurnTime(ItemStack fuel)
        {
            for (ItemStackOrOreDictEntry entry : fuelSet)
            {
                if (entry.is(fuel))
                {
                    return entry.getFuelLvl();
                }
            }
            return 0;
        }
    });
}
项目:TRHS_Club_Mod_2016    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:CauldronGit    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:CarbonMod    文件:CarbonRegistry.java   
public static void registerCompressionChamberFuelHandler(IFuelHandler handler) {
compressionChamberFuelHandlers.add(handler);
  }
项目:CarbonMod    文件:CarbonRegistry.java   
public static int getCompressionChamberFuelValue(ItemStack itemStack) {
    int fuelValue = 0;
    for (IFuelHandler handler : compressionChamberFuelHandlers)
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    return fuelValue;
}
项目:CarbonMod    文件:CarbonRegistry.java   
public static void registerChemicalExtractorFuelHandler(IFuelHandler handler) {
    chemicalExtractorFuelHandlers.add(handler);
}
项目:CarbonMod    文件:CarbonRegistry.java   
public static int getChemicalExtractorFuelValue(ItemStack itemStack) {
    int fuelValue = 0;
    for (IFuelHandler handler : chemicalExtractorFuelHandlers)
        fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack));
    return fuelValue;
}
项目:Cauldron    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:Cauldron    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:Cauldron    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:RuneCraftery    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:RuneCraftery    文件:ModLoaderHelper.java   
public static IFuelHandler buildFuelHelper(BaseModProxy mod)
{
    return new ModLoaderFuelHelper(mod);
}
项目:RuneCraftery    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:RuneCraftery    文件:ModLoaderHelper.java   
public static IFuelHandler buildFuelHelper(BaseModProxy mod)
{
    return new ModLoaderFuelHelper(mod);
}
项目:BetterNutritionMod    文件:GameRegistry.java   
public static void registerFuelHandler(IFuelHandler handler)
{
    fuelHandlers.add(handler);
}
项目:BetterNutritionMod    文件:ModLoaderHelper.java   
public static IFuelHandler buildFuelHelper(BaseModProxy mod)
{
    return new ModLoaderFuelHelper(mod);
}