64 lines
4.0 KiB
Diff
64 lines
4.0 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
|
@@ -247,7 +247,7 @@
|
|
{
|
|
PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f);
|
|
this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this);
|
|
- this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
|
+ this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.get(func_147298_b()).getOverrideDimension(p_147282_1_), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
|
this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g();
|
|
this.field_147299_f.func_71403_a(this.field_147300_g);
|
|
this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f();
|
|
@@ -410,7 +410,8 @@
|
|
public void func_147286_a(S11PacketSpawnExperienceOrb p_147286_1_)
|
|
{
|
|
PacketThreadUtil.func_180031_a(p_147286_1_, this, this.field_147299_f);
|
|
- EntityXPOrb entityxporb = new EntityXPOrb(this.field_147300_g, (double)p_147286_1_.func_148984_d(), (double)p_147286_1_.func_148983_e(), (double)p_147286_1_.func_148982_f(), p_147286_1_.func_148986_g());
|
|
+ EntityXPOrb entityxporb = new EntityXPOrb(this.field_147300_g, (double)p_147286_1_.func_148984_d() / 32.0D, (double)p_147286_1_.func_148983_e() / 32.0D, (double)p_147286_1_.func_148982_f() / 32.0D, p_147286_1_.func_148986_g());
|
|
+ // FORGE: BugFix MC-12013 Wrong XP orb clientside spawn position
|
|
entityxporb.field_70118_ct = p_147286_1_.func_148984_d();
|
|
entityxporb.field_70117_cu = p_147286_1_.func_148983_e();
|
|
entityxporb.field_70116_cv = p_147286_1_.func_148982_f();
|
|
@@ -754,14 +755,16 @@
|
|
public void func_147251_a(S02PacketChat p_147251_1_)
|
|
{
|
|
PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f);
|
|
+ net.minecraft.util.IChatComponent message = net.minecraftforge.event.ForgeEventFactory.onClientChat(p_147251_1_.func_179841_c(), p_147251_1_.func_148915_c());
|
|
+ if (message == null) return;
|
|
|
|
if (p_147251_1_.func_179841_c() == 2)
|
|
{
|
|
- this.field_147299_f.field_71456_v.func_175188_a(p_147251_1_.func_148915_c(), false);
|
|
+ this.field_147299_f.field_71456_v.func_175188_a(message, false);
|
|
}
|
|
else
|
|
{
|
|
- this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(p_147251_1_.func_148915_c());
|
|
+ this.field_147299_f.field_71456_v.func_146158_b().func_146227_a(message);
|
|
}
|
|
}
|
|
|
|
@@ -812,6 +815,11 @@
|
|
float f = (float)(p_147281_1_.func_149028_l() * 360) / 256.0F;
|
|
float f1 = (float)(p_147281_1_.func_149030_m() * 360) / 256.0F;
|
|
EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.func_75616_a(p_147281_1_.func_149025_e(), this.field_147299_f.field_71441_e);
|
|
+ if (entitylivingbase == null)
|
|
+ {
|
|
+ net.minecraftforge.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", p_147281_1_.func_149025_e(), d0, d1, d2);
|
|
+ return;
|
|
+ }
|
|
entitylivingbase.field_70118_ct = p_147281_1_.func_149023_f();
|
|
entitylivingbase.field_70117_cu = p_147281_1_.func_149034_g();
|
|
entitylivingbase.field_70116_cv = p_147281_1_.func_149029_h();
|
|
@@ -1137,6 +1145,10 @@
|
|
{
|
|
tileentity.func_145839_a(p_147273_1_.func_148857_g());
|
|
}
|
|
+ else
|
|
+ {
|
|
+ tileentity.onDataPacket(field_147302_e, p_147273_1_);
|
|
+ }
|
|
}
|
|
}
|
|
|