Jump to content

Request Modder assistance (figuring out mutliple biomes in dimension & liquid)


OwnAgePau

Recommended Posts

Hello there,

 

I am still stuck with this biomes in dimension and i know that creating another post for the same item is not that usefull, but i also have a few points where i simple got stuck... I always try to figure stuff out myself, but this Biome thing has kept me busy for over 2 weeks now and it's still not working. I hope that someone knows how to do this. I have created a bunch of classes like WorldTypeEvent, BiomeCache, GenLayer, WorldChunkManager etc etc, and yet not working still.

 

The 2e thing i got stuck at is the custom liquid i am creating i made 2 classes for each still and stationary water and also one called SoulFluid which is basically my custom BlockFluid. this is what i got in my mod_* class:

 

before @Init

	public static SoulFluid SoulWaterMoving;
	public static Block SoulWater;

inside @Init
{
			SoulWaterMoving = (SoulFluid)(new SoulWaterFlowing(232));
			ModLoader.registerBlock(SoulWaterMoving);		// Id must be under 256
			ModLoader.addName(SoulWaterMoving,"Flowing Soulwater");

		    SoulWater = (new SoulWaterStationary(233));  // I have heard that the Stationary water should always be one higher then flowing so that you don't have to change the method that -- id.
		    ModLoader.registerBlock(SoulWater);		// Id must be under 256
			ModLoader.addName(SoulWater,"Stationary Soulwater");
}

 

This is my SoulFluid:

 

 

