Modify entity origin API to store world/pos seperatly

This commit is contained in:
Shane Freeder
2021-06-16 06:36:02 +01:00
parent f0a6f4878d
commit e1116fe452
5 changed files with 49 additions and 19 deletions

View File

@@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - Fix invulnerable end crystals
+ if (this.level.paperConfig.fixInvulnerableEndCrystalExploit && this.generatedByDragonFight && this.isInvulnerable()) {
+ if ((this.origin.getWorld() != null && !((ServerLevel) this.level).uuid.equals(this.origin.getWorld().getUID()))
+ if (!java.util.Objects.equals(((ServerLevel) this.level).uuid, this.getOriginWorld())
+ || ((ServerLevel) this.level).dragonFight() == null
+ || ((ServerLevel) this.level).dragonFight().respawnStage == null
+ || ((ServerLevel) this.level).dragonFight().respawnStage.ordinal() > net.minecraft.world.level.dimension.end.DragonRespawnAnimation.SUMMONING_DRAGON.ordinal()) {