本文整理汇总了Java中mekanism.api.infuse.InfuseRegistry类的典型用法代码示例。如果您正苦于以下问题:Java InfuseRegistry类的具体用法?Java InfuseRegistry怎么用?Java InfuseRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InfuseRegistry类属于mekanism.api.infuse包,在下文中一共展示了InfuseRegistry类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handlePacketData
import mekanism.api.infuse.InfuseRegistry; //导入依赖的package包/类
@Override
public void handlePacketData(ByteBuf dataStream)
{
if(!worldObj.isRemote)
{
infuseStored.amount = dataStream.readInt();
return;
}
super.handlePacketData(dataStream);
clientActive = dataStream.readBoolean();
operatingTicks = dataStream.readInt();
infuseStored.amount = dataStream.readInt();
controlType = RedstoneControl.values()[dataStream.readInt()];
infuseStored.type = InfuseRegistry.get(PacketHandler.readString(dataStream));
if(updateDelay == 0 && clientActive != isActive)
{
updateDelay = general.UPDATE_DELAY;
isActive = clientActive;
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
}
}
示例2: postInit
import mekanism.api.infuse.InfuseRegistry; //导入依赖的package包/类
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
if(FuelHandler.BCPresent() && BuildcraftFuelRegistry.fuel != null)
{
for(IFuel s : BuildcraftFuelRegistry.fuel.getFuels())
{
if(!(s.getFluid() == null || GasRegistry.containsGas(s.getFluid().getName())))
{
GasRegistry.register(new Gas(s.getFluid()));
}
}
BuildcraftFuelRegistry.fuel.addFuel(FluidRegistry.getFluid("ethene"), (int)(240 * general.TO_TE), 40 * FluidContainerRegistry.BUCKET_VOLUME);
}
for(ItemStack ore : OreDictionary.getOres("dustGold"))
{
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("CARBON"), 10, MekanismUtils.size(ore, 4), GeneratorsItems.Hohlraum.getEmptyItem());
}
}
示例3: intergrate
import mekanism.api.infuse.InfuseRegistry; //导入依赖的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));
}
示例4: getInfuseStacks
import mekanism.api.infuse.InfuseRegistry; //导入依赖的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;
}
示例5: readFromNBT
import mekanism.api.infuse.InfuseRegistry; //导入依赖的package包/类
@Override
public void readFromNBT(NBTTagCompound nbtTags)
{
super.readFromNBT(nbtTags);
clientActive = isActive = nbtTags.getBoolean("isActive");
operatingTicks = nbtTags.getInteger("operatingTicks");
infuseStored.amount = nbtTags.getInteger("infuseStored");
controlType = RedstoneControl.values()[nbtTags.getInteger("controlType")];
infuseStored.type = InfuseRegistry.get(nbtTags.getString("type"));
}
示例6: load
import mekanism.api.infuse.InfuseRegistry; //导入依赖的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: isItemValidForSlot
import mekanism.api.infuse.InfuseRegistry; //导入依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
if(slotID == 3)
{
return false;
}
else if(slotID == 1)
{
return InfuseRegistry.getObject(itemstack) != null && (infuseStored.type == null || infuseStored.type == InfuseRegistry.getObject(itemstack).type);
}
else if(slotID == 0)
{
return itemstack.getItem() == MekanismItems.SpeedUpgrade || itemstack.getItem() == MekanismItems.EnergyUpgrade;
}
else if(slotID == 2)
{
if(infuseStored.type != null)
{
if(RecipeHandler.getMetallurgicInfuserRecipe(new InfusionInput(infuseStored, itemstack)) != null)
{
return true;
}
}
else {
for(Object obj : Recipe.METALLURGIC_INFUSER.get().keySet())
{
InfusionInput input = (InfusionInput)obj;
if(input.inputStack.isItemEqual(itemstack))
{
return true;
}
}
}
}
else if(slotID == 4)
{
return ChargeUtils.canBeDischarged(itemstack);
}
return false;
}
示例8: preInit
import mekanism.api.infuse.InfuseRegistry; //导入依赖的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"));
}