Alchemy arrays should mostly function now (#1202)
Rewrites the crafting recipe portion of alchemy arrays. Currently the rewritten portion is wrapped in the old stuff. Ideally the remaining old stuff will be rewritten as well. Mods who wish to do custom array effects still need to depend on internal classes and I think this is fine.
This commit is contained in:
parent
4b5f8a9685
commit
123b06c288
10 changed files with 239 additions and 34 deletions
|
@ -1,5 +1,7 @@
|
|||
package WayofTime.bloodmagic.client.render.block;
|
||||
|
||||
import WayofTime.bloodmagic.api.impl.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.impl.recipe.RecipeAlchemyArray;
|
||||
import WayofTime.bloodmagic.apibutnotreally.alchemyCrafting.AlchemyCircleRenderer;
|
||||
import WayofTime.bloodmagic.apibutnotreally.registry.AlchemyArrayRecipeRegistry;
|
||||
import WayofTime.bloodmagic.tile.TileAlchemyArray;
|
||||
|
@ -13,6 +15,11 @@ public class RenderAlchemyArray extends TileEntitySpecialRenderer<TileAlchemyArr
|
|||
ItemStack catalystStack = alchemyArray.getStackInSlot(1);
|
||||
int craftTime = alchemyArray.activeCounter;
|
||||
AlchemyCircleRenderer renderer = AlchemyArrayRecipeRegistry.getAlchemyCircleRenderer(inputStack, catalystStack);
|
||||
if (renderer == AlchemyArrayRecipeRegistry.DEFAULT_RENDERER) {
|
||||
RecipeAlchemyArray recipe = BloodMagicAPI.INSTANCE.getRecipeRegistrar().getAlchemyArray(inputStack, catalystStack);
|
||||
if (recipe != null)
|
||||
renderer = new AlchemyCircleRenderer(recipe.getCircleTexture());
|
||||
}
|
||||
|
||||
renderer.renderAt(alchemyArray, x, y, z, (craftTime > 0 ? craftTime + partialTicks : 0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue