Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusted Two-Headed Yufeng spawn rates and health #1170

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
}