um.. i think people should be able to see what type of damage 'bad' mobs can do and know which weapon is best for killing the 'bad' mobs
and i also think there should be a quick walk through at the start of the game so they know how to do things.
P.S.( i think wooden swords suck and that iron swords are better than gold!)
marts12321:)
you should "disassemble" the original villager and find out how skins and such are being implemented.
that should bring you at least halfway there...
Oh... You don't understand, I meant something like the Craftable Mob Eggs mod but you would right click with an unfinished egg when looking at the player, then right click on the ground to spawn another "villager version" of that player... sort of like that, but it will still hold the same skin and NOT look like a villager.
This is the code for Xporbs I got from net.minecraft.src using MCP, JDK, and Eclipse.
I have looked all through this code and cannot find anything to indicate an editable color code.
I have found no hex or numeric color codes.
package net.minecraft.src;
public class EntityXPOrb extends Entity
{
/**
* A constantly increasing value that RenderXPOrb uses to control the colour shifting (Green / yellow)
*/
public int xpColor;
/** The age of the XP orb in ticks. */
public int xpOrbAge = 0;
public int field_70532_c;
/** The health of this XP orb. */
private int xpOrbHealth = 5;
/** This is how much XP this orb has. */
private int xpValue;
/** The closest EntityPlayer to this orb. */
private EntityPlayer closestPlayer;
/** Threshold color for tracking players */
private int xpTargetColor;
public EntityXPOrb(World par1World, double par2, double par4, double par6, int par8)
{
super(par1World);
this.setSize(0.5F, 0.5F);
this.yOffset = this.height / 2.0F;
this.setPosition(par2, par4, par6);
this.rotationYaw = (float)(Math.random() * 360.0D);
this.motionX = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
this.motionY = (double)((float)(Math.random() * 0.2D) * 2.0F);
this.motionZ = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
this.xpValue = par8;
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
*/
protected boolean canTriggerWalking()
{
return false;
}
public EntityXPOrb(World par1World)
{
super(par1World);
this.setSize(0.25F, 0.25F);
this.yOffset = this.height / 2.0F;
}
protected void entityInit() {}
public int getBrightnessForRender(float par1)
{
float var2 = 0.5F;
if (var2 < 0.0F)
{
var2 = 0.0F;
}
if (var2 > 1.0F)
{
var2 = 1.0F;
}
int var3 = super.getBrightnessForRender(par1);
int var4 = var3 & 255;
int var5 = var3 >> 16 & 255;
var4 += (int)(var2 * 15.0F * 16.0F);
if (var4 > 240)
{
var4 = 240;
}
return var4 | var5 << 16;
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
super.onUpdate();
if (this.field_70532_c > 0)
{
--this.field_70532_c;
}
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.motionY -= 0.029999999329447746D;
if (this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)) == Material.lava)
{
this.motionY = 0.20000000298023224D;
this.motionX = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
this.motionZ = (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
this.playSound("random.fizz", 0.4F, 2.0F + this.rand.nextFloat() * 0.4F);
}
this.pushOutOfBlocks(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ);
double var1 = 8.0D;
if (this.xpTargetColor < this.xpColor - 20 + this.entityId % 100)
{
if (this.closestPlayer == null || this.closestPlayer.getDistanceSqToEntity(this) > var1 * var1)
{
this.closestPlayer = this.worldObj.getClosestPlayerToEntity(this, var1);
}
this.xpTargetColor = this.xpColor;
}
if (this.closestPlayer != null)
{
double var3 = (this.closestPlayer.posX - this.posX) / var1;
double var5 = (this.closestPlayer.posY + (double)this.closestPlayer.getEyeHeight() - this.posY) / var1;
double var7 = (this.closestPlayer.posZ - this.posZ) / var1;
double var9 = Math.sqrt(var3 * var3 + var5 * var5 + var7 * var7);
double var11 = 1.0D - var9;
if (var11 > 0.0D)
{
var11 *= var11;
this.motionX += var3 / var9 * var11 * 0.1D;
this.motionY += var5 / var9 * var11 * 0.1D;
this.motionZ += var7 / var9 * var11 * 0.1D;
}
}
this.moveEntity(this.motionX, this.motionY, this.motionZ);
float var13 = 0.98F;
if (this.onGround)
{
var13 = 0.58800006F;
int var4 = this.worldObj.getBlockId(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ));
if (var4 > 0)
{
var13 = Block.blocksList[var4].slipperiness * 0.98F;
}
}
this.motionX *= (double)var13;
this.motionY *= 0.9800000190734863D;
this.motionZ *= (double)var13;
if (this.onGround)
{
this.motionY *= -0.8999999761581421D;
}
++this.xpColor;
++this.xpOrbAge;
if (this.xpOrbAge >= 6000)
{
this.setDead();
}
}
/**
* Returns if this entity is in water and will end up adding the waters velocity to the entity
*/
public boolean handleWaterMovement()
{
return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
}
/**
* Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args:
* amountDamage
*/
protected void dealFireDamage(int par1)
{
this.attackEntityFrom(DamageSource.inFire, par1);
}
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
{
if (this.isEntityInvulnerable())
{
return false;
}
else
{
this.setBeenAttacked();
this.xpOrbHealth -= par2;
if (this.xpOrbHealth <= 0)
{
this.setDead();
}
return false;
}
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
par1NBTTagCompound.setShort("Health", (short)((byte)this.xpOrbHealth));
par1NBTTagCompound.setShort("Age", (short)this.xpOrbAge);
par1NBTTagCompound.setShort("Value", (short)this.xpValue);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
this.xpOrbHealth = par1NBTTagCompound.getShort("Health") & 255;
this.xpOrbAge = par1NBTTagCompound.getShort("Age");
this.xpValue = par1NBTTagCompound.getShort("Value");
}
/**
* Called by a player entity when they collide with an entity
*/
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
{
if (!this.worldObj.isRemote)
{
if (this.field_70532_c == 0 && par1EntityPlayer.xpCooldown == 0)
{
par1EntityPlayer.xpCooldown = 2;
this.playSound("random.orb", 0.1F, 0.5F * ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.8F));
par1EntityPlayer.onItemPickup(this, 1);
par1EntityPlayer.addExperience(this.xpValue);
this.setDead();
}
}
}
/**
* Returns the XP value of this XP orb.
*/
public int getXpValue()
{
return this.xpValue;
}
/**
* Returns a number from 1 to 10 based on how much XP this orb is worth. This is used by RenderXPOrb to determine
* what texture to use.
*/
public int getTextureByXP()
{
return this.xpValue >= 2477 ? 10 : (this.xpValue >= 1237 ? 9 : (this.xpValue >= 617 ? 8 : (this.xpValue >= 307 ? 7 : (this.xpValue >= 149 ? 6 : (this.xpValue >= 73 ? 5 : (this.xpValue >= 37 ? 4 : (this.xpValue >= 17 ? 3 : (this.xpValue >= 7 ? 2 : (this.xpValue >= 3 ? 1 : 0)))))))));
}
/**
* Get xp split rate (Is called until the xp drop code in EntityLiving.onEntityUpdate is complete)
*/
public static int getXPSplit(int par0)
{
return par0 >= 2477 ? 2477 : (par0 >= 1237 ? 1237 : (par0 >= 617 ? 617 : (par0 >= 307 ? 307 : (par0 >= 149 ? 149 : (par0 >= 73 ? 73 : (par0 >= 37 ? 37 : (par0 >= 17 ? 17 : (par0 >= 7 ? 7 : (par0 >= 3 ? 3 : 1)))))))));
}
/**
* If returns false, the item will not inflict any damage against entities.
*/
public boolean canAttackWithItem()
{
return false;
}
}
I made an account just to ask this !
i tried to make my first block. i did everything right but when i hit recompile it says:
"!! Can not find server sources, try decompiling !!"
I decompiled. Said i should try cleanup
Cleanupped. Remade all of my codes but the problem persists.
What to do?
Cannot find server source... I think (THINK) that this isn´t a problem. You tried your mod in Minecraft SP?
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.minecraft.src.TextureWaterFX.<init>(TextureWaterFX.java:20)
at net.minecraft.client.Minecraft.<init>(Minecraft.java:248)
at net.minecraft.src.MinecraftAppletImpl.<init>(MinecraftAppletImpl.java:16)
at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
at net.minecraft.client.Minecraft.main(Minecraft.java:2276)
at Start.main(Start.java:22)
Caused by: java.lang.IllegalArgumentException: Slot 92 is already occupied by net.minecraft.src.BlockExample@12af08b when adding net.minecraft.src.BlockCake@164feb
at net.minecraft.src.Block.<init>(Block.java:283)
at net.minecraft.src.Block.<init>(Block.java:315)
at net.minecraft.src.BlockCake.<init>(BlockCake.java:9)
at net.minecraft.src.Block.<clinit>(Block.java:147)
... 6 more
Someone is closing me!
After i set up a BlockExample.java and run minecraft.. I got this error.
How can I fix it?
Ok, how do I make a block similar to NiftyCraft's removed Water/Lava Storage Block? I wanted a toggleable source of water or lava, but Niftycraft's owner removed it and caarg98's mod is currently not working due to it complaining about ctm.class and ctm.png not being present.
Rollback Post to RevisionRollBack
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.minecraft.src.TextureWaterFX.<init>(TextureWaterFX.java:20)
at net.minecraft.client.Minecraft.<init>(Minecraft.java:248)
at net.minecraft.src.MinecraftAppletImpl.<init>(MinecraftAppletImpl.java:16)
at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
at net.minecraft.client.Minecraft.main(Minecraft.java:2276)
at Start.main(Start.java:22)
Caused by: java.lang.IllegalArgumentException: Slot 92 is already occupied by net.minecraft.src.BlockExample@12af08b when adding net.minecraft.src.BlockCake@164feb
at net.minecraft.src.Block.<init>(Block.java:283)
at net.minecraft.src.Block.<init>(Block.java:315)
at net.minecraft.src.BlockCake.<init>(BlockCake.java:9)
at net.minecraft.src.Block.<clinit>(Block.java:147)
... 6 more
Someone is closing me!
After i set up a BlockExample.java and run minecraft.. I got this error.
How can I fix it?
If you read the error it says, Caused by:
Caused by: java.lang.IllegalArgumentException: Slot 92 is already occupied by net.minecraft.src.BlockExample@12af08b when adding net.minecraft.src.BlockCake@164feb
This is basically saying that the id is already taken. I ran into this problem while following this tut. Look at the id of the very last recipe and set your id to one after that. Have a good day!
src\minecraft\net\minecraft\src\Block.java:206: cannot find symbol
symbol : constructor BlockDyedCobblestone(int)
location: class net.minecraft.src.BlockDyedCobblestone
public static final Block dyedCobblestone = (new BlockDyedCobblestone(146)).setHardness(1.5F).setResistance(10F).setStepSound(soundStoneFootstep).setBlockName("dyedCobblestone");
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
My code is
package net.minecraft.src;
import java.util.List;
public class BlockDyedCobblestone extends Block
{
public BlockDyedCobblestone()
{
super(35, 64, Material.cloth);
this.setCreativeTab(CreativeTabs.tabBlock);
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
if (par2 == 0)
{
return this.blockIndexInTexture;
}
else
{
par2 = ~(par2 & 15);
return 113 + ((par2 & 8) >> 3) + (par2 & 7) * 16;
}
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
*/
public int damageDropped(int par1)
{
return par1;
}
/**
* Takes a dye damage value and returns the block damage value to match
*/
public static int getBlockFromDye(int par0)
{
return ~par0 & 15;
}
/**
* Takes a block damage value and returns the dye damage value to match
*/
public static int getDyeFromBlock(int par0)
{
return ~par0 & 15;
}
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
for (int var4 = 0; var4 < 16; ++var4)
{
par3List.add(new ItemStack(par1, 1, var4));
}
}
}
public static final Block dyedCobblestone = (new BlockDyedCobblestone(146)).setHardness(1.5F).setResistance(10F).setStepSound(soundStoneFootstep).setBlockName("dyedCobblestone");
I am trying to make a dye-able cobblestone mod where you can make different color cobblestone.
Ok, how do I make a block similar to NiftyCraft's removed Water/Lava Storage Block? I wanted a toggleable source of water or lava, but Niftycraft's owner removed it and caarg98's mod is currently not working due to it complaining about ctm.class and ctm.png not being present.
Excuse me, I need a bit of help here. I want to be able to make a block that does this:
1. User places lever next to block
2. User activates lever.
3. ??????
4. PROFIT!(In other words, creates a block of lava or water in front of it)
Rollback Post to RevisionRollBack
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
Excuse me, I need a bit of help here. I want to be able to make a block that does this:
1. User places lever next to block
2. User activates lever.
3. ??????
4. PROFIT!(In other words, creates a block of lava or water in front of it)
Well, Ice creates an entity (water) when being broken so I wonder if you copy the ice code, change its texture, add redstone activation and decide if you are wanting it to make lava or water then its done, I cant really explain how to do it in detail as I havent done it myself yet but thats a theory.
You should also try asking for the source, if he doesent use it, im sure he wont mind giving it to you to update and continue it.
1. Setup the minecraft coder pack (MCP)
1.1 Extract the ZIP to a directory on your computer, for this example; C:/MCP
1.2 Copy the whole .minecraft/bin and .minecraft/resources directories to C:/MCP/jars/
1.3 Run decompile.bat
When I run decompile.bat i get this:
"Java JDK is not installed! Please install Java JDK from http://java.oracle.com"
Any help?
Thanks, BTW: I have found everything else helpful so far
and i also think there should be a quick walk through at the start of the game so they know how to do things.
P.S.( i think wooden swords suck and that iron swords are better than gold!)
marts12321:)
Oh... You don't understand, I meant something like the Craftable Mob Eggs mod but you would right click with an unfinished egg when looking at the player, then right click on the ground to spawn another "villager version" of that player... sort of like that, but it will still hold the same skin and NOT look like a villager.
Can you give me an example of what I would do to add this?
I have looked all through this code and cannot find anything to indicate an editable color code.
I have found no hex or numeric color codes.
Cannot find server source... I think (THINK) that this isn´t a problem. You tried your mod in Minecraft SP?
at net.minecraft.src.TextureWaterFX.<init>(TextureWaterFX.java:20)
at net.minecraft.client.Minecraft.<init>(Minecraft.java:248)
at net.minecraft.src.MinecraftAppletImpl.<init>(MinecraftAppletImpl.java:16)
at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
at net.minecraft.client.Minecraft.main(Minecraft.java:2276)
at Start.main(Start.java:22)
Caused by: java.lang.IllegalArgumentException: Slot 92 is already occupied by net.minecraft.src.BlockExample@12af08b when adding net.minecraft.src.BlockCake@164feb
at net.minecraft.src.Block.<init>(Block.java:283)
at net.minecraft.src.Block.<init>(Block.java:315)
at net.minecraft.src.BlockCake.<init>(BlockCake.java:9)
at net.minecraft.src.Block.<clinit>(Block.java:147)
... 6 more
Someone is closing me!
After i set up a BlockExample.java and run minecraft.. I got this error.
How can I fix it?
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
https://minecraftnoobtest.com/test.php
Don't click this link, HE is haunting it...
If you read the error it says, Caused by: This is basically saying that the id is already taken. I ran into this problem while following this tut. Look at the id of the very last recipe and set your id to one after that. Have a good day!
My code is
I am trying to make a dye-able cobblestone mod where you can make different color cobblestone.
Excuse me, I need a bit of help here. I want to be able to make a block that does this:
1. User places lever next to block
2. User activates lever.
3. ??????
4. PROFIT!(In other words, creates a block of lava or water in front of it)
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
https://minecraftnoobtest.com/test.php
Don't click this link, HE is haunting it...
Well, Ice creates an entity (water) when being broken so I wonder if you copy the ice code, change its texture, add redstone activation and decide if you are wanting it to make lava or water then its done, I cant really explain how to do it in detail as I havent done it myself yet but thats a theory.
You should also try asking for the source, if he doesent use it, im sure he wont mind giving it to you to update and continue it.
When I run decompile.bat i get this:
"Java JDK is not installed! Please install Java JDK from http://java.oracle.com"
Any help?
Thanks, BTW: I have found everything else helpful so far
Thanks.
--
It is dangerous to go alone, Take this: