Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Fix PathfinderMoveThroughVillage Creature being Casted to Villager
Browse files Browse the repository at this point in the history
  • Loading branch information
gmitch215 committed Sep 25, 2023
1 parent e9080d1 commit 05e937b
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage": {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
return new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
return new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction": {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public static PathfinderGoal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new PathfinderGoalMoveThroughVillage((EntityVillager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new PathfinderGoalMoveThroughVillage((EntityCreature) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public static Goal toNMS(Pathfinder b) {
}
case "MoveThroughVillage" -> {
PathfinderMoveThroughVillage p = (PathfinderMoveThroughVillage) b;
yield new MoveThroughVillageGoal((net.minecraft.world.entity.npc.Villager) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
yield new MoveThroughVillageGoal((PathfinderMob) m, p.getSpeedModifier(), p.mustBeNight(), p.getMinDistance(), p.canUseDoors());
}
case "MoveTowardsRestriction" -> {
PathfinderMoveTowardsRestriction p = (PathfinderMoveTowardsRestriction) b;
Expand Down

0 comments on commit 05e937b

Please sign in to comment.