package Mod_Ores.Blocks.Special;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFluid;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import Mod_Ores.SoulForestMaterials;
import Mod_Ores.mod_Ores;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public abstract class SoulFluid extends Block
{
    @SideOnly(Side.CLIENT)
    protected Icon[] theIcon;

    protected SoulFluid(int par1, Material par2Material)
    {
        super(par1, par2Material);
        float f = 0.0F;
        float f1 = 0.0F;
        this.setBlockBounds(0.0F + f1, 0.0F + f, 0.0F + f1, 1.0F + f1, 1.0F + f, 1.0F + f1);
        this.setTickRandomly(true);
    }

    public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        return this.blockMaterial != SoulForestMaterials.soulWater;
    }

    @SideOnly(Side.CLIENT)
    public int getBlockColor()
    {
        return 16777215;
    }

    @SideOnly(Side.CLIENT)

    /**
     * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
     * when first determining what to render.
     */
    public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        if (this.blockMaterial != SoulForestMaterials.soulWater)
        {
            return 16777215;
        }
        else
        {
            int l = 0;
            int i1 = 0;
            int j1 = 0;

            for (int k1 = -1; k1 <= 1; ++k1)
            {
                for (int l1 = -1; l1 <= 1; ++l1)
                {
                    int i2 = par1IBlockAccess.getBiomeGenForCoords(par2 + l1, par4 + k1).getWaterColorMultiplier();
                    l += (i2 & 16711680) >> 16;
                    i1 += (i2 & 65280) >> 8;
                    j1 += i2 & 255;
                }
            }

            return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255;
        }
    }

    /**
     * Returns the percentage of the fluid block that is air, based on the given flow decay of the fluid.
     */
    public static float getFluidHeightPercent(int par0)
    {
        if (par0 >= 
        {
            par0 = 0;
        }

        return (float)(par0 + 1) / 9.0F;
    }

    @SideOnly(Side.CLIENT)

    /**
     * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
     */
    public Icon getIcon(int par1, int par2)
    {
        return par1 != 0 && par1 != 1 ? this.theIcon[1] : this.theIcon[0];
    }

    /**
     * Returns the amount of fluid decay at the coordinates, or -1 if the block at the coordinates is not the same
     * material as the fluid.
     */
    protected int getFlowDecay(World par1World, int par2, int par3, int par4)
    {
        return par1World.getBlockMaterial(par2, par3, par4) == this.blockMaterial ? par1World.getBlockMetadata(par2, par3, par4) : -1;
    }

    /**
     * Returns the flow decay but converts values indicating falling liquid (values >= to their effective source block
     * value of zero.
     */
    protected int getEffectiveFlowDecay(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        if (par1IBlockAccess.getBlockMaterial(par2, par3, par4) != this.blockMaterial)
        {
            return -1;
        }
        else
        {
            int l = par1IBlockAccess.getBlockMetadata(par2, par3, par4);

            if (l >= 
            {
                l = 0;
            }

            return l;
        }
    }

    /**
     * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
     */
    public boolean renderAsNormalBlock()
    {
        return false;
    }

    /**
     * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
     * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
     */
    public boolean isOpaqueCube()
    {
        return false;
    }

    /**
     * Returns whether this block is collideable based on the arguments passed in Args: blockMetaData, unknownFlag
     */
    public boolean canCollideCheck(int par1, boolean par2)
    {
        return par2 && par1 == 0;
    }

    /**
     * Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the
     * adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
     */
    public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        Material material = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
        return material == this.blockMaterial ? false : (par5 == 1 ? true : (material == Material.ice ? false : super.isBlockSolid(par1IBlockAccess, par2, par3, par4, par5)));
    }

    @SideOnly(Side.CLIENT)

    /**
     * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
     * coordinates.  Args: blockAccess, x, y, z, side
     */
    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        Material material = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
        return material == this.blockMaterial ? false : (par5 == 1 ? true : (material == Material.ice ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5)));
    }

    /**
     * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
     * cleared to be reused)
     */
    public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
    {
        return null;
    }

    /**
     * The type of render function that is called for this block
     */
    public int getRenderType()
    {
        return 4;
    }

    /**
     * Returns the ID of the items to drop on destruction.
     */
    public int idDropped(int par1, Random par2Random, int par3)
    {
        return 0;
    }

    /**
     * Returns the quantity of items to drop on block destruction.
     */
    public int quantityDropped(Random par1Random)
    {
        return 0;
    }

    /**
     * Returns a vector indicating the direction and intensity of fluid flow.
     */
    public Vec3 getFlowVector(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        Vec3 vec3 = par1IBlockAccess.getWorldVec3Pool().getVecFromPool(0.0D, 0.0D, 0.0D);
        int l = this.getEffectiveFlowDecay(par1IBlockAccess, par2, par3, par4);

        for (int i1 = 0; i1 < 4; ++i1)
        {
            int j1 = par2;
            int k1 = par4;

            if (i1 == 0)
            {
                j1 = par2 - 1;
            }

            if (i1 == 1)
            {
                k1 = par4 - 1;
            }

            if (i1 == 2)
            {
                ++j1;
            }

            if (i1 == 3)
            {
                ++k1;
            }

            int l1 = this.getEffectiveFlowDecay(par1IBlockAccess, j1, par3, k1);
            int i2;

            if (l1 < 0)
            {
                if (!par1IBlockAccess.getBlockMaterial(j1, par3, k1).blocksMovement())
                {
                    l1 = this.getEffectiveFlowDecay(par1IBlockAccess, j1, par3 - 1, k1);

                    if (l1 >= 0)
                    {
                        i2 = l1 - (l - ;
                        vec3 = vec3.addVector((double)((j1 - par2) * i2), (double)((par3 - par3) * i2), (double)((k1 - par4) * i2));
                    }
                }
            }
            else if (l1 >= 0)
            {
                i2 = l1 - l;
                vec3 = vec3.addVector((double)((j1 - par2) * i2), (double)((par3 - par3) * i2), (double)((k1 - par4) * i2));
            }
        }

        if (par1IBlockAccess.getBlockMetadata(par2, par3, par4) >= 
        {
            boolean flag = false;

            if (flag || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 - 1, 2))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 + 1, 3))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3, par4, 4))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3, par4, 5))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 - 1, 2))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 + 1, 3))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3 + 1, par4, 4))
            {
                flag = true;
            }

            if (flag || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3 + 1, par4, 5))
            {
                flag = true;
            }

            if (flag)
            {
                vec3 = vec3.normalize().addVector(0.0D, -6.0D, 0.0D);
            }
        }

        vec3 = vec3.normalize();
        return vec3;
    }

    /**
     * Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, vec3d
     */
    public void velocityToAddToEntity(World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3)
    {
        Vec3 vec31 = this.getFlowVector(par1World, par2, par3, par4);
        par6Vec3.xCoord += vec31.xCoord;
        par6Vec3.yCoord += vec31.yCoord;
        par6Vec3.zCoord += vec31.zCoord;
    }

    /**
     * How many world ticks before ticking
     */
    public int tickRate(World par1World)
    {
        return this.blockMaterial == SoulForestMaterials.soulWater ? 5 : (this.blockMaterial == Material.lava ? (par1World.provider.hasNoSky ? 10 : 30) : 0);
    }

    /**
     * Called whenever the block is added into the world. Args: world, x, y, z
     */
    public void onBlockAdded(World par1World, int par2, int par3, int par4)
    {
        this.checkForHarden(par1World, par2, par3, par4);
    }

    /**
     * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
     * their own) Args: x, y, z, neighbor blockID
     */
    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        this.checkForHarden(par1World, par2, par3, par4);
    }

    @SideOnly(Side.CLIENT)

    /**
     * Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
     */
    public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        int l = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3, par4, 0);
        int i1 = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3 + 1, par4, 0);
        int j1 = l & 255;
        int k1 = i1 & 255;
        int l1 = l >> 16 & 255;
        int i2 = i1 >> 16 & 255;
        return (j1 > k1 ? j1 : k1) | (l1 > i2 ? l1 : i2) << 16;
    }

    @SideOnly(Side.CLIENT)

    /**
     * How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
     */
    public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        float f = par1IBlockAccess.getLightBrightness(par2, par3, par4);
        float f1 = par1IBlockAccess.getLightBrightness(par2, par3 + 1, par4);
        return f > f1 ? f : f1;
    }

    @SideOnly(Side.CLIENT)

    /**
     * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
     */
    public int getRenderBlockPass()
    {
        return this.blockMaterial == SoulForestMaterials.soulWater ? 1 : 0;
    }

    @SideOnly(Side.CLIENT)

    /**
     * A randomly called display update to be able to add particles or other items for display
     */
    public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        int l;

        if (this.blockMaterial == SoulForestMaterials.soulWater)
        {
            if (par5Random.nextInt(10) == 0)
            {
                l = par1World.getBlockMetadata(par2, par3, par4);

                if (l <= 0 || l >= 
                {
                    par1World.spawnParticle("suspended", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + par5Random.nextFloat()), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
                }
            }

            for (l = 0; l < 0; ++l)
            {
                int i1 = par5Random.nextInt(4);
                int j1 = par2;
                int k1 = par4;

                if (i1 == 0)
                {
                    j1 = par2 - 1;
                }

                if (i1 == 1)
                {
                    ++j1;
                }

                if (i1 == 2)
                {
                    k1 = par4 - 1;
                }

                if (i1 == 3)
                {
                    ++k1;
                }

                if (par1World.getBlockMaterial(j1, par3, k1) == Material.air && (par1World.getBlockMaterial(j1, par3 - 1, k1).blocksMovement() || par1World.getBlockMaterial(j1, par3 - 1, k1).isLiquid()))
                {
                    float f = 0.0625F;
                    double d0 = (double)((float)par2 + par5Random.nextFloat());
                    double d1 = (double)((float)par3 + par5Random.nextFloat());
                    double d2 = (double)((float)par4 + par5Random.nextFloat());

                    if (i1 == 0)
                    {
                        d0 = (double)((float)par2 - f);
                    }

                    if (i1 == 1)
                    {
                        d0 = (double)((float)(par2 + 1) + f);
                    }

                    if (i1 == 2)
                    {
                        d2 = (double)((float)par4 - f);
                    }

                    if (i1 == 3)
                    {
                        d2 = (double)((float)(par4 + 1) + f);
                    }

                    double d3 = 0.0D;
                    double d4 = 0.0D;

                    if (i1 == 0)
                    {
                        d3 = (double)(-f);
                    }

                    if (i1 == 1)
                    {
                        d3 = (double)f;
                    }

                    if (i1 == 2)
                    {
                        d4 = (double)(-f);
                    }

                    if (i1 == 3)
                    {
                        d4 = (double)f;
                    }

                    par1World.spawnParticle("splash", d0, d1, d2, d3, 0.0D, d4);
                }
            }
        }

        if (this.blockMaterial ==SoulForestMaterials.soulWater && par5Random.nextInt(64) == 0)
        {
            l = par1World.getBlockMetadata(par2, par3, par4);

            if (l > 0 && l < 
            {
                par1World.playSound((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), "liquid.water", par5Random.nextFloat() * 0.25F + 0.75F, par5Random.nextFloat() * 1.0F + 0.5F, false);
            }
        }

        double d5;
        double d6;
        double d7;

        if (this.blockMaterial == Material.lava && par1World.getBlockMaterial(par2, par3 + 1, par4) == Material.air && !par1World.isBlockOpaqueCube(par2, par3 + 1, par4))
        {
            if (par5Random.nextInt(100) == 0)
            {
                d5 = (double)((float)par2 + par5Random.nextFloat());
                d7 = (double)par3 + this.maxY;
                d6 = (double)((float)par4 + par5Random.nextFloat());
                par1World.spawnParticle("lava", d5, d7, d6, 0.0D, 0.0D, 0.0D);
                par1World.playSound(d5, d7, d6, "liquid.lavapop", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
            }

            if (par5Random.nextInt(200) == 0)
            {
                par1World.playSound((double)par2, (double)par3, (double)par4, "liquid.lava", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
            }
        }

        if (par5Random.nextInt(10) == 0 && par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !par1World.getBlockMaterial(par2, par3 - 2, par4).blocksMovement())
        {
            d5 = (double)((float)par2 + par5Random.nextFloat());
            d7 = (double)par3 - 1.05D;
            d6 = (double)((float)par4 + par5Random.nextFloat());

            if (this.blockMaterial == SoulForestMaterials.soulWater)
            {
                par1World.spawnParticle("dripWater", d5, d7, d6, 0.0D, 0.0D, 0.0D);
            }
            else if(this.blockMaterial == Material.lava)
            {
                par1World.spawnParticle("dripLava", d5, d7, d6, 0.0D, 0.0D, 0.0D);
            }
            else
            {
            	par1World.spawnParticle("dripWater", d5, d7, d6, 0.0D, 0.0D, 0.0D);
            }
        }
    }

    @SideOnly(Side.CLIENT)

    /**
     * the sin and cos of this number determine the surface gradient of the flowing block.
     */
    public static double getFlowDirection(IBlockAccess par0IBlockAccess, int par1, int par2, int par3, Material par4Material)
    {
        Vec3 vec3 = null;

        if (par4Material == SoulForestMaterials.soulWater)
        {
            vec3 = mod_Ores.SoulWaterMoving.getFlowVector(par0IBlockAccess, par1, par2, par3);
        }

        if (par4Material == Material.water)
        {
        	vec3 = Block.waterMoving.getFlowVector(par0IBlockAccess, par1, par2, par3);
        }
        
        if (par4Material == Material.lava)
        {
            vec3 = Block.lavaMoving.getFlowVector(par0IBlockAccess, par1, par2, par3);
        }
        
        return vec3.xCoord == 0.0D && vec3.zCoord == 0.0D ? -1000.0D : Math.atan2(vec3.zCoord, vec3.xCoord) - (Math.PI / 2D);
    }

    /**
     * Forces lava to check to see if it is colliding with water, and then decide what it should harden to.
     */
    private void checkForHarden(World par1World, int par2, int par3, int par4)
    {
        if (par1World.getBlockId(par2, par3, par4) == this.blockID)
        {
            if (this.blockMaterial == Material.lava)
            {
                boolean flag = false;

                if (flag || par1World.getBlockMaterial(par2, par3, par4 - 1) == SoulForestMaterials.soulWater)
                {
                    flag = true;
                }

                if (flag || par1World.getBlockMaterial(par2, par3, par4 + 1) == SoulForestMaterials.soulWater)
                {
                    flag = true;
                }

                if (flag || par1World.getBlockMaterial(par2 - 1, par3, par4) == SoulForestMaterials.soulWater)
                {
                    flag = true;
                }

                if (flag || par1World.getBlockMaterial(par2 + 1, par3, par4) == SoulForestMaterials.soulWater)
                {
                    flag = true;
                }

                if (flag || par1World.getBlockMaterial(par2, par3 + 1, par4) == SoulForestMaterials.soulWater)
                {
                    flag = true;
                }

                if (flag)
                {
                    int l = par1World.getBlockMetadata(par2, par3, par4);

                    if (l == 0)
                    {
                        par1World.setBlock(par2, par3, par4, Block.obsidian.blockID);
                    }
                    else if (l <= 4)
                    {
                        par1World.setBlock(par2, par3, par4, Block.cobblestone.blockID);
                    }

                    this.triggerLavaMixEffects(par1World, par2, par3, par4);
                }
            }
        }
    }

    /**
     * Creates fizzing sound and smoke. Used when lava flows over block or mixes with water.
     */
    protected void triggerLavaMixEffects(World par1World, int par2, int par3, int par4)
    {
        par1World.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F);

        for (int l = 0; l < 8; ++l)
        {
            par1World.spawnParticle("largesmoke", (double)par2 + Math.random(), (double)par3 + 1.2D, (double)par4 + Math.random(), 0.0D, 0.0D, 0.0D);
        }
    }

    @SideOnly(Side.CLIENT)

    /**
     * When this method is called, your block should register all the icons it needs with the given IconRegister. This
     * is the only chance you get to register icons.
     */
    @Override
    public void registerIcons(IconRegister par1IconRegister)
    {
        if (this.blockMaterial == SoulForestMaterials.soulWater)
        {
        	this.theIcon = new Icon[] {par1IconRegister.registerIcon("Soul_Water"), par1IconRegister.registerIcon("Soul_Water_Flow")};
        }
    }

    @SideOnly(Side.CLIENT)
    public static Icon func_94424_b(String par0Str)
    {
        return par0Str == "Soul_Water" ? mod_Ores.SoulWaterMoving.theIcon[0] : 
        	(par0Str == "Soul_Water_Flow" ? mod_Ores.SoulWaterMoving.theIcon[1] : null);
    }
}

 

 

 

SoulWaterFlowing

 

 

package Mod_Ores.Blocks.Special;

import java.util.Random;

import Mod_Ores.SoulForestMaterials;
import Mod_Ores.mod_Ores;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFlowing;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.liquids.ILiquid;

public class SoulWaterFlowing extends SoulFluid
{
    public SoulWaterFlowing(int par1)
    {
        super(par1, SoulForestMaterials.soulWater);
        this.blockHardness = 100F;
        this.setLightOpacity(3);
        this.disableStats();
        this.setCreativeTab(CreativeTabs.tabMisc);
        this.setUnlocalizedName("Soul_Water_Flow");
    }
    
    /**
     * Number of horizontally adjacent liquid source blocks. Diagonal doesn't count. Only source blocks of the same
     * liquid as the block using the field are counted.
     */
    int numAdjacentSources = 0;

    /**
     * Indicates whether the flow direction is optimal. Each array index corresponds to one of the four cardinal
     * directions.
     */
    boolean[] isOptimalFlowDirection = new boolean[4];

    /**
     * The estimated cost to flow in a given direction from the current point. Each array index corresponds to one of
     * the four cardinal directions.
     */
    int[] flowCost = new int[4];

    /**
     * Updates the flow for the BlockFlowing object.
     */
    private void updateFlow(World par1World, int par2, int par3, int par4)
    {
        int l = par1World.getBlockMetadata(par2, par3, par4);
        par1World.setBlock(par2, par3, par4, this.blockID + 1, l, 2);
    }

    public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        return this.blockMaterial != Material.lava;
    }

    /**
     * Ticks the block if it's been scheduled
     */
    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        int l = this.getFlowDecay(par1World, par2, par3, par4);
        byte b0 = 1;

        if (this.blockMaterial == Material.lava && !par1World.provider.isHellWorld)
        {
            b0 = 2;
        }

        boolean flag = true;
        int i1;

        if (l > 0)
        {
            byte b1 = -100;
            this.numAdjacentSources = 0;
            int j1 = this.getSmallestFlowDecay(par1World, par2 - 1, par3, par4, b1);
            j1 = this.getSmallestFlowDecay(par1World, par2 + 1, par3, par4, j1);
            j1 = this.getSmallestFlowDecay(par1World, par2, par3, par4 - 1, j1);
            j1 = this.getSmallestFlowDecay(par1World, par2, par3, par4 + 1, j1);
            i1 = j1 + b0;

            if (i1 >= 8 || j1 < 0)
            {
                i1 = -1;
            }

            if (this.getFlowDecay(par1World, par2, par3 + 1, par4) >= 0)
            {
                int k1 = this.getFlowDecay(par1World, par2, par3 + 1, par4);

                if (k1 >= 
                {
                    i1 = k1;
                }
                else
                {
                    i1 = k1 + 8;
                }
            }

            if (this.numAdjacentSources >= 2 && this.blockMaterial == SoulForestMaterials.soulWater)
            {
                if (par1World.getBlockMaterial(par2, par3 - 1, par4).isSolid())
                {
                    i1 = 0;
                }
                else if (par1World.getBlockMaterial(par2, par3 - 1, par4) == this.blockMaterial && par1World.getBlockMetadata(par2, par3 - 1, par4) == 0)
                {
                    i1 = 0;
                }
            }

            if (this.blockMaterial == Material.lava && l < 8 && i1 < 8 && i1 > l && par5Random.nextInt(4) != 0)
            {
                i1 = l;
                flag = false;
            }

            if (i1 == l)
            {
                if (flag)
                {
                    this.updateFlow(par1World, par2, par3, par4);
                }
            }
            else
            {
                l = i1;

                if (i1 < 0)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    par1World.setBlockMetadataWithNotify(par2, par3, par4, i1, 2);
                    par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World));
                    par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this.blockID);
                }
            }
        }
        else
        {
            this.updateFlow(par1World, par2, par3, par4);
        }

        if (this.liquidCanDisplaceBlock(par1World, par2, par3 - 1, par4))
        {
            if (this.blockMaterial == Material.lava && par1World.getBlockMaterial(par2, par3 - 1, par4) == SoulForestMaterials.soulWater)
            {
                par1World.setBlock(par2, par3 - 1, par4, Block.stone.blockID);
                this.triggerLavaMixEffects(par1World, par2, par3 - 1, par4);
                return;
            }

            if (l >= 
            {
                this.flowIntoBlock(par1World, par2, par3 - 1, par4, l);
            }
            else
            {
                this.flowIntoBlock(par1World, par2, par3 - 1, par4, l + ;
            }
        }
        else if (l >= 0 && (l == 0 || this.blockBlocksFlow(par1World, par2, par3 - 1, par4)))
        {
            boolean[] aboolean = this.getOptimalFlowDirections(par1World, par2, par3, par4);
            i1 = l + b0;

            if (l >= 
            {
                i1 = 1;
            }

            if (i1 >= 
            {
                return;
            }

            if (aboolean[0])
            {
                this.flowIntoBlock(par1World, par2 - 1, par3, par4, i1);
            }

            if (aboolean[1])
            {
                this.flowIntoBlock(par1World, par2 + 1, par3, par4, i1);
            }

            if (aboolean[2])
            {
                this.flowIntoBlock(par1World, par2, par3, par4 - 1, i1);
            }

            if (aboolean[3])
            {
                this.flowIntoBlock(par1World, par2, par3, par4 + 1, i1);
            }
        }
    }

    /**
     * flowIntoBlock(World world, int x, int y, int z, int newFlowDecay) - Flows into the block at the coordinates and
     * changes the block type to the liquid.
     */
    private void flowIntoBlock(World par1World, int par2, int par3, int par4, int par5)
    {
        if (this.liquidCanDisplaceBlock(par1World, par2, par3, par4))
        {
            int i1 = par1World.getBlockId(par2, par3, par4);

            if (i1 > 0)
            {
                if (this.blockMaterial == Material.lava)
                {
                    this.triggerLavaMixEffects(par1World, par2, par3, par4);
                }
                else
                {
                    Block.blocksList[i1].dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
                }
            }

            par1World.setBlock(par2, par3, par4, this.blockID, par5, 3);
        }
    }

    /**
     * calculateFlowCost(World world, int x, int y, int z, int accumulatedCost, int previousDirectionOfFlow) - Used to
     * determine the path of least resistance, this method returns the lowest possible flow cost for the direction of
     * flow indicated. Each necessary horizontal flow adds to the flow cost.
     */
    private int calculateFlowCost(World par1World, int par2, int par3, int par4, int par5, int par6)
    {
        int j1 = 1000;

        for (int k1 = 0; k1 < 4; ++k1)
        {
            if ((k1 != 0 || par6 != 1) && (k1 != 1 || par6 != 0) && (k1 != 2 || par6 != 3) && (k1 != 3 || par6 != 2))
            {
                int l1 = par2;
                int i2 = par4;

                if (k1 == 0)
                {
                    l1 = par2 - 1;
                }

                if (k1 == 1)
                {
                    ++l1;
                }

                if (k1 == 2)
                {
                    i2 = par4 - 1;
                }

                if (k1 == 3)
                {
                    ++i2;
                }

                if (!this.blockBlocksFlow(par1World, l1, par3, i2) && (par1World.getBlockMaterial(l1, par3, i2) != this.blockMaterial || par1World.getBlockMetadata(l1, par3, i2) != 0))
                {
                    if (!this.blockBlocksFlow(par1World, l1, par3 - 1, i2))
                    {
                        return par5;
                    }

                    if (par5 < 4)
                    {
                        int j2 = this.calculateFlowCost(par1World, l1, par3, i2, par5 + 1, k1);

                        if (j2 < j1)
                        {
                            j1 = j2;
                        }
                    }
                }
            }
        }

        return j1;
    }

    /**
     * Returns a boolean array indicating which flow directions are optimal based on each direction's calculated flow
     * cost. Each array index corresponds to one of the four cardinal directions. A value of true indicates the
     * direction is optimal.
     */
    private boolean[] getOptimalFlowDirections(World par1World, int par2, int par3, int par4)
    {
        int l;
        int i1;

        for (l = 0; l < 4; ++l)
        {
            this.flowCost[l] = 1000;
            i1 = par2;
            int j1 = par4;

            if (l == 0)
            {
                i1 = par2 - 1;
            }

            if (l == 1)
            {
                ++i1;
            }

            if (l == 2)
            {
                j1 = par4 - 1;
            }

            if (l == 3)
            {
                ++j1;
            }

            if (!this.blockBlocksFlow(par1World, i1, par3, j1) && (par1World.getBlockMaterial(i1, par3, j1) != this.blockMaterial || par1World.getBlockMetadata(i1, par3, j1) != 0))
            {
                if (this.blockBlocksFlow(par1World, i1, par3 - 1, j1))
                {
                    this.flowCost[l] = this.calculateFlowCost(par1World, i1, par3, j1, 1, l);
                }
                else
                {
                    this.flowCost[l] = 0;
                }
            }
        }

        l = this.flowCost[0];

        for (i1 = 1; i1 < 4; ++i1)
        {
            if (this.flowCost[i1] < l)
            {
                l = this.flowCost[i1];
            }
        }

        for (i1 = 0; i1 < 4; ++i1)
        {
            this.isOptimalFlowDirection[i1] = this.flowCost[i1] == l;
        }

        return this.isOptimalFlowDirection;
    }

    /**
     * Returns true if block at coords blocks fluids
     */
    private boolean blockBlocksFlow(World par1World, int par2, int par3, int par4)
    {
        int l = par1World.getBlockId(par2, par3, par4);

        if (l != Block.doorWood.blockID && l != Block.doorIron.blockID && l != Block.signPost.blockID && l != Block.ladder.blockID && l != Block.reed.blockID)
        {
            if (l == 0)
            {
                return false;
            }
            else
            {
                Material material = Block.blocksList[l].blockMaterial;
                return material == Material.portal ? true : material.blocksMovement();
            }
        }
        else
        {
            return true;
        }
    }

    /**
     * getSmallestFlowDecay(World world, intx, int y, int z, int currentSmallestFlowDecay) - Looks up the flow decay at
     * the coordinates given and returns the smaller of this value or the provided currentSmallestFlowDecay. If one
     * value is valid and the other isn't, the valid value will be returned. Valid values are >= 0. Flow decay is the
     * amount that a liquid has dissipated. 0 indicates a source block.
     */
    protected int getSmallestFlowDecay(World par1World, int par2, int par3, int par4, int par5)
    {
        int i1 = this.getFlowDecay(par1World, par2, par3, par4);

        if (i1 < 0)
        {
            return par5;
        }
        else
        {
            if (i1 == 0)
            {
                ++this.numAdjacentSources;
            }

            if (i1 >= 
            {
                i1 = 0;
            }

            return par5 >= 0 && i1 >= par5 ? par5 : i1;
        }
    }

    /**
     * Returns true if the block at the coordinates can be displaced by the liquid.
     */
    private boolean liquidCanDisplaceBlock(World par1World, int par2, int par3, int par4)
    {
        Material material = par1World.getBlockMaterial(par2, par3, par4);
        return material == this.blockMaterial ? false : (material == Material.lava ? false : !this.blockBlocksFlow(par1World, par2, par3, par4));
    }

    /**
     * Called whenever the block is added into the world. Args: world, x, y, z
     */
    public void onBlockAdded(World par1World, int par2, int par3, int par4)
    {
        super.onBlockAdded(par1World, par2, par3, par4);

        if (par1World.getBlockId(par2, par3, par4) == this.blockID)
        {
            par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World));
        }
    }

    public boolean func_82506_l()
    {
        return false;
    }

}

 

 

 

And SoulWaterStationary

package Mod_Ores.Blocks.Special;

import java.util.Random;

import Mod_Ores.SoulForestMaterials;
import Mod_Ores.mod_Ores;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFlowing;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.liquids.ILiquid;

public class SoulWaterFlowing extends SoulFluid
{
    public SoulWaterFlowing(int par1)
    {
        super(par1, SoulForestMaterials.soulWater);
        this.blockHardness = 100F;
        this.setLightOpacity(3);
        this.disableStats();
        this.setCreativeTab(CreativeTabs.tabMisc);
        this.setUnlocalizedName("Soul_Water_Flow");
    }
    
    /**
     * Number of horizontally adjacent liquid source blocks. Diagonal doesn't count. Only source blocks of the same
     * liquid as the block using the field are counted.
     */
    int numAdjacentSources = 0;

    /**
     * Indicates whether the flow direction is optimal. Each array index corresponds to one of the four cardinal
     * directions.
     */
    boolean[] isOptimalFlowDirection = new boolean[4];

    /**
     * The estimated cost to flow in a given direction from the current point. Each array index corresponds to one of
     * the four cardinal directions.
     */
    int[] flowCost = new int[4];

    /**
     * Updates the flow for the BlockFlowing object.
     */
    private void updateFlow(World par1World, int par2, int par3, int par4)
    {
        int l = par1World.getBlockMetadata(par2, par3, par4);
        par1World.setBlock(par2, par3, par4, this.blockID + 1, l, 2);
    }

    public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        return this.blockMaterial != Material.lava;
    }

    /**
     * Ticks the block if it's been scheduled
     */
    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        int l = this.getFlowDecay(par1World, par2, par3, par4);
        byte b0 = 1;

        if (this.blockMaterial == Material.lava && !par1World.provider.isHellWorld)
        {
            b0 = 2;
        }

        boolean flag = true;
        int i1;

        if (l > 0)
        {
            byte b1 = -100;
            this.numAdjacentSources = 0;
            int j1 = this.getSmallestFlowDecay(par1World, par2 - 1, par3, par4, b1);
            j1 = this.getSmallestFlowDecay(par1World, par2 + 1, par3, par4, j1);
            j1 = this.getSmallestFlowDecay(par1World, par2, par3, par4 - 1, j1);
            j1 = this.getSmallestFlowDecay(par1World, par2, par3, par4 + 1, j1);
            i1 = j1 + b0;

            if (i1 >= 8 || j1 < 0)
            {
                i1 = -1;
            }

            if (this.getFlowDecay(par1World, par2, par3 + 1, par4) >= 0)
            {
                int k1 = this.getFlowDecay(par1World, par2, par3 + 1, par4);

                if (k1 >= 
                {
                    i1 = k1;
                }
                else
                {
                    i1 = k1 + 8;
                }
            }

            if (this.numAdjacentSources >= 2 && this.blockMaterial == SoulForestMaterials.soulWater)
            {
                if (par1World.getBlockMaterial(par2, par3 - 1, par4).isSolid())
                {
                    i1 = 0;
                }
                else if (par1World.getBlockMaterial(par2, par3 - 1, par4) == this.blockMaterial && par1World.getBlockMetadata(par2, par3 - 1, par4) == 0)
                {
                    i1 = 0;
                }
            }

            if (this.blockMaterial == Material.lava && l < 8 && i1 < 8 && i1 > l && par5Random.nextInt(4) != 0)
            {
                i1 = l;
                flag = false;
            }

            if (i1 == l)
            {
                if (flag)
                {
                    this.updateFlow(par1World, par2, par3, par4);
                }
            }
            else
            {
                l = i1;

                if (i1 < 0)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    par1World.setBlockMetadataWithNotify(par2, par3, par4, i1, 2);
                    par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World));
                    par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this.blockID);
                }
            }
        }
        else
        {
            this.updateFlow(par1World, par2, par3, par4);
        }

        if (this.liquidCanDisplaceBlock(par1World, par2, par3 - 1, par4))
        {
            if (this.blockMaterial == Material.lava && par1World.getBlockMaterial(par2, par3 - 1, par4) == SoulForestMaterials.soulWater)
            {
                par1World.setBlock(par2, par3 - 1, par4, Block.stone.blockID);
                this.triggerLavaMixEffects(par1World, par2, par3 - 1, par4);
                return;
            }

            if (l >= 
            {
                this.flowIntoBlock(par1World, par2, par3 - 1, par4, l);
            }
            else
            {
                this.flowIntoBlock(par1World, par2, par3 - 1, par4, l + ;
            }
        }
        else if (l >= 0 && (l == 0 || this.blockBlocksFlow(par1World, par2, par3 - 1, par4)))
        {
            boolean[] aboolean = this.getOptimalFlowDirections(par1World, par2, par3, par4);
            i1 = l + b0;

            if (l >= 
            {
                i1 = 1;
            }

            if (i1 >= 
            {
                return;
            }

            if (aboolean[0])
            {
                this.flowIntoBlock(par1World, par2 - 1, par3, par4, i1);
            }

            if (aboolean[1])
            {
                this.flowIntoBlock(par1World, par2 + 1, par3, par4, i1);
            }

            if (aboolean[2])
            {
                this.flowIntoBlock(par1World, par2, par3, par4 - 1, i1);
            }

            if (aboolean[3])
            {
                this.flowIntoBlock(par1World, par2, par3, par4 + 1, i1);
            }
        }
    }

    /**
     * flowIntoBlock(World world, int x, int y, int z, int newFlowDecay) - Flows into the block at the coordinates and
     * changes the block type to the liquid.
     */
    private void flowIntoBlock(World par1World, int par2, int par3, int par4, int par5)
    {
        if (this.liquidCanDisplaceBlock(par1World, par2, par3, par4))
        {
            int i1 = par1World.getBlockId(par2, par3, par4);

            if (i1 > 0)
            {
                if (this.blockMaterial == Material.lava)
                {
                    this.triggerLavaMixEffects(par1World, par2, par3, par4);
                }
                else
                {
                    Block.blocksList[i1].dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
                }
            }

            par1World.setBlock(par2, par3, par4, this.blockID, par5, 3);
        }
    }

    /**
     * calculateFlowCost(World world, int x, int y, int z, int accumulatedCost, int previousDirectionOfFlow) - Used to
     * determine the path of least resistance, this method returns the lowest possible flow cost for the direction of
     * flow indicated. Each necessary horizontal flow adds to the flow cost.
     */
    private int calculateFlowCost(World par1World, int par2, int par3, int par4, int par5, int par6)
    {
        int j1 = 1000;

        for (int k1 = 0; k1 < 4; ++k1)
        {
            if ((k1 != 0 || par6 != 1) && (k1 != 1 || par6 != 0) && (k1 != 2 || par6 != 3) && (k1 != 3 || par6 != 2))
            {
                int l1 = par2;
                int i2 = par4;

                if (k1 == 0)
                {
                    l1 = par2 - 1;
                }

                if (k1 == 1)
                {
                    ++l1;
                }

                if (k1 == 2)
                {
                    i2 = par4 - 1;
                }

                if (k1 == 3)
                {
                    ++i2;
                }

                if (!this.blockBlocksFlow(par1World, l1, par3, i2) && (par1World.getBlockMaterial(l1, par3, i2) != this.blockMaterial || par1World.getBlockMetadata(l1, par3, i2) != 0))
                {
                    if (!this.blockBlocksFlow(par1World, l1, par3 - 1, i2))
                    {
                        return par5;
                    }

                    if (par5 < 4)
                    {
                        int j2 = this.calculateFlowCost(par1World, l1, par3, i2, par5 + 1, k1);

                        if (j2 < j1)
                        {
                            j1 = j2;
                        }
                    }
                }
            }
        }

        return j1;
    }

    /**
     * Returns a boolean array indicating which flow directions are optimal based on each direction's calculated flow
     * cost. Each array index corresponds to one of the four cardinal directions. A value of true indicates the
     * direction is optimal.
     */
    private boolean[] getOptimalFlowDirections(World par1World, int par2, int par3, int par4)
    {
        int l;
        int i1;

        for (l = 0; l < 4; ++l)
        {
            this.flowCost[l] = 1000;
            i1 = par2;
            int j1 = par4;

            if (l == 0)
            {
                i1 = par2 - 1;
            }

            if (l == 1)
            {
                ++i1;
            }

            if (l == 2)
            {
                j1 = par4 - 1;
            }

            if (l == 3)
            {
                ++j1;
            }

            if (!this.blockBlocksFlow(par1World, i1, par3, j1) && (par1World.getBlockMaterial(i1, par3, j1) != this.blockMaterial || par1World.getBlockMetadata(i1, par3, j1) != 0))
            {
                if (this.blockBlocksFlow(par1World, i1, par3 - 1, j1))
                {
                    this.flowCost[l] = this.calculateFlowCost(par1World, i1, par3, j1, 1, l);
                }
                else
                {
                    this.flowCost[l] = 0;
                }
            }
        }

        l = this.flowCost[0];

        for (i1 = 1; i1 < 4; ++i1)
        {
            if (this.flowCost[i1] < l)
            {
                l = this.flowCost[i1];
            }
        }

        for (i1 = 0; i1 < 4; ++i1)
        {
            this.isOptimalFlowDirection[i1] = this.flowCost[i1] == l;
        }

        return this.isOptimalFlowDirection;
    }

    /**
     * Returns true if block at coords blocks fluids
     */
    private boolean blockBlocksFlow(World par1World, int par2, int par3, int par4)
    {
        int l = par1World.getBlockId(par2, par3, par4);

        if (l != Block.doorWood.blockID && l != Block.doorIron.blockID && l != Block.signPost.blockID && l != Block.ladder.blockID && l != Block.reed.blockID)
        {
            if (l == 0)
            {
                return false;
            }
            else
            {
                Material material = Block.blocksList[l].blockMaterial;
                return material == Material.portal ? true : material.blocksMovement();
            }
        }
        else
        {
            return true;
        }
    }

    /**
     * getSmallestFlowDecay(World world, intx, int y, int z, int currentSmallestFlowDecay) - Looks up the flow decay at
     * the coordinates given and returns the smaller of this value or the provided currentSmallestFlowDecay. If one
     * value is valid and the other isn't, the valid value will be returned. Valid values are >= 0. Flow decay is the
     * amount that a liquid has dissipated. 0 indicates a source block.
     */
    protected int getSmallestFlowDecay(World par1World, int par2, int par3, int par4, int par5)
    {
        int i1 = this.getFlowDecay(par1World, par2, par3, par4);

        if (i1 < 0)
        {
            return par5;
        }
        else
        {
            if (i1 == 0)
            {
                ++this.numAdjacentSources;
            }

            if (i1 >= 
            {
                i1 = 0;
            }

            return par5 >= 0 && i1 >= par5 ? par5 : i1;
        }
    }

    /**
     * Returns true if the block at the coordinates can be displaced by the liquid.
     */
    private boolean liquidCanDisplaceBlock(World par1World, int par2, int par3, int par4)
    {
        Material material = par1World.getBlockMaterial(par2, par3, par4);
        return material == this.blockMaterial ? false : (material == Material.lava ? false : !this.blockBlocksFlow(par1World, par2, par3, par4));
    }

    /**
     * Called whenever the block is added into the world. Args: world, x, y, z
     */
    public void onBlockAdded(World par1World, int par2, int par3, int par4)
    {
        super.onBlockAdded(par1World, par2, par3, par4);

        if (par1World.getBlockId(par2, par3, par4) == this.blockID)
        {
            par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World));
        }
    }

    public boolean func_82506_l()
    {
        return false;
    }

}

 

This is the error i get when i try to place either of them, it somehow sends me into BlockFluid while i have no clue why it even goes into that class. Am i missing something?? :

 

 

java.lang.NullPointerException

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.block.BlockFluid.getFlowDirection(BlockFluid.java:562)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderBlocks.renderBlockFluids(RenderBlocks.java:3863)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:447)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:226)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1535)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1119)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:991)

