diff --git a/changelog.txt b/changelog.txt index c7161c82..f385a646 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,8 +5,11 @@ Version 2.2.8 - It's a bright idea to fix this as soon as I can. - Changed the recipe of the Teleport Array: - Note from Scotty: Captain, I'll remind ya what happened last time you put an apple in her array! Use an Enderpearl and redstone dust next time! -- Added a new array, the Turret Array: - - Place an array on top of an inventory with arrows and then place a bow and an arrow in the array. The array will target enemies greater than 3 blocks away and less than 32, using any arrows in the inventory. +- Added new arrays + - The Turret Array: + > Place an array on top of an inventory with arrows and then place a bow and an arrow in the array. The array will target enemies greater than 3 blocks away and less than 32, using any arrows in the inventory. + - Spike Array: + > Place a piece of cobblestone and iron ingot in the array. The array deals damage to any living entity that enters - Increased the max number of items transferable by the Master Routing Node in its system to 64 per second. Will revisit this limit if I figure out a less silly upgrade system. - Added additional effects to the Sentient Bow when aspected to different Will types. - Added in book entries for the Teleport Array and the Turret Array. diff --git a/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSpike.java b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSpike.java new file mode 100644 index 00000000..a0bbf514 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/alchemyArray/AlchemyArrayEffectSpike.java @@ -0,0 +1,52 @@ +package WayofTime.bloodmagic.alchemyArray; + +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.DamageSource; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import WayofTime.bloodmagic.iface.IAlchemyArray; + +public class AlchemyArrayEffectSpike extends AlchemyArrayEffect +{ + public AlchemyArrayEffectSpike(String key) + { + super(key); + } + + @Override + public boolean update(TileEntity tile, int ticksActive) + { + return false; + } + + @Override + public void onEntityCollidedWithBlock(IAlchemyArray array, World world, BlockPos pos, IBlockState state, Entity entity) + { + if (entity instanceof EntityLivingBase) + { + entity.attackEntityFrom(DamageSource.CACTUS, 2); + } + } + + @Override + public void writeToNBT(NBTTagCompound tag) + { + + } + + @Override + public void readFromNBT(NBTTagCompound tag) + { + + } + + @Override + public AlchemyArrayEffect getNewCopy() + { + return new AlchemyArrayEffectSpike(key); + } +} \ No newline at end of file diff --git a/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/LowStaticAlchemyCircleRenderer.java b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/LowStaticAlchemyCircleRenderer.java new file mode 100644 index 00000000..0256ec93 --- /dev/null +++ b/src/main/java/WayofTime/bloodmagic/client/render/alchemyArray/LowStaticAlchemyCircleRenderer.java @@ -0,0 +1,29 @@ +package WayofTime.bloodmagic.client.render.alchemyArray; + +import net.minecraft.util.ResourceLocation; + +public class LowStaticAlchemyCircleRenderer extends LowAlchemyCircleRenderer +{ + public LowStaticAlchemyCircleRenderer() + { + this(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png")); + } + + public LowStaticAlchemyCircleRenderer(ResourceLocation arrayResource) + { + super(arrayResource); + } + + @Override + public float getRotation(float craftTime) + { + float offset = 2; + float duration = 180; + if (craftTime >= offset && craftTime < offset + duration) + { + float modifier = (craftTime - offset) * 2f; + return modifier * 1f; + } + return 0; + } +} diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java index fdebf48d..2e2930e8 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java @@ -6,7 +6,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import WayofTime.bloodmagic.util.BMLog; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.init.MobEffects; @@ -28,12 +27,14 @@ import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectFurnaceFuel; import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectMovement; import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectSigil; import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectSkeletonTurret; +import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectSpike; import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectTeleport; import WayofTime.bloodmagic.alchemyArray.AlchemyArrayEffectUpdraft; import WayofTime.bloodmagic.client.render.alchemyArray.AttractorAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.BindingAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.LowAlchemyCircleRenderer; +import WayofTime.bloodmagic.client.render.alchemyArray.LowStaticAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.SingleAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.StaticAlchemyCircleRenderer; import WayofTime.bloodmagic.client.render.alchemyArray.TurretAlchemyCircleRenderer; @@ -61,6 +62,7 @@ import WayofTime.bloodmagic.livingArmour.downgrade.LivingArmourUpgradeStormTroop import WayofTime.bloodmagic.potion.BMPotionUtils; import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTableDyeableRecipe; import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTablePotionRecipe; +import WayofTime.bloodmagic.util.BMLog; import WayofTime.bloodmagic.util.Utils; import com.google.common.base.Stopwatch; @@ -124,6 +126,7 @@ public class ModRecipes AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.ENDER_PEARL), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectTeleport("teleport"), new StaticAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/teleportation.png"))); AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.BOW), new ItemStack(Items.ARROW), new AlchemyArrayEffectArrowTurret("turret"), new TurretAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png"))); // AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.APPLE), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectLaputa("laputa"), new AttractorAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/shardoflaputa.png"))); + AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Blocks.COBBLESTONE), new ItemStack(Items.IRON_INGOT), new AlchemyArrayEffectSpike("spike"), new LowStaticAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/spikearray.png"))); AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_FAST_MINER.getStack(), new ItemStack(Items.IRON_PICKAXE), new AlchemyArrayEffectSigil("fastMiner", (ISigil) RegistrarBloodMagicItems.SIGIL_FAST_MINER), new SingleAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/FastMinerSigil.png"))); diff --git a/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png new file mode 100644 index 00000000..7e312f51 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/models/alchemyarrays/spikearray.png differ