From 604ec0667107637d718cdb092f6cdd98e3bfd780 Mon Sep 17 00:00:00 2001 From: bijimio Date: Mon, 11 Nov 2024 16:49:40 -0800 Subject: [PATCH] Bijimio Experimental Fork V7.1.9 | Adjusted Two-Headed Yufeng spawn rates and health --- .../entity/beast/DarkLatexDoubleYufeng.java | 11 ++ .../changed/init/ChangedEntities.java | 1 + .../changed/world/biome/DarkLatexPlains.java | 2 +- .../entities/dark_latex_double_yufeng.json | 109 ++++++++++++++++++ 4 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/data/changed/loot_tables/entities/dark_latex_double_yufeng.json diff --git a/src/main/java/net/ltxprogrammer/changed/entity/beast/DarkLatexDoubleYufeng.java b/src/main/java/net/ltxprogrammer/changed/entity/beast/DarkLatexDoubleYufeng.java index 3922aceba..3b548be6e 100644 --- a/src/main/java/net/ltxprogrammer/changed/entity/beast/DarkLatexDoubleYufeng.java +++ b/src/main/java/net/ltxprogrammer/changed/entity/beast/DarkLatexDoubleYufeng.java @@ -9,6 +9,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.Mth; import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.AttributeMap; +import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.control.LookControl; import net.minecraft.world.entity.ai.goal.GoalSelector; import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; @@ -17,6 +19,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.ForgeMod; public class DarkLatexDoubleYufeng extends DarkLatexYufeng implements DoubleHeadedEntity { protected float yHead2Rot = 0.0f; @@ -147,6 +150,14 @@ public void lerpHead2To(float yRot, float xRot, int steps) { this.lerpHead2Steps = steps; } + @Override + protected void setAttributes(AttributeMap attributes) { + super.setAttributes(attributes); + attributes.getInstance(Attributes.MOVEMENT_SPEED).setBaseValue(1.0); + attributes.getInstance(ForgeMod.SWIM_SPEED.get()).setBaseValue(0.85); + attributes.getInstance(Attributes.MAX_HEALTH).setBaseValue(28.0); + } + @Override public TransfurVariant getTransfurVariant() { return ChangedTransfurVariants.DARK_LATEX_YUFENG.get(); diff --git a/src/main/java/net/ltxprogrammer/changed/init/ChangedEntities.java b/src/main/java/net/ltxprogrammer/changed/init/ChangedEntities.java index e2e62d0f4..37ec000d2 100644 --- a/src/main/java/net/ltxprogrammer/changed/init/ChangedEntities.java +++ b/src/main/java/net/ltxprogrammer/changed/init/ChangedEntities.java @@ -458,6 +458,7 @@ public static void addSpawners(BiomeLoadingEvent event) { // Inject spawns into ChangedBiomeInterface.addSpawn(spawns, ChangedMobCategories.CHANGED, LATEX_PINK_YUIN_DRAGON, 50, 1, 3, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawns, ChangedMobCategories.CHANGED, LATEX_YUIN, 100, 1, 3, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawns, ChangedMobCategories.CHANGED, DARK_LATEX_YUFENG, 20, 1, 1, 0.7, 0.15); + ChangedBiomeInterface.addSpawn(spawns, ChangedMobCategories.CHANGED, DARK_LATEX_DOUBLE_YUFENG, 5, 1, 1, 0.7, 0.15); // Passive ChangedBiomeInterface.addSpawn(spawns, ChangedMobCategories.CHANGED, DARK_DRAGON, 5, 1, 1, 0.7, 0.15); diff --git a/src/main/java/net/ltxprogrammer/changed/world/biome/DarkLatexPlains.java b/src/main/java/net/ltxprogrammer/changed/world/biome/DarkLatexPlains.java index 6cc91d443..176b93b9d 100644 --- a/src/main/java/net/ltxprogrammer/changed/world/biome/DarkLatexPlains.java +++ b/src/main/java/net/ltxprogrammer/changed/world/biome/DarkLatexPlains.java @@ -66,7 +66,7 @@ public Biome build() { ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.DARK_LATEX_WOLF_PARTIAL, 1, 1, 1, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.DARK_LATEX_WOLF_PUP, 30, 1, 4, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.DARK_LATEX_YUFENG, 40, 1, 3, 0.7, 0.15); - ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.DARK_LATEX_DOUBLE_YUFENG, 5, 1, 1, 0.7, 0.15); + ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.DARK_LATEX_DOUBLE_YUFENG, 6, 1, 1, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.PHAGE_LATEX_WOLF_MALE, 20, 1, 2, 0.7, 0.15); ChangedBiomeInterface.addSpawn(spawnBuilder, ChangedMobCategories.CHANGED, ChangedEntities.PHAGE_LATEX_WOLF_FEMALE, 20, 1, 2, 0.7, 0.15); diff --git a/src/main/resources/data/changed/loot_tables/entities/dark_latex_double_yufeng.json b/src/main/resources/data/changed/loot_tables/entities/dark_latex_double_yufeng.json new file mode 100644 index 000000000..ec76d29c8 --- /dev/null +++ b/src/main/resources/data/changed/loot_tables/entities/dark_latex_double_yufeng.json @@ -0,0 +1,109 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 1.0, + "max": 4.0 + }, + "add": false + }, + { + "function": "minecraft:looting_enchant", + "count": { + "type": "minecraft:uniform", + "min": 0.0, + "max": 1.0 + } + } + ], + "name": "changed:dark_latex_goo" + } + ] + }, + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "type": "minecraft:uniform", + "min": 0.0, + "max": 3.0 + }, + "add": false + }, + { + "function": "minecraft:looting_enchant", + "count": { + "type": "minecraft:uniform", + "min": 0.0, + "max": 1.0 + } + } + ], + "name": "changed:dark_latex_crystal_fragment" + } + ] + }, + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:phantom_membrane" + } + ], + "conditions": [ + { + "condition": "minecraft:killed_by_player" + }, + { + "condition": "minecraft:random_chance_with_looting", + "chance": 0.15, + "looting_multiplier": 0.02 + } + ] + }, + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "changed:dark_latex_mask", + "functions": [ + { + "function": "changed:set_variant", + "variant": "changed:form_dark_latex_yufeng" + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:killed_by_player" + }, + { + "condition": "minecraft:random_chance_with_looting", + "chance": 0.150, + "looting_multiplier": 0.03 + } + ] + } + ] +} \ No newline at end of file