Skip to content

Commit

Permalink
🐛 Solve breaking changes in NeoForge 21.0.74
Browse files Browse the repository at this point in the history
  • Loading branch information
Autovw committed Jul 8, 2024
1 parent 7c248d0 commit a514fc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void onEnderManAngerEvent(final EnderManAngerEvent event)
@SubscribeEvent
public static void onLivingChangeTargetEvent(final LivingChangeTargetEvent event)
{
LivingEntity target = event.getOriginalTarget(); // Gets the target (player)
LivingEntity target = event.getOriginalAboutToBeSetTarget(); // Gets the target (player)
LivingEntity attacker = event.getEntity(); // Gets the attacker

if (target == null)
Expand All @@ -65,7 +65,7 @@ public static void onLivingChangeTargetEvent(final LivingChangeTargetEvent event
Item item = stack.getItem();
if ((item instanceof AdvancedArmorItem && ((AdvancedArmorItem) item).pacifiesPhantoms()) || (item instanceof IAdvancedHooks && ((IAdvancedHooks) item).pacifyPhantoms(stack)))
{
event.setNewTarget(null); // Set target to null to allow the attacker to pick a new target
event.setNewAboutToBeSetTarget(null); // Set target to null to allow the attacker to pick a new target
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion NeoForge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Visit the GitHub Wiki for more information on everything this mod adds.
# 'required' requires the mod to exist, 'optional' does not
# 'incompatible' will prevent the game from loading when the mod exists, and 'discouraged' will show a warning
type="required"
versionRange="[21.0,)"
versionRange="[21.0.74,)"
ordering="NONE"
side="BOTH"
[[dependencies.advancednetherite]]
Expand Down

0 comments on commit a514fc0

Please sign in to comment.