I was looking around for information about metaData:
Shouldnt it be possible to share a single ID with multiple blocks? I havent found any up-to-date tutorials showing how to do that... is there a link somebody could share or post something like an "How-To"?
The tutorials here are great and very well explained. I have no porblems creating lots of blocks, but in the end I believe it would be better to have them share a single ID if possible.
Well, it's possible to share a single ID with multiple blocks per sei, but they have to have damage values assigned to them to be distinguished. If you make them explicitly share the same data value, then the item/block defined with that that data value FIRST will assume it, and the other item will basically be overridden.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Well, it's possible to share a single ID with multiple blocks per sei, but they have to have damage values assigned to them to be distinguished. If you make them explicitly share the same data value, then the item/block defined with that that data value FIRST will assume it, and the other item will basically be overridden.
That seems to be my problem... but how do I assign the damagevalues correctly? I tried going with this, but in the end they were just overwritten:
*snip*
public static final Block ColoredPlanks = new BlockWood(189).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ColoredPlanks");
public void load() {
//Exampleblock #01, "Blast-Resistant Glass"
ModLoader.registerBlock(BlastResistantGlass);
ModLoader.addName(BlastResistantGlass, "Blast-Resistant Glass");
BlastResistantGlass.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/BlastResistantGlass.png");
//Exampleblock #02, "Planks" sharing the same ID
ModLoader.registerBlock(ColoredPlanks);
ModLoader.addName(ColoredPlanks, "Colored Planks");
ColoredPlanks.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/ColoredPlanks00.png");
ModLoader.addName(new ItemStack(ColoredPlanks, 189), "Red Plank");
ModLoader.addName(new ItemStack(ColoredPlanks, 189, 1), "Purple Plank");
ModLoader.addName(new ItemStack(ColoredPlanks, 189, 2), "Orange Plank");
}*snip*
That was the only thing I could find after googling, but as already mentioned this is not working... do I have to set up a completely new Blocktype instadof just using the Vanilla Plank-Block?
I have a question, when I added a hoe in my mod, I noticed that it's not working properly in the game. The hoe doesnt create the farmland when right-clicked on grass/dirt block. Any solutions and fixes?
Rollback Post to RevisionRollBack
You may ask for cookies, but it doesn't mean you're going to get them. This is known as the way of life. ShaoTheGamerHD's Channel
That seems to be my problem... but how do I assign the damagevalues correctly? I tried going with this, but in the end they were just overwritten:
*snip*
public static final Block ColoredPlanks = new BlockWood(189).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ColoredPlanks");
public void load() {
//Exampleblock #01, "Blast-Resistant Glass"
ModLoader.registerBlock(BlastResistantGlass);
ModLoader.addName(BlastResistantGlass, "Blast-Resistant Glass");
BlastResistantGlass.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/BlastResistantGlass.png");
//Exampleblock #02, "Planks" sharing the same ID
ModLoader.registerBlock(ColoredPlanks);
ModLoader.addName(ColoredPlanks, "Colored Planks");
ColoredPlanks.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/ColoredPlanks00.png");
ModLoader.addName(new ItemStack(ColoredPlanks, 189), "Red Plank");
ModLoader.addName(new ItemStack(ColoredPlanks, 189, 1), "Purple Plank");
ModLoader.addName(new ItemStack(ColoredPlanks, 189, 2), "Orange Plank");
}*snip*
That was the only thing I could find after googling, but as already mentioned this is not working... do I have to set up a completely new Blocktype instadof just using the Vanilla Plank-Block?
Honestly, I don't know how to assign damage values to items/blocks yet. If I find out, I'll let you know (I would really like to know myself.)
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
TechGuy! Awsome news!!! I have figured out the code to a human mob! BUT I will give you the code if you tell me how to make so a NPC have a name above the head. Like the villagers had Testificate before. That is what I need. Tell me that and you will get the code.
Ya know, he's never going to do this. Just saying,
Techguy, I am getting this error in 1.3.2 when trying to run the game (I will message my code if asked to do so.:
27 achievements
195 recipes
Setting user: Player701, -
Client asked for parameter: server
LWJGL Version: 2.4.2
ModLoader 1.3.2 Initializing...
Mod Initialized: mod_Diego for 1.3.2
Overriding /gui/items.png with /textures/bacon.png @ 38. 80 left.
Overriding /gui/items.png with /textures/baconRaw.png @ 102. 79 left.
Overriding /gui/items.png with /textures/MineralFood.png @ 118. 78 left.
Overriding /terrain.png with /textures/RedstoneBlock.png @ 26. 31 left.
Overriding /gui/items.png with /textures/Nerfite.png @ 119. 77 left.
Overriding /terrain.png with /textures/NerfiteOre.png @ 27. 30 left.
Overriding /gui/items.png with /textures/PigManEgg.png @ 120. 76 left.
Overriding /terrain.png with /textures/CoalBlock.png @ 41. 29 left.
Overriding /gui/items.png with /textures/NerfiteBar.png @ 134. 75 left.
Mod Loaded: mod_Diego for 1.3.2
Done.
Starting up SoundSystem...
Initializing LWJGL OpenAL
(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
OpenAL initialized.
java.lang.NullPointerException
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1220)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:857)
at net.minecraft.client.Minecraft.run(Minecraft.java:751)
at java.lang.Thread.run(Unknown Source)
Stopping!
TechGuy! Awsome news!!! I have figured out the code to a human mob! BUT I will give you the code if you tell me how to make so a NPC have a name above the head. Like the villagers had Testificate before. That is what I need. Tell me that and you will get the code.
That's not how it works. He'll never do this.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Techguy, I am getting this error in 1.3.2 when trying to run the game (I will message my code if asked to do so.:
27 achievements
195 recipes
Setting user: Player701, -
Client asked for parameter: server
LWJGL Version: 2.4.2
ModLoader 1.3.2 Initializing...
Mod Initialized: mod_Diego for 1.3.2
Overriding /gui/items.png with /textures/bacon.png @ 38. 80 left.
Overriding /gui/items.png with /textures/baconRaw.png @ 102. 79 left.
Overriding /gui/items.png with /textures/MineralFood.png @ 118. 78 left.
Overriding /terrain.png with /textures/RedstoneBlock.png @ 26. 31 left.
Overriding /gui/items.png with /textures/Nerfite.png @ 119. 77 left.
Overriding /terrain.png with /textures/NerfiteOre.png @ 27. 30 left.
Overriding /gui/items.png with /textures/PigManEgg.png @ 120. 76 left.
Overriding /terrain.png with /textures/CoalBlock.png @ 41. 29 left.
Overriding /gui/items.png with /textures/NerfiteBar.png @ 134. 75 left.
Mod Loaded: mod_Diego for 1.3.2
Done.
Starting up SoundSystem...
Initializing LWJGL OpenAL
(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
OpenAL initialized.
java.lang.NullPointerException
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1220)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:857)
at net.minecraft.client.Minecraft.run(Minecraft.java:751)
at java.lang.Thread.run(Unknown Source)
Stopping!
There is a null (nothing) in the code and the listed class files didnt know what to do with it, so it probably shut down. You might wanna take a look at that.
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Exception occured in ModLoader
This error has been saved to /Users/raywendt/Library/Application Support/minecraft/crash-reports/crash-2012-08-21_09.06.10-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT ca9b2137 --------
Generated 8/21/12 9:06 AM
- Minecraft Version: 1.3.2
- Operating System: Mac OS X (i386) version 10.7.4
- Java Version: 1.6.0_33, Apple Inc.
- Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Apple Inc.
- Memory: 501774336 bytes (478 MB) / 535232512 bytes (510 MB) up to 1070399488 bytes (1020 MB)
- JVM Flags: 3 total; -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Resources/LauncherSupport.jar -Xms512M -Xmx1024M
- ModLoader: Mods loaded: 1
ModLoader 1.3.2
java.lang.NoSuchFieldError: e
at BlockGranite.<init>(BlockGranite.java:7)
at mod_Geology.<clinit>(mod_Geology.java:4)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at ModLoader.addMod(ModLoader.java:343)
at ModLoader.readFromClassPath(ModLoader.java:1333)
at ModLoader.init(ModLoader.java:931)
at ModLoader.addAllRenderers(ModLoader.java:185)
at avy.<init>(RenderManager.java:87)
at avy.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(SourceFile:260)
at net.minecraft.client.Minecraft.run(SourceFile:516)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT b97125d9 ----------
And the files:
mod_Geology
package net.minecraft.src;
public class mod_Geology extends BaseMod
{
public static final Block granite = new BlockGranite(160,0).setBlockName("granite").setHardness(3F).setResistance(4F);
public void load()
{
granite.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/geology/granite.png");
ModLoader.registerBlock(granite);
ModLoader.addName(granite, "Granite");
ModLoader.addRecipe(new ItemStack(granite, 1), new Object [] {"#",Character.valueOf('#'),Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockGranite
package net.minecraft.src;
import java.util.Random;
public class BlockGranite extends Block
{
public BlockGranite(int i, int j)
{
super(i,j,Material.rock);
setCreativeTab(CreativeTabs.tabBlock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Geology.granite.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Send me a pm for an answer for what I've done incorrect.
package net.minecraft.src;
import java.util.Random;
public class Cement extends Block
{
public Cement(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return Mod_DecorBlocks.nameHere.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
public class Mod_DecorBlocks extends BaseMod
{
public static final Block Cement = new Cement(160, 0).Cement("Cement").setHardness(4F).setResistance(350F).setLightValue(1F).setCreativeTab(CreativeTabs.tabBlock);
public void load()
{
Cement.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/cement.png");
ModLoader.registerBlock(Cement);
ModLoader.addName(Cement, "Cement");
ModLoader.addRecipe(new ItemStack(itemtoreceive, quantity), new Object [] {"@", "%", "#", Character.valueOf('#'), Block.stone, Character.valueOf('@'), Block.gravel, Character.valueOf('%'), Item.bone});}
public String getVersion()
{
return "1.3.1";
}
}
Send me a pm for an answer for what I've done incorrect.
package net.minecraft.src;
import java.util.Random;
public class Cement extends Block
{
public Cement(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return Mod_DecorBlocks.nameHere.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
package net.minecraft.src;
public class Mod_DecorBlocks extends BaseMod
{
public static final Block Cement = new Cement(160, 0).Cement("Cement").setHardness(4F).setResistance(350F).setLightValue(1F).setCreativeTab(CreativeTabs.tabBlock);
public void load()
{
Cement.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/cement.png");
ModLoader.registerBlock(Cement);
ModLoader.addName(Cement, "Cement");
ModLoader.addRecipe(new ItemStack(itemtoreceive, quantity), new Object [] {"@", "%", "#", Character.valueOf('#'), Block.stone, Character.valueOf('@'), Block.gravel, Character.valueOf('%'), Item.bone});}
public String getVersion()
{
return "1.3.1";
}
}
Um, are you getting an error?
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
All you people asking when something will get done will result in getting this thread locked, and none of us want that to happen.
See, it's people like you who make the rest of us look good. Thank you for getting it.
In the mean time, we should just work on figuring stuff out for ourselves.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
anybody know how to get custom block textures to work with forge because it seems differant than if your using risugami's mod loader. and FML just seems to load it... well... differently.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWell, it's possible to share a single ID with multiple blocks per sei, but they have to have damage values assigned to them to be distinguished. If you make them explicitly share the same data value, then the item/block defined with that that data value FIRST will assume it, and the other item will basically be overridden.
Fixed it, misnamed a statement, all is well now.
That seems to be my problem... but how do I assign the damagevalues correctly? I tried going with this, but in the end they were just overwritten:
*snip* public static final Block ColoredPlanks = new BlockWood(189).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setBlockName("ColoredPlanks"); public void load() { //Exampleblock #01, "Blast-Resistant Glass" ModLoader.registerBlock(BlastResistantGlass); ModLoader.addName(BlastResistantGlass, "Blast-Resistant Glass"); BlastResistantGlass.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/BlastResistantGlass.png"); //Exampleblock #02, "Planks" sharing the same ID ModLoader.registerBlock(ColoredPlanks); ModLoader.addName(ColoredPlanks, "Colored Planks"); ColoredPlanks.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/ColoredPlanks00.png"); ModLoader.addName(new ItemStack(ColoredPlanks, 189), "Red Plank"); ModLoader.addName(new ItemStack(ColoredPlanks, 189, 1), "Purple Plank"); ModLoader.addName(new ItemStack(ColoredPlanks, 189, 2), "Orange Plank"); }*snip*That was the only thing I could find after googling, but as already mentioned this is not working... do I have to set up a completely new Blocktype instadof just using the Vanilla Plank-Block?
You may ask for cookies, but it doesn't mean you're going to get them. This is known as the way of life.
ShaoTheGamerHD's Channel
-
View User Profile
-
View Posts
-
Send Message
Retired StaffHonestly, I don't know how to assign damage values to items/blocks yet. If I find out, I'll let you know (I would really like to know myself.)
Ya know, he's never going to do this. Just saying,
http://www.planetminecraft.com/blog/125-halo-3-weapons---custom-content-for-flans-mods/
27 achievements
195 recipes
Setting user: Player701, -
Client asked for parameter: server
LWJGL Version: 2.4.2
ModLoader 1.3.2 Initializing...
Mod Initialized: mod_Diego for 1.3.2
Overriding /gui/items.png with /textures/bacon.png @ 38. 80 left.
Overriding /gui/items.png with /textures/baconRaw.png @ 102. 79 left.
Overriding /gui/items.png with /textures/MineralFood.png @ 118. 78 left.
Overriding /terrain.png with /textures/RedstoneBlock.png @ 26. 31 left.
Overriding /gui/items.png with /textures/Nerfite.png @ 119. 77 left.
Overriding /terrain.png with /textures/NerfiteOre.png @ 27. 30 left.
Overriding /gui/items.png with /textures/PigManEgg.png @ 120. 76 left.
Overriding /terrain.png with /textures/CoalBlock.png @ 41. 29 left.
Overriding /gui/items.png with /textures/NerfiteBar.png @ 134. 75 left.
Mod Loaded: mod_Diego for 1.3.2
Done.
Starting up SoundSystem...
Initializing LWJGL OpenAL
(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
OpenAL initialized.
java.lang.NullPointerException
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1220)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:857)
at net.minecraft.client.Minecraft.run(Minecraft.java:751)
at java.lang.Thread.run(Unknown Source)
Stopping!
SoundSystem shutting down...
Author: Paul Lamb, www.paulscode.com
Someone is closing me!
How would one go as to add it?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThat's not how it works. He'll never do this.
When should i expect this to be updated?
and when should i expect this to be a full tutorial (everything is finished)?
There is a null (nothing) in the code and the listed class files didnt know what to do with it, so it probably shut down. You might wanna take a look at that.
The error:
And the files:
mod_Geology
package net.minecraft.src; public class mod_Geology extends BaseMod { public static final Block granite = new BlockGranite(160,0).setBlockName("granite").setHardness(3F).setResistance(4F); public void load() { granite.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/geology/granite.png"); ModLoader.registerBlock(granite); ModLoader.addName(granite, "Granite"); ModLoader.addRecipe(new ItemStack(granite, 1), new Object [] {"#",Character.valueOf('#'),Block.dirt}); } public String getVersion() { return "1.3.1"; } }BlockGranite
package net.minecraft.src; import java.util.Random; public class BlockGranite extends Block { public BlockGranite(int i, int j) { super(i,j,Material.rock); setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int i, Random random, int j) { return mod_Geology.granite.blockID; } public int quantityDropped(Random random) { return 1; } }thanks to anyone who helps!
package net.minecraft.src; import java.util.Random; public class Cement extends Block { public Cement(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return Mod_DecorBlocks.nameHere.blockID; } public int quantityDropped(Random random) { return 1; } }package net.minecraft.src; public class Mod_DecorBlocks extends BaseMod { public static final Block Cement = new Cement(160, 0).Cement("Cement").setHardness(4F).setResistance(350F).setLightValue(1F).setCreativeTab(CreativeTabs.tabBlock); public void load() { Cement.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/cement.png"); ModLoader.registerBlock(Cement); ModLoader.addName(Cement, "Cement"); ModLoader.addRecipe(new ItemStack(itemtoreceive, quantity), new Object [] {"@", "%", "#", Character.valueOf('#'), Block.stone, Character.valueOf('@'), Block.gravel, Character.valueOf('%'), Item.bone});} public String getVersion() { return "1.3.1"; } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffUm, are you getting an error?
Have A Sheep!
-
View User Profile
-
View Posts
-
Send Message
Retired StaffSee, it's people like you who make the rest of us look good. Thank you for getting it.
In the mean time, we should just work on figuring stuff out for ourselves.