Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.14.4] Worldgen issues


Crack3dC0d3
 Share

Recommended Posts

4 minutes ago, Crack3dC0d3 said:

But it didnt spawn. Not at all. Any help?

Huh? Help with what I don't see what I could help with. You've provided no way for me to provide actual assistance.

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.

Link to comment
Share on other sites

Alright, I''m trying to spawn trees in my normal world. I already got the nbt files but i cant seem to fix how the "Feature" class works. (If i'm actually supposed to use that one) heres my code now

 

public class SilverwoodFeature extends Feature<NoFeatureConfig> {
    public SilverwoodFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> configFactoryIn) {
        super(configFactoryIn);
    }

    @Override
    public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> generator, Random random, BlockPos spawnPos, NoFeatureConfig config) {
        ServerWorld worldserver = (ServerWorld) world;
        TemplateManager templatemanager = worldserver.getStructureTemplateManager();
        Template template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/greatwoodtree"));
        int h = ThreadLocalRandom.current().nextInt(0, 7);
        switch(h) {
            case 1: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood1")); break;
            case 2: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood2")); break;
            case 3: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood3")); break;
            case 4: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood4")); break;
            case 5: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood5")); break;
            case 6: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood6")); break;
            case 7: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood7")); break;
        }

        if(random.nextInt(1) != 0 || world.getBiome(spawnPos) != Biomes.PLAINS) {
            return false;
        }

        if(template == null) {
            Constants.LOGGER.error("Could not find structure at " + new ResourceLocation("arcana:structures/trees/greatwood"));
            return false;
        }
        PlacementSettings placementsettings = (new PlacementSettings()).setMirror(Mirror.NONE)
                .setRotation(Rotation.NONE).setIgnoreEntities(false).setChunk(null);

        template.addBlocksToWorld(world, spawnPos.add(-4, 0, -4), placementsettings);
        return true;
    }
Link to comment
Share on other sites

11 hours ago, Crack3dC0d3 said:

.setChunk(null);

You may want to set the chunk to the chunk you are in.You can get it from the IWorld parameter using the BlockPos parameter you were given.

 

11 hours ago, Crack3dC0d3 said:

I already got the nbt files

Where are they located?

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.

Link to comment
Share on other sites

11 hours ago, Animefan8888 said:

Where are they located?


Thats not the problem since saplings work with the same files. But they are located in resources/data/arcana/structures.. Oh wait thats not right


EDIT: It is right, Nevermind. But still, they dont spawn in the world. The saplings do work though

 

 

11 hours ago, Animefan8888 said:

You may want to set the chunk to the chunk you are in.You can get it from the IWorld parameter using the BlockPos parameter you were given.

Tried that, Doesnt change anything.

I got no errors in the console

Edited by Crack3dC0d3
Link to comment
Share on other sites

10 hours ago, Crack3dC0d3 said:

But still, they dont spawn in the world. The saplings do work though

So then are the features getting called? Is the template returning null? Are you adding the feature to a biomes list of features?

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.

Link to comment
Share on other sites

28 minutes ago, Crack3dC0d3 said:

See, I forgot something. How can i do that? 

Biome#addFeature

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.

Link to comment
Share on other sites

21 minutes ago, Crack3dC0d3 said:

Alright thanks, which parameters do i use? i got the first 2 but i dont understand the last 2

Biome#addFeature only has two parameters.

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.

Link to comment
Share on other sites

24 minutes ago, Crack3dC0d3 said:

Sorry, wrong method. I meant Biome#createDecoratedFeature

I'm not sure to be honest look for where the trees are added in vanilla.

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.

Link to comment
Share on other sites

  • 9 months later...
3 minutes ago, hohserg said:

Did anyone found how to port IWorldGenerator to Feature? I still wander in the dark. Help plz

Please start a new thread for your issue instead of posting in a nearly year old one, you'll get a better response :)

 

Also, include a description of what you are trying to do (from the gameplay standpoint; not HOW you want to do it), what you have tried (code is good, a github repo link is best), and logs (debug.log posted as a github gist is best)

Doing these things will ensure you get the best possible response. An incomplete post is an invitation to just have it skipped over!! ?

Edited by Ugdhar
  • Like 1
Link to comment
Share on other sites

2 hours ago, hohserg said:

Did anyone found how to port IWorldGenerator to Feature? I still wander in the dark. Help plz

TLDR: you don't. You rewrite it from scratch.

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.

Link to comment
Share on other sites

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
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Really old Minecraft versions are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • Forge's custom networking is built on the custom payload packet. You can either use a SimpleChannel (which uses a byte-indexed codec, so you have to handle that on the bukkit side, too) or you can use an EventChannel, which just gives you access to the raw payload packet data. There isn't anything special you need to do to make the two talk to each other. It just works, because both use the same network packet.
    • [16:08:43] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292] at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70) [forge.jar:?] at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34) [forge.jar:?] Caused by: java.lang.VerifyError: Operand stack overflow Exception Details: Location: net/minecraft/entity/EntityLivingBase.func_70088_a()V @7: aload_0 Reason: Exceeded max stack size. Current Frame: bci: @7 flags: { } locals: { 'net/minecraft/entity/EntityLivingBase' } stack: { 'net/minecraftforge/fml/common/eventhandler/EventBus', uninitialized 3, uninitialized 3 } Bytecode: 0x0000000: b201 09bb 010b 592a b701 0cb6 0112 572a 0x0000010: b401 16b2 0118 03b8 011e b601 242a b401 0x0000020: 16b2 0126 03b8 012b b601 242a b401 16b2 0x0000030: 012d 03b8 0132 b601 242a b401 16b2 0134 0x0000040: 03b8 012b b601 242a b401 16b2 0136 0cb8 0x0000050: 013b b601 24b1 at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_292] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_292] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_292] at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_292] at net.minecraft.entity.EntityList.func_191303_a(EntityList.java:410) ~[vi.class:?] at net.minecraft.entity.EntityList.func_151514_a(EntityList.java:280) ~[vi.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:505) ~[ni.class:?] at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1470) ~[MinecraftServer.class:?] ... 12 more
    • 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.