net.minecraft.world.ChunkRegion Java Examples

The following examples show how to use net.minecraft.world.ChunkRegion. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HallowedChunkGenerator.java    From the-hallow with MIT License 5 votes vote down vote up
@Override
public void populateEntities(ChunkRegion region) {
	int centreX = region.getCenterChunkX();
	int centreZ = region.getCenterChunkZ();
	Biome biome = region.getBiome((new ChunkPos(centreX, centreZ)).getCenterBlockPos());
	ChunkRandom chunkRandom = new ChunkRandom();
	chunkRandom.setSeed(region.getSeed(), centreX << 4, centreZ << 4);
	SpawnHelper.populateEntities(region, biome, centreX, centreZ, chunkRandom);
}
 
Example #2
Source File: ChunkGeneratorMixin.java    From carpet-extra with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Inject(method = "generateFeatures", at = @At("HEAD"))
private void onGenerateFeaturesStart(ChunkRegion chunkRegion_1, CallbackInfo ci)
{
    if (CarpetExtraSettings.dragonEggBedrockBreaking)
        DragonEggBedrockBreaking.fallInstantly = true;
}
 
Example #3
Source File: ChunkGeneratorMixin.java    From carpet-extra with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Inject(method = "generateFeatures", at = @At("TAIL"))
private void onGenerateFeaturesEnd(ChunkRegion chunkRegion_1, CallbackInfo ci)
{
    if (CarpetExtraSettings.dragonEggBedrockBreaking)
        DragonEggBedrockBreaking.fallInstantly = false;
}