Reinitialize furnaces when loaded from disk
This commit is contained in:
parent
98b15c3434
commit
d4ccb22e4f
@ -144,6 +144,12 @@ namespace TrueCraft.Core.Logic.Blocks
|
|||||||
UpdateWindows(coords, state);
|
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)
|
public override void BlockMined(BlockDescriptor descriptor, BlockFace face, IWorld world, IRemoteClient user)
|
||||||
{
|
{
|
||||||
var entity = world.GetTileEntity(descriptor.Coordinates);
|
var entity = world.GetTileEntity(descriptor.Coordinates);
|
||||||
|
@ -21,6 +21,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using TrueCraft.Profiling;
|
using TrueCraft.Profiling;
|
||||||
|
using TrueCraft.Core.Logic.Blocks;
|
||||||
|
|
||||||
namespace TrueCraft
|
namespace TrueCraft
|
||||||
{
|
{
|
||||||
@ -224,6 +225,7 @@ namespace TrueCraft
|
|||||||
|
|
||||||
void ScheduleUpdatesForChunk(IWorld world, IChunk chunk)
|
void ScheduleUpdatesForChunk(IWorld world, IChunk chunk)
|
||||||
{
|
{
|
||||||
|
chunk.UpdateHeightMap();
|
||||||
int _x = chunk.Coordinates.X * Chunk.Width;
|
int _x = chunk.Coordinates.X * Chunk.Width;
|
||||||
int _z = chunk.Coordinates.Z * Chunk.Depth;
|
int _z = chunk.Coordinates.Z * Chunk.Depth;
|
||||||
Coordinates3D coords, _coords;
|
Coordinates3D coords, _coords;
|
||||||
|
Reference in New Issue
Block a user