Initial 1.16.2 Update

This commit is contained in:
LexManos committed 2020-08-13 00:35:08 -07:00
1 parent a3c4ffd2c1
commit fe43088c96
233 files changed
+1644 -2297

No files matched your search

@@ -1,6 +1,6 @@
--- a/net/minecraft/entity/Entity.java
+++ b/net/minecraft/entity/Entity.java
@@ -107,12 +107,13 @@
@@ -109,12 +109,13 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -15,7 +15,7 @@
private final EntityType<?> field_200606_g;
private int field_145783_c = field_213331_b.incrementAndGet();
public boolean field_70156_m;
@@ -138,6 +139,7 @@
@@ -140,6 +141,7 @@
public boolean field_70124_G;
public boolean field_70133_I;
protected Vector3d field_213328_B = Vector3d.field_186680_a;
@@ -23,7 +23,7 @@
public boolean field_70128_L;
public float field_70141_P;
public float field_70140_Q;
@@ -198,6 +200,7 @@
@@ -195,6 +197,7 @@
private float field_213326_aJ;
public Entity(EntityType<?> p_i48580_1_, World p_i48580_2_) {
@@ -31,7 +31,7 @@
this.field_200606_g = p_i48580_1_;
this.field_70170_p = p_i48580_2_;
this.field_213325_aI = p_i48580_1_.func_220334_j();
@@ -213,7 +216,9 @@
@@ -211,7 +214,9 @@
this.field_70180_af.func_187214_a(field_189655_aD, false);
this.field_70180_af.func_187214_a(field_213330_X, Pose.STANDING);
this.func_70088_a();
@@ -42,7 +42,7 @@
}
@OnlyIn(Dist.CLIENT)
@@ -305,7 +310,13 @@
@@ -317,7 +322,13 @@
}
public void func_70106_y() {
@@ -58,13 +58,13 @@
public void func_213301_b(Pose p_213301_1_) {
@@ -330,6 +341,7 @@
public void func_70107_b(double p_70107_1_, double p_70107_3_, double p_70107_5_) {
this.func_226288_n_(p_70107_1_, p_70107_3_, p_70107_5_);
public boolean func_233562_a_(Entity p_233562_1_, double p_233562_2_) {
double d0 = p_233562_1_.field_233557_ao_.field_72450_a - this.field_233557_ao_.field_72450_a;
+ if (this.isAddedToWorld() && !this.field_70170_p.field_72995_K && field_70170_p instanceof ServerWorld) ((ServerWorld)this.field_70170_p).func_217464_b(this); // Forge - Process chunk registration after moving.
float f = this.field_213325_aI.field_220315_a / 2.0F;
float f1 = this.field_213325_aI.field_220316_b;
this.func_174826_a(new AxisAlignedBB(p_70107_1_ - (double)f, p_70107_3_, p_70107_5_ - (double)f, p_70107_1_ + (double)f, p_70107_3_ + (double)f1, p_70107_5_ + (double)f));
@@ -542,7 +554,7 @@
double d1 = p_233562_1_.field_233557_ao_.field_72448_b - this.field_233557_ao_.field_72448_b;
double d2 = p_233562_1_.field_233557_ao_.field_72449_c - this.field_233557_ao_.field_72449_c;
return d0 * d0 + d1 * d1 + d2 * d2 < p_233562_2_ * p_233562_2_;
@@ -560,7 +572,7 @@
this.field_70140_Q = (float)((double)this.field_70140_Q + (double)MathHelper.func_76133_a(func_213296_b(vector3d)) * 0.6D);
this.field_82151_R = (float)((double)this.field_82151_R + (double)MathHelper.func_76133_a(d0 * d0 + d1 * d1 + d2 * d2) * 0.6D);
@@ -73,7 +73,7 @@
this.field_70150_b = this.func_203009_ad();
if (this.func_70090_H()) {
Entity entity = this.func_184207_aI() && this.func_184179_bs() != null ? this.func_184179_bs() : this;
@@ -557,7 +569,7 @@
@@ -575,7 +587,7 @@
} else {
this.func_180429_a(blockpos, blockstate);
}
@@ -82,7 +82,7 @@
this.field_191959_ay = this.func_191954_d(this.field_82151_R);
}
}
@@ -574,8 +586,9 @@
@@ -591,8 +603,9 @@
float f2 = this.func_225515_ai_();
this.func_213317_d(this.func_213322_ci().func_216372_d((double)f2, 1.0D, (double)f2));
@@ -94,7 +94,7 @@
}) && this.field_190534_ay <= 0) {
this.func_241209_g_(-this.func_190531_bD());
}
@@ -594,11 +607,10 @@
@@ -611,11 +624,10 @@
int j = MathHelper.func_76128_c(this.field_233557_ao_.field_72448_b - (double)0.2F);
int k = MathHelper.func_76128_c(this.field_233557_ao_.field_72449_c);
BlockPos blockpos = new BlockPos(i, j, k);
@@ -108,7 +108,7 @@
return blockpos1;
}
}
@@ -784,6 +796,7 @@
@@ -801,6 +813,7 @@
public void func_174829_m() {
AxisAlignedBB axisalignedbb = this.func_174813_aQ();
this.func_226288_n_((axisalignedbb.field_72340_a + axisalignedbb.field_72336_d) / 2.0D, axisalignedbb.field_72338_b, (axisalignedbb.field_72339_c + axisalignedbb.field_72334_f) / 2.0D);
@@ -116,7 +116,7 @@
}
protected SoundEvent func_184184_Z() {
@@ -832,7 +845,7 @@
@@ -849,7 +862,7 @@
protected void func_180429_a(BlockPos p_180429_1_, BlockState p_180429_2_) {
if (!p_180429_2_.func_185904_a().func_76224_d()) {
BlockState blockstate = this.field_70170_p.func_180495_p(p_180429_1_.func_177984_a());
@@ -125,7 +125,7 @@
this.func_184185_a(soundtype.func_185844_d(), soundtype.func_185843_a() * 0.15F, soundtype.func_185847_b());
}
}
@@ -1048,9 +1061,10 @@
@@ -1056,9 +1069,10 @@
int k = MathHelper.func_76128_c(this.func_226281_cx_());
BlockPos blockpos = new BlockPos(i, j, k);
BlockState blockstate = this.field_70170_p.func_180495_p(blockpos);
@@ -137,7 +137,7 @@
}
}
@@ -1356,6 +1370,7 @@
@@ -1377,6 +1391,7 @@
if (this.field_184238_ar) {
p_189511_1_.func_74757_a("Glowing", this.field_184238_ar);
}
@@ -145,7 +145,7 @@
if (!this.field_184236_aF.isEmpty()) {
ListNBT listnbt = new ListNBT();
@@ -1367,6 +1382,10 @@
@@ -1388,6 +1403,10 @@
p_189511_1_.func_218657_a("Tags", listnbt);
}
@@ -156,7 +156,7 @@
this.func_213281_b(p_189511_1_);
if (this.func_184207_aI()) {
ListNBT listnbt1 = new ListNBT();
@@ -1437,6 +1456,9 @@
@@ -1458,6 +1477,9 @@
this.func_174810_b(p_70020_1_.func_74767_n("Silent"));
this.func_189654_d(p_70020_1_.func_74767_n("NoGravity"));
this.func_184195_f(p_70020_1_.func_74767_n("Glowing"));
@@ -166,7 +166,7 @@
if (p_70020_1_.func_150297_b("Tags", 9)) {
this.field_184236_aF.clear();
ListNBT listnbt3 = p_70020_1_.func_150295_c("Tags", 8);
@@ -1525,6 +1547,8 @@
@@ -1546,6 +1568,8 @@
} else {
ItemEntity itementity = new ItemEntity(this.field_70170_p, this.func_226277_ct_(), this.func_226278_cu_() + (double)p_70099_2_, this.func_226281_cx_(), p_70099_1_);
itementity.func_174869_p();
@@ -175,7 +175,7 @@
this.field_70170_p.func_217376_c(itementity);
return itementity;
}
@@ -1558,6 +1582,7 @@
@@ -1582,6 +1606,7 @@
public void func_70098_U() {
this.func_213317_d(Vector3d.field_186680_a);
@@ -183,7 +183,7 @@
this.func_70071_h_();
if (this.func_184218_aH()) {
this.func_184187_bx().func_184232_k(this);
@@ -1603,6 +1628,7 @@
@@ -1627,6 +1652,7 @@
}
}
@@ -191,7 +191,7 @@
if (p_184205_2_ || this.func_184228_n(p_184205_1_) && p_184205_1_.func_184219_q(this)) {
if (this.func_184218_aH()) {
this.func_184210_p();
@@ -1635,6 +1661,7 @@
@@ -1659,6 +1685,7 @@
public void func_233575_bb_() {
if (this.field_184239_as != null) {
Entity entity = this.field_184239_as;
@@ -199,7 +199,7 @@
this.field_184239_as = null;
entity.func_184225_p(this);
}
@@ -1799,6 +1826,7 @@
@@ -1816,6 +1843,7 @@
return !this.func_184188_bt().isEmpty();
}
@@ -207,7 +207,7 @@
public boolean func_205710_ba() {
return true;
}
@@ -2015,7 +2043,7 @@
@@ -2032,7 +2060,7 @@
}
protected ITextComponent func_225513_by_() {
@@ -216,7 +216,7 @@
}
public boolean func_70028_i(Entity p_70028_1_) {
@@ -2072,10 +2100,15 @@
@@ -2087,6 +2115,10 @@
@Nullable
public Entity func_241206_a_(ServerWorld p_241206_1_) {
@@ -227,58 +227,37 @@
if (this.field_70170_p instanceof ServerWorld && !this.field_70128_L) {
this.field_70170_p.func_217381_Z().func_76320_a("changeDimension");
this.func_213319_R();
this.field_70170_p.func_217381_Z().func_76320_a("reposition");
+ Entity transportedEntity = teleporter.placeEntity(this, (ServerWorld) this.field_70170_p, p_241206_1_, this.field_70177_z, spawnPortal -> { //Forge: Start vanilla logic
Vector3d vector3d = this.func_213322_ci();
float f = 0.0F;
BlockPos blockpos;
@@ -2105,6 +2138,7 @@
d1 = MathHelper.func_151237_a(d1, d4, d6);
Vector3d vector3d1 = this.func_181014_aG();
blockpos = new BlockPos(d0, this.func_226278_cu_(), d1);
+ if (spawnPortal) {
BlockPattern.PortalInfo blockpattern$portalinfo = p_241206_1_.func_85176_s().func_222272_a(blockpos, vector3d, this.func_181012_aH(), vector3d1.field_72450_a, vector3d1.field_72448_b, this instanceof PlayerEntity);
if (blockpattern$portalinfo == null) {
return null;
@@ -2113,6 +2147,7 @@
blockpos = new BlockPos(blockpattern$portalinfo.field_222505_a);
vector3d = blockpattern$portalinfo.field_222506_b;
f = (float)blockpattern$portalinfo.field_222507_c;
+ }
}
this.field_70170_p.func_217381_Z().func_219895_b("reloading");
@@ -2126,13 +2161,15 @@
ServerWorld.func_241121_a_(p_241206_1_);
@@ -2095,6 +2127,7 @@
if (portalinfo == null) {
return null;
} else {
+ Entity transportedEntity = teleporter.placeEntity(this, (ServerWorld) this.field_70170_p, p_241206_1_, this.field_70177_z, spawnPortal -> { //Forge: Start vanilla logic
this.field_70170_p.func_217381_Z().func_219895_b("reloading");
Entity entity = this.func_200600_R().func_200721_a(p_241206_1_);
if (entity != null) {
@@ -2102,17 +2135,19 @@
entity.func_70012_b(portalinfo.field_222505_a.field_72450_a, portalinfo.field_222505_a.field_72448_b, portalinfo.field_222505_a.field_72449_c, portalinfo.field_242960_c, entity.field_70125_A);
entity.func_213317_d(portalinfo.field_222506_b);
p_241206_1_.func_217460_e(entity);
- if (p_241206_1_.func_234923_W_() == World.field_234920_i_) {
+ if (spawnPortal && p_241206_1_.func_234923_W_() == World.field_234920_i_) {
ServerWorld.func_241121_a_(p_241206_1_);
}
}
}
+ return entity;
+ });//Forge: End vanilla logic
+ return entity;
+ }); //Forge: End vanilla logic
this.func_241204_bJ_();
this.field_70170_p.func_217381_Z().func_76319_b();
((ServerWorld)this.field_70170_p).func_82742_i();
p_241206_1_.func_82742_i();
this.field_70170_p.func_217381_Z().func_76319_b();
- return entity;
+ return transportedEntity;
this.func_241204_bJ_();
this.field_70170_p.func_217381_Z().func_76319_b();
((ServerWorld)this.field_70170_p).func_82742_i();
p_241206_1_.func_82742_i();
this.field_70170_p.func_217381_Z().func_76319_b();
- return entity;
+ return transportedEntity;
}
} else {
return null;
}
@@ -2159,10 +2196,12 @@
}
public Vector3d func_181014_aG() {
+ if (this.field_181017_ao == null) return Vector3d.field_186680_a;
return this.field_181017_ao;
}
public Direction func_181012_aH() {
+ if (this.field_181018_ap == null) return Direction.NORTH;
return this.field_181018_ap;
}
@@ -2295,7 +2334,7 @@
@@ -2322,7 +2357,7 @@
Pose pose = this.func_213283_Z();
EntitySize entitysize1 = this.func_213305_a(pose);
this.field_213325_aI = entitysize1;
@@ -287,7 +266,7 @@
if (entitysize1.field_220315_a < entitysize.field_220315_a) {
double d0 = (double)entitysize1.field_220315_a / 2.0D;
this.func_174826_a(new AxisAlignedBB(this.func_226277_ct_() - d0, this.func_226278_cu_(), this.func_226281_cx_() - d0, this.func_226277_ct_() + d0, this.func_226278_cu_() + (double)entitysize1.field_220316_b, this.func_226281_cx_() + d0));
@@ -2769,6 +2808,7 @@
@@ -2796,6 +2831,7 @@
this.field_233555_aA_ = true;
}
@@ -295,7 +274,7 @@
}
@@ -2779,4 +2819,69 @@
@@ -2811,4 +2847,69 @@
public interface IMoveCallback {
void accept(Entity p_accept_1_, double p_accept_2_, double p_accept_4_, double p_accept_6_);
}