ok , i did just a min ago find a tut on it , but i'm gonna have to actualy sit down and study it for quite some time , cause the 2 ppl doing the tut ( yes 2 ppl , 1 tut DX ) are crap at explaining how it works
but yeah its kinda custom block modeling but the main part i was looking for was getting the block to render how the model is supposed to
Is it HDAViirus and Teken by any chance?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Yeah, just make it so that the string isn't empty. Try putting the System.out line before the tileentitymobspawner.setMobID line. I'm sort of working on the same thing at the moment so I'll try and get mine working.
I tried to add exactly what I had, just after the System.err.println chunk, but when I started a new world it would crash the game whenever I got close enough to a boat for it to generate.
Oh, and this is the crash report, in case it makes a difference.:
[17:29:10] OpenAL initialized.
[17:29:10]
[17:29:34] Failed to fetch mob spawner entity at (127, 63, 597)
[17:29:36] java.lang.NullPointerException
[17:29:36] at net.minecraft.src.WorldGenBoat.generate(WorldGenBoat.java:283
)
[17:29:36] at net.minecraft.src.mod_Boat.generateSurface(mod_Boat.java:20)
[17:29:36] at net.minecraft.src.ModLoader.populateChunk(ModLoader.java:1216
)
[17:29:36] at net.minecraft.src.ChunkProvider.populate(ChunkProvider.java:1
96)
[17:29:36] at net.minecraft.src.Chunk.populateChunk(Chunk.java:1145)
[17:29:36] at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:
106)
[17:29:36] at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.ja
va:119)
[17:29:36] at net.minecraft.src.World.getChunkFromChunkCoords(World.java:65
1)
[17:29:36] at net.minecraft.src.World.tickBlocksAndAmbiance(World.java:3101
)
[17:29:36] at net.minecraft.src.World.tick(World.java:2869)
[17:29:36] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1923)
[17:29:36] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:890
)
[17:29:36] at net.minecraft.client.Minecraft.run(Minecraft.java:798)
[17:29:36] at java.lang.Thread.run(Thread.java:722)
[17:29:36] Stopping!
[17:29:36]
[17:29:36] SoundSystem shutting down...
[17:29:36] Author: Paul Lamb, www.paulscode.com
[17:29:36]
package net.minecraft.src;
public enum ObsidianEnumToolMaterial
{
OBSIDIAN(5, 2000, 12F, 7, 22);
/**
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
*/
private final int harvestLevel;
/**
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
*/
private final int maxUses;
/**
* The strength of this tool material against blocks which it is effective against.
*/
private final float efficiencyOnProperMaterial;
/** Damage versus entities. */
private final int damageVsEntity;
/** Defines the natural enchantability factor of the material. */
private final int enchantability;
private ObsidianEnumToolMaterial(int par3, int par4, float par5, int par6, int par7)
{
harvestLevel = par3;
maxUses = par4;
efficiencyOnProperMaterial = par5;
damageVsEntity = par6;
enchantability = par7;
}
/**
* The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
*/
public int getMaxUses()
{
return maxUses;
}
/**
* The strength of this tool material against blocks which it is effective against.
*/
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
/**
* Damage versus entities.
*/
public int getDamageVsEntity()
{
return damageVsEntity;
}
/**
* The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
*/
public int getHarvestLevel()
{
return harvestLevel;
}
/**
* Return the natural enchantability factor of the material.
*/
public int getEnchantability()
{
return enchantability;
}
}
EDIT: No, I was wrong. Let me think of something else that might be causing it.
Ok, try adding one more int before the 2000. I think you are missing one.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
On a totally unrelated topic: is there a way to make the potion effect for instant health give me a smaller amount, because at the moment I am trying to make some potion effect food that restores like 1-1/2 hearts, but it seems that it will restore way more then that when I use it, so I was just wondering if you thought there was a way to make the effect less, otherwise, I will just use the regeneration effect.
getNavigator().setBreakDoors(true);
tasks.addTask(0, new EntityAISwimming(this));
tasks.addTask(1, new EntityAIBreakDoor(this));
tasks.addTask(2, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityPlayer.class, moveSpeed, false));
tasks.addTask(3, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityVillager.class, moveSpeed, true));
tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, moveSpeed));
tasks.addTask(5, new EntityAIMoveThroughVillage(this, moveSpeed, false));
tasks.addTask(6, new EntityAIWander(this, moveSpeed));
tasks.addTask(7, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F));
tasks.addTask(7, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityVillager.class, 16F, 0, false));
Then this method anywhere else.
protected boolean isAIEnabled()
{
return true;
}
Thanks it worked, but now i have another problem. I change his health to be 150, but it is still 20. What is the problem?
EDIT: I got it to work
I sort-of got it to work, now it will select the mob, but the mob still wont spawn, but it no longer tells me that it "Failed to fetch mob spawner entity at (127, 63, 597) " and it has the correct mob spinning inside of it, but it wont spawn. To make this work I just changed the (i, j, k) part of this:
so that is was the same place as were I told it to generate the mob spawner block, as you can see here:
world.setBlockWithNotify(i +3, j +3, k +5, Block.mobSpawner.blockID);
TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getBlockTileEntity(i +3, j +3, k +5);
if (tileentitymobspawner != null)
{
tileentitymobspawner.setMobID(pickMobSpawner(random));
}
else
{
System.err.println((new StringBuilder()).append("Failed to fetch mob spawner entity at (").append(i).append(", ").append(j).append(", ").append(k).append(")").toString());
}
just thought that you might like to know that It still needs something else to make the mob actually spawn (or maybe my boat is too small of a space, and therefor they wont spawn on it)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
BlockUseless
package net.minecraft.src;
import java.util.Random;
public class BlockUseless extends Block
{
public BlockUseless(int i, int j)
{
super(i, j, Material.field_1336_B);
}
public int idDropped(int i, Random random, int j)
{
return mod_Useless.Useless.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
mod_Useless
package net.minecraft.src;
public class mod_Useless extends BaseMod
{ public static final Block Useless = new BlockUseless(160,
0).setBlockName("Don").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{ Useless.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mod/Random.png");
ModLoader.registerBlock(Useless);
ModLoader.addName(Useless, "Don");
ModLoader.addRecipe(new ItemStack(Useless,1),new Object [] {" # ", Character.valueOf('#'),Block.dirt,});
}
public String getVersion()
{
return "1.2.4";
}
}
I sort-of got it to work, now it will select the mob, but the mob still wont spawn, but it no longer tells me that it "Failed to fetch mob spawner entity at (127, 63, 597) " and it has the correct mob spinning inside of it, but it wont spawn. To make this work I just changed the (i, j, k) part of this:
so that is was the same place as were I told it to generate the mob spawner block, as you can see here:
world.setBlockWithNotify(i +3, j +3, k +5, Block.mobSpawner.blockID);
TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getBlockTileEntity(i +3, j +3, k +5);
if (tileentitymobspawner != null)
{
tileentitymobspawner.setMobID(pickMobSpawner(random));
}
else
{
System.err.println((new StringBuilder()).append("Failed to fetch mob spawner entity at (").append(i).append(", ").append(j).append(", ").append(k).append(")").toString());
}
just thought that you might like to know that It still needs something else to make the mob actually spawn (or maybe my boat is too small of a space, and therefor they wont spawn on it)
Never mind, did more testing and I figured out that the reason that my mob wasn't spawning was because there was too much light, but otherwise it will work fine! Thanks for all the help, the thing is... I thought the mob spawners weren't effected by light... Hum... I guess I will have to re-think my boat design.
I'm having problems again, this time attempting to use my own materials in the crafting recipe.
This is the mod file for the thing I want it to be crafted with
package net.minecraft.src;
public class mod_PlainUmbrella extends BaseMod
{
public static final Item PlainUmbrella = new ItemPlainUmbrella(489).setItemName("PlainUmbrella");
And this is the item file for the thing I want to craft.
package net.minecraft.src;
public class ItemRazorUmbrella extends Item
{
public ItemRazorUmbrella(int i)
{
super(i);
maxStackSize = 64;
}
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
}
I'm having problems again, this time attempting to use my own materials in the crafting recipe.
This is the mod file for the thing I want it to be crafted with
package net.minecraft.src;
public class mod_PlainUmbrella extends BaseMod
{
public static final Item PlainUmbrella = new ItemPlainUmbrella(489).setItemName("PlainUmbrella");
And this is the item file for the thing I want to craft.
package net.minecraft.src;
public class ItemRazorUmbrella extends Item
{
public ItemRazorUmbrella(int i)
{
super(i);
maxStackSize = 64;
}
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
}
Please help.
Thanks.
You should combine your mod_ files into one file, then it will work better.
I have another question, what is the effect that happens when you kill the enderdragon? It seems to be like some puprle beam of light, does anybody know what its class file? What is the name of the effect? I want to use it as an effecting for my mods.
On a totally unrelated topic: is there a way to make the potion effect for instant health give me a smaller amount, because at the moment I am trying to make some potion effect food that restores like 1-1/2 hearts, but it seems that it will restore way more then that when I use it, so I was just wondering if you thought there was a way to make the effect less, otherwise, I will just use the regeneration effect.
I haven't really played with potions so I don't know. I'm sure there is a way to do it, but I don't know how to do it.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
BlockUseless
package net.minecraft.src;
import java.util.Random;
public class BlockUseless extends Block
{
public BlockUseless(int i, int j)
{
super(i, j, Material.field_1336_B);
}
public int idDropped(int i, Random random, int j)
{
return mod_Useless.Useless.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
mod_Useless
package net.minecraft.src;
public class mod_Useless extends BaseMod
{ public static final Block Useless = new BlockUseless(160,
0).setBlockName("Don").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{ Useless.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mod/Random.png");
ModLoader.registerBlock(Useless);
ModLoader.addName(Useless, "Don");
ModLoader.addRecipe(new ItemStack(Useless,1),new Object [] {" # ", Character.valueOf('#'),Block.dirt,});
}
public String getVersion()
{
return "1.2.4";
}
}
The only thing I can see wrong is the material. Methods and fields have been renamed in 1.2.4 so that may be your problem.
It was sort of a guess but I used that tutorial ages ago and it took them like over an hour to explain stuff. I followed what they did, and it didn't even work, with 1.1 anyway.
I'm having problems again, this time attempting to use my own materials in the crafting recipe.
This is the mod file for the thing I want it to be crafted with
package net.minecraft.src;
public class mod_PlainUmbrella extends BaseMod
{
public static final Item PlainUmbrella = new ItemPlainUmbrella(489).setItemName("PlainUmbrella");
And this is the item file for the thing I want to craft.
package net.minecraft.src;
public class ItemRazorUmbrella extends Item
{
public ItemRazorUmbrella(int i)
{
super(i);
maxStackSize = 64;
}
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
}
Please help.
Thanks.
What are you having trouble with exactly? Also, keep everything in one mod_ class. It is much neater, easier and better way of doing it.
When I try to recompile, with my new food coded I get this error:
== 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_01\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_RedstonePlus.java:9: error: constructor Item
RedstoneDrink in class ItemRedstoneDrink cannot be applied to given types;
public static final Item RedstoneDrink = new ItemRedstoneDrink(5001, 10, 1F, fal
se).setItemName("Redstone Drink");
^
required: int
found: int,int,float,boolean
reason: actual and formal argument lists differ in length
1 error
==================
!! Can not find server sources, try decompiling !!
Post your ItemRedstoneDrink class.
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 another question, what is the effect that happens when you kill the enderdragon? It seems to be like some puprle beam of light, does anybody know what its class file? What is the name of the effect? I want to use it as an effecting for my mods.
Look in EntityDragon at line 585, in the method onDeathUpdate. The three float lines above it are also important.
I've tried to make a mod which adds a few new mobs. But only the first I code spawns. The 2nd, 3rd and so on just aren't spawning, however the recomipiling gives no errors. Could you try to find what causes this?
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
i have an question now tho. now i know how to use difrent textures for difrent sides of the block. but i whant to use cordinates like terrain.png does ... can you make and send or teach me how to use cordinates in png's ?? that would be awsome becose than i dont need to have 50 pictures and only use 1 png
i know how to use the terrain cordinate there eazy to use but i whant to add my own png and cordinates
hope you can help
greets
To use 1 png for all your items, you need to use MinecraftForge. If you haven't heard of it, it is an API for modders(and players), that is similar to ModLoader but has a lot more features. The person who is currently assisting with the coding of the mod I'm working on is trying to do it without Forge. He managed to find a way to use custom sounds without audiomod so I'm pretty sure he will figure this out too
I dont think so, but can you answer my question, do I just make a new folder or project or ..
What do I do? Where do I start modding in.
I use Eclipse BTW
You create your new classes in the package:
net.minecraft.src
If you have no clue about packages, I really suggest that you have a look at the page that I linked at the bottom of the OP. It will help you.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Is it HDAViirus and Teken by any chance?
together they are powerful beyond imagination."
I tried to add exactly what I had, just after the System.err.println chunk, but when I started a new world it would crash the game whenever I got close enough to a boat for it to generate.
Oh, and this is the crash report, in case it makes a difference.:
EDIT: No, I was wrong. Let me think of something else that might be causing it.Ok, try adding one more int before the 2000. I think you are missing one.
together they are powerful beyond imagination."
Thanks it worked, but now i have another problem. I change his health to be 150, but it is still 20. What is the problem?
EDIT: I got it to work
so that is was the same place as were I told it to generate the mob spawner block, as you can see here:
oops here you go I'll just put them all here again
recompiling errors
symbol : method setBlockName(java.lang.String)
location: class net.minecraft.src.BlockUseless
0).setBlockName("Don").setHardness(3F).setResistance(4F).setLightValue(1F);
^
src\minecraft\net\minecraft\src\BlockUseless.java:15: cannot find symbol
symbol : variable blockID
location: class net.minecraft.src.Block
return mod_Useless.Useless.blockID;
^
src\minecraft\net\minecraft\src\mod_Useless.java:8: cannot find symbol
symbol : variable blockIndexInTexture
location: class net.minecraft.src.Block
{ Useless.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mod/Random.png");
^
src\minecraft\net\minecraft\src\mod_Useless.java:11: cannot find symbol
symbol : variable dirt
location: class net.minecraft.src.Block
ModLoader.addRecipe(new ItemStack(Useless,1),new Object [] {" # ", Character.valueOf('#'),Block.dirt,});
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
BlockUseless
Never mind, did more testing and I figured out that the reason that my mob wasn't spawning was because there was too much light, but otherwise it will work fine! Thanks for all the help, the thing is... I thought the mob spawners weren't effected by light... Hum... I guess I will have to re-think my boat design.
rofl , how'd u know ?
This is the mod file for the thing I want it to be crafted with
package net.minecraft.src;
public class mod_PlainUmbrella extends BaseMod
{
public static final Item PlainUmbrella = new ItemPlainUmbrella(489).setItemName("PlainUmbrella");
public void load()
{
PlainUmbrella.iconIndex = ModLoader.addOverride("/gui/items.png", "/batman/plainumbrella.png");
ModLoader.addName(PlainUmbrella, "Plain Umbrella");
ModLoader.addRecipe(new ItemStack(PlainUmbrella, 1), new Object [] {"###", " @ ", "@@ ", Character.valueOf('#'), new ItemStack (Block.cloth, 1, 15), Character.valueOf('@'), Item.ingotIron});
}
public String getVersion()
{
return "1.2.4";
}
}
package net.minecraft.src;
public class ItemPlainUmbrella extends Item
{
public ItemPlainUmbrella(int i)
{
super(i);
maxStackSize = 64;
}
}
package net.minecraft.src;
public class mod_RazorUmbrella extends BaseMod
{
public static final Item RazorUmbrella = new ItemRazorUmbrella(496).setItemName("RazorUmbrella");
public void load()
{
RazorUmbrella.iconIndex = ModLoader.addOverride("/gui/items.png", "/pathtoyourfile/image.png");
ModLoader.addName(RazorUmbrella, "Razor Umbrella");
ModLoader.addRecipe(new ItemStack(RazorUmbrella, 1), new Object [] {"#@#", Character.valueOf('#'), Item.ingotIron, Character.valueOf('@'), PlainUmbrella });
}
public String getVersion()
{
return "1.2.4";
}
}
package net.minecraft.src;
public class ItemRazorUmbrella extends Item
{
public ItemRazorUmbrella(int i)
{
super(i);
maxStackSize = 64;
}
public int getDamageVsEntity(Entity par1Entity)
{
return 7;
}
}
Thanks.
I believe that this is because you have
instead of
But it is difficult to tell without looking at the code.
You should combine your mod_ files into one file, then it will work better.
I saw your superfoods mod and really want to know what paint editing program you used cause i can't put a transparent background with paint!
By the way Epic mods you made!
For now put it in the To do list?
you can use paint.net or gimp. There both free.
I haven't really played with potions so I don't know. I'm sure there is a way to do it, but I don't know how to do it.
The only thing I can see wrong is the material. Methods and fields have been renamed in 1.2.4 so that may be your problem.
It was sort of a guess but I used that tutorial ages ago and it took them like over an hour to explain stuff. I followed what they did, and it didn't even work, with 1.1 anyway.
What are you having trouble with exactly? Also, keep everything in one mod_ class. It is much neater, easier and better way of doing it.
Post your ItemRedstoneDrink class.
together they are powerful beyond imagination."
I will get to it when I get to it. Asking only slows me down.
Look in EntityDragon at line 585, in the method onDeathUpdate. The three float lines above it are also important.
Guns are quite an advanced sort of thing. I'll add it to the list, but it will probably be the last thing I do.
Post your code please.
together they are powerful beyond imagination."
To use 1 png for all your items, you need to use MinecraftForge. If you haven't heard of it, it is an API for modders(and players), that is similar to ModLoader but has a lot more features. The person who is currently assisting with the coding of the mod I'm working on is trying to do it without Forge. He managed to find a way to use custom sounds without audiomod so I'm pretty sure he will figure this out too
You create your new classes in the package:
If you have no clue about packages, I really suggest that you have a look at the page that I linked at the bottom of the OP. It will help you.
together they are powerful beyond imagination."