Fix reference to IForgeDimension.SleepResult being through Dimension, thus causing a Srg2Source issue.

And improper getWorld patch.
This commit is contained in:
LexManos 2019-01-08 05:52:25 -08:00
parent f7acc73282
commit 34568a0a74
2 changed files with 4 additions and 11 deletions

View file

@ -5,9 +5,9 @@
}
- if (p_196250_2_.field_73011_w.func_76567_e() && p_196250_2_.func_180494_b(p_196250_3_) != Biomes.field_76778_j) {
+ net.minecraft.world.dimension.Dimension.SleepResult sleepResult = p_196250_2_.field_73011_w.canSleepAt(p_196250_4_, p_196250_3_);
+ if (sleepResult != net.minecraft.world.dimension.Dimension.SleepResult.BED_EXPLODES) {
+ if (sleepResult == net.minecraft.world.dimension.Dimension.SleepResult.DENY) return true;
+ net.minecraftforge.common.extensions.IForgeDimension.SleepResult sleepResult = p_196250_2_.field_73011_w.canSleepAt(p_196250_4_, p_196250_3_);
+ if (sleepResult != net.minecraftforge.common.extensions.IForgeDimension.SleepResult.BED_EXPLODES) {
+ if (sleepResult == net.minecraftforge.common.extensions.IForgeDimension.SleepResult.DENY) return true;
if (p_196250_1_.func_177229_b(field_176471_b)) {
EntityPlayer entityplayer = this.func_176470_e(p_196250_2_, p_196250_3_);
if (entityplayer != null) {

View file

@ -55,7 +55,7 @@
}
private Chunk func_75823_a(IWorld p_75823_1_, NBTTagCompound p_75823_2_) {
@@ -511,12 +532,16 @@
@@ -511,6 +532,10 @@
chunk.func_177427_f(true);
}
@ -66,13 +66,6 @@
return chunk;
}
private void func_199814_a(NBTTagCompound p_199814_1_, Chunk p_199814_2_) {
NBTTagList nbttaglist = p_199814_1_.func_150295_c("Entities", 10);
- World world = p_199814_2_.func_177412_p();
+ World world = p_199814_2_.getWorld();
for(int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound = nbttaglist.func_150305_b(i);
@@ -813,4 +838,8 @@
return flag;