firstly you need a "/" in the second set of brackets for the tags to work. In relation to your error, it was caused by the game looking for more code in your file, but not finding any, parameters ( } ) are used to stop the game from trying to go further. this means that you need to put another "}" at the end of your file.
ok i did that now it has 5 errors! D: here is the class.
package net.minecraft.src;
public class mod_darkmatter extends BaseMod
{
public static final Block darkmatter = new Block(160,
0).setBlockName("darkmatter").setHardness(4F).setResistance(4F).setLightValue(1F);
public void load()
{
darkmatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png",
"/mcp62/eclipse/Client/bin/darkmatter.png");
ModLoader.registerBlock(darkmatter);
ModLoader.addname(darkmatter, "darkmatter");
}
public String getVersion()
{
return "1.2.5";
}
}
map.put(EntityDireWolf.class, new RenderDireWolf(new ModelDireWolf(), 0.5F));
and it didn't even give me an error message, I don't think it is even looking at it.
Got any ideas as to why that would be?
Post your latest code please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I have a question except this time not about modding! Since i'm a noob and just made an account i need to know how to make my own topic and how to make a download link to get my mod. It's not finished yet but still it would be good to get ready. Thanks!
And Thanks TechGuy for the awesome tutorial. You ar an Epic modder!
I have a question except this time not about modding! Since i'm a noob and just made an account i need to know how to make my own topic and how to make a download link to get my mod. It's not finished yet but still it would be good to get ready. Thanks!
And Thanks TechGuy for the awesome tutorial. You ar an Epic modder!
When you are in the right section you just hit the "Start New Topic" button, then create your topic. For a link, you highlight the words you want to make into a link, then hit the button on the right of numbering, or 2nd on the left of pictures, then paste the link and hit ok.
EDIT: StrangeOne101 has already explained most of what I said.
I was just wondering, is there a list of the item and block names used with MCP? I'm trying to create a new block but I don't know what some of the items are called.
Have a look in Item.java and Block.java. Everything is kept in there.
ok i did that now it has 5 errors! D: here is the class.
package net.minecraft.src;
public class mod_darkmatter extends BaseMod
{
public static final Block darkmatter = new Block(160,
0).setBlockName("darkmatter").setHardness(4F).setResistance(4F).setLightValue(1F);
public void load()
{
darkmatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png",
"/mcp62/eclipse/Client/bin/darkmatter.png");
ModLoader.registerBlock(darkmatter);
ModLoader.addname(darkmatter, "darkmatter");
}
public String getVersion()
{
return "1.2.5";
}
}
Post the errors please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
public class mod_CreeperBlock extends BaseMod
{
public static final Block CreeperBlock = new BlockCreeperBlock(160, 0).setBlockName("Creeper Block").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
CreeperBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/CreeperBlock.png");
ModLoader.registerBlock(CreeperBlock);
ModLoader.addName(CreeperBlock, "Creeper Block");
ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf('B'), Block.wool , 15});
}
public String getVersion()
{
return "1.2.4";
}
}
CreeperBlock.java
package net.minecraft.src;
import java.util.Random;
public class BlockCreeperBlock extends Block
{
public BlockCreeperBlock(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_CreeperBlock.CreeperBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
Is there a new smelting method? Because in eclipse it says "The method addSmelting(int, ItemStack) in the type ModLoader is not applicable for the arguments (Item, ItemStack)"
Rollback Post to RevisionRollBack
If you see this right now, That means I am currently using this mod in my New Series/LP.
Check it out on my channel by clicking down below! Subscribe!
package net.minecraft.src;
import java.util.Map;
public class DireWolf extends BaseMod{
public void load()
{
ModLoader.registerEntityID(EntityDireWolf.class, "Dire Wolf", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityDireWolf.class, 15, 5, 7, EnumCreatureType.monster);
}
public void addRenderer(Map map)
{
map.put(EntityDireWolf.class, new RenderDireWolf(new ModelDireWolf(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityDireWolf
package net.minecraft.src;
public class EntityDireWolf extends EntityMob
{
public EntityDireWolf(World world)
{
super(world);
texture = "/mob/null.png";
this.setSize(0.9F, 0.9F);
moveSpeed = 0.5F;
attackStrength = 4;
this.getNavigator().setBreakDoors(true);
this.tasks.addTask(0, new EntityAISwimming(this));
//this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
//this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityVillager.class, this.moveSpeed, true));
this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.tasks.addTask(7, new EntityAIArrowAttack(this, this.moveSpeed, 1, 60));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 16.0F, 0, false));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
}
ModelDireWolf
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
public class ModelDireWolf extends ModelBase
{
/** main box for the wolf head */
public ModelRenderer wolfHeadMain;
/** The wolf's body */
public ModelRenderer wolfBody;
/** Wolf'se first leg */
public ModelRenderer wolfLeg1;
/** Wolf's second leg */
public ModelRenderer wolfLeg2;
/** Wolf's third leg */
public ModelRenderer wolfLeg3;
/** Wolf's fourth leg */
public ModelRenderer wolfLeg4;
/** The wolf's tail */
ModelRenderer wolfTail;
/** The wolf's mane */
ModelRenderer wolfMane;
public ModelDireWolf()
{
float var1 = 0.0F;
float var2 = 13.5F;
this.wolfHeadMain = new ModelRenderer(this, 0, 0);
this.wolfHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, var1);
this.wolfHeadMain.setRotationPoint(-1.0F, var2, -7.0F);
this.wolfBody = new ModelRenderer(this, 18, 14);
this.wolfBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, var1);
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfMane = new ModelRenderer(this, 21, 0);
this.wolfMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, var1);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, 2.0F);
this.wolfLeg1 = new ModelRenderer(this, 0, 18);
this.wolfLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2 = new ModelRenderer(this, 0, 18);
this.wolfLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3 = new ModelRenderer(this, 0, 18);
this.wolfLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4 = new ModelRenderer(this, 0, 18);
this.wolfLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfTail = new ModelRenderer(this, 9, 18);
this.wolfTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, var1);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, var1);
this.wolfHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, var1);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
super.render(par1Entity, par2, par3, par4, par5, par6, par7);
this.setRotationAngles(par2, par3, par4, par5, par6, par7);
if (this.isChild)
{
float var8 = 2.0F;
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7);
this.wolfHeadMain.renderWithRotation(par7);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
this.wolfBody.render(par7);
this.wolfLeg1.render(par7);
this.wolfLeg2.render(par7);
this.wolfLeg3.render(par7);
this.wolfLeg4.render(par7);
this.wolfTail.renderWithRotation(par7);
this.wolfMane.render(par7);
GL11.glPopMatrix();
}
else
{
this.wolfHeadMain.renderWithRotation(par7);
this.wolfBody.render(par7);
this.wolfLeg1.render(par7);
this.wolfLeg2.render(par7);
this.wolfLeg3.render(par7);
this.wolfLeg4.render(par7);
this.wolfTail.renderWithRotation(par7);
this.wolfMane.render(par7);
}
}
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4)
{
EntityDireWolf var5 = (EntityDireWolf)par1EntityLiving;
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfLeg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
this.wolfLeg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
this.wolfLeg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
this.wolfLeg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
}
/**
* Sets the models various rotation angles.
*/
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)
{
super.setRotationAngles(par1, par2, par3, par4, par5, par6);
this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI);
this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI);
this.wolfTail.rotateAngleX = par3;
}
}
RenderDireWolf
package net.minecraft.src;
public class RenderDireWolf extends RenderLiving
{
public RenderDireWolf(ModelBase par1ModelBase, float par2)
{
super(par1ModelBase, par2);
}
public void renderWolf(EntityDireWolf par1EntityDireWolf, double par2, double par4, double par6, float par8, float par9)
{
super.doRenderLiving(par1EntityDireWolf, par2, par4, par6, par8, par9);
}
protected void func_25006_b(EntityDireWolf par1EntityDireWolf, float par2) {}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
this.func_25006_b((EntityDireWolf)par1EntityLiving, par2);
}
public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
this.renderWolf((EntityDireWolf)par1EntityLiving, par2, par4, par6, par8, par9);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
this.renderWolf((EntityDireWolf)par1Entity, par2, par4, par6, par8, par9);
}
}
package net.minecraft.src;
public class mod_CreeperBlock extends BaseMod
{
public static final Block CreeperBlock = new BlockCreeperBlock(160, 0).setBlockName("Creeper Block").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
CreeperBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/CreeperBlock.png");
ModLoader.registerBlock(CreeperBlock);
ModLoader.addName(CreeperBlock, "Creeper Block");
ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf('B'), Block.wool , 15});
}
public String getVersion()
{
return "1.2.4";
}
}
CreeperBlock.java
package net.minecraft.src;
import java.util.Random;
public class BlockCreeperBlock extends Block
{
public BlockCreeperBlock(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_CreeperBlock.CreeperBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
Is there a new smelting method? Because in eclipse it says "The method addSmelting(int, ItemStack) in the type ModLoader is not applicable for the arguments (Item, ItemStack)"
Make sure you put .shiftedIndex (.blockID for blocks) after the first thing you are trying to smelt.
package net.minecraft.src;
import java.util.Map;
public class DireWolf extends BaseMod{
public void load()
{
ModLoader.registerEntityID(EntityDireWolf.class, "Dire Wolf", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityDireWolf.class, 15, 5, 7, EnumCreatureType.monster);
}
public void addRenderer(Map map)
{
map.put(EntityDireWolf.class, new RenderDireWolf(new ModelDireWolf(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntityDireWolf
package net.minecraft.src;
public class EntityDireWolf extends EntityMob
{
public EntityDireWolf(World world)
{
super(world);
texture = "/mob/null.png";
this.setSize(0.9F, 0.9F);
moveSpeed = 0.5F;
attackStrength = 4;
this.getNavigator().setBreakDoors(true);
this.tasks.addTask(0, new EntityAISwimming(this));
//this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
//this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityVillager.class, this.moveSpeed, true));
this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAILookIdle(this));
this.tasks.addTask(7, new EntityAIArrowAttack(this, this.moveSpeed, 1, 60));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 16.0F, 0, false));
}
public boolean isAIEnabled()
{
return true;
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
}
ModelDireWolf
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
public class ModelDireWolf extends ModelBase
{
/** main box for the wolf head */
public ModelRenderer wolfHeadMain;
/** The wolf's body */
public ModelRenderer wolfBody;
/** Wolf'se first leg */
public ModelRenderer wolfLeg1;
/** Wolf's second leg */
public ModelRenderer wolfLeg2;
/** Wolf's third leg */
public ModelRenderer wolfLeg3;
/** Wolf's fourth leg */
public ModelRenderer wolfLeg4;
/** The wolf's tail */
ModelRenderer wolfTail;
/** The wolf's mane */
ModelRenderer wolfMane;
public ModelDireWolf()
{
float var1 = 0.0F;
float var2 = 13.5F;
this.wolfHeadMain = new ModelRenderer(this, 0, 0);
this.wolfHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, var1);
this.wolfHeadMain.setRotationPoint(-1.0F, var2, -7.0F);
this.wolfBody = new ModelRenderer(this, 18, 14);
this.wolfBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, var1);
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfMane = new ModelRenderer(this, 21, 0);
this.wolfMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, var1);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, 2.0F);
this.wolfLeg1 = new ModelRenderer(this, 0, 18);
this.wolfLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2 = new ModelRenderer(this, 0, 18);
this.wolfLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3 = new ModelRenderer(this, 0, 18);
this.wolfLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4 = new ModelRenderer(this, 0, 18);
this.wolfLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfTail = new ModelRenderer(this, 9, 18);
this.wolfTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1);
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, var1);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, var1);
this.wolfHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, var1);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
super.render(par1Entity, par2, par3, par4, par5, par6, par7);
this.setRotationAngles(par2, par3, par4, par5, par6, par7);
if (this.isChild)
{
float var8 = 2.0F;
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7);
this.wolfHeadMain.renderWithRotation(par7);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
this.wolfBody.render(par7);
this.wolfLeg1.render(par7);
this.wolfLeg2.render(par7);
this.wolfLeg3.render(par7);
this.wolfLeg4.render(par7);
this.wolfTail.renderWithRotation(par7);
this.wolfMane.render(par7);
GL11.glPopMatrix();
}
else
{
this.wolfHeadMain.renderWithRotation(par7);
this.wolfBody.render(par7);
this.wolfLeg1.render(par7);
this.wolfLeg2.render(par7);
this.wolfLeg3.render(par7);
this.wolfLeg4.render(par7);
this.wolfTail.renderWithRotation(par7);
this.wolfMane.render(par7);
}
}
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4)
{
EntityDireWolf var5 = (EntityDireWolf)par1EntityLiving;
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfLeg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
this.wolfLeg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
this.wolfLeg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3;
this.wolfLeg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3;
}
/**
* Sets the models various rotation angles.
*/
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)
{
super.setRotationAngles(par1, par2, par3, par4, par5, par6);
this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI);
this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI);
this.wolfTail.rotateAngleX = par3;
}
}
RenderDireWolf
package net.minecraft.src;
public class RenderDireWolf extends RenderLiving
{
public RenderDireWolf(ModelBase par1ModelBase, float par2)
{
super(par1ModelBase, par2);
}
public void renderWolf(EntityDireWolf par1EntityDireWolf, double par2, double par4, double par6, float par8, float par9)
{
super.doRenderLiving(par1EntityDireWolf, par2, par4, par6, par8, par9);
}
protected void func_25006_b(EntityDireWolf par1EntityDireWolf, float par2) {}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
this.func_25006_b((EntityDireWolf)par1EntityLiving, par2);
}
public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
this.renderWolf((EntityDireWolf)par1EntityLiving, par2, par4, par6, par8, par9);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
this.renderWolf((EntityDireWolf)par1Entity, par2, par4, par6, par8, par9);
}
}
Like I said, leave the main class with mod_ before it. Change DireWolf.java to mod_DireWolf.java. Having mod_ at the start of the name is how ModLoader finds and reads the classes.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Like I said, leave the main class with mod_ before it. Change DireWolf.java to mod_DireWolf.java. Having mod_ at the start of the name is how ModLoader finds and reads the classes.
Make sure you put .shiftedIndex (.blockID for blocks) after the first thing you are trying to smelt.
Ahh.. Thanks lol. But there also this new thing that Risugami said in the IRC chat that smelting now has a static method. But I really don't know what that means. And if you go into ModLoader and for smelting is now
public static void addSmelting(int i, ItemStack itemstack)
{
FurnaceRecipes.smelting().addSmelting(i, itemstack);
}
Rollback Post to RevisionRollBack
If you see this right now, That means I am currently using this mod in my New Series/LP.
Check it out on my channel by clicking down below! Subscribe!
i haven't code java in a while and was wondering if i need to make one mod_Block.java for all of my blocks or do i need to have a different file for each one? any help would be nice thank you!
And by Multi textured blocks do you mean the block changes textures while in use(ex. a furnace)?
I honestly don't think you've coded at all if you say that. You can create all instances of things in one mod_ class. More than one mod_ class should NEVER be used. Multi textured blocks means more then 1 texture on the faces of the block. Like a furnace, but I'm not showing how to change the texture when a block is in use.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I honestly don't think you've coded at all if you say that. You can create all instances of things in one mod_ class. More than one mod_ class should NEVER be used. Multi textured blocks means more then 1 texture on the faces of the block. Like a furnace, but I'm not showing how to change the texture when a block is in use.
its been a LONG time and i figured it out already i ment to delete the post sorry for wasting your time...
hi, i followed all your code and get errors whilest i was writing it, may you would see the diffrence but after corrections the code is error free. I saved the files in eclipse, double clicked the start.bat file and my client started, in the console window i got this error (listet below)
I havent my new block in minecraft and i cant use the recepie to create my new block.. mhm...could someone help me out here whats happen?
mod_iceBlocks.java
package net.minecraft.src;
public class mod_iceBlocks extends BaseMod{
//Block proberties
// i changed new Block(160, 0) to new Block(160, Material.rock)
public static final Block Marble = new Block(160, Material.rock).setBlockName("anynamehere").setHardness(3F).setResistance(4F).setLightValue(1F);
public String getVersion() {
return"Minecraft 1.2.5 iceBlocks 0.1_Alpha";
}
public void load() {
// Block Textures
Marble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "textures/blocks/marble.png");
//Registering the blocks
ModLoader.registerBlock(Marble);
// Block Names
ModLoader.addName(Marble, "Marble Block");
// Block Recipes
ModLoader.addRecipe(new ItemStack(Marble, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
}
Marble.java
package net.minecraft.src;
import java.util.Random;
public class Marble extends Block{
public Marble(int i, int j){
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j){
return mod_iceBlocks.Marble.blockID;
}
public int quantityDropped(Random random){
return 1;
}
}
error log
18:09:03 - == MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
18:09:03 - OS : win32
18:09:03 - runmc: '"C:\Program Files\Java\jdk1.7.0_03\bin\java" -Xincgc -Xms1024M -Xmx1024M -cp "..\bin\minecraft;..\lib;..\lib\*;..\jars\bin\minecraft.jar;..\jars\bin\jinput.jar;..\jars\bin\lwjgl.jar;..\jars\bin\lwjgl_util.jar" -Djava.library.path=..\jars\bin\natives Start'
18:09:03 - shlex: ['C:\\Program Files\\Java\\jdk1.7.0_03\\bin\\java', '-Xincgc', '-Xms1024M', '-Xmx1024M', '-cp', '..\\bin\\minecraft;..\\lib;..\\lib\\*;..\\jars\\bin\\minecraft.jar;..\\jars\\bin\\jinput.jar;..\\jars\\bin\\lwjgl.jar;..\\jars\\bin\\lwjgl_util.jar', '-Djava.library.path=..\\jars\\bin\\natives', 'Start']
18:09:04 - 27 achievements
18:09:04 - 182 recipes
18:09:04 - LWJGL Version: 2.4.2
18:09:05 - ModLoader 1.2.5 Initializing...
18:09:05 - Done.
18:09:05 - WARNING: Found unknown Windows version: Windows 7
18:09:05 - Attempting to use default windows plug-in.
18:09:05 - Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
18:09:05 -
18:09:05 - Starting up SoundSystem...
18:09:05 - Initializing LWJGL OpenAL
18:09:05 - (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
18:09:05 - OpenAL initialized.
18:09:06 -
18:09:06 - java.net.SocketException: Invalid argument: connect
18:09:06 - at java.net.DualStackPlainSocketImpl.connect0(Native Method)
18:09:06 - at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
18:09:06 - at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
18:09:06 - at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
18:09:06 - at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
18:09:06 - at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
18:09:06 - at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
18:09:06 - at java.net.Socket.connect(Socket.java:579)
18:09:06 - at java.net.Socket.connect(Socket.java:528)
18:09:06 - at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
18:09:06 - at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
18:09:06 - at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
18:09:06 - at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
18:09:06 - at sun.net.www.http.HttpClient.New(HttpClient.java:300)
18:09:06 - at sun.net.www.http.HttpClient.New(HttpClient.java:316)
18:09:06 - at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
18:09:06 - at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
18:09:06 - at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
18:09:06 - at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
18:09:06 - at java.net.URL.openStream(URL.java:1035)
18:09:06 - at net.minecraft.src.ThreadDownloadResources.run(ThreadDownloadResources.java:46)
18:09:09 - Stopping!
I worked it out. I recompiled it, reobfuscate it, opened my minecraft.jar and put all the files i created into my minecraft.jar then it worked. After i looked into the startClient.bat i noticed it will do something with phyton what i have not installed. may that was the actual problem or?? What ever, minecraft runs without problems and i can use 3 dirt to create my marble Block and use it like i should HAPPY FACE
Um my ore won't spawn! It has no errors and all but i am bad at trying to find a good spawning rate. I put it's rarity to be more common than coal but still can't find it! Is my code wrong?
Take a look.
BTW I looked at someones post of their ore for my ore might be familiar.
public class mod_ManaOre extends BaseMod
{
public static final Block ManaOre = new BlockManaOre(190, 0).setBlockName("Mana Ore").setHardness(3.5F).setResistance(15F).setLightValue(0F);
public void load()
{
ManaOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Ore.png");
ModLoader.registerBlock(ManaOre);
ModLoader.addName(ManaOre, "RockSalt");
ModLoader.addSmelting(mod_ManaOre.ManaOre.blockID, new ItemStack(mod_Items.Ingot, 1));
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 37; i++)
{
int randPosX = chunkX + rand.nextInt(5);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(5);
(new WorldGenMinable(mod_ManaOre.ManaOre.blockID, 17)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
Um my ore won't spawn! It has no errors and all but i am bad at trying to find a good spawning rate. I put it's rarity to be more common than coal but still can't find it! Is my code wrong?
Take a look.
BTW I looked at someones post of their ore for my ore might be familiar.
public class mod_ManaOre extends BaseMod
{
public static final Block ManaOre = new BlockManaOre(190, 0).setBlockName("Mana Ore").setHardness(3.5F).setResistance(15F).setLightValue(0F);
public void load()
{
ManaOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Ore.png");
ModLoader.registerBlock(ManaOre);
ModLoader.addName(ManaOre, "RockSalt");
ModLoader.addSmelting(mod_ManaOre.ManaOre.blockID, new ItemStack(mod_Items.Ingot, 1));
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 37; i++)
{
int randPosX = chunkX + rand.nextInt(5);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(5);
(new WorldGenMinable(mod_ManaOre.ManaOre.blockID, 17)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public class BlockManaOre extends Block
{
public BlockManaOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_ManaOre.ManaOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
If you think there is something wrong please tell me!
GenerateSurface
needs to be
generateSurface
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Your the best person ever! Thanks so much for bearing with me and my endless questions! but this is the probabaly the last question for a while cause i now i know how to do all the code and everything.
But I had a problem reobfuscating! I recompiled my mod than reobfuscated it and when i try to istall it on my minecraft it always crashes! I have no errors recompiling. But of course i installed mod loader 1.2.5
if you can figure out whats wrong please tell me if not list all or atleast a good amount of problems that could go wrong reobfuscating cause i most likely would've forgotten something.
Your the best person ever! Thanks so much for bearing with me and my endless questions! but this is the probabaly the last question for a while cause i now i know how to do all the code and everything.
But I had a problem reobfuscating! I recompiled my mod than reobfuscated it and when i try to istall it on my minecraft it always crashes! I have no errors recompiling. But of course i installed mod loader 1.2.5
if you can figure out whats wrong please tell me if not list all or atleast a good amount of problems that could go wrong reobfuscating cause i most likely would've forgotten something.
Again thanks! Caann't wait for other tutorials!
The only things I can think of are:
Using the correct MCP version(MCP62 for 1.2.5)?
Have a look at the crash report in ModLoader.txt in .minecraft. If you don't know what it means, post it here and I'll have a look for you.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
hello, when i add a mob it seems to float? im not sure if its an error in codding or its how the model was made but heres my model code:
<code>// Date: 3/30/2012 2:37:20 PM
package net.minecraft.src; public class mod_darkmatter extends BaseMod { public static final Block darkmatter = new Block(160, 0).setBlockName("darkmatter").setHardness(4F).setResistance(4F).setLightValue(1F); public void load() { darkmatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mcp62/eclipse/Client/bin/darkmatter.png"); ModLoader.registerBlock(darkmatter); ModLoader.addname(darkmatter, "darkmatter"); } public String getVersion() { return "1.2.5"; } }Post your latest code please.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumGo to http://www.minecraft...o=new_post&f=51 and just fill out the from. If you need to upload your mod to the internet, go http://www.filehosting.org. But make sure it's in a zip file though. Just makes life easier for others
When you are in the right section you just hit the "Start New Topic" button, then create your topic. For a link, you highlight the words you want to make into a link, then hit the button on the right of numbering, or 2nd on the left of pictures, then paste the link and hit ok.
EDIT: StrangeOne101 has already explained most of what I said.
Have a look in Item.java and Block.java. Everything is kept in there.
Post the errors please.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premiummod_CreeperBlock.java
package net.minecraft.src; public class mod_CreeperBlock extends BaseMod { public static final Block CreeperBlock = new BlockCreeperBlock(160, 0).setBlockName("Creeper Block").setHardness(3F).setResistance(4F).setLightValue(1F); public void load() { CreeperBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/CreeperBlock.png"); ModLoader.registerBlock(CreeperBlock); ModLoader.addName(CreeperBlock, "Creeper Block"); ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf('B'), Block.wool , 15}); } public String getVersion() { return "1.2.4"; } }CreeperBlock.java
package net.minecraft.src; import java.util.Random; public class BlockCreeperBlock extends Block { public BlockCreeperBlock(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return mod_CreeperBlock.CreeperBlock.blockID; } public int quantityDropped(Random random) { return 1; }}Errors:
== MCP 6.1 (data: 6.1, client: 1.2.4, server: 1.2.4) == # found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa ram csvs, astyle, astyle config == Recompiling client == > Cleaning bin > Recompiling '"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g - source 1.6 -target 1....' failed : 1 == ERRORS FOUND == src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: '}' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: illegal start o f expression ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: not a statement ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: not a statement ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: ';' expected ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:12: error: illegal start o f type ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [ ] {"BGB" "GBG" "BGB", Character.valueOf('G'), Block.wool, 5 , Character.valueOf( 'B'), Block.wool , 15}); ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:15: error: class, interfac e, or enum expected public String getVersion() ^ src\minecraft\net\minecraft\src\mod_CreeperBlock.java:18: error: class, interfac e, or enum expected } ^ 13 errors ================== == Recompiling server == > Cleaning bin > Recompiling - Done in 6.11 seconds Press any key to continue . . .DireWolf
package net.minecraft.src; import java.util.Map; public class DireWolf extends BaseMod{ public void load() { ModLoader.registerEntityID(EntityDireWolf.class, "Dire Wolf", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityDireWolf.class, 15, 5, 7, EnumCreatureType.monster); } public void addRenderer(Map map) { map.put(EntityDireWolf.class, new RenderDireWolf(new ModelDireWolf(), 0.5F)); } public String getVersion() { return "1.2.5"; } }EntityDireWolf
package net.minecraft.src; public class EntityDireWolf extends EntityMob { public EntityDireWolf(World world) { super(world); texture = "/mob/null.png"; this.setSize(0.9F, 0.9F); moveSpeed = 0.5F; attackStrength = 4; this.getNavigator().setBreakDoors(true); this.tasks.addTask(0, new EntityAISwimming(this)); //this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false)); //this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityVillager.class, this.moveSpeed, true)); this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed)); this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed)); this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.tasks.addTask(7, new EntityAIArrowAttack(this, this.moveSpeed, 1, 60)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 16.0F, 0, false)); } public boolean isAIEnabled() { return true; } public int getMaxHealth() { return 20; } protected String getLivingSound() { return "mob.villager.default"; } protected String getHurtSound() { return "mob.villager.defaulthurt"; } protected String getDeathSound() { return "mob.villager.defaultdeath"; } protected int getDropItemId() { return Item.ingotIron.shiftedIndex; } protected boolean canDespawn() { return false; } }ModelDireWolf
package net.minecraft.src; import org.lwjgl.opengl.GL11; public class ModelDireWolf extends ModelBase { /** main box for the wolf head */ public ModelRenderer wolfHeadMain; /** The wolf's body */ public ModelRenderer wolfBody; /** Wolf'se first leg */ public ModelRenderer wolfLeg1; /** Wolf's second leg */ public ModelRenderer wolfLeg2; /** Wolf's third leg */ public ModelRenderer wolfLeg3; /** Wolf's fourth leg */ public ModelRenderer wolfLeg4; /** The wolf's tail */ ModelRenderer wolfTail; /** The wolf's mane */ ModelRenderer wolfMane; public ModelDireWolf() { float var1 = 0.0F; float var2 = 13.5F; this.wolfHeadMain = new ModelRenderer(this, 0, 0); this.wolfHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, var1); this.wolfHeadMain.setRotationPoint(-1.0F, var2, -7.0F); this.wolfBody = new ModelRenderer(this, 18, 14); this.wolfBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, var1); this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F); this.wolfMane = new ModelRenderer(this, 21, 0); this.wolfMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, var1); this.wolfMane.setRotationPoint(-1.0F, 14.0F, 2.0F); this.wolfLeg1 = new ModelRenderer(this, 0, 18); this.wolfLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1); this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); this.wolfLeg2 = new ModelRenderer(this, 0, 18); this.wolfLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1); this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); this.wolfLeg3 = new ModelRenderer(this, 0, 18); this.wolfLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1); this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); this.wolfLeg4 = new ModelRenderer(this, 0, 18); this.wolfLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1); this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); this.wolfTail = new ModelRenderer(this, 9, 18); this.wolfTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, var1); this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F); this.wolfHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, var1); this.wolfHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, var1); this.wolfHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, var1); } /** * Sets the models various rotation angles then renders the model. */ public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { super.render(par1Entity, par2, par3, par4, par5, par6, par7); this.setRotationAngles(par2, par3, par4, par5, par6, par7); if (this.isChild) { float var8 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7); this.wolfHeadMain.renderWithRotation(par7); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); this.wolfBody.render(par7); this.wolfLeg1.render(par7); this.wolfLeg2.render(par7); this.wolfLeg3.render(par7); this.wolfLeg4.render(par7); this.wolfTail.renderWithRotation(par7); this.wolfMane.render(par7); GL11.glPopMatrix(); } else { this.wolfHeadMain.renderWithRotation(par7); this.wolfBody.render(par7); this.wolfLeg1.render(par7); this.wolfLeg2.render(par7); this.wolfLeg3.render(par7); this.wolfLeg4.render(par7); this.wolfTail.renderWithRotation(par7); this.wolfMane.render(par7); } } /** * Used for easily adding entity-dependent animations. The second and third float params here are the same second * and third as in the setRotationAngles method. */ public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { EntityDireWolf var5 = (EntityDireWolf)par1EntityLiving; this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F); this.wolfBody.rotateAngleX = ((float)Math.PI / 2F); this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F); this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX; this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F); this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F); this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F); this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F); this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F); this.wolfLeg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3; this.wolfLeg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; this.wolfLeg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; this.wolfLeg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3; } /** * Sets the models various rotation angles. */ public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6) { super.setRotationAngles(par1, par2, par3, par4, par5, par6); this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI); this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI); this.wolfTail.rotateAngleX = par3; } }RenderDireWolf
package net.minecraft.src; public class RenderDireWolf extends RenderLiving { public RenderDireWolf(ModelBase par1ModelBase, float par2) { super(par1ModelBase, par2); } public void renderWolf(EntityDireWolf par1EntityDireWolf, double par2, double par4, double par6, float par8, float par9) { super.doRenderLiving(par1EntityDireWolf, par2, par4, par6, par8, par9); } protected void func_25006_b(EntityDireWolf par1EntityDireWolf, float par2) {} /** * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: * entityLiving, partialTickTime */ protected void preRenderCallback(EntityLiving par1EntityLiving, float par2) { this.func_25006_b((EntityDireWolf)par1EntityLiving, par2); } public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) { this.renderWolf((EntityDireWolf)par1EntityLiving, par2, par4, par6, par8, par9); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.renderWolf((EntityDireWolf)par1Entity, par2, par4, par6, par8, par9); } }You missed two commas in the recipe. You need a comma after every set of quotations "###".
ModLoader.addRecipe(new ItemStack(CreeperBlock, 1), new Object [] {"BGB", "GBG", "BGB", Character.valueOf('G'), new ItemStack(Block.wool, 5) , Character.valueOf( 'B'), new ItemStack(Block.wool, 15)});Make sure you put .shiftedIndex (.blockID for blocks) after the first thing you are trying to smelt.
Like I said, leave the main class with mod_ before it. Change DireWolf.java to mod_DireWolf.java. Having mod_ at the start of the name is how ModLoader finds and reads the classes.
together they are powerful beyond imagination."
it worked
Ahh.. Thanks lol. But there also this new thing that Risugami said in the IRC chat that smelting now has a static method. But I really don't know what that means. And if you go into ModLoader and for smelting is now
public static void addSmelting(int i, ItemStack itemstack) { FurnaceRecipes.smelting().addSmelting(i, itemstack); }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThanks again! The only other thing is the wool block, but I'll try and fix it myself first.
I honestly don't think you've coded at all if you say that. You can create all instances of things in one mod_ class. More than one mod_ class should NEVER be used. Multi textured blocks means more then 1 texture on the faces of the block. Like a furnace, but I'm not showing how to change the texture when a block is in use.
Did you see what else I added in to the recipe I posted? I added what you needed to make that wool work.
Character.valueOf('#'), new ItemStack(Block.wool, 15)together they are powerful beyond imagination."
its been a LONG time and i figured it out already i ment to delete the post sorry for wasting your time...
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI havent my new block in minecraft and i cant use the recepie to create my new block.. mhm...could someone help me out here whats happen?
mod_iceBlocks.java
package net.minecraft.src; public class mod_iceBlocks extends BaseMod{ //Block proberties // i changed new Block(160, 0) to new Block(160, Material.rock) public static final Block Marble = new Block(160, Material.rock).setBlockName("anynamehere").setHardness(3F).setResistance(4F).setLightValue(1F); public String getVersion() { return"Minecraft 1.2.5 iceBlocks 0.1_Alpha"; } public void load() { // Block Textures Marble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "textures/blocks/marble.png"); //Registering the blocks ModLoader.registerBlock(Marble); // Block Names ModLoader.addName(Marble, "Marble Block"); // Block Recipes ModLoader.addRecipe(new ItemStack(Marble, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); } }Marble.java
package net.minecraft.src; import java.util.Random; public class Marble extends Block{ public Marble(int i, int j){ super(i, j, Material.rock); } public int idDropped(int i, Random random, int j){ return mod_iceBlocks.Marble.blockID; } public int quantityDropped(Random random){ return 1; } }error log
I worked it out. I recompiled it, reobfuscate it, opened my minecraft.jar and put all the files i created into my minecraft.jar then it worked. After i looked into the startClient.bat i noticed it will do something with phyton what i have not installed. may that was the actual problem or?? What ever, minecraft runs without problems and i can use 3 dirt to create my marble Block and use it like i should
Take a look.
BTW I looked at someones post of their ore for my ore might be familiar.
mod_ManaOre.java
import java.util.Random;
public class mod_ManaOre extends BaseMod
{
public static final Block ManaOre = new BlockManaOre(190, 0).setBlockName("Mana Ore").setHardness(3.5F).setResistance(15F).setLightValue(0F);
public void load()
{
ManaOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Ore.png");
ModLoader.registerBlock(ManaOre);
ModLoader.addName(ManaOre, "RockSalt");
ModLoader.addSmelting(mod_ManaOre.ManaOre.blockID, new ItemStack(mod_Items.Ingot, 1));
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 37; i++)
{
int randPosX = chunkX + rand.nextInt(5);
int randPosY = rand.nextInt(80);
int randPosZ = chunkZ + rand.nextInt(5);
(new WorldGenMinable(mod_ManaOre.ManaOre.blockID, 17)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
BlockManaOre.java
import java.util.Random;
public class BlockManaOre extends Block
{
public BlockManaOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_ManaOre.ManaOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
If you think there is something wrong please tell me!
needs to be
together they are powerful beyond imagination."
Your the best person ever! Thanks so much for bearing with me and my endless questions! but this is the probabaly the last question for a while cause i now i know how to do all the code and everything.
But I had a problem reobfuscating! I recompiled my mod than reobfuscated it and when i try to istall it on my minecraft it always crashes! I have no errors recompiling. But of course i installed mod loader 1.2.5
if you can figure out whats wrong please tell me if not list all or atleast a good amount of problems that could go wrong reobfuscating cause i most likely would've forgotten something.
Again thanks! Caann't wait for other tutorials!
I'm not sure. I only know about using ModLoader for descriptions.
The only things I can think of are:
together they are powerful beyond imagination."
<code>// Date: 3/30/2012 2:37:20 PM
package net.minecraft.src;
public class ModelLarion extends ModelBase
{
//fields
ModelRenderer Headtop;
ModelRenderer jaw;
ModelRenderer hedspike;
ModelRenderer toparmor;
ModelRenderer body;
ModelRenderer Bodspike1;
ModelRenderer Bodspike2;
ModelRenderer armuorbutt;
ModelRenderer Bodspike3;
ModelRenderer Tail;
ModelRenderer Legone;
ModelRenderer legtwo;
ModelRenderer Legthree;
ModelRenderer legfour;
public ModelLarion()
{
textureWidth = 64;
textureHeight = 32;
Headtop = new ModelRenderer(this, 0, 0);
Headtop.addBox(-3F, -2F, -3F, 6, 4, 6);
Headtop.setRotationPoint(0F, 0F, -5F);
Headtop.setTextureSize(64, 32);
Headtop.mirror = true;
setRotation(Headtop, 0F, 0F, 0F);
jaw = new ModelRenderer(this, 0, 10);
jaw.addBox(-2.5F, -1F, -3F, 5, 2, 6);
jaw.setRotationPoint(0F, 2F, -5F);
jaw.setTextureSize(64, 32);
jaw.mirror = true;
setRotation(jaw, 0.8922867F, 0F, 0F);
hedspike = new ModelRenderer(this, 24, 0);
hedspike.addBox(-1F, -2F, -2F, 2, 3, 3);
hedspike.setRotationPoint(0F, -1F, -3F);
hedspike.setTextureSize(64, 32);
hedspike.mirror = true;
setRotation(hedspike, -0.3346075F, 0F, 0F);
toparmor = new ModelRenderer(this, 0, 20);
toparmor.addBox(-4F, -1F, 0F, 8, 2, 10);
toparmor.setRotationPoint(0F, -1F, -2F);
toparmor.setTextureSize(64, 32);
toparmor.mirror = true;
setRotation(toparmor, 0F, 0F, 0F);
body = new ModelRenderer(this, 24, 7);
body.addBox(-3F, 0F, -2F, 6, 3, 10);
body.setRotationPoint(0F, 0F, 0F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 0F, 0F, 0F);
Bodspike1 = new ModelRenderer(this, 24, 0);
Bodspike1.addBox(-1F, -2F, -1F, 2, 3, 3);
Bodspike1.setRotationPoint(0F, -2F, 0F);
Bodspike1.setTextureSize(64, 32);
Bodspike1.mirror = true;
setRotation(Bodspike1, -0.3346075F, 0F, 0F);
Bodspike2 = new ModelRenderer(this, 24, 0);
Bodspike2.addBox(-1F, -2F, -1F, 2, 3, 3);
Bodspike2.setRotationPoint(0F, -2F, 4F);
Bodspike2.setTextureSize(64, 32);
Bodspike2.mirror = true;
setRotation(Bodspike2, -0.3346075F, 0F, 0F);
armuorbutt = new ModelRenderer(this, 46, 0);
armuorbutt.addBox(-2F, -1F, 0F, 4, 2, 5);
armuorbutt.setRotationPoint(0F, -1F, 8F);
armuorbutt.setTextureSize(64, 32);
armuorbutt.mirror = true;
setRotation(armuorbutt, 0F, 0F, 0F);
Bodspike3 = new ModelRenderer(this, 24, 0);
Bodspike3.addBox(-1F, -2F, -1F, 2, 3, 3);
Bodspike3.setRotationPoint(0F, -1F, 8F);
Bodspike3.setTextureSize(64, 32);
Bodspike3.mirror = true;
setRotation(Bodspike3, -0.3346075F, 0F, 0F);
Tail = new ModelRenderer(this, 32, 13);
Tail.addBox(-2F, -1F, 0F, 4, 1, 5);
Tail.setRotationPoint(0F, 1F, 8F);
Tail.setTextureSize(64, 32);
Tail.mirror = true;
setRotation(Tail, 0F, 0F, 0F);
Legone = new ModelRenderer(this, 37, 23);
Legone.addBox(0F, 0F, -2F, 3, 5, 3);
Legone.setRotationPoint(3F, 0F, 0F);
Legone.setTextureSize(64, 32);
Legone.mirror = true;
setRotation(Legone, 0F, 0F, 0F);
legtwo = new ModelRenderer(this, 37, 23);
legtwo.addBox(0F, 0F, -2F, 3, 5, 3);
legtwo.setRotationPoint(3F, 0F, 7F);
legtwo.setTextureSize(64, 32);
legtwo.mirror = true;
setRotation(legtwo, 0F, 0F, 0F);
Legthree = new ModelRenderer(this, 37, 23);
Legthree.addBox(-3F, 0F, -1F, 3, 5, 3);
Legthree.setRotationPoint(-3F, 0F, -1F);
Legthree.setTextureSize(64, 32);
Legthree.mirror = true;
setRotation(Legthree, 0F, 0.0185893F, 0F);
legfour = new ModelRenderer(this, 37, 23);
legfour.addBox(-3F, 0F, -1F, 3, 5, 3);
legfour.setRotationPoint(-3F, 0F, 6F);
legfour.setTextureSize(64, 32);
legfour.mirror = true;
setRotation(legfour, 0F, 0.0557679F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
Headtop.render(f5);
jaw.render(f5);
hedspike.render(f5);
toparmor.render(f5);
body.render(f5);
Bodspike1.render(f5);
Bodspike2.render(f5);
armuorbutt.render(f5);
Bodspike3.render(f5);
Tail.render(f5);
Legone.render(f5);
legtwo.render(f5);
Legthree.render(f5);
legfour.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
}
</code>
plz help me