Fix Slimes not splitting on death Closes #5973
This commit is contained in:
parent
731e1920d2
commit
57d4d60a33
4 changed files with 60 additions and 19 deletions
|
@ -1,12 +1,10 @@
|
|||
--- a/net/minecraft/entity/item/minecart/ContainerMinecartEntity.java
|
||||
+++ b/net/minecraft/entity/item/minecart/ContainerMinecartEntity.java
|
||||
@@ -116,11 +116,17 @@
|
||||
@@ -115,12 +115,14 @@
|
||||
return super.func_212321_a(p_212321_1_);
|
||||
}
|
||||
|
||||
public void func_70106_y() {
|
||||
+ super.func_70106_y();
|
||||
+ }
|
||||
+
|
||||
- public void func_70106_y() {
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
if (!this.field_70170_p.field_72995_K && this.field_94112_b) {
|
||||
|
@ -19,7 +17,7 @@
|
|||
}
|
||||
|
||||
protected void func_213281_b(CompoundNBT p_213281_1_) {
|
||||
@@ -149,6 +155,7 @@
|
||||
@@ -149,6 +151,7 @@
|
||||
}
|
||||
|
||||
public boolean func_184230_a(PlayerEntity p_184230_1_, Hand p_184230_2_) {
|
||||
|
@ -27,7 +25,7 @@
|
|||
p_184230_1_.func_213829_a(this);
|
||||
return true;
|
||||
}
|
||||
@@ -168,6 +175,8 @@
|
||||
@@ -168,6 +171,8 @@
|
||||
LootTable loottable = this.field_70170_p.func_73046_m().func_200249_aQ().func_186521_a(this.field_184290_c);
|
||||
this.field_184290_c = null;
|
||||
LootContext.Builder lootcontext$builder = (new LootContext.Builder((ServerWorld)this.field_70170_p)).func_216015_a(LootParameters.field_216286_f, new BlockPos(this)).func_216016_a(this.field_184291_d);
|
||||
|
@ -36,7 +34,7 @@
|
|||
if (p_184288_1_ != null) {
|
||||
lootcontext$builder.func_186469_a(p_184288_1_.func_184817_da()).func_216015_a(LootParameters.field_216281_a, p_184288_1_);
|
||||
}
|
||||
@@ -198,4 +207,17 @@
|
||||
@@ -198,4 +203,17 @@
|
||||
}
|
||||
|
||||
protected abstract Container func_213968_a(int p_213968_1_, PlayerInventory p_213968_2_);
|
||||
|
|
|
@ -17,7 +17,26 @@
|
|||
for(int j = 0; j < i * 8; ++j) {
|
||||
float f = this.field_70146_Z.nextFloat() * ((float)Math.PI * 2F);
|
||||
float f1 = this.field_70146_Z.nextFloat() * 0.5F + 0.5F;
|
||||
@@ -251,7 +252,7 @@
|
||||
@@ -170,7 +171,8 @@
|
||||
return (EntityType<? extends SlimeEntity>) super.func_200600_R();
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
int i = this.func_70809_q();
|
||||
if (!this.field_70170_p.field_72995_K && i > 1 && this.func_110143_aJ() <= 0.0F) {
|
||||
int j = 2 + this.field_70146_Z.nextInt(3);
|
||||
@@ -193,7 +195,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- super.func_70106_y();
|
||||
+ super.remove(keepData);
|
||||
}
|
||||
|
||||
public void func_70108_f(Entity p_70108_1_) {
|
||||
@@ -251,7 +253,7 @@
|
||||
}
|
||||
|
||||
public static boolean func_223366_c(EntityType<SlimeEntity> p_223366_0_, IWorld p_223366_1_, SpawnReason p_223366_2_, BlockPos p_223366_3_, Random p_223366_4_) {
|
||||
|
@ -26,7 +45,7 @@
|
|||
return false;
|
||||
} else {
|
||||
if (p_223366_1_.func_175659_aa() != Difficulty.PEACEFUL) {
|
||||
@@ -309,6 +310,12 @@
|
||||
@@ -309,6 +311,12 @@
|
||||
return super.func_213305_a(p_213305_1_).func_220313_a(0.255F * (float)this.func_70809_q());
|
||||
}
|
||||
|
||||
|
|
|
@ -272,7 +272,19 @@
|
|||
this.func_184602_cy();
|
||||
this.field_70170_p.func_72960_a(this, (byte)30);
|
||||
}
|
||||
@@ -1146,6 +1209,9 @@
|
||||
@@ -1128,8 +1191,9 @@
|
||||
public void func_71004_bE() {
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
- super.func_70106_y();
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
+ super.remove(keepData);
|
||||
this.field_71069_bz.func_75134_a(this);
|
||||
if (this.field_71070_bA != null) {
|
||||
this.field_71070_bA.func_75134_a(this);
|
||||
@@ -1146,6 +1210,9 @@
|
||||
}
|
||||
|
||||
public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) {
|
||||
|
@ -282,7 +294,7 @@
|
|||
Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D);
|
||||
if (!this.field_70170_p.field_72995_K) {
|
||||
if (this.func_70608_bn() || !this.func_70089_S()) {
|
||||
@@ -1156,7 +1222,7 @@
|
||||
@@ -1156,7 +1223,7 @@
|
||||
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_HERE);
|
||||
}
|
||||
|
||||
|
@ -291,7 +303,7 @@
|
|||
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_NOW);
|
||||
}
|
||||
|
||||
@@ -1197,6 +1263,8 @@
|
||||
@@ -1197,6 +1264,8 @@
|
||||
private boolean func_190774_a(BlockPos p_190774_1_, Direction p_190774_2_) {
|
||||
if (Math.abs(this.field_70165_t - (double)p_190774_1_.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)p_190774_1_.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)p_190774_1_.func_177952_p()) <= 3.0D) {
|
||||
return true;
|
||||
|
@ -300,7 +312,7 @@
|
|||
} else {
|
||||
BlockPos blockpos = p_190774_1_.func_177972_a(p_190774_2_.func_176734_d());
|
||||
return Math.abs(this.field_70165_t - (double)blockpos.func_177958_n()) <= 3.0D && Math.abs(this.field_70163_u - (double)blockpos.func_177956_o()) <= 2.0D && Math.abs(this.field_70161_v - (double)blockpos.func_177952_p()) <= 3.0D;
|
||||
@@ -1209,6 +1277,7 @@
|
||||
@@ -1209,6 +1278,7 @@
|
||||
}
|
||||
|
||||
public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_) {
|
||||
|
@ -308,7 +320,7 @@
|
|||
Optional<BlockPos> optional = this.func_213374_dv();
|
||||
super.func_213366_dy();
|
||||
if (this.field_70170_p instanceof ServerWorld && p_70999_2_) {
|
||||
@@ -1229,17 +1298,17 @@
|
||||
@@ -1229,17 +1299,17 @@
|
||||
}
|
||||
|
||||
public static Optional<Vec3d> func_213822_a(IWorldReader p_213822_0_, BlockPos p_213822_1_, boolean p_213822_2_) {
|
||||
|
@ -330,7 +342,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1254,23 +1323,67 @@
|
||||
@@ -1254,23 +1324,67 @@
|
||||
public void func_146105_b(ITextComponent p_146105_1_, boolean p_146105_2_) {
|
||||
}
|
||||
|
||||
|
@ -407,7 +419,7 @@
|
|||
}
|
||||
|
||||
public void func_195066_a(ResourceLocation p_195066_1_) {
|
||||
@@ -1436,6 +1549,8 @@
|
||||
@@ -1436,6 +1550,8 @@
|
||||
}
|
||||
|
||||
super.func_180430_e(p_180430_1_, p_180430_2_);
|
||||
|
@ -416,7 +428,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1703,7 +1818,10 @@
|
||||
@@ -1703,7 +1819,10 @@
|
||||
}
|
||||
|
||||
public ITextComponent func_145748_c_() {
|
||||
|
@ -428,7 +440,7 @@
|
|||
return this.func_208016_c(itextcomponent);
|
||||
}
|
||||
|
||||
@@ -1939,4 +2057,44 @@
|
||||
@@ -1939,4 +2058,44 @@
|
||||
return this.field_221260_g;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,3 +62,15 @@
|
|||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -416,8 +424,9 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- public void func_70106_y() {
|
||||
- super.func_70106_y();
|
||||
+ @Override
|
||||
+ public void remove(boolean keepData) {
|
||||
+ super.remove(keepData);
|
||||
if (this.field_146042_b != null) {
|
||||
this.field_146042_b.field_71104_cf = null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue