mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Option to make drowned break doors
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
--- a/net/minecraft/world/entity/monster/Drowned.java
|
||||
+++ b/net/minecraft/world/entity/monster/Drowned.java
|
||||
@@ -85,7 +_,19 @@
|
||||
@@ -82,10 +_,23 @@
|
||||
this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false));
|
||||
this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0));
|
||||
this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel()));
|
||||
+ if (level().purpurConfig.drownedBreakDoors) this.goalSelector.addGoal(6, new net.minecraft.world.entity.ai.goal.MoveThroughVillageGoal(this, 1.0D, true, 4, this::canBreakDoors)); // Purpur - Option to make drowned break doors
|
||||
this.goalSelector.addGoal(7, new RandomStrollGoal(this, 1.0));
|
||||
this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Drowned.class).setAlertOthers(ZombifiedPiglin.class));
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (entity, level) -> this.okTarget(entity)));
|
||||
|
||||
@@ -1075,6 +1075,7 @@ public class PurpurWorldConfig {
|
||||
public double drownedJockeyChance = 0.05D;
|
||||
public boolean drownedJockeyTryExistingChickens = true;
|
||||
public boolean drownedTakeDamageFromWater = false;
|
||||
public boolean drownedBreakDoors = false;
|
||||
private void drownedSettings() {
|
||||
drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable);
|
||||
drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater);
|
||||
@@ -1091,6 +1092,7 @@ public class PurpurWorldConfig {
|
||||
drownedJockeyChance = getDouble("mobs.drowned.jockey.chance", drownedJockeyChance);
|
||||
drownedJockeyTryExistingChickens = getBoolean("mobs.drowned.jockey.try-existing-chickens", drownedJockeyTryExistingChickens);
|
||||
drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater);
|
||||
drownedBreakDoors = getBoolean("mobs.drowned.can-break-doors", drownedBreakDoors);
|
||||
}
|
||||
|
||||
public boolean elderGuardianRidable = false;
|
||||
|
||||
Reference in New Issue
Block a user