Sure. This is the function. Upon testing, nothing happens, the System.out.println() doesn't even print. I have tested this by killing the Dragon. Each time a new end gateway is spawned, but nothing shows up in the console (and yes, I know Systmem.out.println() isn't the proper way to log, it's only temporary, and works with IDEA).
Function:
@SubscribeEvent
public static void onChunkPopulate(PopulateChunkEvent.Post event)
{
System.out.println("End chunk population event");
if (!event.getWorld().isRemote && event.getGen() instanceof ChunkGeneratorEnd)
{
World world = event.getWorld();
ChunkGeneratorEnd generator = (ChunkGeneratorEnd) event.getGen();
int chunkX = event.getChunkX(), chunkZ = event.getChunkZ();
for (int x = 0; x < 16; x++)
{
for (int y = 8; y < 128; y++)
{
for (int z = 0; z < 16; z++)
{
if (world.getChunkFromChunkCoords(chunkX, chunkZ).getBlockState(new BlockPos(x, y, z)).getBlock() == Blocks.END_GATEWAY)
{
System.out.println("Located gateway! Chunk X: " + chunkX + ", Chunk Z: " + chunkZ + ", Block X: " + x + ", Block Y: " + y + ", Block Z: " + z);
}
}
}
}
}
}
Registration (during FMLInitializationEvent?
MinecraftForge.EVENT_BUS.register(new VppChunkGeneratorEnd());