Added the Bounce Array and the temp recipe for the "Grove Array" (name pending, and NYI)

This commit is contained in:
WayofTime 2020-12-31 15:50:14 -05:00
parent 510ec5cce5
commit c85a605b5a
9 changed files with 103 additions and 1 deletions

View file

@ -110,6 +110,9 @@ public class ClientEvents
AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/spike"), new LowStaticAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/spikearray.png")));
AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/day"), new DayAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/sunarray.png"), BloodMagic.rl("textures/models/alchemyarrays/sunarrayspikes.png"), BloodMagic.rl("textures/models/alchemyarrays/sunarraycircle.png")));
AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/night"), new NightAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/moonarrayoutside.png"), BloodMagic.rl("textures/models/alchemyarrays/moonarraysymbols.png"), BloodMagic.rl("textures/models/alchemyarrays/moonarrayinside.png")));
AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/grove"), new BeaconAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/growthsigil.png")));
AlchemyArrayRendererRegistry.registerRenderer(BloodMagic.rl("array/bounce"), new LowStaticAlchemyCircleRenderer(BloodMagic.rl("textures/models/alchemyarrays/bouncearray.png")));
}
public static void registerItemModelProperties(FMLClientSetupEvent event)

View file

@ -0,0 +1,66 @@
package wayoftime.bloodmagic.common.alchemyarray;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
import wayoftime.bloodmagic.tile.TileAlchemyArray;
public class AlchemyArrayEffectBounce extends AlchemyArrayEffect
{
public AlchemyArrayEffectBounce()
{
super();
}
@Override
public boolean update(TileAlchemyArray tile, int ticksActive)
{
return false;
}
@Override
public void onEntityCollidedWithBlock(TileAlchemyArray array, World world, BlockPos pos, BlockState state, Entity entity)
{
if (entity.isSneaking())
{
entity.fallDistance = 0;
} else if (entity.getMotion().y < 0.0D)
{
Vector3d motion = entity.getMotion();
motion = motion.mul(1, -1, 1);
if (!(entity instanceof LivingEntity))
{
motion = motion.mul(1, 0.8, 1);
}
entity.setMotion(motion);
entity.fallDistance = 0;
}
}
@Override
public AlchemyArrayEffect getNewCopy()
{
return new AlchemyArrayEffectBounce();
}
@Override
public void readFromNBT(CompoundNBT compound)
{
// TODO Auto-generated method stub
}
@Override
public void writeToNBT(CompoundNBT compound)
{
// TODO Auto-generated method stub
}
}

View file

@ -41,6 +41,8 @@ public class AlchemyArrayRecipeProvider implements ISubRecipeProvider
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/spikearray.png"), Ingredient.fromItems(Items.COBBLESTONE), Ingredient.fromTag(Tags.Items.INGOTS_IRON), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "spike"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/sunarray.png"), Ingredient.fromItems(Items.COAL), Ingredient.fromItems(Items.COAL), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "day"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/moonarray.png"), Ingredient.fromItems(Items.LAPIS_LAZULI), Ingredient.fromItems(Items.LAPIS_LAZULI), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "night"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/growthsigil.png"), Ingredient.fromTag(Tags.Items.BONES), Ingredient.fromTag(Tags.Items.BONES), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "grove"));
AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/bouncearray.png"), Ingredient.fromTag(Tags.Items.SLIMEBALLS), Ingredient.fromTag(Tags.Items.DUSTS_REDSTONE), ItemStack.EMPTY).build(consumer, BloodMagic.rl(basePath + "bounce"));
// AlchemyArrayRecipeBuilder.array(BloodMagic.rl("textures/models/alchemyarrays/fastminersigil.png"),
// Ingredient.fromItems(BloodMagicItems.REAGENT_FAST_MINER.get()),
// Ingredient.fromItems(BloodMagicItems.REINFORCED_SLATE.get()), new

View file

@ -11,6 +11,7 @@ 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.AlchemyArrayEffectBounce;
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectCrafting;
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectDay;
import wayoftime.bloodmagic.common.alchemyarray.AlchemyArrayEffectMovement;
@ -41,6 +42,7 @@ public class AlchemyArrayRegistry
registerEffect(BloodMagic.rl("array/spike"), new AlchemyArrayEffectSpike());
registerEffect(BloodMagic.rl("array/day"), new AlchemyArrayEffectDay());
registerEffect(BloodMagic.rl("array/night"), new AlchemyArrayEffectNight());
registerEffect(BloodMagic.rl("array/bounce"), new AlchemyArrayEffectBounce());
}
public static AlchemyArrayEffect getEffect(World world, ResourceLocation rl, RecipeAlchemyArray recipe)