本文整理匯總了Java中net.minecraftforge.event.terraingen.InitNoiseGensEvent類的典型用法代碼示例。如果您正苦於以下問題:Java InitNoiseGensEvent類的具體用法?Java InitNoiseGensEvent怎麽用?Java InitNoiseGensEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
InitNoiseGensEvent類屬於net.minecraftforge.event.terraingen包,在下文中一共展示了InitNoiseGensEvent類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: injectNoiseSmoothers
import net.minecraftforge.event.terraingen.InitNoiseGensEvent; //導入依賴的package包/類
@SubscribeEvent
public void injectNoiseSmoothers(InitNoiseGensEvent event) {
// Create a flat arena around colossi.
if (!genOnWorld(event.world)) return;
int[] target_noises = new int[] { 0, 1, 2, 5 };
int max = target_noises[0];
for (int i : target_noises) max = Math.max(max, i);
if (event.newNoiseGens == null || max >= event.newNoiseGens.length) {
Core.logWarning("Colossi will not generate in dimension: " + event.world.provider.getDimensionId());
dimensionBlacklist.put(event.world.provider.getDimensionId(), (byte) 1);
return;
}
for (int noise_index : target_noises) {
NoiseGenerator parentGenerator = event.newNoiseGens[noise_index];
event.newNoiseGens[noise_index] = new SmoothNoiseNearColossi(noise_index, (NoiseGeneratorOctaves) parentGenerator);
}
}
示例2: onInitNoiseGensEvent
import net.minecraftforge.event.terraingen.InitNoiseGensEvent; //導入依賴的package包/類
@SubscribeEvent
@SuppressWarnings("unused")
public void onInitNoiseGensEvent(InitNoiseGensEvent event){
}
示例3: onEvent
import net.minecraftforge.event.terraingen.InitNoiseGensEvent; //導入依賴的package包/類
@SubscribeEvent
public void onEvent(InitNoiseGensEvent event) {
WorldGenUtil.transformNoiseGenerators(event.originalNoiseGens, event.newNoiseGens, event.world);
}