net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData Java Examples
The following examples show how to use
net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RecipeHandlerFluidRegistry.java From NEI-Integration with MIT License | 6 votes |
@Override public void loadCraftingRecipes(ItemStack result) { if (Utils.isFluidBlock(result)) { super.loadCraftingRecipes(result); } if (Config.handlerFluidRegistry) { for (Fluid fluid : this.getFluids()) { CachedFluidRegistryRecipe crecipe = new CachedFluidRegistryRecipe(fluid); if (crecipe.filledContainer != null && crecipe.filledContainer.contains(result)) { crecipe.setPermutation(crecipe.filledContainer, result); for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (Utils.areStacksSameTypeCraftingSafe(data.filledContainer, result)) { crecipe.setPermutation(crecipe.emptyContainer, data.emptyContainer); } } this.arecipes.add(crecipe); } } } }
Example #2
Source File: RecipeHandlerFluidRegistry.java From NEI-Integration with MIT License | 6 votes |
@Override public void loadUsageRecipes(ItemStack ingredient) { super.loadUsageRecipes(ingredient); if (Config.handlerFluidRegistry) { for (Fluid fluid : this.getFluids()) { CachedFluidRegistryRecipe crecipe = new CachedFluidRegistryRecipe(fluid); if (crecipe.emptyContainer != null && crecipe.emptyContainer.contains(ingredient)) { crecipe.setPermutation(crecipe.emptyContainer, ingredient); for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (Utils.areStacksSameTypeCraftingSafe(data.emptyContainer, ingredient)) { crecipe.setPermutation(crecipe.filledContainer, data.filledContainer); } } this.arecipes.add(crecipe); } } } }
Example #3
Source File: RecipeHandlerFluidRegistry.java From NEI-Integration with MIT License | 5 votes |
private void setContainerItems(Fluid fluid) { List<ItemStack> emptyContainers = new ArrayList<ItemStack>(); List<ItemStack> filledContainers = new ArrayList<ItemStack>(); for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (data.fluid.getFluid() == fluid) { emptyContainers.add(data.emptyContainer); filledContainers.add(data.filledContainer); } } if (!emptyContainers.isEmpty() && !filledContainers.isEmpty()) { this.emptyContainer = new PositionedStack(emptyContainers, 71, 43); this.filledContainer = new PositionedStack(filledContainers, 112, 43); } }
Example #4
Source File: RecipeHandlerBottler.java From NEI-Integration with MIT License | 5 votes |
@Override public void prepare() { guiClass = Utils.getClass("forestry.factory.gui.GuiBottler"); for (FluidContainerData container : FluidContainerRegistry.getRegisteredFluidContainerData()) { MachineBottler.Recipe recipe = MachineBottler.RecipeManager.findMatchingRecipe(container.fluid, container.emptyContainer); if (recipe != null) { recipes.add(recipe); } } }
Example #5
Source File: RecipeInputFluidContainer.java From Electro-Magic-Tools with GNU General Public License v3.0 | 5 votes |
@Override public List<ItemStack> getInputs() { List<ItemStack> ret = new ArrayList<ItemStack>(); for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) { if (data.fluid.getFluid() == fluid) ret.add(data.filledContainer); } return ret; }