本文整理汇总了Java中mekanism.api.infuse.InfuseType类的典型用法代码示例。如果您正苦于以下问题:Java InfuseType类的具体用法?Java InfuseType怎么用?Java InfuseType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InfuseType类属于mekanism.api.infuse包,在下文中一共展示了InfuseType类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addMetallurgicInfuserRecipe
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
/**
* Add a Metallurgic Infuser recipe.
* @param infuse - which Infuse to use
* @param amount - how much Infuse to use
* @param input - input ItemStack
* @param output - output ItemStack
*/
public static void addMetallurgicInfuserRecipe(InfuseType infuse, int amount, ItemStack input, ItemStack output)
{
try {
Class recipeClass = Class.forName("mekanism.common.recipe.RecipeHandler");
Method m = recipeClass.getMethod("addMetallurgicInfuserRecipe", InfuseType.class, Integer.TYPE, ItemStack.class, ItemStack.class);
m.invoke(null, infuse, amount, input, output);
} catch(Exception e) {
System.err.println("Error while adding recipe: " + e.getMessage());
}
}
示例2: intergrate
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
private static void intergrate() {
InfuseType solderInfuse = new InfuseType("SOLDER", RorysGlobal.MODID + ":infuse/solder").setUnlocalizedName("solder");
InfuseRegistry.registerInfuseType(solderInfuse);
InfuseRegistry.registerInfuseObject(new ItemStack(RorysMod.items.solderWire), new InfuseObject(solderInfuse, 10));
InfuseRegistry.registerInfuseObject(new ItemStack(RorysMod.items.solderCoil), new InfuseObject(solderInfuse, 80));
for (ItemStack ironDust : OreDictionary.getOres("dustIron")) {
RecipeHelper.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 100, ironDust, new ItemStack(RorysMod.items.steelDust));
}
RecipeHelper.addMetallurgicInfuserRecipe(solderInfuse, 10, new ItemStack(RorysMod.items.blankCircuit), new ItemStack(RorysMod.items.circuit));
RecipeHelper.addMetallurgicInfuserRecipe(solderInfuse, 10, new ItemStack(RorysMod.items.blankAdvancedCircuit), new ItemStack(RorysMod.items.advancedCircuit));
}
示例3: getInfuseStacks
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
public List<ItemStack> getInfuseStacks(InfuseType type)
{
List<ItemStack> ret = new ArrayList<ItemStack>();
for(Map.Entry<ItemStack, InfuseObject> obj : InfuseRegistry.getObjectMap().entrySet())
{
if(obj.getValue().type == type)
{
ret.add(obj.getKey());
}
}
return ret;
}
示例4: drawExtras
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
@Override
public void drawExtras(int i)
{
InfuseType type = ((CachedIORecipe)arecipes.get(i)).infusionType;
float f = ticksPassed >= 20 && ticksPassed < 40 ? (ticksPassed - 20) % 20 / 20.0F : 1.0F;
if(ticksPassed < 20) f = 0.0F;
changeTexture(type.texture);
drawProgressBar(2, 2, type.texX, type.texY, 4, 52, f, 3);
}
示例5: CachedIORecipe
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
public CachedIORecipe(ItemStack input, ItemStack output, List<ItemStack> infuses, InfuseType type)
{
super();
inputStack = new PositionedStack(input, 46, 28);
outputStack = new PositionedStack(output, 104, 28);
infuseStacks = infuses;
infusionType = type;
}
示例6: load
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
@Override
public void load(NBTTagCompound nbtTags)
{
inputStack = ItemStack.loadItemStackFromNBT(nbtTags.getCompoundTag("input"));
InfuseType type = InfuseRegistry.get(nbtTags.getString("infuseType"));
int amount = nbtTags.getInteger("infuseAmount");
infuse = new InfuseStorage(type, amount);
}
示例7: InfuseStorage
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
public InfuseStorage(InfuseType infuseType, int infuseAmount)
{
type = infuseType;
amount = infuseAmount;
}
示例8: preInit
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
File config = event.getSuggestedConfigurationFile();
//Set the mod's configuration
configuration = new Configuration(config);
if(config.getAbsolutePath().contains("voltz"))
{
logger.info("Detected Voltz in root directory - hello, fellow user!");
}
else if(config.getAbsolutePath().contains("tekkit"))
{
logger.info("Detected Tekkit in root directory - hello, fellow user!");
}
GasRegistry.register(new Gas("hydrogen")).registerFluid();
GasRegistry.register(new Gas("oxygen")).registerFluid();
GasRegistry.register(new Gas("water")).registerFluid();
GasRegistry.register(new Gas("chlorine")).registerFluid();
GasRegistry.register(new Gas("sulfurDioxideGas")).registerFluid();
GasRegistry.register(new Gas("sulfurTrioxideGas")).registerFluid();
GasRegistry.register(new Gas("sulfuricAcid")).registerFluid();
GasRegistry.register(new Gas("hydrogenChloride")).registerFluid();
GasRegistry.register(new Gas("liquidOsmium").setVisible(false));
GasRegistry.register(new Gas("liquidStone").setVisible(false));
GasRegistry.register(new Gas("ethene").registerFluid());
GasRegistry.register(new Gas("sodium").registerFluid());
GasRegistry.register(new Gas("brine").registerFluid());
GasRegistry.register(new Gas("deuterium")).registerFluid();
GasRegistry.register(new Gas("tritium")).registerFluid();
GasRegistry.register(new Gas("fusionFuelDT")).registerFluid();
GasRegistry.register(new Gas("steam")).registerFluid();
GasRegistry.register(new Gas("lithium")).registerFluid();
FluidRegistry.registerFluid(new Fluid("heavyWater"));
for(Resource resource : Resource.values())
{
String name = resource.getName();
OreGas clean = (OreGas)GasRegistry.register(new OreGas("clean" + name, "oregas." + name.toLowerCase()).setVisible(false));
GasRegistry.register(new OreGas(name.toLowerCase(), "oregas." + name.toLowerCase()).setCleanGas(clean).setVisible(false));
}
Mekanism.proxy.preInit();
//Register blocks and items
MekanismItems.register();
MekanismBlocks.register();
//Register infuses
InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0).setUnlocalizedName("infuse.carbon"));
InfuseRegistry.registerInfuseType(new InfuseType("TIN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 4, 0).setUnlocalizedName("infuse.tin"));
InfuseRegistry.registerInfuseType(new InfuseType("DIAMOND", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 8, 0).setUnlocalizedName("infuse.diamond"));
InfuseRegistry.registerInfuseType(new InfuseType("REDSTONE", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 16, 0).setUnlocalizedName("infuse.redstone"));
InfuseRegistry.registerInfuseType(new InfuseType("FUNGI", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 20, 0).setUnlocalizedName("infuse.fungi"));
InfuseRegistry.registerInfuseType(new InfuseType("BIO", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 12, 0).setUnlocalizedName("infuse.bio"));
InfuseRegistry.registerInfuseType(new InfuseType("OBSIDIAN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 24, 0).setUnlocalizedName("infuse.obsidian"));
}
示例9: InfusionInput
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
public InfusionInput(InfuseType infusionType, int required, ItemStack itemStack)
{
infuse = new InfuseStorage(infusionType, required);
inputStack = itemStack;
}
示例10: addMetallurgicInfuserRecipe
import mekanism.api.infuse.InfuseType; //导入依赖的package包/类
/**
* Add a Metallurgic Infuser recipe.
* @param infuse - which Infuse to use
* @param amount - how much of the Infuse to use
* @param input - input ItemStack
* @param output - output ItemStack
*/
public static void addMetallurgicInfuserRecipe(InfuseType infuse, int amount, ItemStack input, ItemStack output)
{
addRecipe(Recipe.METALLURGIC_INFUSER, new MetallurgicInfuserRecipe(new InfusionInput(infuse, amount, input), output));
}