Skip to content

Commit

Permalink
Fix portal teleport on NeoForge (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Mar 31, 2024
1 parent 75700e2 commit 870df7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public Entity changeDimension(ServerLevel arg) {
@Overwrite(remap = false)
@Nullable
public Entity changeDimension(ServerLevel server, ITeleporter teleporter) {
if (CommonHooks.onTravelToDimension((Entity) (Object) this, server.dimension()))
if (!CommonHooks.onTravelToDimension((Entity) (Object) this, server.dimension()))
return null;
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Entity changeDimension(ServerLevel server, ITeleporter teleporter) {
if (this.isSleeping()) {
return (ServerPlayer) (Object) this;
}
if (CommonHooks.onTravelToDimension((ServerPlayer) (Object) this, server.dimension())) return null;
if (!CommonHooks.onTravelToDimension((ServerPlayer) (Object) this, server.dimension())) return null;

// this.invulnerableDimensionChange = true;
ServerLevel serverworld = this.serverLevel();
Expand Down

0 comments on commit 870df7d

Please sign in to comment.