package net.minecraft.src;
public class mod_DirtPlus extends BaseMod
{
public static final Block DirtStairs = new BlockDirtStairs(170, 0).setBlockName("Dirt Stairs").setHardness(1F).setResistance(2F);
public static final Block DirtBrick = new BlockDirtBrick(171, 0).setBlockName("Dirt Bricks").setHardness(2F).setResistance(4F);
public static final Block DirtSlab = new BlockDirtSlab(172, 0).setBlockName("Dirt Slab").setHardness(1F).setResistance(2F);
public void load()
{
DirtStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/DirtPlus/Dirt.png");
DirtBrick.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/DirtPlus/DirtBrick.png");
DirtSlab.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/DirtPlus/Dirt.png");
ModLoader.registerBlock(DirtStairs);
ModLoader.registerBlock(DirtBrick);
ModLoader.registerBlock(DirtSlab);
ModLoader.addName(DirtStairs, "Dirt Stairs");
ModLoader.addName(DirtBrick, "Dirt Bricks");
ModLoader.addName(DirtSlab, "Dirt Slab");
ModLoader.addRecipe(new ItemStack(DirtStairs, 1), new Object [] {"# ", "## ", "###", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 6), new Object [] {"# ", " ", " ", Character.valueOf('#'), DirtStairs});
ModLoader.addRecipe(new ItemStack(DirtBrick, 1), new Object [] {"## ", "## ", " ", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 4), new Object [] {"# ", " ", " ", Character.valueOf('#'), DirtBrick});
ModLoader.addRecipe(new ItemStack(DirtSlab, 6), new Object [] {" ", " ", "###", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 3), new Object [] {" ", " ", "# ", Character.valueOf('#'), DirtSlab});
}
public String getVersion()
{
return "1.2.3";
}
}
The BlockDirtBrick.java
package net.minecraft.src;
import java.util.Random;
public class BlockDirtBrick extends Block
{
public BlockDirtBrick(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_DirtPlus.DirtBrick.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
The BlockDirtStairs.java
package net.minecraft.src;
import java.util.ArrayList;
public class BlockDirtStairs extends Block
{
public BlockDirtStairs(int i, int j)
{
super(i, j, Material.wood);
}
public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if (l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2);
}
if (l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 1);
}
if (l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3);
}
if (l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 0);
}
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 10;
}
}
The BlockDirtSlab.java
package net.minecraft.src;
import java.util.Random;
public class BlockDirtSlab extends Block
{
protected BlockDirtSlab(int i, int j)
{
super(i, j, Material.wood);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
setLightOpacity(255);
}
public boolean isOpaqueCube()
{
return false;
}
public int idDropped(int i, Random random, int j)
{
return mod_DirtPlus.DirtSlab.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
if (this != Block.stairSingle)
{
super.shouldSideBeRendered(iblockaccess, i, j, k, l);
}
if (l == 1)
{
return true;
}
if (!super.shouldSideBeRendered(iblockaccess, i, j, k, l))
{
return false;
}
if (l == 0)
{
return true;
}
else
{
return iblockaccess.getBlockId(i, j, k) != blockID;
}
}
}
The crash is in my previous post.
And by the way, when I try to generate something I get the following message:
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
&--#62; Cleaning bin
&--#62; Recompiling
'"C:\Program Files\Java\jdk1.7.0_01\bin\javac" -g -source 1.6 -target 1.6 -class
path "lib;lib\*;jars\...' failed : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_DiamondsEverywhere.java:15: error: illegal c
haracter: \35
for(int k = 0; k &--#60; 10; k++)
^
src\minecraft\net\minecraft\src\mod_DiamondsEverywhere.java:15: error: not a sta
tement
for(int k = 0; k &--#60; 10; k++)
^
src\minecraft\net\minecraft\src\mod_DiamondsEverywhere.java:15: error: ')' expec
ted
for(int k = 0; k &--#60; 10; k++)
^
src\minecraft\net\minecraft\src\mod_DiamondsEverywhere.java:15: error: not a sta
tement
for(int k = 0; k &--#60; 10; k++)
^
src\minecraft\net\minecraft\src\mod_DiamondsEverywhere.java:15: error: ';' expec
ted
for(int k = 0; k &--#60; 10; k++)
^
5 errors
1 warning
==================
!! Can not find server sources, try decompiling !!
Remove all the extra " " sets as they're not needed.
ModLoader.addRecipe(new ItemStack(Block.dirt, 3), new Object [] {"# ", Character.valueOf('#'), DirtSlab});
For the generation, I've fixed it now, but the forum was changing the code I had written. It needs to be like this:
EDIT: I searched "Java" in my search bar. Got something called "Java VisualVM". Is that right?
Can you open Eclipse without getting an error message about not having the JDK installed? I am fairly sure now that most, if not all, Java stuff comes pre-packaged with OS X. I think that JavaVisualVM is right. As it is the Java Virtual Machine, which is what is used when modding to test the mod in the client(I use it, not sure about anyone else though).
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Can you open Eclipse without getting an error message about not having the JDK installed? I am fairly sure now that most, if not all, Java stuff comes pre-packaged with OS X. I think that JavaVisualVM is right. As it is the Java Virtual Machine, which is what is used when modding to test the mod in the client(I use it, not sure about anyone else though).
Crap. Where do I get to Eclipse? (I know, I'm not this good when it comes to computers).
Crap. Where do I get to Eclipse? (I know, I'm not this good when it comes to computers).
Get it from here. It's the third one on the list, "Eclipse IDE For Java Developers".
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
All of your code will then be in "modsrc" in the mcp directory.
Check all of your classes are in that directory, if they aren't go and get the missing ones from src.
Copy the "modsrc" folder to another directory outside of mcp.
Run cleanup.bat/sh.
Wait until there is a new version of mcp to be downloaded. It normally takes 3 days to a week.
Run updatemcp.bat/sh
Get a jar of the new version of minecraft and install the latest ModLoader for that version.
Put it in jars/bin along with all the other jars like lwjgl, make sure you get them from your .minecraft directory because they update with the minecraft.jar.
Decompile again.
Put all the .java's from "modsrc" back into src with all of the other client/server files(depending on what your mod is)
Fix any errors you get with the new version of MCP and ModLoader.
Um, it didn't seem to work, no errors, but it will still spawn below the water.
my code:
package net.minecraft.src;
import java.util.Random;
public class WorldGenBoat extends WorldGenerator
{
public WorldGenBoat()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
if(world.getBlockId(i, j, k) != Block.waterStill.blockID && world.getBlockId(i, j + 1, k) !=
0)
{
return false;
}
int wood = Block.planks.blockID;
world.setBlockWithNotify(i, j, k, wood);
world.setBlockWithNotify(i, j, k +1, wood);
world.setBlockWithNotify(i, j, k +2, wood);
world.setBlockWithNotify(i, j, k +3, wood);
world.setBlockWithNotify(i, j, k +4, wood);
world.setBlockWithNotify(i, j, k +5, wood);
world.setBlockWithNotify(i, j, k +6, wood);
world.setBlockWithNotify(i, j, k +7, wood);
return true;
}
}
I've been testing a few things, and I've come up with this:
public boolean generate(World world, Random random, int i, int j, int k)
{
if(world.getBlockId(i, j, k) == Block.waterStill.blockID && world.getBlockId(i, j + 1, k) == 0)
{
int wood = Block.planks.blockID;
world.setBlockWithNotify(i, j, k, wood);
world.setBlockWithNotify(i, j, k +1, wood);
world.setBlockWithNotify(i, j, k +2, wood);
world.setBlockWithNotify(i, j, k +3, wood);
world.setBlockWithNotify(i, j, k +4, wood);
world.setBlockWithNotify(i, j, k +5, wood);
world.setBlockWithNotify(i, j, k +6, wood);
world.setBlockWithNotify(i, j, k +7, wood);
return true;
}
return false;
}
}
That works fine for me You'll just have to change the check for air(0) to a higher int if you want your ship deeper. I want to say thanks for asking me about this, because I need to do the same sort of thing in Undead+.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Help me
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
&--#62; Cleaning bin
&--#62; Recompiling
'"D:\PC\JDK\bin\javac" -g -source 1.6 -target 1.6 -classpath "lib;lib\*;jars\bin
\minecraft.jar;jars\b...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_BiomeNamehere.java:8: cannot find symbol
symbol : method addBiome(net.minecraft.src.BiomeGenBase)
location: class net.minecraft.src.ModLoader
ModLoader.addBiome(Namehere);
^
1 error
==================
code
package net.minecraft.src;
public class mod_BiomeNamehere extends BaseMod
{
public static final BiomeGenBase Namehere = (new BiomeGenNamehere(25)).setColor(0xfa9418).setBiomeName("Any Name Here");
public void load()
{
ModLoader.addBiome(Namehere);
}
I hope to god that a .tar.gz file works on this system...
EDIT: Well I got it downloaded. Didn't crash. Anything else I should know?
Just set your workspace to the "eclipse" folder in MCP and it will set everything else up for you. Then you can just create your new mod_ class, etc, in the net.minecraft.src package.
Help me
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
&--#62; Cleaning bin
&--#62; Recompiling
'"D:\PC\JDK\bin\javac" -g -source 1.6 -target 1.6 -classpath "lib;lib\*;jars\bin
\minecraft.jar;jars\b...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_BiomeNamehere.java:8: cannot find symbol
symbol : method addBiome(net.minecraft.src.BiomeGenBase)
location: class net.minecraft.src.ModLoader
ModLoader.addBiome(Namehere);
^
1 error
==================
code
package net.minecraft.src;
public class mod_BiomeNamehere extends BaseMod
{
public static final BiomeGenBase Namehere = (new BiomeGenNamehere(25)).setColor(0xfa9418).setBiomeName("Any Name Here");
public void load()
{
ModLoader.addBiome(Namehere);
}
public String getVersion()
{
return "1.2.3";
}
}
Download the latest ModLoader and decompile again.
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've been testing a few things, and I've come up with this:
public boolean generate(World world, Random random, int i, int j, int k)
{
if(world.getBlockId(i, j, k) == Block.waterStill.blockID && world.getBlockId(i, j + 1, k) == 0)
{
int wood = Block.planks.blockID;
world.setBlockWithNotify(i, j, k, wood);
world.setBlockWithNotify(i, j, k +1, wood);
world.setBlockWithNotify(i, j, k +2, wood);
world.setBlockWithNotify(i, j, k +3, wood);
world.setBlockWithNotify(i, j, k +4, wood);
world.setBlockWithNotify(i, j, k +5, wood);
world.setBlockWithNotify(i, j, k +6, wood);
world.setBlockWithNotify(i, j, k +7, wood);
return true;
}
return false;
}
}
That works fine for me You'll just have to change the check for air(0) to a higher int if you want your ship deeper. I want to say thanks for asking me about this, because I need to do the same sort of thing in Undead+.
Right, thanks, and it is no problem to pester you for help
also; back to the stairs question: do you know how to make them spawn facing the right way?
Right, thanks, and it is no problem to pester you for help
also; back to the stairs question: do you know how to make them spawn facing the right way?
I'm not really sure. Maybe try using the world.setBlockAndMetadataWithNotify method like I used as an example in the world gen tut. Then just change the 1 to 2, 3 or 4 and it should change direction.
Would you be able to add a tut on how to make custom fences
Added to the list.
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'm not really sure. Maybe try using the world.setBlockAndMetadataWithNotify method like I used as an example in the world gen tut. Then just change the 1 to 2, 3 or 4 and it should change direction.
Yeah, that seems to have done it, thanks but just so you know; it goes from 0-7 as you have to include the upside down ones.
Character.valueOf('#') says that if you use # in your crafting recipe it will be the item you type after it, which will now be a block of dirt (Block.dirt)
The dirt slab works now, only the upper side of the block is black, is there any way to fix that?
And I added dirt glass, recompile.bat gives NO errors, startclient.bat gives NO errors too, however when I place dirt in the crafting table to give me dirt glass, the client crashes when the recipe's finished.
I placed it like the following:
[][][]
[] []
[][]
and if you place the last piece:
[][][]
[] []
[][][]
then It crashes.
here's the crash:
[SPOILER]
Mods loaded: 2
ModLoader 1.2.3
mod_DirtPlus 1.2.3
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 36b09cb1 --------
Generated 24-3-12 20:46
Minecraft: Minecraft 1.2.3
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_01, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel 965/963 Graphics Media Accelerator version 2.0.0 - Build 8.14.10.1930, Intel
java.lang.NullPointerException
at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:105)
at net.minecraft.src.RenderItem.renderItemIntoGUI(RenderItem.java:270)
at net.minecraft.src.GuiContainer.drawSlotInventory(GuiContainer.java:228)
at net.minecraft.src.GuiContainer.drawScreen(GuiContainer.java:74)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1018)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:943)
at net.minecraft.client.Minecraft.run(Minecraft.java:799)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 9b83350b ----------
And here's the source:
[SPOILER]
[SPOILER]
The mod_DirtPlus.java
[SPOILER]
package net.minecraft.src;
public class mod_DirtPlus extends BaseMod
{
public static final Block DirtStairs = new BlockDirtStairs(170, 0).setBlockName("Dirt Stairs").setHardness(1F).setResistance(2F);
public static final Block DirtBrick = new BlockDirtBrick(171, 0).setBlockName("Dirt Bricks").setHardness(2F).setResistance(4F);
public static final Block DirtSlab = new BlockDirtSlab(172, 0).setBlockName("Dirt Slab").setHardness(1F).setResistance(2F);
public static final Block DirtGlass = new BlockDirtGlass(173, 0).setBlockName("Dirt Glass").setHardness(1F).setResistance(2F);
public void load()
{
DirtStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/DirtPlus/DirtStairs.png");
DirtBrick.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/DirtPlus/DirtBrick.png");
DirtSlab.blockIndexInTexture = ModLoader.addOverride ("/terrain.png", "/DirtPlus/Dirt.png");
DirtGlass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/DirtPlus/DirtGlass.png");
ModLoader.registerBlock(DirtStairs);
ModLoader.registerBlock(DirtBrick);
ModLoader.registerBlock(DirtSlab);
ModLoader.registerBlock(DirtSlab);
ModLoader.addName(DirtStairs, "Dirt Stairs");
ModLoader.addName(DirtBrick, "Dirt Bricks");
ModLoader.addName(DirtSlab, "Dirt Slab");
ModLoader.addName(DirtGlass, "Dirt Glass");
ModLoader.addRecipe(new ItemStack(DirtStairs, 1), new Object [] {"# ","## ","###", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 6), new Object [] {"# ", Character.valueOf('#'), DirtStairs});
ModLoader.addRecipe(new ItemStack(DirtBrick, 1), new Object [] {"## ","## ", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 4), new Object [] {"# ", Character.valueOf('#'), DirtBrick});
ModLoader.addRecipe(new ItemStack(DirtSlab, 6), new Object [] {"###", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 3), new Object [] {"# ", Character.valueOf('#'), DirtSlab});
ModLoader.addRecipe(new ItemStack(DirtGlass, 8), new Object [] {"###", "# #", "###", Character.valueOf('#'), Block.dirt});
ModLoader.addRecipe(new ItemStack(Block.dirt, 8), new Object [] {"# ", Character.valueOf('#'), DirtGlass});
}
public String getVersion()
{
return "1.2.3";
}
}
[/SPOILER]
[SPOILER]
And the BlockDirtGlass.java
package net.minecraft.src;
public class BlockDirtGlass extends Block
{
public BlockDirtGlass(int i, int j)
{
super(i, j, Material.wood);
}
public boolean isOpaqueCube()
{
return false;
}
}
[/SPOILER]
[/SPOILER]
A crash at the crafting grid normally indicates something wrong with the texture/s of the block. The crash report also indicates this. Make sure that it is the correct size, format and in the right location.
Put that in the constructor of your biome class. The three ints at the end are the same as ModLoader's addSpawn method.
Probability of spawning in chunk - Minimum in Chunk - Maximum in Chunk
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
I need more information about this. What is Character.valueOf? And Block.dirt});?
Character.valueOf is part of Java. More specifically, char. It is a primitive data type, and is a single 16-bit Unicode Character. We use it in Minecraft for getting the values of characters that we add into a string/s for the recipe of an item. So then we can assign an ingredient to that symbol/character in the recipe, then the code in CraftingManager.java reads it all, and makes it an actual recipe in the game.
Block.dirt is simply the name of the an instance in Block.java called "dirt". As I said above, It is used by CraftingManager.java to make an actual recipe. Block.dirt in code, is the same thing as having a dirt block in your inventory, or even just the world around.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
Remove all the extra " " sets as they're not needed.
ModLoader.addRecipe(new ItemStack(Block.dirt, 3), new Object [] {"# ", Character.valueOf('#'), DirtSlab});For the generation, I've fixed it now, but the forum was changing the code I had written. It needs to be like this:
Can you open Eclipse without getting an error message about not having the JDK installed? I am fairly sure now that most, if not all, Java stuff comes pre-packaged with OS X. I think that JavaVisualVM is right. As it is the Java Virtual Machine, which is what is used when modding to test the mod in the client(I use it, not sure about anyone else though).
together they are powerful beyond imagination."
Crap. Where do I get to Eclipse? (I know, I'm not this good when it comes to computers).
Get it from here. It's the third one on the list, "Eclipse IDE For Java Developers".
together they are powerful beyond imagination."
I meant the whole empty sets of quotation marks. Your recipes should look something like this:
ModLoader.addRecipe(new ItemStack(DirtStairs, 1), new Object [] {"# ", "## ", "###", Character.valueOf('#'), Block.dirt});ModLoader.addRecipe(new ItemStack(Block.dirt, 6), new Object [] {"#", Character.valueOf('#'), DirtStairs});Please put your code and error in a SPOILER.
together they are powerful beyond imagination."
Would that work with Eclipse .class files?
I'm not sure what you mean. Do you mean class files that eclipse has built from the .javas?
I've been testing a few things, and I've come up with this:
public boolean generate(World world, Random random, int i, int j, int k) { if(world.getBlockId(i, j, k) == Block.waterStill.blockID && world.getBlockId(i, j + 1, k) == 0) { int wood = Block.planks.blockID; world.setBlockWithNotify(i, j, k, wood); world.setBlockWithNotify(i, j, k +1, wood); world.setBlockWithNotify(i, j, k +2, wood); world.setBlockWithNotify(i, j, k +3, wood); world.setBlockWithNotify(i, j, k +4, wood); world.setBlockWithNotify(i, j, k +5, wood); world.setBlockWithNotify(i, j, k +6, wood); world.setBlockWithNotify(i, j, k +7, wood); return true; } return false; } }That works fine for me
together they are powerful beyond imagination."
I hope to god that a .tar.gz file works on this system...
EDIT: Well I got it downloaded. Didn't crash. Anything else I should know?
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
&--#62; Cleaning bin
&--#62; Recompiling
'"D:\PC\JDK\bin\javac" -g -source 1.6 -target 1.6 -classpath "lib;lib\*;jars\bin
\minecraft.jar;jars\b...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_BiomeNamehere.java:8: cannot find symbol
symbol : method addBiome(net.minecraft.src.BiomeGenBase)
location: class net.minecraft.src.ModLoader
ModLoader.addBiome(Namehere);
^
1 error
==================
code
package net.minecraft.src;
public class mod_BiomeNamehere extends BaseMod
{
public static final BiomeGenBase Namehere = (new BiomeGenNamehere(25)).setColor(0xfa9418).setBiomeName("Any Name Here");
public void load()
{
ModLoader.addBiome(Namehere);
}
public String getVersion()
{
return "1.2.3";
}
}
Make high-quality models in the Techne. And do the model in Blender.
Just set your workspace to the "eclipse" folder in MCP and it will set everything else up for you. Then you can just create your new mod_ class, etc, in the net.minecraft.src package.
Download the latest ModLoader and decompile again.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumRight, thanks, and it is no problem to pester you for help
also; back to the stairs question: do you know how to make them spawn facing the right way?
I'm not really sure. Maybe try using the world.setBlockAndMetadataWithNotify method like I used as an example in the world gen tut. Then just change the 1 to 2, 3 or 4 and it should change direction.
Added to the list.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt is in to OP
Like.. Springs? (the one found on most coaches)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYeah, that seems to have done it, thanks
i wanna make ores but cant make they generate
Make high-quality models in the Techne. And do the model in Blender.
Sorry for the long wait and yes.
I need more information about this. What is Character.valueOf? And Block.dirt});?
I don't understand :l
Block animations are hard. I'm currently working with someone trying to do them and get them working well.
Awesome, Thanks!
It is on the list to do, I'll get to it when I get to it.
A crash at the crafting grid normally indicates something wrong with the texture/s of the block. The crash report also indicates this. Make sure that it is the correct size, format and in the right location.
They are quite difficult, especially to make a tutorial on. I can try once I get rid of some of the tutorials on the list already.
I think we were talking about mobs? Something like this should work.
Put that in the constructor of your biome class. The three ints at the end are the same as ModLoader's addSpawn method.
Probability of spawning in chunk - Minimum in Chunk - Maximum in Chunk
Character.valueOf is part of Java. More specifically, char. It is a primitive data type, and is a single 16-bit Unicode Character. We use it in Minecraft for getting the values of characters that we add into a string/s for the recipe of an item. So then we can assign an ingredient to that symbol/character in the recipe, then the code in CraftingManager.java reads it all, and makes it an actual recipe in the game.
Block.dirt is simply the name of the an instance in Block.java called "dirt". As I said above, It is used by CraftingManager.java to make an actual recipe. Block.dirt in code, is the same thing as having a dirt block in your inventory, or even just the world around.
Does this clear up a few things for you?
together they are powerful beyond imagination."