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

    • Hello. I decided to try to make a mod, but for some reason I stumbled at the very beginning. How do I register a block for it to appear in the inventory? It seems that I'm trying to do it according to the manual, but only the procedure for registering new blocks is described there. So I made a mod class. I registered the registration, but when I install it into the game, I do not see my block in the intent. And I will also be grateful if you give a link to some kind of detailed manual. So that step by step it was described how what can be created. Thanks.   @Mod("examplemod") public class ExampleMod { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); private static final String MODID = "0.1"; private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID); public static final RegistryObject<Block> MyBlock = BLOCKS.register("mysuperblockreg", () -> new SuperBlock(BlockBehaviour.Properties.of(Material.WOOD).lightLevel((s) -> { return 1; }).sound(SoundType.WOOD))); public ExampleMod() { // Register the setup method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the enqueueIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); // Register the processIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) { // some preinit code LOGGER.info("HELLO FROM PREINIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } private void enqueueIMC(final InterModEnqueueEvent event) { // some example code to dispatch IMC to another mod InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world"; }); } private void processIMC(final InterModProcessEvent event) { // some example code to receive and process InterModComms from other mods LOGGER.info("Got IMC {}", event.getIMCStream().map(m -> m.messageSupplier().get()).collect(Collectors.toList())); } // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent public void onServerStarting(FMLServerStartingEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); } // You can use EventBusSubscriber to automatically subscribe events on the // contained class (this is subscribing to the MOD // Event bus for receiving Registry Events) @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { // register a new block here LOGGER.info("HELLO from Register Block"); } } }  
    • I'm probably really stupid but how do I fix this error. It happens whenever I try to startup Minecraft forge 1.8.9 recommended [19:13:10 ERROR]: Gave up trying to download https://maven.minecraftforge.net/jline/jline/2.13/jline-2.13.jar for job 'Version & Libraries' [19:13:10 ERROR]: Job 'Version & Libraries' finished with 1 failure(s)! (took 0:00:13.982)   How do I fix this?
    • Override attackEntityFrom and do checks there, for example DamageSource#isProjectile. Or check how Enderman does it.
    • Hey, I just started modding, and especially texturing, so I'm still new to all of this. I thought a fun thing to do would be to turn the world to glass (turn blocks such as grass and stone and ores etc..) to have the grass texture, so the world would be glass. Seemed kinda fun. So I just copy-pasted the glass texture into my pack, renamed it to stone, and ran into a problem. It is rendering the glass texture, but is not transparent. Its just grey on the inside, with the glass textures on the side. I am completely lost as of what to do. Does anyone have a solution ? thank you
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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