mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
make it compile
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
protected void registerGoals() {
|
||||
super.registerGoals();
|
||||
this.goalSelector.addGoal(0, new FloatGoal(this));
|
||||
+ 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 - option to make ravagers afraid of rabbits
|
||||
+ if (level().purpurConfig.ravagerAvoidRabbits) this.goalSelector.addGoal(3, new net.minecraft.world.entity.ai.goal.AvoidEntityGoal<>(this, net.minecraft.world.entity.animal.rabbit.Rabbit.class, 6.0F, 1.0D, 1.2D)); // Purpur - option to make ravagers afraid of rabbits
|
||||
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0, true));
|
||||
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4));
|
||||
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
+ if (!inactive) {
|
||||
+ this.getBrain().tick(level, this); // Paper - EAR 2
|
||||
+ }
|
||||
+ else if (this.isLobotomized && shouldRestock()) restock();
|
||||
+ else if (this.isLobotomized && shouldRestock(level)) restock();
|
||||
+ // Purpur end - Lobotomize stuck villagers
|
||||
profilerFiller.pop();
|
||||
if (this.assignProfessionWhenSpawned) {
|
||||
@@ -122,7 +122,7 @@
|
||||
}
|
||||
|
||||
public void spawnGolemIfNeeded(ServerLevel level, long gameTime, int minVillagerAmount) {
|
||||
+ if (level.purpurConfig.villagerSpawnIronGolemRadius > 0 && level.getEntitiesOfClass(net.minecraft.world.entity.animal.IronGolem.class, getBoundingBox().inflate(level.purpurConfig.villagerSpawnIronGolemRadius)).size() > level.purpurConfig.villagerSpawnIronGolemLimit) return; // Purpur - Implement configurable search radius for villagers to spawn iron golems
|
||||
+ if (level.purpurConfig.villagerSpawnIronGolemRadius > 0 && level.getEntitiesOfClass(net.minecraft.world.entity.animal.golem.IronGolem.class, getBoundingBox().inflate(level.purpurConfig.villagerSpawnIronGolemRadius)).size() > level.purpurConfig.villagerSpawnIronGolemLimit) return; // Purpur - Implement configurable search radius for villagers to spawn iron golems
|
||||
if (this.wantsToSpawnGolem(gameTime)) {
|
||||
AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0);
|
||||
List<Villager> entitiesOfClass = level.getEntitiesOfClass(Villager.class, aabb);
|
||||
|
||||
Reference in New Issue
Block a user