Added the Binding array
Hehe lightning go brrrrrr
This commit is contained in:
parent
2075fa5be3
commit
507c541d5b
|
@ -56,7 +56,7 @@ e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritu
|
|||
42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json
|
||||
3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json
|
||||
d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json
|
||||
0529422020c4a1669969bd3ee63aee063de4954d assets/bloodmagic/lang/en_us.json
|
||||
173699095ea3249b38b9dfa43e3480cd1fa209f4 assets/bloodmagic/lang/en_us.json
|
||||
34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json
|
||||
bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json
|
||||
adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json
|
||||
|
@ -288,6 +288,7 @@ f267edf1b08e69d377290a549bd5ec4a12661d9e assets/bloodmagic/models/item/primitive
|
|||
aa8684bdce288295cfbb41248ff7f008f98b5e7b assets/bloodmagic/models/item/primitive_hydration_cell.json
|
||||
63fe86d0faf9aa03a513221a6a12828a886b1301 assets/bloodmagic/models/item/rawdemoncrystal.json
|
||||
b4e1259784354b048cd7ec5ef888a182e3909dc6 assets/bloodmagic/models/item/reagentair.json
|
||||
2b43c346e0dc565cba8a9b4748e0976eb1f1913f assets/bloodmagic/models/item/reagentbinding.json
|
||||
919b17ed4620c7b76c86494683951ab6e7fc7864 assets/bloodmagic/models/item/reagentbloodlight.json
|
||||
c0a7633527bdd25fc85e78fc4838733063726d88 assets/bloodmagic/models/item/reagentfastminer.json
|
||||
4ff6b8f6943d96a0f292ff4e0b0973edff550229 assets/bloodmagic/models/item/reagentgrowth.json
|
||||
|
@ -571,6 +572,10 @@ d1ac23080f72f21adb5908befefe965ffb4efd4f data/bloodmagic/recipes/array/bloodligh
|
|||
4bd220ced486f1d8fc4468ebd61dac755670d716 data/bloodmagic/recipes/array/fastminersigil.json
|
||||
f191a3c9982b827b0b2ba93164a81fc4f8cb0959 data/bloodmagic/recipes/array/growthsigil.json
|
||||
78c880321f0bfad14239d4b9d2edae170a7fa86e data/bloodmagic/recipes/array/lavasigil.json
|
||||
165f8f8ba7ae094cdd1367716a0797a0f8d4d605 data/bloodmagic/recipes/array/living_boots.json
|
||||
1de17e8a769d471c934835955184d0c8782fb619 data/bloodmagic/recipes/array/living_helmet.json
|
||||
4a48885f110a87505381c7e2f2607d30612a3604 data/bloodmagic/recipes/array/living_leggings.json
|
||||
5e3c6dd7bfcd16e79f17e963d8c1b59c0d1aebe9 data/bloodmagic/recipes/array/living_plate.json
|
||||
8b1007de1b7fca5d27b54d7c9839cde9e47ab1c0 data/bloodmagic/recipes/array/magnetismsigil.json
|
||||
6fd91801759c6a7a018b9d18601fc3db4d3ee3b4 data/bloodmagic/recipes/array/seersigil.json
|
||||
cabe693e7c714203ad708a1068f302b3ee3120b0 data/bloodmagic/recipes/array/voidsigil.json
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
"item.bloodmagic.primitive_explosive_cell": "Primitive Explosive Cell",
|
||||
"item.bloodmagic.primitive_hydration_cell": "Primitive Hydration Cell",
|
||||
"item.bloodmagic.reagentair": "Air Reagent",
|
||||
"item.bloodmagic.reagentbinding": "Binding Reagent",
|
||||
"item.bloodmagic.reagentbloodlight": "Blood Lamp Reagent",
|
||||
"item.bloodmagic.reagentfastminer": "Mining Reagent",
|
||||
"item.bloodmagic.reagentgrowth": "Growth Reagent",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "bloodmagic:item/reagentbinding"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "bloodmagic:array",
|
||||
"texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png",
|
||||
"baseinput": {
|
||||
"item": "bloodmagic:reagentbinding"
|
||||
},
|
||||
"addedinput": {
|
||||
"item": "minecraft:iron_boots"
|
||||
},
|
||||
"output": {
|
||||
"item": "bloodmagic:livingboots",
|
||||
"nbt": "{Damage:0}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "bloodmagic:array",
|
||||
"texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png",
|
||||
"baseinput": {
|
||||
"item": "bloodmagic:reagentbinding"
|
||||
},
|
||||
"addedinput": {
|
||||
"item": "minecraft:iron_helmet"
|
||||
},
|
||||
"output": {
|
||||
"item": "bloodmagic:livinghelmet",
|
||||
"nbt": "{Damage:0}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "bloodmagic:array",
|
||||
"texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png",
|
||||
"baseinput": {
|
||||
"item": "bloodmagic:reagentbinding"
|
||||
},
|
||||
"addedinput": {
|
||||
"item": "minecraft:iron_leggings"
|
||||
},
|
||||
"output": {
|
||||
"item": "bloodmagic:livingleggings",
|
||||
"nbt": "{Damage:0}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "bloodmagic:array",
|
||||
"texture": "bloodmagic:textures/models/alchemyarrays/bindingarray.png",
|
||||
"baseinput": {
|
||||
"item": "bloodmagic:reagentbinding"
|
||||
},
|
||||
"addedinput": {
|
||||
"item": "minecraft:iron_chestplate"
|
||||
},
|
||||
"output": {
|
||||
"item": "bloodmagic:livingplate",
|
||||
"nbt": "{Damage:0}"
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@ import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
|||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import wayoftime.bloodmagic.BloodMagic;
|
||||
import wayoftime.bloodmagic.api.compat.IMultiWillTool;
|
||||
import wayoftime.bloodmagic.client.model.MimicColor;
|
||||
import wayoftime.bloodmagic.client.render.block.RenderAlchemyArray;
|
||||
import wayoftime.bloodmagic.client.render.block.RenderAltar;
|
||||
|
@ -34,7 +35,6 @@ import wayoftime.bloodmagic.common.item.ItemSacrificialDagger;
|
|||
import wayoftime.bloodmagic.common.item.sigil.ItemSigilToggleable;
|
||||
import wayoftime.bloodmagic.common.item.soul.ItemSentientSword;
|
||||
import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes;
|
||||
import wayoftime.bloodmagic.api.compat.IMultiWillTool;
|
||||
import wayoftime.bloodmagic.tile.TileAlchemyArray;
|
||||
import wayoftime.bloodmagic.tile.TileAltar;
|
||||
import wayoftime.bloodmagic.tile.TileDemonCrucible;
|
||||
|
@ -98,6 +98,7 @@ public class ClientEvents
|
|||
Minecraft.getInstance().getBlockColors().register(new MimicColor(), BloodMagicBlocks.MIMIC.get());
|
||||
RenderTypeLookup.setRenderLayer(BloodMagicBlocks.MIMIC.get(), (RenderType) -> true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static void registerItemModelProperties(FMLClientSetupEvent event)
|
||||
|
|
|
@ -0,0 +1,229 @@
|
|||
package wayoftime.bloodmagic.client.render.alchemyarray;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
import wayoftime.bloodmagic.client.render.BloodMagicRenderer;
|
||||
import wayoftime.bloodmagic.client.render.BloodMagicRenderer.Model2D;
|
||||
import wayoftime.bloodmagic.client.render.RenderResizableQuadrilateral;
|
||||
import wayoftime.bloodmagic.tile.TileAlchemyArray;
|
||||
|
||||
public class BindingAlchemyCircleRenderer extends AlchemyArrayRenderer
|
||||
{
|
||||
public static final int numberOfSweeps = 5;
|
||||
public static final int startTime = 50;
|
||||
public static final int sweepTime = 40;
|
||||
public static final int inwardRotationTime = 50;
|
||||
public static final float arcLength = (float) Math.sqrt(2 * (2 * 2) - 2 * 2 * 2 * Math.cos(2 * Math.PI * 2 / 5));
|
||||
public static final float theta2 = (float) (18f * Math.PI / 180f);
|
||||
public static final int endTime = 300;
|
||||
public final ResourceLocation[] arraysResources;
|
||||
public float offsetFromFace = -0.9f;
|
||||
|
||||
public BindingAlchemyCircleRenderer()
|
||||
{
|
||||
super(new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindingarray.png"));
|
||||
arraysResources = new ResourceLocation[5];
|
||||
arraysResources[0] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png");
|
||||
arraysResources[1] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png");
|
||||
arraysResources[2] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png");
|
||||
arraysResources[3] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png");
|
||||
arraysResources[4] = new ResourceLocation("bloodmagic", "textures/models/alchemyarrays/bindinglightningarray.png");
|
||||
}
|
||||
|
||||
public float getRotation(int circle, float craftTime)
|
||||
{
|
||||
float offset = 2;
|
||||
if (circle == -1 && craftTime >= offset)
|
||||
{
|
||||
return (craftTime - offset) * 360 * 2 / 5 / sweepTime;
|
||||
}
|
||||
if (craftTime >= offset)
|
||||
{
|
||||
float modifier = (float) Math.pow(craftTime - offset, 1.5);
|
||||
return modifier * 0.5f;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public float getSecondaryRotation(int circle, float craftTime)
|
||||
{
|
||||
float offset = 50;
|
||||
if (craftTime >= offset)
|
||||
{
|
||||
float modifier = (float) Math.pow(craftTime - offset, 1.7);
|
||||
return modifier * 0.5f;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public float getVerticalOffset(int circle, float craftTime)
|
||||
{
|
||||
if (circle >= 0 && circle <= 4)
|
||||
{
|
||||
if (craftTime >= 5)
|
||||
{
|
||||
if (craftTime <= 40)
|
||||
{
|
||||
return (float) ((0.4) * Math.pow((craftTime - 5) / 35f, 3));
|
||||
} else
|
||||
{
|
||||
return 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (craftTime >= 5)
|
||||
{
|
||||
if (craftTime <= 40)
|
||||
{
|
||||
return (float) ((0.4) * Math.pow((craftTime - 5) / 35f, 3));
|
||||
} else
|
||||
{
|
||||
return 0.4f;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public float getInwardRotation(int circle, float craftTime)
|
||||
{
|
||||
float offset = startTime + numberOfSweeps * sweepTime;
|
||||
if (craftTime >= offset)
|
||||
{
|
||||
if (craftTime <= offset + inwardRotationTime)
|
||||
{
|
||||
return 90f / inwardRotationTime * (craftTime - offset);
|
||||
} else
|
||||
{
|
||||
return 90;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void renderAt(TileAlchemyArray tileArray, double x, double y, double z, float craftTime, MatrixStack matrixStack, IRenderTypeBuffer renderer, int combinedLightIn, int combinedOverlayIn)
|
||||
{
|
||||
matrixStack.push();
|
||||
|
||||
matrixStack.translate(0.5, 0.5, 0.5);
|
||||
|
||||
float rot = getRotation(-1, craftTime);
|
||||
float secondaryRot = getSecondaryRotation(craftTime);
|
||||
|
||||
float size = 3;
|
||||
Direction dirRotation = tileArray.getRotation();
|
||||
|
||||
matrixStack.push();
|
||||
matrixStack.translate(0, getVerticalOffset(craftTime), 0);
|
||||
matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), -dirRotation.getHorizontalAngle(), true));
|
||||
|
||||
matrixStack.push();
|
||||
|
||||
matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rot, true));
|
||||
// matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), secondaryRot, true));
|
||||
// matrixStack.rotate(new Quaternion(Direction.EAST.toVector3f(), secondaryRot * 0.45812f, true));
|
||||
|
||||
IVertexBuilder twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arrayResource));
|
||||
Model2D arrayModel = new BloodMagicRenderer.Model2D();
|
||||
arrayModel.minX = -0.5;
|
||||
arrayModel.maxX = +0.5;
|
||||
arrayModel.minY = -0.5;
|
||||
arrayModel.maxY = +0.5;
|
||||
arrayModel.resource = arrayResource;
|
||||
|
||||
matrixStack.scale(size, size, size);
|
||||
|
||||
RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, combinedLightIn, combinedOverlayIn);
|
||||
|
||||
matrixStack.pop();
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
matrixStack.push();
|
||||
|
||||
float newSize = 1;
|
||||
float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(i, craftTime);
|
||||
float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(i, craftTime);
|
||||
float rotation = this.getRotation(i, craftTime);
|
||||
|
||||
matrixStack.translate(distance * Math.sin(angle), this.getVerticalOffset(i, craftTime), -distance * Math.cos(angle));
|
||||
matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), i * 360 / 5, true));
|
||||
matrixStack.rotate(new Quaternion(Direction.NORTH.toVector3f(), getInwardRotation(i, craftTime), true));
|
||||
matrixStack.rotate(new Quaternion(Direction.UP.toVector3f(), rotation, true));
|
||||
twoDBuffer = renderer.getBuffer(RenderType.getEntityTranslucent(arraysResources[i]));
|
||||
arrayModel.resource = arraysResources[i];
|
||||
|
||||
matrixStack.scale(newSize, newSize, newSize);
|
||||
|
||||
RenderResizableQuadrilateral.INSTANCE.renderSquare(arrayModel, matrixStack, twoDBuffer, 0xFFFFFFFF, combinedLightIn, combinedOverlayIn);
|
||||
|
||||
matrixStack.pop();
|
||||
}
|
||||
|
||||
matrixStack.pop();
|
||||
matrixStack.pop();
|
||||
}
|
||||
|
||||
public static float getAngleOfCircle(int circle, float craftTime)
|
||||
{
|
||||
if (circle >= 0 && circle <= 4)
|
||||
{
|
||||
float originalAngle = (float) (circle * 2 * Math.PI / 5d);
|
||||
|
||||
double sweep = (craftTime - startTime) / sweepTime;
|
||||
if (sweep >= 0 && sweep < numberOfSweeps)
|
||||
{
|
||||
float offset = ((int) sweep) * sweepTime + startTime;
|
||||
originalAngle += 2 * Math.PI * 2 / 5 * (int) sweep + getAngle(craftTime - offset, (int) sweep);
|
||||
} else if (sweep >= numberOfSweeps)
|
||||
{
|
||||
originalAngle += 2 * Math.PI * 2 / 5 * numberOfSweeps + (craftTime - 5 * sweepTime - startTime) * 2 * Math.PI * 2 / 5 / sweepTime;
|
||||
}
|
||||
|
||||
return originalAngle;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static float getAngle(float craftTime, int sweep)
|
||||
{
|
||||
float rDP = craftTime / sweepTime * arcLength;
|
||||
float rEnd = (float) Math.sqrt(rDP * rDP + 2 * 2 - 2 * rDP * 2 * Math.cos(theta2));
|
||||
return (float) (Math.acos((2 * 2 + rEnd * rEnd - rDP * rDP) / (2 * rEnd * 2)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the center-to-center distance of this circle.
|
||||
*/
|
||||
public static float getDistanceOfCircle(int circle, float craftTime)
|
||||
{ // TODO Change this so it doesn't use angle, since it is a constant speed.
|
||||
double sweep = (craftTime - startTime) / sweepTime;
|
||||
if (sweep >= 0 && sweep < numberOfSweeps)
|
||||
{
|
||||
float offset = ((int) sweep) * sweepTime + startTime;
|
||||
float angle = getAngle(craftTime - offset, (int) sweep);
|
||||
float thetaPrime = (float) (Math.PI - theta2 - angle);
|
||||
// if(thetaPrime > 0 && thetaPrime < Math.PI) {
|
||||
return (float) (2 * Math.sin(theta2) / Math.sin(thetaPrime));
|
||||
// }
|
||||
} else if (sweep >= numberOfSweeps && craftTime < endTime)
|
||||
{
|
||||
return 2 - 2 * (craftTime - startTime - numberOfSweeps * sweepTime) / (endTime - startTime - numberOfSweeps * sweepTime);
|
||||
} else if (craftTime >= endTime)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package wayoftime.bloodmagic.common.alchemyarray;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.effect.LightningBoltEntity;
|
||||
import net.minecraft.entity.item.ItemEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import wayoftime.bloodmagic.client.render.alchemyarray.BindingAlchemyCircleRenderer;
|
||||
import wayoftime.bloodmagic.tile.TileAlchemyArray;
|
||||
|
||||
public class AlchemyArrayEffectBinding extends AlchemyArrayEffectCrafting
|
||||
{
|
||||
public AlchemyArrayEffectBinding(ItemStack outputStack, int tickLimit)
|
||||
{
|
||||
super(outputStack, tickLimit);
|
||||
}
|
||||
|
||||
public AlchemyArrayEffectBinding(ItemStack outputStack)
|
||||
{
|
||||
this(outputStack, 300);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(TileAlchemyArray tile, int ticksActive)
|
||||
{
|
||||
// TODO: Add recipe rechecking to verify nothing screwy is going on.
|
||||
if (tile.getWorld().isRemote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ticksActive >= 50 && ticksActive <= 250)
|
||||
{
|
||||
this.spawnLightningOnCircle(tile.getWorld(), tile.getPos(), ticksActive);
|
||||
}
|
||||
|
||||
if (ticksActive >= tickLimit)
|
||||
{
|
||||
BlockPos pos = tile.getPos();
|
||||
|
||||
ItemStack output = outputStack.copy();
|
||||
|
||||
ItemEntity outputEntity = new ItemEntity(tile.getWorld(), pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, output);
|
||||
|
||||
tile.getWorld().addEntity(outputEntity);
|
||||
// tile.getWorld().spawnEntity(outputEntity);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void spawnLightningOnCircle(World world, BlockPos pos, int ticksActive)
|
||||
{
|
||||
if (ticksActive % 50 == 0)
|
||||
{
|
||||
int circle = ticksActive / 50 - 1;
|
||||
float distance = BindingAlchemyCircleRenderer.getDistanceOfCircle(circle, ticksActive);
|
||||
float angle = BindingAlchemyCircleRenderer.getAngleOfCircle(circle, ticksActive);
|
||||
|
||||
double dispX = distance * Math.sin(angle);
|
||||
double dispZ = -distance * Math.cos(angle);
|
||||
|
||||
LightningBoltEntity lightningboltentity = EntityType.LIGHTNING_BOLT.create(world);
|
||||
// LightningBoltEntity lightning = new LightningBoltEntity(world, pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ);
|
||||
lightningboltentity.setPosition(pos.getX() + dispX, pos.getY(), pos.getZ() + dispZ);
|
||||
lightningboltentity.setEffectOnly(true);
|
||||
world.addEntity(lightningboltentity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlchemyArrayEffect getNewCopy()
|
||||
{
|
||||
return new AlchemyArrayEffectBinding(outputStack, tickLimit);
|
||||
}
|
||||
}
|
|
@ -459,6 +459,7 @@ public class GeneratorLanguage extends LanguageProvider
|
|||
addItem(BloodMagicItems.REAGENT_AIR, "Air Reagent");
|
||||
addItem(BloodMagicItems.REAGENT_BLOOD_LIGHT, "Blood Lamp Reagent");
|
||||
addItem(BloodMagicItems.REAGENT_SIGHT, "Sight Reagent");
|
||||
addItem(BloodMagicItems.REAGENT_BINDING, "Binding Reagent");
|
||||
|
||||
addItem(BloodMagicItems.PETTY_GEM, "Petty Tartaric Gem");
|
||||
addItem(BloodMagicItems.LESSER_GEM, "Lesser Tartaric Gem");
|
||||
|
|
|
@ -163,6 +163,7 @@ public class BloodMagicItems
|
|||
public static final RegistryObject<Item> REAGENT_AIR = BASICITEMS.register("reagentair", () -> new ItemBase());
|
||||
public static final RegistryObject<Item> REAGENT_BLOOD_LIGHT = BASICITEMS.register("reagentbloodlight", () -> new ItemBase());
|
||||
public static final RegistryObject<Item> REAGENT_SIGHT = BASICITEMS.register("reagentsight", () -> new ItemBase());
|
||||
public static final RegistryObject<Item> REAGENT_BINDING = BASICITEMS.register("reagentbinding", () -> new ItemBase());
|
||||
|
||||
// Tartaric Gems
|
||||
public static final RegistryObject<Item> PETTY_GEM = ITEMS.register("soulgempetty", () -> new ItemSoulGem("petty", 64));
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.item.crafting.Ingredient;
|
|||
import wayoftime.bloodmagic.BloodMagic;
|
||||
import wayoftime.bloodmagic.common.data.recipe.builder.AlchemyArrayRecipeBuilder;
|
||||
import wayoftime.bloodmagic.common.item.BloodMagicItems;
|
||||
import wayoftime.bloodmagic.core.registry.AlchemyArrayRegistry;
|
||||
|
||||
public class AlchemyArrayRecipeProvider implements ISubRecipeProvider
|
||||
{
|
||||
|
@ -29,7 +30,16 @@ public class AlchemyArrayRecipeProvider implements ISubRecipeProvider
|
|||
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/lightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_BLOOD_LIGHT.get()), Ingredient.fromItems(BloodMagicItems.IMBUED_SLATE.get()), new ItemStack(BloodMagicItems.BLOOD_LIGHT_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "bloodlightsigil"));
|
||||
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/airsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_AIR.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.AIR_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "airsigil"));
|
||||
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sightsigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_SIGHT.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.SEER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "seersigil"));
|
||||
// AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"), Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()), Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new ItemStack(BloodMagicItems.FAST_MINER_SIGIL.get())).build(consumer, BloodMagic.rl(basePath + "frostsigil"));
|
||||
AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_HELMET), new ItemStack(BloodMagicItems.LIVING_HELMET.get())).build(consumer, BloodMagic.rl(basePath + "living_helmet"));
|
||||
AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_CHESTPLATE), new ItemStack(BloodMagicItems.LIVING_PLATE.get())).build(consumer, BloodMagic.rl(basePath + "living_plate"));
|
||||
AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_LEGGINGS), new ItemStack(BloodMagicItems.LIVING_LEGGINGS.get())).build(consumer, BloodMagic.rl(basePath + "living_leggings"));
|
||||
AlchemyArrayRecipeBuilder.array(AlchemyArrayRegistry.BINDING_ARRAY, Ingredient.fromItems(BloodMagicItems.REAGENT_BINDING.get()), Ingredient.fromItems(Items.IRON_BOOTS), new ItemStack(BloodMagicItems.LIVING_BOOTS.get())).build(consumer, BloodMagic.rl(basePath + "living_boots"));
|
||||
|
||||
// AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"),
|
||||
// Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()),
|
||||
// Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new
|
||||
// ItemStack(BloodMagicItems.FAST_MINER_SIGIL.get())).build(consumer,
|
||||
// BloodMagic.rl(basePath + "frostsigil"));
|
||||
// BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.GEMS_DIAMOND), new ItemStack(BloodMagicItems.WEAK_BLOOD_ORB.get()), AltarTier.ONE.ordinal(), 2000, 2, 1).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath
|
||||
// + "weakbloodorb"));
|
||||
// BloodAltarRecipeBuilder.altar(Ingredient.fromTag(Tags.Items.STONE), new ItemStack(BloodMagicItems.SLATE.get()), AltarTier.ONE.ordinal(), 1000, 5, 5).build(consumer, new ResourceLocation(BloodMagic.MODID, basePath
|
||||
|
|
|
@ -8,14 +8,17 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import wayoftime.bloodmagic.BloodMagic;
|
||||
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffect;
|
||||
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectBinding;
|
||||
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectCrafting;
|
||||
import wayoftime.bloodmagic.impl.BloodMagicAPI;
|
||||
import wayoftime.bloodmagic.recipe.RecipeAlchemyArray;
|
||||
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffect;
|
||||
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectCrafting;
|
||||
|
||||
public class AlchemyArrayRegistry
|
||||
{
|
||||
public static Map<ResourceLocation, AlchemyArrayEffect> effectMap = new HashMap<ResourceLocation, AlchemyArrayEffect>();
|
||||
public static final ResourceLocation BINDING_ARRAY = BloodMagic.rl("textures/models/alchemyarrays/bindingarray.png");
|
||||
|
||||
public static boolean registerEffect(ResourceLocation rl, AlchemyArrayEffect effect)
|
||||
{
|
||||
|
@ -35,6 +38,10 @@ public class AlchemyArrayRegistry
|
|||
|
||||
if (!recipe.getOutput().isEmpty())
|
||||
{
|
||||
if (recipe.getTexture().equals(BINDING_ARRAY))
|
||||
{
|
||||
return new AlchemyArrayEffectBinding(recipe.getOutput());
|
||||
}
|
||||
// Return a new instance of AlchemyEffectCrafting
|
||||
return new AlchemyArrayEffectCrafting(recipe.getOutput());
|
||||
}
|
||||
|
@ -50,4 +57,5 @@ public class AlchemyArrayRegistry
|
|||
|
||||
return getEffect(world, array.getRight().getId(), array.getRight());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,10 @@ import net.minecraft.util.ResourceLocation;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import wayoftime.bloodmagic.client.render.alchemyarray.AlchemyArrayRenderer;
|
||||
import wayoftime.bloodmagic.client.render.alchemyarray.BindingAlchemyCircleRenderer;
|
||||
import wayoftime.bloodmagic.impl.BloodMagicAPI;
|
||||
import wayoftime.bloodmagic.recipe.RecipeAlchemyArray;
|
||||
import wayoftime.bloodmagic.client.render.alchemyarray.AlchemyArrayRenderer;
|
||||
|
||||
public class AlchemyArrayRendererRegistry
|
||||
{
|
||||
|
@ -47,6 +48,9 @@ public class AlchemyArrayRendererRegistry
|
|||
}
|
||||
|
||||
ResourceLocation texture = recipe.getTexture();
|
||||
if (AlchemyArrayRegistry.BINDING_ARRAY.equals(texture))
|
||||
return new BindingAlchemyCircleRenderer();
|
||||
|
||||
if (texture != null)
|
||||
return new AlchemyArrayRenderer(texture);
|
||||
|
||||
|
|
Loading…
Reference in a new issue