Skip to content

Commit

Permalink
Fixed #33. This time in the right branch!
Browse files Browse the repository at this point in the history
  • Loading branch information
amadornes committed May 22, 2016
1 parent 0b66bc2 commit 91bb73d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mcmultipart/block/TileMultipartContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public boolean occlusionTest(IMultipart part, IMultipart... ignored) {
@Override
public void onAddPartPre(IMultipart part) {

if (part instanceof ITickable && !(this instanceof ITickable)) {
if (getWorld() != null && part instanceof ITickable && !(this instanceof ITickable)) {
getWorld().setBlockState(getPos(),
MCMultiPartMod.multipart.getDefaultState().withProperty(BlockMultipartContainer.PROPERTY_TICKING, true));
TileEntity te = getWorld().getTileEntity(getPos());
Expand All @@ -152,7 +152,7 @@ public void onAddPartPost(IMultipart part) {
@Override
public void onRemovePartPre(IMultipart part) {

if (part instanceof ITickable && getParts().size() > 1) {
if (getWorld() != null && part instanceof ITickable && getParts().size() > 1) {
boolean shouldTick = false;
for (IMultipart p : getParts()) {
if (p != part && p instanceof ITickable) {
Expand Down

0 comments on commit 91bb73d

Please sign in to comment.