Skip to content

Commit

Permalink
Finished compatibility update
Browse files Browse the repository at this point in the history
Finished the update to fix compatibility with the latest Ars Nouveau version
  • Loading branch information
MintTeaTx committed Jan 20, 2021
1 parent 0a99bfa commit c1638c3
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 115 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: "com.wynprice.cursemaven"
apply plugin: 'org.spongepowered.mixin'
version = '1.16.4-1.0.3'
version = '1.16.4-1.0.4'
group = 'com.minttea.tomeofblood' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'tomeofblood'

Expand Down Expand Up @@ -125,8 +125,8 @@ dependencies {
runtimeOnly fg.deobf("curse.maven:curios:3122651")
compileOnly fg.deobf("curse.maven:patchouli:3126931")
runtimeOnly fg.deobf("curse.maven:patchouli:3126931")
compileOnly fg.deobf("curse.maven:ars-noveau:3173254")
runtimeOnly fg.deobf("curse.maven:ars-noveau:3173254")
compileOnly fg.deobf("curse.maven:ars-noveau:3174543")
runtimeOnly fg.deobf("curse.maven:ars-noveau:3174543")
compileOnly fg.deobf("curse.maven:blood-magic:3149693")
runtimeOnly fg.deobf("curse.maven:blood-magic:3149693")

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,14 @@ public static void awardSpellCastArmourUpgrade(SpellCastEvent event)
stats.addExperience(new ResourceLocation("tomeofblood", "mana_bonus"), xpAward);
LOGGER.debug("Arcane Attunement level ", stats.getLevel(new ResourceLocation("tomeofblood", "mana_bonus")));
LivingStats.toPlayer(player, stats);
if(stats)
if(stats != null)
{
int level = stats.getLevel(new ResourceLocation("tomeofblood", "mana_bonus"));
float discount = 1-(float) level / 10;
spell.setCost((int) discount);
}
}
}

}
@SubscribeEvent
public static void maxManaForArmor(MaxManaCalcEvent event)
{
PlayerEntity player = (PlayerEntity) event.getEntity();
LivingStats stats = LivingStats.fromPlayer(player);
if(stats != null) {
double max = event.getMax();
int level = stats.getLevel(new ResourceLocation("tomeofblood", "mana_bonus"));
float manaBonus = 1 + (float) level / 10;
event.setMax((int) (max * manaBonus));
}

}
}
30 changes: 0 additions & 30 deletions src/main/java/com/minttea/tomeofblood/common/items/BloodTome.java
Original file line number Diff line number Diff line change
@@ -1,61 +1,31 @@
package com.minttea.tomeofblood.common.items;

import com.hollingsworth.arsnouveau.api.client.IDisplayMana;
import com.hollingsworth.arsnouveau.api.item.IScribeable;
import com.hollingsworth.arsnouveau.api.spell.AbstractSpellPart;
import com.hollingsworth.arsnouveau.api.spell.ISpellTier;
import com.hollingsworth.arsnouveau.api.spell.SpellContext;
import com.hollingsworth.arsnouveau.api.spell.SpellResolver;
import com.hollingsworth.arsnouveau.api.util.MathUtil;
import com.hollingsworth.arsnouveau.api.util.SpellRecipeUtil;
import com.hollingsworth.arsnouveau.client.keybindings.ModKeyBindings;
import com.hollingsworth.arsnouveau.client.particle.ParticleColor;
import com.hollingsworth.arsnouveau.common.block.tile.IntangibleAirTile;
import com.hollingsworth.arsnouveau.common.block.tile.PhantomBlockTile;
import com.hollingsworth.arsnouveau.common.block.tile.ScribesTile;
import com.hollingsworth.arsnouveau.common.capability.ManaCapability;
import com.hollingsworth.arsnouveau.common.items.SpellBook;
import com.hollingsworth.arsnouveau.common.network.Networking;
import com.hollingsworth.arsnouveau.common.network.PacketOpenSpellBook;
import com.hollingsworth.arsnouveau.common.util.PortUtil;
import com.minttea.tomeofblood.TomeOfBloodMod;
import com.minttea.tomeofblood.client.renderer.item.TomeRenderer;
import com.minttea.tomeofblood.common.utils.BloodSpellResolver;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.item.UseAction;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.EntityRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.network.PacketDistributor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;

import static com.hollingsworth.arsnouveau.common.items.SpellBook.getMode;
import static com.hollingsworth.arsnouveau.common.items.SpellBook.getUnlockedSpellString;

public class BloodTome extends SpellBook {

private static final Logger LOGGER = LogManager.getLogger();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.minttea.tomeofblood.setup;

import com.hollingsworth.arsnouveau.api.spell.ISpellTier;
import com.minttea.tomeofblood.TomeOfBloodMod;
import com.minttea.tomeofblood.common.items.BloodTome;
import net.minecraft.item.Item;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.minttea.tomeofblood.setup;

import com.minttea.tomeofblood.common.livingarmor.ManaUpgrade;
import net.minecraft.util.ResourceLocation;
import wayoftime.bloodmagic.common.registration.impl.LivingUpgradeDeferredRegister;
import wayoftime.bloodmagic.common.registration.impl.LivingUpgradeRegistryObject;
import wayoftime.bloodmagic.core.LivingArmorRegistrar;
import wayoftime.bloodmagic.core.living.LivingUpgrade;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
[[dependencies.tomeofblood]]
modId="ars_nouveau"
mandatory=true
versionRange="[1.10,)"
versionRange="[1.11,)"
ordering="AFTER"
side="BOTH"
[[dependencies.tomeofblood]]
Expand Down

0 comments on commit c1638c3

Please sign in to comment.