Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JacobeTerminator

Members
  • Joined

  • Last visited

  1. But i have an error: public static void generate(final BiomeLoadingEvent event) { for(LakeType type : LakeType.values()) { LiquidsConfig liquidsConfig = new LiquidsConfig(type.getBlock().get().defaultFluidState(), true, 4, 1, ImmutableSet.of(Blocks.STONE)); ConfiguredPlacement<TopSolidRangeConfig> configuredPlacement = Placement.RANGE_BIASED.configured(new TopSolidRangeConfig(type.getMinHeight(), type.getMaxHeight(), type.getMaxHeight())); configuredPlacement.squared(); configuredPlacement.count(60); //lakes provided blockstateconfig ConfiguredFeature<?, ?> fluidFeature = registerLakeFeature(type, liquidsConfig, configuredPlacement); event.getGeneration().addFeature(GenerationStage.Decoration.LAKES, fluidFeature); } for (OreType ore : OreType.values()) { OreFeatureConfig oreFeatureConfig = new OreFeatureConfig( OreFeatureConfig.FillerBlockType.NATURAL_STONE, ore.getBlock().get().defaultBlockState(), ore.getMaxVeinSize()); ConfiguredPlacement<TopSolidRangeConfig> configuredPlacement = Placement.RANGE.configured( new TopSolidRangeConfig(ore.getMinHeight(), ore.getMinHeight(), ore.getMaxHeight())); ConfiguredFeature<?, ?> oreFeature = registerOreFeature(ore, oreFeatureConfig, configuredPlacement); event.getGeneration().addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, oreFeature); } List<Supplier<ConfiguredFeature<?, ?>>> features = event.getGeneration().getFeatures(GenerationStage.Decoration.VEGETAL_DECORATION); features.add(() -> ModFeatures.Configured.BLUE_MUSHROOM); } private static ConfiguredFeature<?, ?> registerOreFeature(OreType ore, OreFeatureConfig oreFeatureConfig, ConfiguredPlacement configuredPlacement) { return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, ore.getBlock().get().getRegistryName(), Feature.ORE.configured(oreFeatureConfig).decorated(configuredPlacement) .squared().count(ore.getMaxVeinSize())); } private static ConfiguredFeature<?, ?> registerLakeFeature(LakeType ore, LiquidsConfig liquidsConfig, ConfiguredPlacement configuredPlacement) { return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, ore.getBlock().get().getRegistryName(), Feature.SPRING.configured(liquidsConfig).decorated(configuredPlacement) .squared().count(ore.getMaxVeinSize())); } PLASMA(Lazy.of(ModFluids.PLASMA), 8, 3, 40); private final Lazy<FlowingFluid> block; private final int maxVeinSize; private final int minHeight; private final int maxHeight; LakeType(Lazy<FlowingFluid> block, int maxVeinSize, int minHeight, int maxHeight) { this.block = block; this.maxVeinSize = maxVeinSize; this.minHeight = minHeight; this.maxHeight = maxHeight; } public Lazy<FlowingFluid> getBlock() { return block; } public int getMaxVeinSize() { return maxVeinSize; } public int getMinHeight() { return minHeight; } public int getMaxHeight() { return maxHeight; } public static LakeType get(Fluid block) { for (LakeType fluid : values()) { if(block == fluid.block) { return fluid; } } return null; } URAN(Lazy.of(ModBlocks.URAN), 8, 3, 40); private final Lazy<Block> block; private final int maxVeinSize; private final int minHeight; private final int maxHeight; OreType(Lazy<Block> block, int maxVeinSize, int minHeight, int maxHeight) { this.block = block; this.maxVeinSize = maxVeinSize; this.minHeight = minHeight; this.maxHeight = maxHeight; } public Lazy<Block> getBlock() { return block; } public int getMaxVeinSize() { return maxVeinSize; } public int getMinHeight() { return minHeight; } public int getMaxHeight() { return maxHeight; } public static OreType get(Block block) { for (OreType ore : values()) { if(block == ore.block) { return ore; } } return null; } And i have this error: [16:01:14 ERROR]: Exception caught during firing event: net.minecraft.crash.ReportedException: Feature placement Index: 7 Listeners: 0: HIGH 1: ASM: class me.shedaniel.architectury.event.forge.EventHandlerImplCommon event(Lnet/minecraftforge/event/TickEvent$PlayerTickEvent;)V 2: NORMAL 3: net.minecraftforge.eventbus.EventBus$$Lambda$2904/0x000000080157e298@36b86623 4: net.minecraftforge.eventbus.EventBus$$Lambda$2904/0x000000080157e298@53bf9fd7 5: net.minecraftforge.eventbus.EventBus$$Lambda$2904/0x000000080157e298@7b0f8db8 6: net.minecraftforge.eventbus.EventBus$$Lambda$2904/0x000000080157e298@67c7818a 7: ASM: class ru.hollowhorizon.metacraft.core.events.ModEventsFactory playerTicketEvent(Lnet/minecraftforge/event/TickEvent$PlayerTickEvent;)V 8: ASM: com.thelivan.wm.worldmanager.RegionHookEventHandler@25dbb4bf onTick(Lnet/minecraftforge/event/TickEvent;)V java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: Feature placement at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159) at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(DelegatedTaskExecutor.java:89) at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(DelegatedTaskExecutor.java:133) at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(DelegatedTaskExecutor.java:101) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: net.minecraft.crash.ReportedException: Feature placement at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$18(ChunkManager.java:541) at com.mojang.datafixers.util.Either$Left.map(Either.java:38) at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$20(ChunkManager.java:528) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ... 11 more Caused by: java.lang.IllegalArgumentException: bound must be positive at java.base/java.util.Random.nextInt(Random.java:322) at net.minecraft.world.gen.placement.RangeBiasedPlacement.func_212852_a_(SourceFile:19) at net.minecraft.world.gen.placement.RangeBiasedPlacement.func_212852_a_(SourceFile:10) at net.minecraft.world.gen.placement.SimplePlacement.func_241857_a(SourceFile:17) at net.minecraft.world.gen.placement.ConfiguredPlacement.func_242876_a(SourceFile:24) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:22) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:14) at net.minecraft.world.gen.feature.ConfiguredFeature.func_242765_a(SourceFile:55) at net.minecraft.world.gen.feature.DecoratedFeature.func_242772_a(SourceFile:23) at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:22) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:14) at net.minecraft.world.gen.feature.ConfiguredFeature.func_242765_a(SourceFile:55) at net.minecraft.world.gen.feature.DecoratedFeature.func_242772_a(SourceFile:23) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104) at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:22) at net.minecraft.world.gen.feature.DecoratedFeature.func_241855_a(SourceFile:14) at net.minecraft.world.gen.feature.ConfiguredFeature.func_242765_a(SourceFile:55) at net.minecraft.world.biome.Biome.func_242427_a(Biome.java:254) at net.minecraft.world.gen.ChunkGenerator.func_230351_a_(ChunkGenerator.java:220) at net.minecraft.world.chunk.ChunkStatus.func_222605_b(ChunkStatus.java:77) at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) at net.minecraft.world.server.ChunkManager.lambda$scheduleChunkGeneration$18(ChunkManager.java:530)
  2. Thanks so much! In my mappings it calls 'SPRING'
  3. Hello! I am trying to genereate carves with my own fluid, bui i confused. @SubscribeEvent public static void generate(final BiomeLoadingEvent event) { for(LakeType type : LakeType.values()) { LiquidsConfig liquidsConfig = new LiquidsConfig(type.getBlock().get().defaultFluidState(), true, 4, 1, ImmutableSet.of(Blocks.STONE)); ConfiguredPlacement<TopSolidRangeConfig> configuredPlacement = Placement.RANGE_BIASED.configured(new TopSolidRangeConfig(type.getMinHeight(), type.getMaxHeight(), type.getMaxHeight())); configuredPlacement.squared(); configuredPlacement.count(60); //lakes provided blockstateconfig ConfiguredFeature<?, ?> fluidFeature = registerLakeFeature(type, liquidsConfig, configuredPlacement); } } private static ConfiguredFeature<?, ?> registerLakeFeature(LakeType ore, BlockStateFeatureConfig blockStateFeatureConfig, ConfiguredPlacement configuredPlacement) { return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, ore.getBlock().get().getRegistryName(), Feature.LAKE.configured(blockStateFeatureConfig).decorated(configuredPlacement) .squared().count(ore.getMaxVeinSize())); } Can you help me, how can i generate caves with my own fluid?
  4. Thank you very much
  5. Thx! Were i can find some information about tags?
  6. Hey! I create a new fluid - "Plasma". I need to make it behave as if I were in the water and hit the space. How can I do this?
  7. Sorry, I've only been learning java for 3 months and recently started learning lambda expressions, could you help me and tell me what's wrong with this code.
  8. Hello! I create a only server-side mod and i have problem with my ide. ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); My IDE tells "Target type of a lambda conversion must be an interface" My imports here: import com.mojang.datafixers.util.Pair; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.ExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.network.FMLNetworkConstants; Minecraft 1.16.5

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.