mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-06-24 11:50:03 +02:00
33 lines
1 KiB
Java
33 lines
1 KiB
Java
|
package de.ellpeck.naturesaura.compat.patchouli;
|
||
|
|
||
|
import de.ellpeck.naturesaura.recipes.AltarRecipe;
|
||
|
import net.minecraft.util.ResourceLocation;
|
||
|
import vazkii.patchouli.api.IComponentProcessor;
|
||
|
import vazkii.patchouli.api.IVariableProvider;
|
||
|
import vazkii.patchouli.api.PatchouliAPI;
|
||
|
|
||
|
public class ProcessorAltar implements IComponentProcessor {
|
||
|
|
||
|
private AltarRecipe recipe;
|
||
|
|
||
|
@Override
|
||
|
public void setup(IVariableProvider provider) {
|
||
|
ResourceLocation res = new ResourceLocation(provider.get("recipe"));
|
||
|
this.recipe = AltarRecipe.RECIPES.get(res);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String process(String key) {
|
||
|
switch (key) {
|
||
|
case "input":
|
||
|
return PatchouliAPI.instance.serializeItemStack(this.recipe.input);
|
||
|
case "output":
|
||
|
return PatchouliAPI.instance.serializeItemStack(this.recipe.output);
|
||
|
case "name":
|
||
|
return this.recipe.output.getDisplayName();
|
||
|
default:
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|