From 5a0861533e54b886c69111f572dea1790882ed92 Mon Sep 17 00:00:00 2001 From: Me <135455255+IcarussOne@users.noreply.github.com> Date: Thu, 26 Sep 2024 06:49:18 -0500 Subject: [PATCH] Meteor boots tweak --- .../crimsonrevelations/init/CRRecipes.java | 27 +++++++++++-------- .../item/armor/ItemMeteorBoots.java | 5 ++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/java/mod/icarus/crimsonrevelations/init/CRRecipes.java b/src/main/java/mod/icarus/crimsonrevelations/init/CRRecipes.java index 5b1f990..bf994d6 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/init/CRRecipes.java +++ b/src/main/java/mod/icarus/crimsonrevelations/init/CRRecipes.java @@ -6,6 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagByte; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fml.common.Loader; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApiHelper; @@ -252,17 +253,6 @@ public static void initInfusion() { "plateVoid", CRItems.crimsonFabric, CRItems.crimsonFabric)); - ThaumcraftApi.addInfusionCraftingRecipe(new ResourceLocation(NewCrimsonRevelations.MODID, "meteor_boots"), - new InfusionRecipe("CR_METEOR_BOOTS", new ItemStack(CRItems.meteorBoots), 4, - new AspectList().add(Aspect.MOTION, 100).add(Aspect.FIRE, 50).add(Aspect.FLIGHT, 100).add(Aspect.ENTROPY, 50), - new ItemStack(ItemsTC.travellerBoots), - BlocksTC.crystalFire, - Blocks.OBSIDIAN, - Blocks.OBSIDIAN, - Blocks.OBSIDIAN, - Items.MAGMA_CREAM, - Items.FIRE_CHARGE, - BlocksTC.crystalEntropy)); ThaumcraftApi.addInfusionCraftingRecipe(new ResourceLocation(NewCrimsonRevelations.MODID, "praetor_helm"), new InfusionRecipe("CR_PRAETOR_ARMOR", new ItemStack(ItemsTC.crimsonPraetorHelm), 2, new AspectList().add(Aspect.METAL, 40).add(Aspect.ELDRITCH, 25).add(Aspect.PROTECT, 20), @@ -385,5 +375,20 @@ public static void initInfusion() { Items.GHAST_TEAR, ThaumcraftApiHelper.makeCrystal(Aspect.WATER, 1), ThaumcraftApiHelper.makeCrystal(Aspect.WATER, 1))); + + // Thaumic Augmentation Integration + if (Loader.isModLoaded("thaumicaugmentation")) { + ThaumcraftApi.addInfusionCraftingRecipe(new ResourceLocation(NewCrimsonRevelations.MODID, "meteor_boots"), + new InfusionRecipe("CR_METEOR_BOOTS", new ItemStack(CRItems.meteorBoots), 4, + new AspectList().add(Aspect.MOTION, 100).add(Aspect.FIRE, 50).add(Aspect.FLIGHT, 100).add(Aspect.ENTROPY, 50), + new ItemStack(ItemsTC.travellerBoots), + BlocksTC.crystalFire, + Blocks.OBSIDIAN, + Blocks.OBSIDIAN, + Blocks.OBSIDIAN, + Items.MAGMA_CREAM, + Items.FIRE_CHARGE, + BlocksTC.crystalEntropy)); + } } } diff --git a/src/main/java/mod/icarus/crimsonrevelations/item/armor/ItemMeteorBoots.java b/src/main/java/mod/icarus/crimsonrevelations/item/armor/ItemMeteorBoots.java index 7e0f2f6..58f6a6f 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/item/armor/ItemMeteorBoots.java +++ b/src/main/java/mod/icarus/crimsonrevelations/item/armor/ItemMeteorBoots.java @@ -20,6 +20,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; +import net.minecraft.util.EntitySelectors; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; @@ -185,10 +186,10 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { // Explode on ground impact and reset smash state. if (player.fallDistance <= 0.0F && player.onGround) { int radius = 4; + AxisAlignedBB area = new AxisAlignedBB(player.posX - radius, player.posY - radius, player.posZ - radius, player.posX + radius, player.posY + radius, player.posZ + radius); setSmashingState(stack, false); - for (EntityLivingBase nearbyLivingEntity : world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(player.posX - radius, player.posY - radius, player.posZ - radius, - player.posX + radius, player.posY + radius, player.posZ + radius))) { + for (EntityLivingBase nearbyLivingEntity : world.getEntitiesWithinAABB(EntityLivingBase.class, area, EntitySelectors.IS_ALIVE)) { if (nearbyLivingEntity != player && !nearbyLivingEntity.isOnSameTeam(player)) { nearbyLivingEntity.setFire(5 + (world.rand.nextInt(5))); nearbyLivingEntity.knockBack(player, 1.0F, player.posX - nearbyLivingEntity.posX, player.posZ - nearbyLivingEntity.posZ);