Skip to content

Commit

Permalink
WER
Browse files Browse the repository at this point in the history
  • Loading branch information
seymourimadeit committed Jun 12, 2024
1 parent 28c0ca5 commit 6878169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public static class CommonConfig {
public final ForgeConfigSpec.IntValue reputationRequirementToBeAttacked;
public final ForgeConfigSpec.DoubleValue chanceToDropEquipment;
public final ForgeConfigSpec.BooleanValue MobsAttackGuards;
public final ForgeConfigSpec.BooleanValue guardPatrol;

public CommonConfig(ForgeConfigSpec.Builder builder) {
builder.push("raids and illagers");
Expand All @@ -162,6 +163,7 @@ public CommonConfig(ForgeConfigSpec.Builder builder) {
ironGolemFloat = builder.define("Allow Iron Golems to float on water?", true);
builder.pop();
builder.push("guard stuff");
guardPatrol = builder.define("Have guards patrol the village regularly?", true);
chanceToDropEquipment = builder.defineInRange("Chance to drop equipment", 100.0F, -999.9F, 999.0F);
GuardsRunFromPolarBears = builder.comment("This makes Guards run from polar bears, as anyone with common sense would.").translation(GuardVillagers.MODID + ".config.IllagersRunFromPolarBears").define("Have Guards have some common sense?", false);
GuardsOpenDoors = builder.comment("This lets Guards open doors.").translation(GuardVillagers.MODID + ".config.GuardsOpenDoors").define("Have Guards open doors?", true);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tallestegg/guardvillagers/entities/Guard.java
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ public boolean canContinueToUse() {
if (GuardConfig.armorerRepairGuardArmor) this.goalSelector.addGoal(6, new ArmorerRepairGuardArmorGoal(this));
this.goalSelector.addGoal(4, new WalkBackToCheckPointGoal(this, 0.5D));
this.goalSelector.addGoal(5, new GolemRandomStrollInVillageGoal(this, 0.5D));
this.goalSelector.addGoal(5, new MoveThroughVillageGoal(this, 0.5D, false, 4, () -> false));
if (GuardConfig.COMMON.guardPatrol.get())
this.goalSelector.addGoal(5, new MoveThroughVillageGoal(this, 0.5D, false, 4, () -> false));
this.goalSelector.addGoal(8, new WaterAvoidingRandomStrollGoal(this, 0.5D));
this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, AbstractVillager.class, 8.0F));
this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
Expand Down

0 comments on commit 6878169

Please sign in to comment.