Jump to content

Recommended Posts

Posted

Hi everyone, I am making a mod to add a basic sky dimension, using only forge. Could someone walk me through from scratch how to start? I could never find a decent explanation, documentation, or tutorial.

Posted

I looked. I would love one on there too....

But I don't really know how to do it in the first place :P

I will add a tutorial on how to use METADATA blocks to have many blocks under one ID while still using Forge's Infinite Sprites.

Posted
  On 7/7/2012 at 3:09 AM, Rashed said:

I will add a tutorial on how to use METADATA blocks to have many blocks under one ID while still using Forge's Infinite Sprites.

Meh, no real point anymore honestly, unless you are dynamically creating things like RP2's microblocks, we have 4096 IDs now.  And if we are lucky then 1.3 or 1.4 will drop metadata (wishful thinking anyway).

Posted
  On 7/7/2012 at 12:18 AM, OvermindDL1 said:

We have no tutorials for that yet, but we would love one placed on the wiki!  (*hint*hint*)

 

i made a tutorial on minecraft forum, but when i went to put it on here, they'd deleted my topic for no reason :S

Posted

Could you rewrite it? That would be awesome. I am arguing with my friend over whether or not to use the Dimension API, but I want to stay all-forge.  ;D

Posted

Haha that friend would be me.

The Dimensions API is horribly outdated as the last Forge it worked with was 1.4...

However it's coded for Minecraft 1.2.5 so that would make it easier to make it work with the latest Forge :)

Posted

dimensions with forge are very easy.

 

post what you currently have and ill help you out with the rest (i believe you sent me a message on MinecragtForums aswell ;)

Posted

right, well firstly look in the dimension manager class, if you know how to code, you should be able to understand what to do by looking in there

Posted

 

  Reveal hidden contents

 

 

 

 

Edit:

 

I think the WorldProvider was not what causes the Problem.Now I think it was the ChunkProvider. I've changed a few thinks and now I get this Error:

 

2 mods loaded
Minecraft Forge 3.3.7.135
FML vnull.null.null.null
Forge Mod Loader version null.null.null.null for Minecraft null
mod_dim : Available (src)
mod_MinecraftForge : Available (src)


      Minecraft has crashed!      
      ----------------------      

Minecraft has stopped running because it encountered a problem.




--- BEGIN ERROR REPORT 699fbf70 --------
Generated 13.07.12 09:25

Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_05, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GT 130M/PCI/SSE2 version 3.3.0, NVIDIA Corporation

java.lang.NullPointerException
at net.minecraft.src.PlayerControllerSP.onPlayerDestroyBlock(PlayerControllerSP.java:49)
at net.minecraft.src.PlayerControllerSP.clickBlock(PlayerControllerSP.java:87)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1351)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1795)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:822)
at net.minecraft.client.Minecraft.run(Minecraft.java:750)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT fa404cdf ----------

 

The ChunkProvider now looks like this:

 

package net.minecraft.src;

import java.util.List;
import java.util.Random;

public class ChunkProviderLEO implements IChunkProvider {

    private World worldObj;
    private Random random;
    private final boolean useStructures;
    private MapGenVillage villageGen = new MapGenVillage(1);


    public ChunkProviderLEO(World par1World, long par2, boolean par4)
    {
        this.worldObj = par1World;
        this.useStructures = par4;
        this.random = new Random(par2);
    }

    private void generate(byte[] par1ArrayOfByte)
    {
        int var2 = par1ArrayOfByte.length / 256;

        for (int var3 = 0; var3 < 16; ++var3)
        {
            for (int var4 = 0; var4 < 16; ++var4)
            {
                for (int var5 = 0; var5 < var2; ++var5)
                {
                    int var6 = 0;

                    if (var5 == 0)
                    {
                        var6 = Block.bedrock.blockID;
                    }
                    else if (var5 <= 2)
                    {
                        var6 = Block.dirt.blockID;
                    }
                    else if (var5 == 3)
                    {
                        var6 = Block.grass.blockID;
                    }

                    par1ArrayOfByte[var3 << 11 | var4 << 7 | var5] = (byte)var6;
                }
            }
        }
    }


    public Chunk loadChunk(int par1, int par2)
    {
        return this.provideChunk(par1, par2);
    }

    public Chunk provideChunk(int par1, int par2)
    {
        byte[] var3 = new byte[32768];
        this.generate(var3);
        Chunk var4 = new Chunk(this.worldObj, var3, par1, par2);

        BiomeGenBase[] var5 = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, par1 * 16, par2 * 16, 16, 16);
        byte[] var6 = var4.getBiomeArray();

        for (int var7 = 0; var7 < var6.length; ++var7)
        {
            var6[var7] = (byte)var5[var7].biomeID;
        }

        var4.generateSkylightMap();
        return var4;
    }

    public boolean chunkExists(int par1, int par2)
    {
        return true;
    }

    public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
    {
        this.random.setSeed(this.worldObj.getSeed());
        long var4 = this.random.nextLong() / 2L * 2L + 1L;
        long var6 = this.random.nextLong() / 2L * 2L + 1L;
        this.random.setSeed((long)par2 * var4 + (long)par3 * var6 ^ this.worldObj.getSeed());

    }

    public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
    {
        return true;
    }


    public boolean unload100OldestChunks()
    {
        return false;
    }

    public boolean canSave()
    {
        return true;
    }

    public String makeString()
    {
        return "LEOLevelSource";
    }


    public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
    {
        //BiomeGenBase var5 = this.worldObj.getBiomeGenForCoords(par2, par4);
        //return var5 == null ? null : var5.getSpawnableList(par1EnumCreatureType);
    	return null;
    }


    public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)
    {
        return null;
    }

}

 

When I reenter the save I spawn in some Blocks, so I die after a few seconds. When I respawn I spawn so high over the ground, that I die by the falldamage.

I think the Problem now is the Teleporter, but I can't find what causes the Problem, so could someone please help me? For the Teleporter´s Code look in the Spoiler above.

 

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.