I've tried multiple tutorials and in all of them i cant get my textures to work this is my code
I dont know why its not working but i just get the magenta and black texture.
What error comes up in the console when minecraft is loading? There should be an error when a texture doesn't load properly, and it may be that the texture is simply in the wrong location.
The Meaning of Life, the Universe, and Everything.
Join Date:
4/9/2014
Posts:
240
Member Details
Hi. Try as I might (and I know this isn't part of your tutorials), I cannot get a custom fuel created. All the tutorials out there say that I need to do this:
public class MetalsModFuelHandler implements IFuelHandler{
@Override
public int getBurnTime(ItemStack fuel) {
if(fuel.itemID == metalsmod.lignite.itemID)
return 0;
}
}
Of course, this is for 1.6.4, and I'm modding for 1.7.2. Any idea how I can get the INT value that IFuelHandler wants even now without ItemIDs?
When I insert the code for AI I get no errors, but my mob does not spawn.
Here is my code:
package com.example.JonriCraft.mobs;
public class EntityDirtMob extends EntityTameable{
public EntityDirtMob(World par1World) {
super(par1World);
this.setSize(0.6F, 0.8F);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, this.aiSit);
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(9, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
this.setTamed(false);
}
public void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(32.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.0D);
}
@Override
public EntityAgeable createChild(EntityAgeable arg0) {
return null;
}
public boolean isAIEnabled()
{
return true;
}
When I insert the code for AI I get no errors, but my mob does not spawn.
I don't see any obvious problems with the code, but I've never worked with tameable mobs before. I would try commenting out parts of the AI code to find where the issue is.
Hey, can you add a crop tutorial? That would be very nice if you could, of course. Im getting confused with making crops
I'm not planning on adding one since I don't have any experience with crops. I recommend checking out BlockFlower, and BlockCrops to see how those work.
I'm not planning on adding one since I don't have any experience with crops. I recommend checking out BlockFlower, and BlockCrops to see how those work.
Plz help! I followed the tutorial for textures, but it did not work! Here is my code:
package com.example.examplemod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public class GemDirt extends Block
{
@SideOnly(Side.CLIENT)
protected IIcon blockIcon;
public GemDirt(Material datMaterial)
{
super(datMaterial);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister)
{
blockIcon = iconRegister.registerIcon(Tutorial.modid + ":" + this.getUnlocalizedName().substring(5));
System.out.println(this.getUnlocalizedName());
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{
return blockIcon;
}
}
When I start minecraft, it gives me this error:
[17:12:33] [Client thread/ERROR]: Using missing texture, unable to load mahmod:textures/blocks/gemDirt.png
java.io.FileNotFoundException: mahmod:textures/blocks/gemDirt.png
I checked to see that I had the texture in the right location, and I do. I have a file called gemDirt.png in this path:
/home/[my username]/Downloads/Modding/Forge/src/main/resources/assets/mahmod/textures/blocks
java.lang.IllegalArgumentException: Can not set static net.minecraft.src.joakleymorecraft.SuperZombie field net.minecraft.src.joakleymorecraft.mod_morecraft.instance to net.minecraft.src.joakleymorecraft.mod_morecraft
I copied and pasted code and just changed the names of a few things.
First of all, thanks so much for the tutorials. They're great! Everything has been fine until I'v tried to add the "Stev" skin to the mob entity. I'm still seeing white blocks when I spawn the mobs. I can't quite figure out what's wrong. Here's my code from RenderTest:
package tutorial.generic;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderTest extends RenderBiped {
private static final ResourceLocation entityGenericLocation = new ResourceLocation( Generic.MODID + ":" + "textures/entities/entityGeneric.png" );
public RenderTest(ModelBiped model, float shadowSize) {
super(model, shadowSize);
}
@Override
protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return entityGenericLocation;
}
}
**BLOCKCLASS**
**CREATIVETABS**
I dont know why its not working but i just get the magenta and black texture.
What error comes up in the console when minecraft is loading? There should be an error when a texture doesn't load properly, and it may be that the texture is simply in the wrong location.
Not sure what you mean, which codes?
i'm crashing and i dont understand why.http://pastebin.com/EwyEJe5Ri tried to add an entity, but im a noob. please help?never mind, i fixed it.
hello, check this out!
public class MetalsModFuelHandler implements IFuelHandler{
@Override
public int getBurnTime(ItemStack fuel) {
if(fuel.itemID == metalsmod.lignite.itemID)
return 0;
}
}
Of course, this is for 1.6.4, and I'm modding for 1.7.2. Any idea how I can get the INT value that IFuelHandler wants even now without ItemIDs?
Here is my code:
package com.example.JonriCraft.mobs;
public class EntityDirtMob extends EntityTameable{
public EntityDirtMob(World par1World) {
super(par1World);
this.setSize(0.6F, 0.8F);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, this.aiSit);
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(9, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
this.setTamed(false);
}
public void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(32.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.0D);
}
@Override
public EntityAgeable createChild(EntityAgeable arg0) {
return null;
}
public boolean isAIEnabled()
{
return true;
}
}
Any help would be appreciated. Thanks.
I don't see any obvious problems with the code, but I've never worked with tameable mobs before. I would try commenting out parts of the AI code to find where the issue is.
MainMod:
Creative Tabs File:
And my block file:
I'm not crazy, i'm just not user friendly
--> Click here to get BETA ACCESS to this mod and upcoming server! <--
I'm not crazy, i'm just not user friendly
--> Click here to get BETA ACCESS to this mod and upcoming server! <--
I don't see any obvious problems with the code, what errors are you getting?
There's some rules that the mod ID is supposed to follow, I'm not sure if underscores are allowed, though I could be mistaken there.
I'm not planning on adding one since I don't have any experience with crops. I recommend checking out BlockFlower, and BlockCrops to see how those work.
Thanks! Ill check this out.
plus, i figured out whats wrong, so its ok.
I'm not crazy, i'm just not user friendly
--> Click here to get BETA ACCESS to this mod and upcoming server! <--
I'd consider it, but I've never worked with fluids before.
When I start minecraft, it gives me this error:
I checked to see that I had the texture in the right location, and I do. I have a file called gemDirt.png in this path:
/home/[my username]/Downloads/Modding/Forge/src/main/resources/assets/mahmod/textures/blocks
Any idea about what the problem is?
to my program arguments to make it work. Maybe you could add this to the tutorial? (E.G. something like "Not working? Try blah blah") Thanks!
I copied and pasted code and just changed the names of a few things.