Jump to content

Crash when loading nether with custom block


jonathantai9

Recommended Posts

I've been working on a mod that adds a liquid that spawns in the nether, but it crashes when I load the nether.

 

Error (from forge log)

 

java.lang.NoClassDefFoundError: net/minecraft/world/CallableLvl1

at net.minecraft.world.World.func_72821_m(World.java:856)

at net.minecraft.world.World.func_72898_h(World.java:781)

at net.minecraft.world.World.func_72851_f(World.java:735)

at net.minecraft.world.World.func_72832_d(World.java:567)

at moreliquids.core.BlockGlowFlowing.updateFlow(BlockGlowFlowing.java:40)

at moreliquids.core.BlockGlowFlowing.func_71847_b(BlockGlowFlowing.java:79)

at net.minecraft.world.WorldServer.func_82740_a(WorldServer.java:480)

at net.minecraft.world.WorldServer.func_72836_a(WorldServer.java:459)

at moreliquids.core.BlockGlowFlowing.func_71861_g(BlockGlowFlowing.java:242)

at net.minecraft.world.chunk.Chunk.func_76592_a(Chunk.java:762)

at net.minecraft.world.World.func_72832_d(World.java:553)

at moreliquids.core.BlockGlowFlowing.flowIntoBlock(BlockGlowFlowing.java:120)

at moreliquids.core.BlockGlowFlowing.func_71847_b(BlockGlowFlowing.java:99)

at moreliquids.core.WorldGenGlowwater.func_76484_a(WorldGenGlowwater.java:89)

at moreliquids.core.WorldGeneratorLiquid.generateNether(WorldGeneratorLiquid.java:26)

at moreliquids.core.WorldGeneratorLiquid.generate(WorldGeneratorLiquid.java:16)

at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:102)

at net.minecraft.world.gen.ChunkProviderServer.func_73153_a(ChunkProviderServer.java:259)

at net.minecraft.world.chunk.Chunk.func_76624_a(Chunk.java:1249)

at net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:153)

at net.minecraft.world.gen.ChunkProviderServer.func_73154_d(ChunkProviderServer.java:166)

at net.minecraft.world.World.func_72964_e(World.java:522)

at net.minecraft.world.World.func_72798_a(World.java:407)

at net.minecraft.world.Teleporter.func_77184_b(SourceFile:84)

at net.minecraft.world.Teleporter.func_77185_a(SourceFile:49)

at net.minecraft.server.management.ServerConfigurationManager.transferEntityToWorld(ServerConfigurationManager.java:557)

at net.minecraft.server.management.ServerConfigurationManager.transferPlayerToDimension(ServerConfigurationManager.java:482)

at net.minecraft.server.management.ServerConfigurationManager.func_72356_a(ServerConfigurationManager.java:470)

at net.minecraft.entity.player.EntityPlayerMP.func_71027_c(EntityPlayerMP.java:487)

at net.minecraft.entity.Entity.func_70030_z(Entity.java:503)

at net.minecraft.entity.EntityLiving.func_70030_z(EntityLiving.java:582)

at net.minecraft.entity.Entity.func_70071_h_(Entity.java:455)

at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:821)

at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:338)

at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:319)

at net.minecraft.network.NetServerHandler.func_72498_a(NetServerHandler.java:308)

at net.minecraft.network.packet.Packet10Flying.func_73279_a(SourceFile:136)

at net.minecraft.network.MemoryConnection.func_74428_b(MemoryConnection.java:89)

at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:134)

at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:53)

at net.minecraft.server.integrated.IntegratedServerListenThread.func_71747_b(IntegratedServerListenThread.java:109)

at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:674)

at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:570)

at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:127)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:468)

at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)

 

 

My code:

 

package moreliquids.core;

 

import java.util.Random;

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

import cpw.mods.fml.common.IWorldGenerator;

import moreliquids.MoreLiquids;

 

public class WorldGeneratorLiquid implements IWorldGenerator

{

 

@Override

public void generate(Random random, int chunkX, int chunkZ, World world,IChunkProvider chunkGenerator, IChunkProvider chunkProvider)

{

if(world.provider.isHellWorld)

generateNether(world, random, chunkX*16, chunkZ*16);

}

 

private void generateNether(World world, Random random, int i, int j)

{

for(int k1 = 0; k1 < 20; k1++)

{

int l2 = i + random.nextInt(16) + 8;

int i4 = random.nextInt(random.nextInt(96) + 16);

int i5 = j + random.nextInt(16) + 8;

(new WorldGenGlowwater(MoreLiquids.glowMoving.blockID, false)).generate(world, random, l2, i4, i5);

}

}

 

}

 

 

 

package moreliquids.core;

 

import java.util.Random;

import net.minecraft.block.Block;

import net.minecraft.world.*;

import net.minecraft.world.gen.feature.*;

 

public class WorldGenGlowwater extends WorldGenerator

{

    private int hellLavaID;

    private boolean field_94524_b = false;

 

    public WorldGenGlowwater(int par1, boolean par2)

    {

        this.hellLavaID = par1;

        this.field_94524_b = par2;

    }

 

    public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)

    {

        if (par1World.getBlockId(par3, par4 + 1, par5) != Block.netherrack.blockID)

        {

            return false;

        }

        else if (par1World.getBlockId(par3, par4, par5) != 0 && par1World.getBlockId(par3, par4, par5) != Block.netherrack.blockID)

        {

            return false;

        }

        else

        {

            int l = 0;

 

            if (par1World.getBlockId(par3 - 1, par4, par5) == Block.netherrack.blockID)

            {

                ++l;

            }

 

            if (par1World.getBlockId(par3 + 1, par4, par5) == Block.netherrack.blockID)

            {

                ++l;

            }

 

            if (par1World.getBlockId(par3, par4, par5 - 1) == Block.netherrack.blockID)

            {

                ++l;

            }

 

            if (par1World.getBlockId(par3, par4, par5 + 1) == Block.netherrack.blockID)

            {

                ++l;

            }

 

            if (par1World.getBlockId(par3, par4 - 1, par5) == Block.netherrack.blockID)

            {

                ++l;

            }

 

            int i1 = 0;

 

            if (par1World.isAirBlock(par3 - 1, par4, par5))

            {

                ++i1;

            }

 

            if (par1World.isAirBlock(par3 + 1, par4, par5))

            {

                ++i1;

            }

 

            if (par1World.isAirBlock(par3, par4, par5 - 1))

            {

                ++i1;

            }

 

            if (par1World.isAirBlock(par3, par4, par5 + 1))

            {

                ++i1;

            }

 

            if (par1World.isAirBlock(par3, par4 - 1, par5))

            {

                ++i1;

            }

 

            if (!this.field_94524_b && l == 4 && i1 == 1 || l == 5)

            {

                par1World.setBlock(par3, par4, par5, this.hellLavaID, 0, 2);

                par1World.scheduledUpdatesAreImmediate = true;

                Block.blocksList[this.hellLavaID].updateTick(par1World, par3, par4, par5, par2Random);

                par1World.scheduledUpdatesAreImmediate = false;

            }

 

            return true;

        }

    }

}

 

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