Chunk leak patched
Not checking if a chunk existed before we placed a rift block could cause the MC server to generate chunks in unloaded terrain. Bad things commence. Possible world leak canidate.
This commit is contained in:
@@ -48,7 +48,7 @@ public class RiftRegenerator implements IRegularTickReceiver {
|
|||||||
{
|
{
|
||||||
IDimLink link = dimension.getRandomLink();
|
IDimLink link = dimension.getRandomLink();
|
||||||
Point4D source = link.source();
|
Point4D source = link.source();
|
||||||
if (!mod_pocketDim.blockRift.isBlockImmune(world, source.getX(), source.getY(), source.getZ()))
|
if (!mod_pocketDim.blockRift.isBlockImmune(world, source.getX(), source.getY(), source.getZ())&& world.getChunkProvider().chunkExists(source.getX() >> 4, source.getZ() >> 4))
|
||||||
{
|
{
|
||||||
world.setBlock(source.getX(), source.getY(), source.getZ(), properties.RiftBlockID);
|
world.setBlock(source.getX(), source.getY(), source.getZ(), properties.RiftBlockID);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user