Thank you I am dumb. Will keep working on my sludge mod.
good luck
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
Omw thanks, I will change it to work in modlaoder :smile.gif: Not that hard lol... Anyways great tutorial, gonna start now :smile.gif:
What are making with that tut?
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
src\minecraft\net\minecraft\src\BlockFluidBlood.java:275: getFlowVector(net.mine
craft.src.IBlockAccess,int,int,int) has private access in net.minecraft.src.Bloc
kFluid
vec3d = ((BlockFluid)Block.bloodMoving).getFlowVector(iblockaccess, i, j, k);
^
1 error
==================
> Done in 42.87 seconds
> Recompiling server...
> Done in 17.61 seconds
Tryk p en vilkÂrlig tast for at fortsÊtte . . .
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Vec3D, World, Material,
// IBlockAccess, AxisAlignedBB, Entity
public abstract class BlockFluidBlood extends Block
{
protected BlockFluidBlood(int i, Material material)
{
super(i, (material != Material.lava && material != Material.water ? 13 : 14) * 12 + 17, material);
float f = 0.0F;
float f1 = 0.0F;
setBlockBounds(0.0F + f1, 0.0F + f, 0.0F + f1, 1.0F + f1, 1.0F + f, 1.0F + f1);
setTickOnLoad(true);
}
public static float getPercentAir(int i)
{
if(i >= 8)
{
i = 0;
}
float f = (float)(i + 1) / 9F;
return f;
}
public int getBlockTextureFromSide(int i)
{
if(i == 0 || i == 1)
{
return blockIndexInTexture;
} else
{
return blockIndexInTexture + 1;
}
}
protected int getFlowDecay(World world, int i, int j, int k)
{
if(world.getBlockMaterial(i, j, k) != blockMaterial)
{
return -1;
} else
{
return world.getBlockMetadata(i, j, k);
}
}
protected int getEffectiveFlowDecay(IBlockAccess iblockaccess, int i, int j, int k)
{
if(iblockaccess.getBlockMaterial(i, j, k) != blockMaterial)
{
return -1;
}
int l = iblockaccess.getBlockMetadata(i, j, k);
if(l >= 8)
{
l = 0;
}
return l;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean canCollideCheck(int i, boolean flag)
{
return flag && i == 0;
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
Material material = iblockaccess.getBlockMaterial(i, j, k);
if(material == blockMaterial)
{
return false;
}
if(material == Material.ice)
{
return false;
}
if(l == 1)
{
return true;
} else
{
return super.shouldSideBeRendered(iblockaccess, i, j, k, l);
}
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public int getRenderType()
{
return 4;
}
public int idDropped(int i, Random random)
{
return 0;
}
public int quantityDropped(Random random)
{
return 0;
}
private Vec3D getFlowVector(IBlockAccess iblockaccess, int i, int j, int k)
{
Vec3D vec3d = Vec3D.createVector(0.0D, 0.0D, 0.0D);
int l = getEffectiveFlowDecay(iblockaccess, i, j, k);
for(int i1 = 0; i1 < 4; i1++)
{
int j1 = i;
int k1 = j;
int l1 = k;
if(i1 == 0)
{
j1--;
}
if(i1 == 1)
{
l1--;
}
if(i1 == 2)
{
j1++;
}
if(i1 == 3)
{
l1++;
}
int i2 = getEffectiveFlowDecay(iblockaccess, j1, k1, l1);
if(i2 < 0)
{
if(iblockaccess.getBlockMaterial(j1, k1, l1).getIsSolid())
{
continue;
}
i2 = getEffectiveFlowDecay(iblockaccess, j1, k1 - 1, l1);
if(i2 >= 0)
{
int j2 = i2 - (l - 8);
vec3d = vec3d.addVector((j1 - i) * j2, (k1 - j) * j2, (l1 - k) * j2);
}
continue;
}
if(i2 >= 0)
{
int k2 = i2 - l;
vec3d = vec3d.addVector((j1 - i) * k2, (k1 - j) * k2, (l1 - k) * k2);
}
}
if(iblockaccess.getBlockMetadata(i, j, k) >= 8)
{
boolean flag = false;
if(flag || shouldSideBeRendered(iblockaccess, i, j, k - 1, 2))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i, j, k + 1, 3))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i - 1, j, k, 4))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i + 1, j, k, 5))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i, j + 1, k - 1, 2))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i, j + 1, k + 1, 3))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i - 1, j + 1, k, 4))
{
flag = true;
}
if(flag || shouldSideBeRendered(iblockaccess, i + 1, j + 1, k, 5))
{
flag = true;
}
if(flag)
{
vec3d = vec3d.normalize().addVector(0.0D, -6D, 0.0D);
}
}
vec3d = vec3d.normalize();
return vec3d;
}
public void velocityToAddToEntity(World world, int i, int j, int k, Entity entity, Vec3D vec3d)
{
Vec3D vec3d1 = getFlowVector(world, i, j, k);
vec3d.xCoord += vec3d1.xCoord;
vec3d.yCoord += vec3d1.yCoord;
vec3d.zCoord += vec3d1.zCoord;
}
public int tickRate()
{
if(blockMaterial == Material.blood)
{
return 15;
}
return blockMaterial != Material.lava ? 0 : 30;
}
public float getBlockBrightness(IBlockAccess iblockaccess, int i, int j, int k)
{
float f = iblockaccess.getLightBrightness(i, j, k);
float f1 = iblockaccess.getLightBrightness(i, j + 1, k);
return f <= f1 ? f1 : f;
}
public void updateTick(World world, int i, int j, int k, Random random)
{
super.updateTick(world, i, j, k, random);
}
public int getRenderBlockPass()
{
return blockMaterial != Material.blood ? 0 : 1;
}
public void randomDisplayTick(World world, int i, int j, int k, Random random)
{
if(blockMaterial == Material.blood && random.nextInt(64) == 0)
{
int l = world.getBlockMetadata(i, j, k);
if(l > 0 && l < 8)
{
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "liquid.blood", random.nextFloat() * 0.25F + 0.75F, random.nextFloat() * 1.0F + 0.5F);
}
}
if(blockMaterial == Material.lava && world.getBlockMaterial(i, j + 1, k) == Material.air && !world.isBlockOpaqueCube(i, j + 1, k) && random.nextInt(100) == 0)
{
double d = (float)i + random.nextFloat();
double d1 = (double)j + maxY;
double d2 = (float)k + random.nextFloat();
world.spawnParticle("lava", d, d1, d2, 0.0D, 0.0D, 0.0D);
}
}
public static double func_293_a(IBlockAccess iblockaccess, int i, int j, int k, Material material)
{
Vec3D vec3d = null;
if(material == Material.blood)
{
vec3d = ((BlockFluid)Block.bloodMoving).getFlowVector(iblockaccess, i, j, k);
}
if(material == Material.lava)
{
vec3d = ((BlockFluidBlood)Block.lavaMoving).getFlowVector(iblockaccess, i, j, k);
}
if(vec3d.xCoord == 0.0D && vec3d.zCoord == 0.0D)
{
return -1000D;
} else
{
return Math.atan2(vec3d.zCoord, vec3d.xCoord) - 1.5707963267948966D;
}
}
public void onBlockAdded(World world, int i, int j, int k)
{
checkForHarden(world, i, j, k);
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
checkForHarden(world, i, j, k);
}
private void checkForHarden(World world, int i, int j, int k)
{
if(world.getBlockId(i, j, k) != blockID)
{
return;
}
if(blockMaterial == Material.lava)
{
boolean flag = false;
if(flag || world.getBlockMaterial(i, j, k - 1) == Material.blood)
{
flag = true;
}
if(flag || world.getBlockMaterial(i, j, k + 1) == Material.blood)
{
flag = true;
}
if(flag || world.getBlockMaterial(i - 1, j, k) == Material.blood)
{
flag = true;
}
if(flag || world.getBlockMaterial(i + 1, j, k) == Material.blood)
{
flag = true;
}
if(flag || world.getBlockMaterial(i, j + 1, k) == Material.blood)
{
flag = true;
}
if(flag)
{
int l = world.getBlockMetadata(i, j, k);
if(l == 0)
{
world.setBlockWithNotify(i, j, k, Block.oreChain.blockID);
} else
if(l <= 4)
{
world.setBlockWithNotify(i, j, k, Block.strike.blockID);
}
triggerLavaMixEffects(world, i, j, k);
}
}
}
protected void triggerLavaMixEffects(World world, int i, int j, int k)
{
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
for(int l = 0; l < 8; l++)
{
world.spawnParticle("largesmoke", (double)i + Math.random(), (double)j + 1.2D, (double)k + Math.random(), 0.0D, 0.0D, 0.0D);
}
}
}
can you help me ?
I can just tell you didn't set the JDK path right, that or you did and it just wont work, and MCP is outdated. I suggest looking on youtube for answers and how to set the PATH variable.
A slime liquid mod :smile.gif: Atm we are two guys, Im doing modloader and hes doing the normal version, sofar the liquid is working, but we are still looking for things like drowning and swimming lol :smile.gif:
A slime liquid mod :smile.gif: Atm we are two guys, Im doing modloader and hes doing the normal version, sofar the liquid is working, but we are still looking for things like drowning and swimming lol :smile.gif:
Got swimming now for other stuff...
Drowning, good that you remind me, i have to update the tut so that this is possible as well
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
I cannot find some of this code in Entity.java. What am I doing wrong?
It has to be there
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
How do tousle it modloader can you send me the .java so I can see
Thanks fish2
Its not all modloader, the modloader things are like the block, recipies , material and rendering(The ones u put in minecraft.java)
Ill add the info now to make it work in modloader...
Ok first off is you make a new class which is named mod_Blah.java
Blah being your mod name.
Now you add the following to your .java file
package net.minecraft.src;
import net.minecraft.src.MapColor;
public class mod_Blah extends BaseMod
{
public String Version()
{
return "1.6.6";
}
}
Now for the liquid blocks, add:
public static Block blahMoving;
public static Block blahStill;
public static Material blahMat;
public mod_Blah()
{
//MATERIAL
blahMat = new MaterialLiquid(MapColor.field_28200_n);
//LIQUID
blahMoving = (new BlockSlimeFlowing(220, blahMat)).setHardness(100F).setLightOpacity(3).setBlockName("blahliq");
blahStill = (new BlockSlimeStationary(221, blahMat)).setHardness(100F).setLightOpacity(3).setBlockName("blahliq");
}
Ok thats for icons or block look without editing terrain.png or editing items.png
Uhm creator of this thread, I want to ask, if you make a second (Second meaning adding a fourth liquid) What will the first line be for it to choose its location in terrain.png ?
Please help with this, thanks (Example: material != Material.lava && material != Material.water ? 13 : 14) * 12 + 17, material)
Ok thats for icons or block look without editing terrain.png or editing items.png
Uhm creator of this thread, I want to ask, if you make a second (Second meaning adding a fourth liquid) What will the first line be for it to choose its location in terrain.png ?
Please help with this, thanks (Example: material != Material.lava && material != Material.water ? 13 : 14) * 12 + 17, material)
It will be material != Material.lava && material != Material.water && material != Material.XXX ? 13 : 14) * 12 + 17, material I guess
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
I mean the animated liquid texture do I need like 5 16x16 pngs and how to code it I don't want to chang the terrain.png
You dont have to or do you want it to look differant to waters texture?
If you want it differant no clue on that :/
My liquid changes the colour of water to green (You change it in the texture files)
Look for this code in the texture files
int l1 = (int)(32F + f2 * 32F);
int j2 = (int)(50F + f2 * 64F);
int k2 = 255;
int l2 = (int)(146F + f2 * 50F);
Play around with it by changing it... :biggrin.gif: For green j2 and k2 should get switched
So play around by switching them stuff and see what happens
OK, I see I should update & organize it, but I don't have much time. I try to it as soon as possible
Rollback Post to RevisionRollBack
Somebody drew a **** on the wall! But who did it? It was old chuckleberrybum, doing the kind of "draw-****-on-wall-thing". It was all he ever did. He drew his first phallic object when he was just 4 months old! You see, some people don't find a purpose in life, they just draw dicks. Now, kids get a job and a watermill, so you don't have to draw penises for a living!
good luck
What are making with that tut?
I can just tell you didn't set the JDK path right, that or you did and it just wont work, and MCP is outdated. I suggest looking on youtube for answers and how to set the PATH variable.
A slime liquid mod :smile.gif: Atm we are two guys, Im doing modloader and hes doing the normal version, sofar the liquid is working, but we are still looking for things like drowning and
swimminglol :smile.gif:Got swimming now for other stuff...
Drowning, good that you remind me, i have to update the tut so that this is possible as well
Yah :smile.gif:
Hmm all I need to know is how to get it not to damage dropped items and blocks but still damage the player and living mobs:(
Want to play Minecraft SSP like Spaceboot1? Try my modpack, all mods made by me, Spaceboot1!
It has to be there
It changed to isWet
Just look for that...
Its not all modloader, the modloader things are like the block, recipies , material and rendering(The ones u put in minecraft.java)
Ill add the info now to make it work in modloader...
Ok first off is you make a new class which is named mod_Blah.java
Blah being your mod name.
Now you add the following to your .java file
Now for the liquid blocks, add:
For rendering add this (The texture classes):
So basicly it will look like this:
Remember that blah is your liquids name...
So basicly no editing minecraft.java, block.java, material.java :smile.gif:
For items and blocks add this under where you declared your blocks info
This is for items
This is for blocks
And adding names to items (Ingame GUI)
Adding names to blocks
Ok thats for icons or block look without editing terrain.png or editing items.png
Uhm creator of this thread, I want to ask, if you make a second (Second meaning adding a fourth liquid) What will the first line be for it to choose its location in terrain.png ?
Please help with this, thanks (Example: material != Material.lava && material != Material.water ? 13 : 14) * 12 + 17, material)
It will be material != Material.lava && material != Material.water && material != Material.XXX ? 13 : 14) * 12 + 17, material I guess
Nvm, I scrapped the second liquid due to problems with it lol :biggrin.gif:
You dont have to or do you want it to look differant to waters texture?
If you want it differant no clue on that :/
My liquid changes the colour of water to green (You change it in the texture files)
Look for this code in the texture files
Play around with it by changing it... :biggrin.gif: For green j2 and k2 should get switched
So play around by switching them stuff and see what happens
Nope, just play around with the numbers until you get it :smile.gif:
In your blockXXXfluid, did you paste the code in the tutorial???
Check that and check if youre making the right liquid render