Jump to content

Recommended Posts

Posted

Ok, so, I remember BlockPos was changed in 1.9/1.10/1.11, what is it now? What do I need to change here:

 

package com.escapemc.teammadnessmod.world;

import java.util.Random;

import com.escapemc.teammadnessmod.init.TeamMadnessModBlocks;

import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.fml.common.IWorldGenerator;

public class world_gen implements IWorldGenerator {



    public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {   
    switch (world.provider.getDimension()) {
    case 0: //Overworld
        this.runGenerator(this.gen_escapemc_ore, world, random, chunkX, chunkZ, 8, 0, 64);
        this.runGenerator(this.gen_mushrromstew_ore, world, random, chunkX, chunkZ, 8, 0, 64);
        this.runGenerator(this.gen_epicbudder22_ore, world, random, chunkX, chunkZ, 8, 0, 64);
        this.runGenerator(this.gen_jonahjoe2002_ore, world, random, chunkX, chunkZ, 8, 0, 64);
        this.runGenerator(this.gen_ms, world, random, chunkX, chunkZ, 6, 0, 40);
        this.runGenerator(this.gen_madness_ore, world, random, chunkX, chunkZ, 6, 0, 64);
        
        break;
    case -1: //Nether

        break;
    case 1: //End

        break;
    	}
    }
    private WorldGenerator gen_escapemc_ore;
    private WorldGenerator gen_mushrromstew_ore;
    private WorldGenerator gen_epicbudder22_ore;
    private WorldGenerator gen_jonahjoe2002_ore;
    private WorldGenerator gen_ms;
    private WorldGenerator gen_madness_ore;


    public world_gen() {
        this.gen_escapemc_ore = new WorldGenMinable(TeamMadnessModBlocks.escapemc_ore.getDefaultState(), ;
        this.gen_mushrromstew_ore = new WorldGenMinable(TeamMadnessModBlocks.mushrromstew_ore.getDefaultState(), ;
        this.gen_epicbudder22_ore = new WorldGenMinable(TeamMadnessModBlocks.epicbudder22_ore.getDefaultState(), ;
        this.gen_jonahjoe2002_ore = new WorldGenMinable(TeamMadnessModBlocks.jonahjoe2002_ore.getDefaultState(), ;
        this.gen_ms = new WorldGenMinable(TeamMadnessModBlocks.ms.getDefaultState(), 4);
        this.gen_madness_ore = new WorldGenMinable(TeamMadnessModBlocks.madness_ore.getDefaultState(), 4);

    }

    private void runGenerator(WorldGenerator generator, World world, Random rand, int chunk_X, int chunk_Z, int chancesToSpawn, int minHeight, int maxHeight) {
        if (minHeight < 0 || maxHeight > 256 || minHeight > maxHeight)
            throw new IllegalArgumentException("Illegal Height Arguments for WorldGenerator");

        int heightDiff = maxHeight - minHeight + 1;
        for (int i = 0; i < chancesToSpawn; i ++) {
            int x = chunk_X * 16 + rand.nextInt(16);
            int y = minHeight + rand.nextInt(heightDiff);
            int z = chunk_Z * 16 + rand.nextInt(16);
            generator.generate(world, rand, new BlockPos(x, y, z));
        }
    }

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
		IChunkProvider chunkProvider) {
	// TODO Auto-generated method stub

}
}

 

Thanks!

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Posted

Um, I was asking about BlockPos, I was going to change anything else I needed to later...

 

What has BlockPos been changed to?

 

Can I have an answer for that, please?

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Posted

I swear they changed BlockPos to that thing that uses the X, Y, and Z axis at the same time...

What is the name of that?

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Posted

So it ended up actually being BlockPos... well! Alright then...

 

I've fixed my world_gen diesieben07 by the way. I knew what I had to do.

 

If you could lock this thread too please.

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Posted

I can? How?

                      |

                      |

Is it by saying \/ or something?

/Locked

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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