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); }
private static void registerFuel() { GameRegistry.registerFuelHandler(new IFuelHandler() { @Override public int getBurnTime(ItemStack fuel) { return Items.diamond != fuel.getItem() ? 0 : 12800; } }); }
public static int getFuelValue(ItemStack itemStack) { int fuelValue = 0; for (IFuelHandler handler : fuelHandlers) { fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack)); } return fuelValue; }
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; } }); }
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; } }); }
public static void registerFuelHandler(IFuelHandler handler) { fuelHandlers.add(handler); }
public static void registerCompressionChamberFuelHandler(IFuelHandler handler) { compressionChamberFuelHandlers.add(handler); }
public static int getCompressionChamberFuelValue(ItemStack itemStack) { int fuelValue = 0; for (IFuelHandler handler : compressionChamberFuelHandlers) fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack)); return fuelValue; }
public static void registerChemicalExtractorFuelHandler(IFuelHandler handler) { chemicalExtractorFuelHandlers.add(handler); }
public static int getChemicalExtractorFuelValue(ItemStack itemStack) { int fuelValue = 0; for (IFuelHandler handler : chemicalExtractorFuelHandlers) fuelValue = Math.max(fuelValue, handler.getBurnTime(itemStack)); return fuelValue; }
public static IFuelHandler buildFuelHelper(BaseModProxy mod) { return new ModLoaderFuelHelper(mod); }