2013-05-20 19:53:15 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)

 

 

 

So if theres any one that can help me, please do i would love to get these 2 things fixed especialy the biomes one... that keeps me stuck for so long now. Btw i have been active on this thread for that issue : http://www.minecraftforge.net/forum/index.php/topic,8334.msg43286.html#msg43286

 

Thanks for your time and your effort!

Link to comment
Share on other sites

Two things.

 

1. You shouldn't be using ModLoader methods. They aren't guaranteed to work perfectly with current Forge stuff and are pretty much deprecated.

 

2. You should be subclassing through the BlockFluid inheritance tree instead of trying to roll your own solution for creating a fluid. I think the base Minecraft code treats BlockFluid and its subclasses (BlockFlowing and BlockStationary, + your subclasses of those two) differently than other blocks, so you should go that route. That's how I implemented my custom liquid, and it works fine.

Link to comment
Share on other sites

So you say to fix my fluid i just change my SoulFluid to extend BlockFluid and my custom water to extend the minecraft water and such, but how is my custom water going to know that i want to use SoulFluid and not BlockFluid by just declaring both of the blocks as BlockFluid or is the declaration of mine currently correct?

 

And also when i do that 1 it still crashes, and it doesn't get my textures.

Link to comment
Share on other sites

You are going to have to copy every thing the overworld uses for multiple biomes and then customize it for yourself, that means custom chunkprovider, genlayer, biomecache etc etc everything, it is no easy feat not something someone can just passively suggest on how you accomplish it.

