mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/WorldProviderEnd.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/WorldProviderEnd.java
|
|
@@ -20,7 +20,7 @@
|
|
public void init()
|
|
{
|
|
this.biomeProvider = new BiomeProviderSingle(Biomes.SKY);
|
|
- NBTTagCompound nbttagcompound = this.world.getWorldInfo().getDimensionData(DimensionType.THE_END);
|
|
+ NBTTagCompound nbttagcompound = this.world.getWorldInfo().getDimensionData(this.world.provider.getDimension());
|
|
this.dragonFightManager = this.world instanceof WorldServer ? new DragonFightManager((WorldServer)this.world, nbttagcompound.getCompoundTag("DragonFight")) : null;
|
|
}
|
|
|
|
@@ -113,7 +113,7 @@
|
|
nbttagcompound.setTag("DragonFight", this.dragonFightManager.getCompound());
|
|
}
|
|
|
|
- this.world.getWorldInfo().setDimensionData(DimensionType.THE_END, nbttagcompound);
|
|
+ this.world.getWorldInfo().setDimensionData(this.world.provider.getDimension(), nbttagcompound);
|
|
}
|
|
|
|
public void onWorldUpdateEntities()
|
|
@@ -129,4 +129,22 @@
|
|
{
|
|
return this.dragonFightManager;
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void onPlayerAdded(net.minecraft.entity.player.EntityPlayerMP player)
|
|
+ {
|
|
+ if (this.dragonFightManager != null)
|
|
+ {
|
|
+ this.dragonFightManager.addPlayer(player);
|
|
+ }
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void onPlayerRemoved(net.minecraft.entity.player.EntityPlayerMP player)
|
|
+ {
|
|
+ if (this.dragonFightManager != null)
|
|
+ {
|
|
+ this.dragonFightManager.removePlayer(player);
|
|
+ }
|
|
+ }
|
|
}
|