Jump to content

Recommended Posts

Posted (edited)

So I want to generate an ore inside of my custom stone, generated earlier. How could I add this block to the FillerBlockType?  Currently I am trying to use the FillerBlockType.create() method, but I can't get it to work.

Here is my code:

ConfiguredPlacement elfiumOreConfig = Placement.COUNT_RANGE.func_227446_a_(new CountRangeConfig(10,20,20,10));
            biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES,
                    Feature.ORE.func_225566_b_(
                            new OreFeatureConfig(
                                    OreFeatureConfig.FillerBlockType.create("FillerBlockType","MOSS_STONE",new BlockMatcher(Blocks.DIRT)),
                                    BlockList.elfium_ore.getDefaultState(),
                                    6 //per vein
                            )
                    ).func_227228_a_(elfiumOreConfig)
            );

 

Edited by bajtix
Posted
25 minutes ago, Ugdhar said:

what is "MOSS_STONE"?

It's the name for the enum field. There are no requirements for it.

 

31 minutes ago, bajtix said:

but I can't get it to work.

What does this mean? The code doesn't compile. It doesn't do what you expect? If so what does it do?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

 

9 minutes ago, Animefan8888 said:

What does this mean? The code doesn't compile. It doesn't do what you expect? If so what does it do?

The game crashes as soon as i generate a world. I'm trying to register BlockList.moss_stone as the block the ore should generate in. I don't really understand how to work with net.minecraftforge.common.IExtensibleEnum and I don't know how to add an entry to the enum.

Posted
2 minutes ago, bajtix said:

and I don't know how to add an entry to the enum.

Have you tried looking at the implementations? There's literally one method that IExtensibleEnum dictates that matters and its very obviously named.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
8 hours ago, Draco18s said:

There's literally one method that IExtensibleEnum dictates that matters and its very obviously named.

The function this enum's description highlights is the create() one but i have no idea on what the arguments should be.

 

8 hours ago, Animefan8888 said:

It probably tells us why. Lets have a look shall we?

Here's the crash report

crash-2020-04-07_07.24.09-server.txt

Posted
1 hour ago, diesieben07 said:

Did you read it? It tells you exactly what the issue is.

Yes, I've read them but yesterday i was so tired that for my brain it was jibberish. Anyway, I've checked them today again and I've found the error

Basically, i wrote the arguments in

//Count range config: [Vein count] [Min height] [Min height] [Max height]
            ConfiguredPlacement mossyStoneConfig = Placement.COUNT_RANGE.func_227446_a_(new CountRangeConfig(10, 20, 20, 100));

in the wrong order, forcing the ore to spawn on negative Y.

Thanks to everyone for help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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