aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/abilities
diff options
context:
space:
mode:
authorMaximusbarcz <maxim.baranek@gmail.com>2023-01-15 18:40:24 +0100
committerMaximusbarcz <maxim.baranek@gmail.com>2023-01-15 18:40:24 +0100
commitd115e4365d0a5a492a55e56a7a4dcf034419e1b4 (patch)
treee9aec4f8b180c4a6b90d194f31e95a8df8863bb4 /src/main/java/dev/mayaqq/ygasi/abilities
parent5bcb1830298caad87a63f44c4e7f1553074cf4c8 (diff)
downloadygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.tar.gz
ygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.tar.bz2
ygasi-d115e4365d0a5a492a55e56a7a4dcf034419e1b4.zip
More stuff! The Mercenary gui is basically done other than the translations, I tried and failed to add modrinth publishing thing to gradle, I redid some stuff, I added stuff, I removed stuff and mainly... I broke the reset command (it works but says it broke) and I have no idea how to fix it!
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/abilities')
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence1.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence2.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja1.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja2.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja3.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java22
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence2.java18
-rw-r--r--src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence3.java18
9 files changed, 166 insertions, 0 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence1.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence1.java
new file mode 100644
index 0000000..22ec265
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence1.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Defence1 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence1")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/defence1"), "unlocked_defence1");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence1")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/defence1");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence2.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence2.java
new file mode 100644
index 0000000..3a47e89
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence2.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Defence2 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence2")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/defence2"), "unlocked_defence2");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence2")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/defence2");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
new file mode 100644
index 0000000..39241aa
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Defence3.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Defence3 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence3")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/defence3"), "unlocked_defence3");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/defence3")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/defence3");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja1.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja1.java
new file mode 100644
index 0000000..09ac5b2
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja1.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Ninja1 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja1")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/ninja1"), "unlocked_ninja1");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja1")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/ninja1");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja2.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja2.java
new file mode 100644
index 0000000..e673d83
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja2.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Ninja2 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja2")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/ninja2"), "unlocked_ninja2");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja2")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/ninja2");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja3.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja3.java
new file mode 100644
index 0000000..818da0f
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Ninja3.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Ninja3 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja3")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/ninja3"), "unlocked_ninja3");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/ninja3")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/ninja3");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java
new file mode 100644
index 0000000..73b99e0
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence1.java
@@ -0,0 +1,22 @@
+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;
+
+public class Offence1 {
+ 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");
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence2.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence2.java
new file mode 100644
index 0000000..9b99592
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence2.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Offence2 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence2")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/offence2"), "unlocked_offence2");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence2")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/offence2");
+ }
+ }
+}
diff --git a/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence3.java b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence3.java
new file mode 100644
index 0000000..86efbc6
--- /dev/null
+++ b/src/main/java/dev/mayaqq/ygasi/abilities/mercenary/Offence3.java
@@ -0,0 +1,18 @@
+package dev.mayaqq.ygasi.abilities.mercenary;
+
+import dev.mayaqq.ygasi.util.AdvUtils;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+public class Offence3 {
+ public static void give(ServerPlayerEntity player) {
+ if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence3")) {
+ AdvUtils.grantAdvancementCriterion(player, new Identifier("minecraft", "ygasi/offence3"), "unlocked_offence3");
+ }
+ }
+ public static void revoke(ServerPlayerEntity player) {
+ if (AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/offence3")) {
+ AdvUtils.revokeAllAdvancements(player, "minecraft", "ygasi/offence3");
+ }
+ }
+}