diff options
author | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-17 20:16:11 +0100 |
---|---|---|
committer | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-17 20:16:11 +0100 |
commit | 531bb27e7eb07e08e1e423d0cf01c297fef890f6 (patch) | |
tree | 15368a17e2cd41ba4c17d7f9c6fa719d7befabfa /src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java | |
parent | c940f1261b74e83c135703fa0c35d3f8e5605761 (diff) | |
download | ygasi-531bb27e7eb07e08e1e423d0cf01c297fef890f6.tar.gz ygasi-531bb27e7eb07e08e1e423d0cf01c297fef890f6.tar.bz2 ygasi-531bb27e7eb07e08e1e423d0cf01c297fef890f6.zip |
Made the first offence1 ability work, the next is offence2! (Wish me luck)
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java')
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java index 73b99e0..506fa18 100644 --- a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java +++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java @@ -1,21 +1,23 @@ package dev.mayaqq.ygasi.abilities.mercenary; -import dev.mayaqq.ygasi.registry.ConfigRegistry; import dev.mayaqq.ygasi.util.AdvUtils; -import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; +import java.util.HashMap; +import java.util.Map; + public class Offence1 { + + public static Map<String, Boolean> attackList = new HashMap<>(); + public static void give(ServerPlayerEntity player) { if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence1")) { - player.getAttributeInstance(EntityAttributes.GENERIC_ATTACK_DAMAGE).setBaseValue(player.getAttributeInstance(EntityAttributes.GENERIC_ATTACK_DAMAGE).getBaseValue() + ConfigRegistry.CONFIG.offence1DefIncrease); AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/offence1"), "unlocked_offence1"); } } public static void revoke(ServerPlayerEntity player) { if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence1")) { - player.getAttributeInstance(EntityAttributes.GENERIC_ATTACK_DAMAGE).setBaseValue(player.getAttributeInstance(EntityAttributes.GENERIC_ATTACK_DAMAGE).getBaseValue() - ConfigRegistry.CONFIG.offence1DefIncrease); AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/offence1"); } } |