@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider)
{
if (dimList.contains(world.provider.getDimension()) == dimListMode)
{
if (random.nextFloat() <= chance)
{
int x = chunkX * 16 + 16;
int z = chunkZ * 16 + 16;
BlockPos pos = new BlockPos(x, world.getHeight(x, z) - 1, z);
if (pos.getY() >= minY && pos.getY() <= maxY)
{
try
{
NBTTagCompound tag = StructureApi.INSTANCE.getStructureNbt(Utils.gRL("lab_medium"));
PurMag.INSTANCE.debug("WG START [lab_medium]");
StructureApi.INSTANCE.spawnStructure(tag, pos, null, Rotation.values()[random.nextInt(Rotation.values().length)], (WorldServer) world, random);
PurMag.INSTANCE.debug("WG END AT " + pos);
}
catch (IOException e)
{
PurMag.INSTANCE.log.error("An IOException occurred when spawning the small lab structure!", e);
}
}
}
}
}
WGLabMedium.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:PurificatiMagicae
作者:
评论列表
文章目录