Fix areas where dimension types are used as dimension IDs.
This commit is contained in:
parent
0d13fe245d
commit
6e46b6e4c1
8 changed files with 89 additions and 8 deletions
|
@ -9,6 +9,15 @@
|
||||||
{
|
{
|
||||||
private static final Logger field_184243_a = LogManager.getLogger();
|
private static final Logger field_184243_a = LogManager.getLogger();
|
||||||
private static final AxisAlignedBB field_174836_a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
private static final AxisAlignedBB field_174836_a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||||
|
@@ -185,7 +185,7 @@
|
||||||
|
|
||||||
|
if (p_i1582_1_ != null)
|
||||||
|
{
|
||||||
|
- this.field_71093_bK = p_i1582_1_.field_73011_w.func_186058_p().func_186068_a();
|
||||||
|
+ this.field_71093_bK = p_i1582_1_.field_73011_w.getDimension();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.field_70180_af = new EntityDataManager(this);
|
||||||
@@ -195,8 +195,16 @@
|
@@ -195,8 +195,16 @@
|
||||||
this.field_70180_af.func_187214_a(field_184242_az, "");
|
this.field_70180_af.func_187214_a(field_184242_az, "");
|
||||||
this.field_70180_af.func_187214_a(field_184234_aB, Boolean.valueOf(false));
|
this.field_70180_af.func_187214_a(field_184234_aB, Boolean.valueOf(false));
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
mapdata.field_76197_d = 0;
|
mapdata.field_76197_d = 0;
|
||||||
mapdata.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, mapdata.field_76197_d);
|
mapdata.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, mapdata.field_76197_d);
|
||||||
- mapdata.field_76200_c = (byte)p_77659_2_.field_73011_w.func_186058_p().func_186068_a();
|
- mapdata.field_76200_c = (byte)p_77659_2_.field_73011_w.func_186058_p().func_186068_a();
|
||||||
+ mapdata.field_76200_c = p_77659_2_.field_73011_w.func_186058_p().func_186068_a();
|
+ mapdata.field_76200_c = p_77659_2_.field_73011_w.getDimension();
|
||||||
mapdata.field_186210_e = true;
|
mapdata.field_186210_e = true;
|
||||||
mapdata.func_76185_a();
|
mapdata.func_76185_a();
|
||||||
--p_77659_1_.field_77994_a;
|
--p_77659_1_.field_77994_a;
|
||||||
|
|
|
@ -5,7 +5,16 @@
|
||||||
mapdata.field_76197_d = 3;
|
mapdata.field_76197_d = 3;
|
||||||
mapdata.func_176054_a((double)p_77873_2_.func_72912_H().func_76079_c(), (double)p_77873_2_.func_72912_H().func_76074_e(), mapdata.field_76197_d);
|
mapdata.func_176054_a((double)p_77873_2_.func_72912_H().func_76079_c(), (double)p_77873_2_.func_72912_H().func_76074_e(), mapdata.field_76197_d);
|
||||||
- mapdata.field_76200_c = (byte)p_77873_2_.field_73011_w.func_186058_p().func_186068_a();
|
- mapdata.field_76200_c = (byte)p_77873_2_.field_73011_w.func_186058_p().func_186068_a();
|
||||||
+ mapdata.field_76200_c = p_77873_2_.field_73011_w.func_186058_p().func_186068_a();
|
+ mapdata.field_76200_c = p_77873_2_.field_73011_w.getDimension();
|
||||||
mapdata.func_76185_a();
|
mapdata.func_76185_a();
|
||||||
p_77873_2_.func_72823_a(s, mapdata);
|
p_77873_2_.func_72823_a(s, mapdata);
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@
|
||||||
|
|
||||||
|
public void func_77872_a(World p_77872_1_, Entity p_77872_2_, MapData p_77872_3_)
|
||||||
|
{
|
||||||
|
- if (p_77872_1_.field_73011_w.func_186058_p().func_186068_a() == p_77872_3_.field_76200_c && p_77872_2_ instanceof EntityPlayer)
|
||||||
|
+ if (p_77872_1_.field_73011_w.getDimension() == p_77872_3_.field_76200_c && p_77872_2_ instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
int i = 1 << p_77872_3_.field_76197_d;
|
||||||
|
int j = p_77872_3_.field_76201_a;
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void func_71190_q()
|
public void func_71190_q()
|
||||||
@@ -672,14 +666,17 @@
|
@@ -672,24 +666,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.field_71304_b.func_76318_c("levels");
|
this.field_71304_b.func_76318_c("levels");
|
||||||
|
@ -210,7 +210,11 @@
|
||||||
this.field_71304_b.func_76320_a(worldserver.func_72912_H().func_76065_j());
|
this.field_71304_b.func_76320_a(worldserver.func_72912_H().func_76065_j());
|
||||||
|
|
||||||
if (this.field_71315_w % 20 == 0)
|
if (this.field_71315_w % 20 == 0)
|
||||||
@@ -690,6 +687,7 @@
|
{
|
||||||
|
this.field_71304_b.func_76320_a("timeSync");
|
||||||
|
- this.field_71318_t.func_148537_a(new SPacketTimeUpdate(worldserver.func_82737_E(), worldserver.func_72820_D(), worldserver.func_82736_K().func_82766_b("doDaylightCycle")), worldserver.field_73011_w.func_186058_p().func_186068_a());
|
||||||
|
+ this.field_71318_t.func_148537_a(new SPacketTimeUpdate(worldserver.func_82737_E(), worldserver.func_72820_D(), worldserver.func_82736_K().func_82766_b("doDaylightCycle")), worldserver.field_73011_w.getDimension());
|
||||||
|
this.field_71304_b.func_76319_b();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.field_71304_b.func_76320_a("tick");
|
this.field_71304_b.func_76320_a("tick");
|
||||||
|
|
|
@ -50,6 +50,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -506,7 +512,7 @@
|
||||||
|
|
||||||
|
public boolean func_175579_a(World p_175579_1_, BlockPos p_175579_2_, EntityPlayer p_175579_3_)
|
||||||
|
{
|
||||||
|
- if (p_175579_1_.field_73011_w.func_186058_p().func_186068_a() != 0)
|
||||||
|
+ if (p_175579_1_.field_73011_w.getDimension() != 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -580,6 +586,9 @@
|
@@ -580,6 +586,9 @@
|
||||||
return this.field_71340_o.func_73669_a("network-compression-threshold", super.func_175577_aI());
|
return this.field_71340_o.func_73669_a("network-compression-threshold", super.func_175577_aI());
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,15 +27,17 @@
|
||||||
p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
|
p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
|
||||||
String s1 = "local";
|
String s1 = "local";
|
||||||
|
|
||||||
@@ -123,7 +134,7 @@
|
@@ -123,8 +134,8 @@
|
||||||
WorldInfo worldinfo = worldserver.func_72912_H();
|
WorldInfo worldinfo = worldserver.func_72912_H();
|
||||||
BlockPos blockpos = worldserver.func_175694_M();
|
BlockPos blockpos = worldserver.func_175694_M();
|
||||||
this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver);
|
this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver);
|
||||||
- NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.field_72400_f, p_72355_1_, p_72355_2_);
|
- NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.field_72400_f, p_72355_1_, p_72355_2_);
|
||||||
|
- nethandlerplayserver.func_147359_a(new SPacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.func_186058_p().func_186068_a(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo")));
|
||||||
+ p_72355_2_.field_71135_a = nethandlerplayserver;
|
+ p_72355_2_.field_71135_a = nethandlerplayserver;
|
||||||
nethandlerplayserver.func_147359_a(new SPacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.func_186058_p().func_186068_a(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo")));
|
+ nethandlerplayserver.func_147359_a(new SPacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.getDimension(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo")));
|
||||||
nethandlerplayserver.func_147359_a(new SPacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName())));
|
nethandlerplayserver.func_147359_a(new SPacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName())));
|
||||||
nethandlerplayserver.func_147359_a(new SPacketServerDifficulty(worldinfo.func_176130_y(), worldinfo.func_176123_z()));
|
nethandlerplayserver.func_147359_a(new SPacketServerDifficulty(worldinfo.func_176130_y(), worldinfo.func_176123_z()));
|
||||||
|
nethandlerplayserver.func_147359_a(new SPacketSpawnPosition(blockpos));
|
||||||
@@ -213,6 +224,7 @@
|
@@ -213,6 +224,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
--- ../src-base/minecraft/net/minecraft/world/WorldManager.java
|
||||||
|
+++ ../src-work/minecraft/net/minecraft/world/WorldManager.java
|
||||||
|
@@ -50,7 +50,7 @@
|
||||||
|
|
||||||
|
public void func_184375_a(EntityPlayer p_184375_1_, SoundEvent p_184375_2_, SoundCategory p_184375_3_, double p_184375_4_, double p_184375_6_, double p_184375_8_, float p_184375_10_, float p_184375_11_)
|
||||||
|
{
|
||||||
|
- this.field_72783_a.func_184103_al().func_148543_a(p_184375_1_, p_184375_4_, p_184375_6_, p_184375_8_, p_184375_10_ > 1.0F ? (double)(16.0F * p_184375_10_) : 16.0D, this.field_72782_b.field_73011_w.func_186058_p().func_186068_a(), new SPacketSoundEffect(p_184375_2_, p_184375_3_, p_184375_4_, p_184375_6_, p_184375_8_, p_184375_10_, p_184375_11_));
|
||||||
|
+ this.field_72783_a.func_184103_al().func_148543_a(p_184375_1_, p_184375_4_, p_184375_6_, p_184375_8_, p_184375_10_ > 1.0F ? (double)(16.0F * p_184375_10_) : 16.0D, this.field_72782_b.field_73011_w.getDimension(), new SPacketSoundEffect(p_184375_2_, p_184375_3_, p_184375_4_, p_184375_6_, p_184375_8_, p_184375_10_, p_184375_11_));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void func_147585_a(int p_147585_1_, int p_147585_2_, int p_147585_3_, int p_147585_4_, int p_147585_5_, int p_147585_6_)
|
||||||
|
@@ -72,7 +72,7 @@
|
||||||
|
|
||||||
|
public void func_180439_a(EntityPlayer p_180439_1_, int p_180439_2_, BlockPos p_180439_3_, int p_180439_4_)
|
||||||
|
{
|
||||||
|
- this.field_72783_a.func_184103_al().func_148543_a(p_180439_1_, (double)p_180439_3_.func_177958_n(), (double)p_180439_3_.func_177956_o(), (double)p_180439_3_.func_177952_p(), 64.0D, this.field_72782_b.field_73011_w.func_186058_p().func_186068_a(), new SPacketEffect(p_180439_2_, p_180439_3_, p_180439_4_, false));
|
||||||
|
+ this.field_72783_a.func_184103_al().func_148543_a(p_180439_1_, (double)p_180439_3_.func_177958_n(), (double)p_180439_3_.func_177956_o(), (double)p_180439_3_.func_177952_p(), 64.0D, this.field_72782_b.field_73011_w.getDimension(), new SPacketEffect(p_180439_2_, p_180439_3_, p_180439_4_, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void func_180440_a(int p_180440_1_, BlockPos p_180440_2_, int p_180440_3_)
|
|
@ -221,6 +221,15 @@
|
||||||
{
|
{
|
||||||
this.field_72996_f.add(entity);
|
this.field_72996_f.add(entity);
|
||||||
this.func_72923_a(entity);
|
this.func_72923_a(entity);
|
||||||
|
@@ -1139,7 +1178,7 @@
|
||||||
|
{
|
||||||
|
if (super.func_72942_c(p_72942_1_))
|
||||||
|
{
|
||||||
|
- this.field_73061_a.func_184103_al().func_148543_a((EntityPlayer)null, p_72942_1_.field_70165_t, p_72942_1_.field_70163_u, p_72942_1_.field_70161_v, 512.0D, this.field_73011_w.func_186058_p().func_186068_a(), new SPacketSpawnGlobalEntity(p_72942_1_));
|
||||||
|
+ this.field_73061_a.func_184103_al().func_148543_a((EntityPlayer)null, p_72942_1_.field_70165_t, p_72942_1_.field_70163_u, p_72942_1_.field_70161_v, 512.0D, this.field_73011_w.getDimension(), new SPacketSpawnGlobalEntity(p_72942_1_));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
@@ -1161,6 +1200,7 @@
|
@@ -1161,6 +1200,7 @@
|
||||||
public Explosion func_72885_a(Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_)
|
public Explosion func_72885_a(Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_)
|
||||||
{
|
{
|
||||||
|
@ -229,8 +238,27 @@
|
||||||
explosion.func_77278_a();
|
explosion.func_77278_a();
|
||||||
explosion.func_77279_a(false);
|
explosion.func_77279_a(false);
|
||||||
|
|
||||||
@@ -1240,19 +1280,23 @@
|
@@ -1206,7 +1246,7 @@
|
||||||
this.field_73061_a.func_184103_al().func_148537_a(new SPacketChangeGameState(8, this.field_73017_q), this.field_73011_w.func_186058_p().func_186068_a());
|
{
|
||||||
|
if (this.func_147485_a(blockeventdata))
|
||||||
|
{
|
||||||
|
- this.field_73061_a.func_184103_al().func_148543_a((EntityPlayer)null, (double)blockeventdata.func_180328_a().func_177958_n(), (double)blockeventdata.func_180328_a().func_177956_o(), (double)blockeventdata.func_180328_a().func_177952_p(), 64.0D, this.field_73011_w.func_186058_p().func_186068_a(), new SPacketBlockAction(blockeventdata.func_180328_a(), blockeventdata.func_151337_f(), blockeventdata.func_151339_d(), blockeventdata.func_151338_e()));
|
||||||
|
+ this.field_73061_a.func_184103_al().func_148543_a((EntityPlayer)null, (double)blockeventdata.func_180328_a().func_177958_n(), (double)blockeventdata.func_180328_a().func_177956_o(), (double)blockeventdata.func_180328_a().func_177952_p(), 64.0D, this.field_73011_w.getDimension(), new SPacketBlockAction(blockeventdata.func_180328_a(), blockeventdata.func_151337_f(), blockeventdata.func_151339_d(), blockeventdata.func_151338_e()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1232,27 +1272,31 @@
|
||||||
|
|
||||||
|
if (this.field_73003_n != this.field_73004_o)
|
||||||
|
{
|
||||||
|
- this.field_73061_a.func_184103_al().func_148537_a(new SPacketChangeGameState(7, this.field_73004_o), this.field_73011_w.func_186058_p().func_186068_a());
|
||||||
|
+ this.field_73061_a.func_184103_al().func_148537_a(new SPacketChangeGameState(7, this.field_73004_o), this.field_73011_w.getDimension());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.field_73018_p != this.field_73017_q)
|
||||||
|
{
|
||||||
|
- this.field_73061_a.func_184103_al().func_148537_a(new SPacketChangeGameState(8, this.field_73017_q), this.field_73011_w.func_186058_p().func_186068_a());
|
||||||
|
+ this.field_73061_a.func_184103_al().func_148537_a(new SPacketChangeGameState(8, this.field_73017_q), this.field_73011_w.getDimension());
|
||||||
}
|
}
|
||||||
|
|
||||||
+ /* The function in use here has been replaced in order to only send the weather info to players in the correct dimension,
|
+ /* The function in use here has been replaced in order to only send the weather info to players in the correct dimension,
|
||||||
|
|
Loading…
Reference in a new issue