Link to comment
Share on other sites

Jeah thats what i have been trying to do in the last couple of weeks... but i keep getting a NullPointerException in World (getWorldChunkManager) and in my chunkprovider it cannot cast BiomeGenBase into BiomeGenBaseMarona.

Link to comment
Share on other sites

usually the errors will give you the line number of the code that is encountering the problem, can you post the code in World and ChunkProvider that is giving the issue?  Also you may be able to achieve this without creating an entire new BiomeGenBase.  If you have skype you can drop me a line and I will try to work through it with you, my skype name is robustushax.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello. I've been having a problem when launching minecraft forge. It just doesn't open the game, and leaves me with this "(exit code 1)" error. Both regular and optifine versions of minecraft launch just fine, tried both with 1.18.2 and 1.20.1. I can assure that my drivers are updated so that can't be it, and i've tried using Java 17, 18 and 21 to no avail. Even with no mods installed, the thing won't launch. I'll leave the log here, although it's in spanish: https://jmp.sh/s/FPqGBSi30fzKJDt2M1gc My specs are this: Ryzen 3 4100 || Radeon R9 280x || 16gb ram || Windows 10 I'd appreciate any help, thank you in advance.
    • Hey, Me and my friends decided to start up a Server with "a few" mods, the last few days everything went well we used all the items we wanted. Now our Game crashes the moment we touch a Lava Bucket inside our Inventory. It just instantly closes and gives me an "Alc Cleanup"  Crash screen (Using GDLauncher). I honestly dont have a clue how to resolve this error. If anyone could help id really appreciate it, I speak German and Englisch so you can choose whatever you speak more fluently. Thanks in Advance. Plus I dont know how to link my Crash Report help for that would be nice too whoops
    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
  • Topics

×
×
  • Create New...

Important Information

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