mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 19:07:44 +01:00
Fix compilation issues (#1530)
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <granny@purpurmc.org>
|
||||
Date: Tue, 7 May 2024 04:59:57 -0700
|
||||
Subject: [PATCH] option to make ravagers afraid of rabbits
|
||||
|
||||
https://github.com/PurpurMC/Purpur/discussions/713
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
index 714a37974e3256913c15193f2bd292fe45072c7f..0c494a8c71e316307af2c0e256ccfd23685f8219 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
@@ -112,6 +112,7 @@ public class Ravager extends Raider {
|
||||
super.registerGoals();
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
+ if (level().purpurConfig.ravagerAvoidRabbits) this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.AvoidEntityGoal<>(this, net.minecraft.world.entity.animal.Rabbit.class, 6.0F, 1.0D, 1.2D)); // Purpur
|
||||
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0D, true));
|
||||
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4D));
|
||||
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index d6ccc6cb1d89279c1786403f4288d33bf89b5546..574a690070fe19d77d2f6b5f711bbf65b6357278 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -2417,6 +2417,7 @@ public class PurpurWorldConfig {
|
||||
public boolean ravagerTakeDamageFromWater = false;
|
||||
public List<Block> ravagerGriefableBlocks = new ArrayList<>();
|
||||
public boolean ravagerAlwaysDropExp = false;
|
||||
+ public boolean ravagerAvoidRabbits = false;
|
||||
private void ravagerSettings() {
|
||||
ravagerRidable = getBoolean("mobs.ravager.ridable", ravagerRidable);
|
||||
ravagerRidableInWater = getBoolean("mobs.ravager.ridable-in-water", ravagerRidableInWater);
|
||||
@@ -2447,6 +2448,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
});
|
||||
ravagerAlwaysDropExp = getBoolean("mobs.ravager.always-drop-exp", ravagerAlwaysDropExp);
|
||||
+ ravagerAvoidRabbits = getBoolean("mobs.ravager.avoid-rabbits", ravagerAvoidRabbits);
|
||||
}
|
||||
|
||||
public boolean salmonRidable = false;
|
||||
Reference in New Issue
Block a user