-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up some tla stuff and depend on our own textures for recipe dec…
…orations
- Loading branch information
Showing
5 changed files
with
50 additions
and
43 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/main/java/com/minelittlepony/unicopia/compat/tla/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/minelittlepony/unicopia/compat/tla/SpellEnhancingTlaRecipe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.minelittlepony.unicopia.compat.tla; | ||
|
||
import java.util.Arrays; | ||
|
||
import com.minelittlepony.unicopia.ability.magic.spell.crafting.SpellEnhancingRecipe; | ||
import com.minelittlepony.unicopia.ability.magic.spell.crafting.SpellbookRecipe; | ||
import com.minelittlepony.unicopia.ability.magic.spell.trait.SpellTraits; | ||
import com.minelittlepony.unicopia.ability.magic.spell.trait.Trait; | ||
|
||
import io.github.mattidragon.tlaapi.api.recipe.TlaStack; | ||
import net.minecraft.recipe.RecipeEntry; | ||
import net.minecraft.util.Identifier; | ||
|
||
class SpellEnhancingTlaRecipe extends SpellbookTlaRecipe { | ||
|
||
private final Identifier id; | ||
|
||
public SpellEnhancingTlaRecipe(RecipeEntry<SpellbookRecipe> recipe, Trait trait) { | ||
super(recipe); | ||
id = recipe.id().withPath(p -> p + "/" + trait.getId().getPath()); | ||
input(trait); | ||
getOutputs().addAll( | ||
Arrays.stream(((SpellEnhancingRecipe)recipe.value()).getBaseMaterial().getMatchingStacks()) | ||
.map(stack -> TlaStack.of(SpellTraits.of(stack).add(new SpellTraits.Builder().with(trait, 1).build()).applyTo(stack))) | ||
.toList() | ||
); | ||
} | ||
|
||
@Override | ||
public Identifier getId() { | ||
return id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters