Hey TechGuy, I did everything you said in generating my custom flowers. I made my WorldGenCustomFlower and made it to work with my flower in the generate method in the mod_ class. But in the WorldGenCustomFlower, I don't what to edit there or something. And it errors in my mod_ class because it says that the constructor WorldGenCustomFlower (int, int) is undefined. What do I do?
im currently working on a lightsaber mod (im sure theres probably loads out there already) but anyway, so far ive got the light sabers complete with recipes and their own section on enumtoolmaterials, this is okay but i would like to try and add sounds to it so that when you attack and such it makes the classic lightsaber sound. and also i wanted to make the saber a hand held light source so that it emits a small amount of light even when held, i was just wondering if any of the above were at all possible and if you knew how to achieve it?
Heres my Code so far
public
class mod_LightSabers extends BaseMod {
publicstaticfinal Item BlueSaber= new ItemSword(2010, EnumToolMaterial.LIGHTSABER).setItemName("Blue Saber");
publicstaticfinal Item GreenSaber= new ItemSword(2011, EnumToolMaterial.LIGHTSABER).setItemName("Green Saber");
publicstaticfinal Item RedSaber= new ItemSword(2012, EnumToolMaterial.LIGHTSABER).setItemName("Red Saber");
publicstaticfinal Item PurpleSaber= new ItemSword(2013, EnumToolMaterial.LIGHTSABER).setItemName("Purple Saber");
publicstaticfinal Item BlueSaberCrystal= new Item(2020).setItemName("Blue Saber Crystal");
publicstaticfinal Item GreenSaberCrystal= new Item(2021).setItemName("Green Saber Crystal");
publicstaticfinal Item RedSaberCrystal= new Item(2022).setItemName("Red Saber Crystal");
publicstaticfinal Item PurpleSaberCrystal= new Item(2023).setItemName("Purple Saber Crystal");
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
im currently working on a lightsaber mod (im sure theres probably loads out there already) but anyway, so far ive got the light sabers complete with recipes and their own section on enumtoolmaterials, this is okay but i would like to try and add sounds to it so that when you attack and such it makes the classic lightsaber sound. and also i wanted to make the saber a hand held light source so that it emits a small amount of light even when held, i was just wondering if any of the above were at all possible and if you knew how to achieve it?
Heres my Code so far
public
class mod_LightSabers extends BaseMod {
publicstaticfinal Item BlueSaber= new ItemSword(2010, EnumToolMaterial.LIGHTSABER).setItemName("Blue Saber");
publicstaticfinal Item GreenSaber= new ItemSword(2011, EnumToolMaterial.LIGHTSABER).setItemName("Green Saber");
publicstaticfinal Item RedSaber= new ItemSword(2012, EnumToolMaterial.LIGHTSABER).setItemName("Red Saber");
publicstaticfinal Item PurpleSaber= new ItemSword(2013, EnumToolMaterial.LIGHTSABER).setItemName("Purple Saber");
publicstaticfinal Item BlueSaberCrystal= new Item(2020).setItemName("Blue Saber Crystal");
publicstaticfinal Item GreenSaberCrystal= new Item(2021).setItemName("Green Saber Crystal");
publicstaticfinal Item RedSaberCrystal= new Item(2022).setItemName("Red Saber Crystal");
publicstaticfinal Item PurpleSaberCrystal= new Item(2023).setItemName("Purple Saber Crystal");
ModLoader.addRecipe( new ItemStack(BlueSaber, 1), new Object[] {"*@*", "*#*", "*%*", Character.valueOf('*'), Item.ingotIron, Character.valueOf('#'), mod_LightSabers.BlueSaberCrystal, Character.valueOf('%'), Block.obsidian, Character.valueOf('@'), Block.glass}); ModLoader.addRecipe( new ItemStack(GreenSaber, 1), new Object[] {"*@*", "*#*", "*%*", Character.valueOf('*'), Item.ingotIron, Character.valueOf('#'), mod_LightSabers.GreenSaberCrystal, Character.valueOf('%'), Block.obsidian, Character.valueOf('@'), Block.glass}); ModLoader.addRecipe( new ItemStack(RedSaber, 1), new Object[] {"*@*", "*#*", "*%*", Character.valueOf('*'), Item.ingotIron, Character.valueOf('#'), mod_LightSabers.RedSaberCrystal, Character.valueOf('%'), Block.obsidian, Character.valueOf('@'), Block.glass}); ModLoader.addRecipe( new ItemStack(PurpleSaber, 1), new Object[] {"*@*", "*#*", "*%*", Character.valueOf('*'), Item.ingotIron, Character.valueOf('#'), mod_LightSabers.PurpleSaberCrystal, Character.valueOf('%'), Block.obsidian, Character.valueOf('@'), Block.glass}); ModLoader.addRecipe( new ItemStack(BlueSaberCrystal, 1), new Object[] {" * ", "*@*", " * ", Character.valueOf('@'), Item.diamond, Character.valueOf('*'), new ItemStack(Item.dyePowder, 1, 4) }); ModLoader.addRecipe( new ItemStack(GreenSaberCrystal, 1), new Object[] {" * ", "*@*", " * ", Character.valueOf('@'), Item.diamond, Character.valueOf('*'), new ItemStack(Item.dyePowder, 1, 10) }); ModLoader.addRecipe( new ItemStack(RedSaberCrystal, 1), new Object[] {" * ", "*@*", " * ", Character.valueOf('@'), Item.diamond, Character.valueOf('*'), new ItemStack(Item.dyePowder, 1, 1) }); ModLoader.addRecipe( new ItemStack(PurpleSaberCrystal, 1), new Object[] {" * ", "*@*", " * ", Character.valueOf('@'), Item.diamond, Character.valueOf('*'), new ItemStack(Item.dyePowder, 1, 5) });
}
publicvoid load() { }
public String getVersion() {
return"1.2.5"; }
}
There is a mod called Dynamic Lights. It makes certain items emit lights when hand held. Their is also a mod called MATmos, which adds sound when swinging swords. Well, you could ask them. Also in Mod Development Section, but not here.
Hi, i tried to make biome. It did success but then i replaced the gold block, with my own block, it still worked then i recompiled then i started client it still worked, then i made new world, it still worked then i just flied around with creative mode, suddenly it crashes, and i cant find my biome. Pls help me if you can, here is the crash report.
Mods loaded: 4
ModLoader 1.2.5
mod_ModLoaderMp 1.2.5v1
mod_Mystic 1.2.5
mod_MysticBiome 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bcebae47 --------
Generated 25.5.2012 18:46
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce GT 420/PCI/SSE2 version 4.0.0, NVIDIA Corporation
java.lang.ArrayIndexOutOfBoundsException: -55
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:83)
at net.minecraft.src.Chunk.<init>(Chunk.java:113)
at net.minecraft.src.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:290)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:93)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:119)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:654)
at net.minecraft.src.World.getBlockId(World.java:547)
at net.minecraft.src.SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnerAnimals.java:204)
at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:118)
at net.minecraft.src.World.tick(World.java:2850)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1903)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT a5bfb135 ----------
and sorry, im bad with this forum and i dont know how to make those "spoiler" things.
AND your tutorials are great techman!
You make a spoiler like this:
[spoiler] your text here [/spoiler]
just remember to put in the "/"
Sorry, I don't know how to fix your problem
@TechGuy543, Hi, your mod tutorials are great!!
only problem is, is that the basic NPC mod doesnt seem to work.
I copied and pasted it in and changed everything to my preference.
Here are the codes:
mod_SpottedGranny.java
package net.minecraft.src;
import java.util.Map;
public class mod_SpottedGranny extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntitySpottedGranny.class, "Spotted Granny", 110);
ModLoader.addSpawn(EntitySpottedGranny.class, 12, 14, 18, EnumCreatureType.monster);
}
public void ModLoaderaddRenderer(Map<Class<EntitySpottedGranny>, RenderBiped> map)
{
map.put(EntitySpottedGranny.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntitySpottedGranny.java
package net.minecraft.src;
public class EntitySpottedGranny extends EntityMob
{
public EntitySpottedGranny(World world)
{
super(world);
texture = "/mob/SpottedGranny.png";
moveSpeed = 0.3F;
attackStrength = 6;}
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.spot.shiftedIndex;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.stick, 1);
}
private static final ItemStack defaultHeldItem;
protected boolean canDespawn()
{
return false;
}
}
Problems:
1- When i attack the mob and kill it, the game half crashes, and the screen changes to 'saving chunks' and then quits. Then when i go back onto the game, it shows the mob despawn and drops nothing.
2- when i was flying around trying to find one, and i got near one, the game crashed (like i said before) and quit
3- I want it to hold a stick, but it holds nothing at all when i see it.
4- I has to change the code slightly to stop the error on the side on eclipse
Hi, i tried to make biome. It did success but then i replaced the gold block, with my own block, it still worked then i recompiled then i started client it still worked, then i made new world, it still worked then i just flied around with creative mode, suddenly it crashes, and i cant find my biome. Pls help me if you can, here is the crash report.
Mods loaded: 4
ModLoader 1.2.5
mod_ModLoaderMp 1.2.5v1
mod_Mystic 1.2.5
mod_MysticBiome 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT bcebae47 --------
Generated 25.5.2012 18:46
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_26, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce GT 420/PCI/SSE2 version 4.0.0, NVIDIA Corporation
java.lang.ArrayIndexOutOfBoundsException: -55
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:83)
at net.minecraft.src.Chunk.<init>(Chunk.java:113)
at net.minecraft.src.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:290)
at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:93)
at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:119)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:654)
at net.minecraft.src.World.getBlockId(World.java:547)
at net.minecraft.src.SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnerAnimals.java:204)
at net.minecraft.src.SpawnerAnimals.performSpawning(SpawnerAnimals.java:118)
at net.minecraft.src.World.tick(World.java:2850)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1903)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT a5bfb135 ----------
and sorry, im bad with this forum and i dont know how to make those "spoiler" things.
AND your tutorials are great techman!
Put the id of the block you're trying to generate below 127. A byte's limit in Java id -128 to 127. Therefore if you go over that then Minecraft will crash. It is quite annoying but there isn't really any other non-base-class-edit way around it.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I copied the code over and started again - i got a little yellow warning symbol on this bit of the code for some reason
public void addRenderer(Map map)
{
map.put(EntitySpottedGranny.class, new RenderBiped(new ModelBiped(), 0.5F));
}
but annyways, heres the code:
mod_SpottedGranny
package net.minecraft.src;
import java.util.Map;
public class mod_SpottedGranny extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntitySpottedGranny.class, "Spotted Granny", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntitySpottedGranny.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntitySpottedGranny.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntitySpottedGranny
package net.minecraft.src;
public class EntitySpottedGranny extends EntityMob
{
public EntitySpottedGranny(World world)
{
super(world);
texture = "/image.png";
moveSpeed = 0.3F;
attackStrength = 10; //take this line out if this class doesn't extend EntityMob.
}
public int getMaxHealth()
{
return 35;
}
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;
}
}
so it only had the yellow arrow bit on the bit i showed you - but i recompiled (because you said it should work if i copied the code correctly) and it came up with this error:
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
one thing i would like to ask @TechGuy543, is how you add a previosly made mod (.class files) back into "net.minecraft.src" folder so your mob can drop and item you have made with modloader a while ago? (i did a cleanup + re-decompiled because i screwed up some of the files :/)
please help - your tutorials are great
Put your mod into the jar with ModLoader and decompile again(after cleaning up, of course). If it fails decompiling, then you'll need to start again. Always back up your code.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Is this the same?
Because it didint work allone.Only with a blockupdate :/
setTickOnLoad was the old name of the method for making blocks tick. setTickRandomly is the new name for it. Go look in BlockCrops if you don't believe me.
I want to add a NPC to the game, but somewhy I can not do it. The texture has broken and the unique model has not sensitive. I show some pictures and source code. What can be the problem?
You obviously aren't using my tutorials if you get a problem like that. Either use my tutorial to fix the error or go and post in Mod Development. I know what the problem is but on the OP I specifically state that I'm only helping people here that are using my tutorials.
get living sound, does it mean what it will 'say' when it is just wondering around?
And how would you make it have 2 of these for example?
Thanks
1. You can convert to that sound using a sound converter. You can use Audacity too, just open the sound file in it then save it again as a different format.
2. In the ModLoader.addSpawn line, use EnumCreatureType.monster.
3. Yes, that is the sound it makes when walking around. I think you could use a switch for two different sounds.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
hi dude. I have a question. How do you add a modded item to a recipe?
You have to for example put.
"X ", character.valueOf('X'), mod_Namehere.Blocknamehere.Blockid
Or for items pretty much same thing.
"X ", character.valueOf('X'), mod_Namehere.Itemnamehere.shiftedIndex
Nvm this thing. I found a way.
Not without a rewrite of the rendering system, as far as I'm aware.
I don't cover sounds here. Go and ask in Mod Development. For the lighting you need to use Dynamic Lights.
together they are powerful beyond imagination."
There is a mod called Dynamic Lights. It makes certain items emit lights when hand held. Their is also a mod called MATmos, which adds sound when swinging swords. Well, you could ask them. Also in Mod Development Section, but not here.
my sword work but all the texture are f#@$ed up
where do i put my sword texture?
and also i have two mobs
but it keeps saying
Skipping Entity with id In-gameEntityNamewait how do i path the texture to the weapon's texture
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou make a spoiler like this:
just remember to put in the "/"
Sorry, I don't know how to fix your problem
I looked on TechGuy's code and yours. There are some lines of code that are different from TechGuy's codes. Please use his template.
my textures are ****ed up
most of the items are blank
and others are just redsone lamp
Post your code.
Put the id of the block you're trying to generate below 127. A byte's limit in Java id -128 to 127. Therefore if you go over that then Minecraft will crash. It is quite annoying but there isn't really any other non-base-class-edit way around it.
together they are powerful beyond imagination."
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/ModLoader.java:3: '.' expected
import MLProp;
^
src/minecraft/net/minecraft/src/ModLoader.java:3: ';' expected
import MLProp;
^
src/minecraft/net/minecraft/src/ModLoader.java:4: class, interface, or enum expected
import java.io.File;
^
3 errors
==================
HELP IF YOU CAN
PLEASE
There is no error, on your post.
together they are powerful beyond imagination."
Put your mod into the jar with ModLoader and decompile again(after cleaning up, of course). If it fails decompiling, then you'll need to start again. Always back up your code.
together they are powerful beyond imagination."
setTickOnLoad was the old name of the method for making blocks tick. setTickRandomly is the new name for it. Go look in BlockCrops if you don't believe me.
You obviously aren't using my tutorials if you get a problem like that. Either use my tutorial to fix the error or go and post in Mod Development. I know what the problem is but on the OP I specifically state that I'm only helping people here that are using my tutorials.
Thanks
1. You can convert to that sound using a sound converter. You can use Audacity too, just open the sound file in it then save it again as a different format.
2. In the ModLoader.addSpawn line, use EnumCreatureType.monster.
3. Yes, that is the sound it makes when walking around. I think you could use a switch for two different sounds.
together they are powerful beyond imagination."
Yes i have i even installed the decompile fixes
"X ", character.valueOf('X'), mod_Namehere.Blocknamehere.Blockid Or for items pretty much same thing. "X ", character.valueOf('X'), mod_Namehere.Itemnamehere.shiftedIndex