Skip to content

Commit

Permalink
Merge pull request #424 from fastdelaspeed/skycrate-fixes
Browse files Browse the repository at this point in the history
Workaround for Skycrate deletion
  • Loading branch information
Pabilo8 authored Oct 28, 2024
2 parents be18c08 + 2bbc46d commit 3b9b474
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,21 @@ public void onUpdate()
}
if(!success)
{
if(crate.getItem() instanceof ItemBlock)
/* if(crate.getItem() instanceof ItemBlock)
{
ItemBlock b = (ItemBlock)crate.getItem();
EntityFallingBlock e = new EntityFallingBlock(world, (int)posX, (int)posY, (int)posX, b.getBlock().getDefaultState());
EntityFallingBlock e = new EntityFallingBlock(world, (int)posX, (int)posY-2, (int)posZ, b.getBlock().getDefaultState());
world.spawnEntity(e);
e.fallTime = -1;
}
else
{
Utils.dropStackAtPos(world, getPosition(), crate.copy());
}
Utils.dropStackAtPos(world, getPosition(), mount.copy());
} */
BlockPos ePos = getPosition();
BlockPos dropPos = new BlockPos(ePos.getX(), ePos.getY() - 2, ePos.getZ());
Utils.dropStackAtPos(world, dropPos, mount.copy());
Utils.dropStackAtPos(world, dropPos, crate.copy());
this.setDead();

}
}
else if(world.getTileEntity(getPosition()) instanceof ISkyCrateConnector)
Expand Down

0 comments on commit 3b9b474

Please sign in to comment.