mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
55 lines
2.5 KiB
Diff
55 lines
2.5 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/ChunkCache.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/ChunkCache.java
|
|
@@ -61,6 +61,8 @@
|
|
{
|
|
int i = (p_175625_1_.func_177958_n() >> 4) - this.field_72818_a;
|
|
int j = (p_175625_1_.func_177952_p() >> 4) - this.field_72816_b;
|
|
+ if (i < 0 || i >= field_72817_c.length || j < 0 || j >= field_72817_c[i].length) return null;
|
|
+ if (field_72817_c[i][j] == null) return null;
|
|
return this.field_72817_c[i][j].func_177424_a(p_175625_1_, Chunk.EnumCreateEntityType.IMMEDIATE);
|
|
}
|
|
|
|
@@ -139,6 +141,8 @@
|
|
{
|
|
int i = (p_175629_2_.func_177958_n() >> 4) - this.field_72818_a;
|
|
int j = (p_175629_2_.func_177952_p() >> 4) - this.field_72816_b;
|
|
+ if (i < 0 || i >= field_72817_c.length || j < 0 || j >= field_72817_c[i].length) return p_175629_1_.field_77198_c;
|
|
+ if (field_72817_c[i][j] == null) return p_175629_1_.field_77198_c;
|
|
return this.field_72817_c[i][j].func_177413_a(p_175629_1_, p_175629_2_);
|
|
}
|
|
}
|
|
@@ -150,7 +154,7 @@
|
|
|
|
public boolean func_175623_d(BlockPos p_175623_1_)
|
|
{
|
|
- return this.func_180495_p(p_175623_1_).func_177230_c().func_149688_o() == Material.field_151579_a;
|
|
+ return this.func_180495_p(p_175623_1_).func_177230_c().isAir(this, p_175623_1_);
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
@@ -160,6 +164,7 @@
|
|
{
|
|
int i = (p_175628_2_.func_177958_n() >> 4) - this.field_72818_a;
|
|
int j = (p_175628_2_.func_177952_p() >> 4) - this.field_72816_b;
|
|
+ if (i < 0 || i >= field_72817_c.length || j < 0 || j >= field_72817_c[i].length) return p_175628_1_.field_77198_c;
|
|
return this.field_72817_c[i][j].func_177413_a(p_175628_1_, p_175628_2_);
|
|
}
|
|
else
|
|
@@ -179,4 +184,16 @@
|
|
{
|
|
return this.field_72815_e.func_175624_G();
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean isSideSolid(BlockPos pos, EnumFacing side, boolean _default)
|
|
+ {
|
|
+ int x = (pos.func_177958_n() >> 4) - this.field_72818_a;
|
|
+ int z = (pos.func_177952_p() >> 4) - this.field_72816_b;
|
|
+ if (pos.func_177956_o() >= 0 && pos.func_177956_o() < 256) return _default;
|
|
+ if (x < 0 || x >= field_72817_c.length || z < 0 || z >= field_72817_c[x].length) return _default;
|
|
+ if (field_72817_c[x][z] == null) return _default;
|
|
+
|
|
+ return func_180495_p(pos).func_177230_c().isSideSolid(this, pos, side);
|
|
+ }
|
|
}
|