Add container null check
This commit is contained in:
parent
67a9f6389e
commit
b0f72a94ab
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ public class TravelingItem {
|
|||
public float getEntityBrightness(float f) {
|
||||
int i = MathHelper.floor_double(xCoord);
|
||||
int j = MathHelper.floor_double(zCoord);
|
||||
if (container.worldObj.blockExists(i, 128 / 2, j)) {
|
||||
if (container != null && container.worldObj.blockExists(i, 128 / 2, j)) {
|
||||
double d = 0.66000000000000003D;
|
||||
int k = MathHelper.floor_double(yCoord + d);
|
||||
return container.worldObj.getLightBrightness(i, k, j);
|
||||
|
|
Loading…
Reference in a new issue