當前位置: 首頁>>代碼示例>>Java>>正文


Java InfuseType類代碼示例

本文整理匯總了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());
	}
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:18,代碼來源:RecipeHelper.java

示例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));
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:13,代碼來源:MekanismPlugin.java

示例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;
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:15,代碼來源:MetallurgicInfuserRecipeHandler.java

示例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);
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:12,代碼來源:MetallurgicInfuserRecipeHandler.java

示例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;
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:12,代碼來源:MetallurgicInfuserRecipeHandler.java

示例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);
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:9,代碼來源:InfusionInput.java

示例7: InfuseStorage

import mekanism.api.infuse.InfuseType; //導入依賴的package包/類
public InfuseStorage(InfuseType infuseType, int infuseAmount)
{
	type = infuseType;
	amount = infuseAmount;
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:6,代碼來源:InfuseStorage.java

示例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"));
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:62,代碼來源:Mekanism.java

示例9: InfusionInput

import mekanism.api.infuse.InfuseType; //導入依賴的package包/類
public InfusionInput(InfuseType infusionType, int required, ItemStack itemStack)
{
	infuse = new InfuseStorage(infusionType, required);
	inputStack = itemStack;
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:6,代碼來源:InfusionInput.java

示例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));
}
 
開發者ID:Microsoft,項目名稱:vsminecraft,代碼行數:12,代碼來源:RecipeHandler.java


注:本文中的mekanism.api.infuse.InfuseType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。