Reinitialize furnaces when loaded from disk

This commit is contained in:
Drew DeVault 2015-10-05 08:44:54 -04:00
parent 98b15c3434
commit d4ccb22e4f
2 changed files with 8 additions and 0 deletions

View File

@ -144,6 +144,12 @@ namespace TrueCraft.Core.Logic.Blocks
UpdateWindows(coords, state);
}
public override void BlockLoadedFromChunk(Coordinates3D coords, IMultiplayerServer server, IWorld world)
{
var state = GetState(world, coords);
TryInitializeFurnace(state, server.Scheduler, world, coords, server.ItemRepository);
}
public override void BlockMined(BlockDescriptor descriptor, BlockFace face, IWorld world, IRemoteClient user)
{
var entity = world.GetTileEntity(descriptor.Coordinates);

View File

@ -21,6 +21,7 @@ using System.Threading.Tasks;
using System.Diagnostics;
using System.Collections.Concurrent;
using TrueCraft.Profiling;
using TrueCraft.Core.Logic.Blocks;
namespace TrueCraft
{
@ -224,6 +225,7 @@ namespace TrueCraft
void ScheduleUpdatesForChunk(IWorld world, IChunk chunk)
{
chunk.UpdateHeightMap();
int _x = chunk.Coordinates.X * Chunk.Width;
int _z = chunk.Coordinates.Z * Chunk.Depth;
Coordinates3D coords, _coords;