What it references would have to be NoiseGenerator.class, NoiseGenerator2.class, NoiseGeneratorOctaves.class, NoiseGeneratorOctaves2.class and/or NoiseGeneratorPerlin.class. Of course, I didn't boil that down exactly, and I couldn't figure out what they do by looking at them. The name would imply that it helps Minecraft dictate the pitch of various sounds, but that raises the question: "Why is it in ChunkProviderGenerate.class?"
In case you can't tell, I'm new to the modding community. I'd appreciate it if you would let me know your view on what this is and what it does.
my view: its a fancy way of notating, in this case, random terrain generation. The term noise its self does mean sound but noise is random sound. Octaves being the varying degrees of that supposed random generator. The tricky part with that, which i think is what kills most custom terrain generating mods, is that it actually has nothing to do with sound. Now what i think i was confused by was the fact that those variable declarations (not .class') are named as fields which is not helpful in any way, and also the fact that they say noise instead of something like terrain.
Now thats just from me looking threw the code and making minor modifications to see what was happening. thoughts?
I've started creating this mod were there would be npc shops in the game, except they wont be spawning randomly in the world, I'd have it so you craft the shop and place the block down, right click it and it appears as a shop for you with an NPC inside. The problem is that, is there a way of making a block, right clicking it and making a shop appear? hope someone knows the answer :smile.gif:
I've started creating this mod were there would be npc shops in the game, except they wont be spawning randomly in the world, I'd have it so you craft the shop and place the block down, right click it and it appears as a shop for you with an NPC inside. The problem is that, is there a way of making a block, right clicking it and making a shop appear? hope someone knows the answer :smile.gif:
do you have any clue on the code or how to do it?? ive seen this mod ages ago like portable house or somthing and u create a block and right click and makes a house. If i found that mod i could see if i could get the code from the person but for now i need to find out how to do it
do you have any clue on the code or how to do it?? ive seen this mod ages ago like portable house or somthing and u create a block and right click and makes a house. If i found that mod i could see if i could get the code from the person but for now i need to find out how to do it
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
my view: its a fancy way of notating, in this case, random terrain generation. The term noise its self does mean sound but noise is random sound. Octaves being the varying degrees of that supposed random generator. The tricky part with that, which i think is what kills most custom terrain generating mods, is that it actually has nothing to do with sound. Now what i think i was confused by was the fact that those variable declarations (not .class') are named as fields which is not helpful in any way, and also the fact that they say noise instead of something like terrain.
Now thats just from me looking threw the code and making minor modifications to see what was happening. thoughts?
Well, I think it's a better thought than mine.
Rollback Post to RevisionRollBack
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
I have been trying to make a new bed with modloader and was experimenting a few things but I could not get it to work. Do you guys have any idea how I would create a new bed that is black?
I am not going to post my code here because it is too shitty and just could not get it to work.
(What I did was copy the BlockBed.java and edited all kinds of stuff to try and get a black bed with ModLoader, did not work for me.)
The textures themselves are fine. Now, a couple of thoughts come to mind.
Firstly, you're using images that aren't embedded into the standard Minecraft repertoire of images, so you'll have to teach it where they are. That might cause some problems.
Secondly, things might be a lot easier if you combine all the beds into a single block with multiple textures for multiple damages. Corresponding the different damages with the correct wool colors will make the crafting scripts a lot more compact.
Thirdly, you need to define "did not work." Does the game recompile? Does the item exist in-game? Is the item craftable? Is the item placeable? Does trying to sleep in it take you to dawn?
Rollback Post to RevisionRollBack
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
Ok, well i am in the process of making my first mod and i keep getting this error, invalid declaration type; return type required, when i try to make a new block.I was wondering if anyone could help. Here is the file I'm trying to make if you need it. Note: right now i want it to drop diamond just for a test, then i will create it's own item. Also sorry if it really simple im a noob i just recently began modding and learning java.
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material
public class BlockBlackdiamond extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
{
return Item.diamond.blockID;
}
}
}
If you told Block.java about your block, and told it that it's an ore block, you should probably put this under BlockOre.java. Otherwise, I'd recommend that you do that. Still, it would be nice if you could give us the exact error message. (right-click, select all, enter will put it onto clipboard)
Rollback Post to RevisionRollBack
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
Ok, well i am in the process of making my first mod and i keep getting this error, invalid declaration type; return type required, when i try to make a new block.I was wondering if anyone could help. Here is the file I'm trying to make if you need it. Note: right now i want it to drop diamond just for a test, then i will create it's own item. Also sorry if it really simple im a noob i just recently began modding and learning java.
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material
public class BlockBlackdiamond extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
{
return Item.diamond.blockID;
}
}
}
Because this was so simple, i just went ahead and did it for you.
here is your new block. name your new .java "BlockBlackDiamond.java" and just cut and paste:
package net.minecraft.src;
import java.util.Random;
public class BlockBlackDiamond extends Block
{
public BlockBlackDiamond(int i, int j) {
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
return Item.diamond.shiftedIndex;
}
}
In the file Block.java put this in its obvious location:
public static final Block BlackDiamond;
as well as this in its obvious location within Block.java:
BlackDiamond = (new BlockOre(56, 50)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BlackDiamond");
---edit---
Let me know if anything is wrong. I think that should work though.
Heres what the info about the block: its almost exactly like a diamond except its named "Black Diamond". that's pretty much it. It has the same texture and properties as diamond ore.
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
Does not work = it did not recompile at all and I have absolutely no idea how to start.
And yes, I was trying to do the second thing.
well you can start by directly adjusting the terrain.png to work with your custom bed/s using something like gimp or photoshop and from were i assume you can work the texture magic for your bed/s, you can find in the area of Block.java were all the block properties are listed. :smile.gif:
Yes, but I want to make this compatible with ModLoader so people can use it with other mods.
well you dont have to make mods with mod loader to make them compatible with other mods. chances are if you code your mod without mod loader, it will run fine with many other mods; but if you've abandoned the project then nevermind i suppose.
I did not abondon it, but if you edit the terrain.png it will not work with other mods that edit it right? And then you have to edit block.java right?
well thats why you paint your block in a square that you hope no one has taken. perhaps to reduce the amount of squares you need, use all the same textures for your custom beds but paint some symbol at the foot of the bed (on top of the red sheets), to differentiate between the beds.
and ill check about that block.java thing, to see if thats were the texture is. ill edit this post to let ya know, should only take a minuet.
---edit---
ya, you'll find the lines of code needed to adjust the textures accordingly are located in Block.java
No problem, got any idea on how to do it with modloader?
I have never touched mod loader but if you post what your trying to do code wise and a little info on how i can use modloader to adjust your code i'll take a look at it and see what i can do :smile.gif:
Ok, well i am in the process of making my first mod and i keep getting this error, invalid declaration type; return type required, when i try to make a new block.I was wondering if anyone could help. Here is the file I'm trying to make if you need it. Note: right now i want it to drop diamond just for a test, then i will create it's own item. Also sorry if it really simple im a noob i just recently began modding and learning java.
package net.minecraft.src;
import java.util.Random;
// Referenced classes of package net.minecraft.src:
// Block, Material
public class BlockBlackdiamond extends Block
{
public BlockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random)
{
{
return Item.diamond.blockID;
}
}
}
public int idDropped(int i, Random random)
{
return Item.diamond.shiftedIndex;
}
items have "shiftedIndex"es no blockID, their not blocks.
How do i make a use a texture for my new block. I was wondering so i could make it look not like diamond, Also if you know how to add a block to world generation that would help.And thanks to the people who helped before
How do i make a use a texture for my new block. I was wondering so i could make it look not like diamond, Also if you know how to add a block to world generation that would help.And thanks to the people who helped before
just curious but did you use the thing i typed up for you?
Well, I will just abondon this project, it is waaaaaaaay to hard for me.
Now for everyone, I was trying to make a block with different textures that creates an empty room of space if you right-click it. I get an error message when I place the block, I did not had this before I added multiple textures. (I have not implented the right-click function yet.)
This is the error message:
[21:47] 16 achievements
[21:47] 148 recipes
[21:47] ModLoader Beta 1.6.6 Initializing...
[21:47] Overriding /terrain.png with /SB/SpaceBox_Top.png @ 30. 87 left.
[21:47] Overriding /terrain.png with /SB/SpaceBox_SideBottom.png @ 54. 86 left.
[21:47] Overriding /terrain.png with /SB/SpaceBox_Front.png @ 76. 85 left.
[21:47] Overriding /gui/items.png with /SB/MagicDiamond.png @ 38. 130 left.
[21:47] Mod Loaded: net.minecraft.src.mod_SpaceBox 1.6.6
[21:47] Done.
[21:47] WARNING: Found unknown Windows version: Windows 7
[21:47] Attempting to use default windows plug-in.
[21:47] Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
[21:48] java.lang.ArrayIndexOutOfBoundsException: 22
[21:48] at net.minecraft.src.ChunkCache.getBrightness(ChunkCache.java:75)
[21:48] at net.minecraft.src.Block.getBlockBrightness(Block.java:140)
[21:48] at net.minecraft.src.RenderBlocks.renderStandardBlockWithColorMultiplier
(RenderBlocks.java:2239)
[21:48] at net.minecraft.src.RenderBlocks.renderStandardBlock(RenderBlocks.java:
1681)
[21:48] at net.minecraft.src.RenderBlocks.renderBlockByRenderType(RenderBlocks.j
ava:164)
[21:48] at net.minecraft.src.WorldRenderer.updateRenderer(WorldRenderer.java:148
)
[21:48] at net.minecraft.src.RenderGlobal.updateRenderers(RenderGlobal.java:1073
)
[21:48] at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:553)
[21:48] at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer
.java:427)
[21:48] at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRen
dererProxy.java:23)
[21:48] at net.minecraft.client.Minecraft.run(Minecraft.java:514)
[21:48] at java.lang.Thread.run(Thread.java:662)
[21:48] Stopping!
This is my mod_SpaceBox.java
package net.minecraft.src;
public class mod_SpaceBox extends BaseMod {
public static final Block SpaceBox = new BlockSpaceBox(198, 0).setHardness(4.6F).setResistance(500.0F).setLightValue(1.5F).setBlockName("SpaceBox");
public static final Item MagicDiamond = new Item(397).setItemName("MagicDiamond");
public static int SpaceBoxSide;
public static int SpaceBoxFront;
public mod_SpaceBox()
{
ModLoader.RegisterBlock(SpaceBox);
SpaceBox.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SB/SpaceBox_Top.png");
SpaceBoxSide = ModLoader.addOverride("/terrain.png", "/SB/SpaceBox_SideBottom.png");
SpaceBoxFront = ModLoader.addOverride("/terrain.png", "/SB/SpaceBox_Front.png");
MagicDiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/SB/MagicDiamond.png");
ModLoader.AddName(SpaceBox, "SpaceBox");
ModLoader.AddRecipe(new ItemStack(SpaceBox, 64), new Object[] {
"X", Character.valueOf('X'), Block.dirt //placeholder
});
}
public String Version()
{
return "1.6.6";
}
}
(It is empty, I just started.)
And this is my BlockSpaceBox.java
package net.minecraft.src;
import java.util.Random;
public class BlockSpaceBox extends Block {
protected BlockSpaceBox(int i, int j) {
super(i, j, Material.iron);
setStepSound(soundStoneFootstep);
}
public int idDropped(int i, Random random)
{
return 198;
}
public int quantityDropped(Random random)
{
return 2;
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
// This code will basically tell MC which way the block should face when it's been placed
// and how the block should be oriented.
{
if(i == 1)
{
return blockIndexInTexture; // return top texture since i is 1
}
if(i == 0)
{
return blockIndexInTexture; //return bottom texture since i is 0
}
// assign front facing texture to variable "k"
int k = mod_SpaceBox.SpaceBoxFront;
// the following 4 if statements determines which direction you're facing,
// and where to place the front texture
if(j == 2 && i == 2)
{
return k; // return mod_SpaceBox.SpaceBoxFront
}
if(j == 3 && i == 5)
{
return k; // return mod_SpaceBox.SpaceBoxFront
}
if(j == 0 && i == 3)
{
return k; //return mod_SpaceBox.SpaceBoxFront
}
if(j == 1 && i == 4)
{
return k; //return mod_SpaceBox.SpaceBoxFront
} else
{
return mod_SpaceBox.SpaceBoxSide; // return side texture
}
}
public int getBlockTextureFromSide(int i)
// getBlockTextureFromSide is a variable that determines the face the engine needs to draw
{
if(i == 1)
{
return blockIndexInTexture; //return top texture
}
if(i == 0)
{
return mod_SpaceBox.SpaceBoxSide; // return bottom texture
}
if(i == 3)
{
return mod_SpaceBox.SpaceBoxFront; // return front texture
} else
{
return mod_SpaceBox.SpaceBoxSide; // return side texture
}
// notice only 0, 1, and 3 are drawn. 2, 4, and 5 are the other 3 side textures. If you wish to create a block with 6 textures,
// start by assigning 2, 4 and 5 with their own textures
}
// onBlockAdded is part of Block.class. I'm not sure what it does
public void onBlockAdded(World world, int i, int j, int k)
{
super.onBlockAdded(world, i, j, k);
}
// canPlaceBlockAt disallows the block to be placed on a ceiling
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
int l = world.getBlockId(i, j, k);
return (l == 0 || Block.blocksList[l].blockMaterial.func_27283_g()) && world.func_28100_h(i, j - 1, k);
}
// I'm not quite sure what this section of code does. Maybe someone else knows?
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 2.5D) & 3;
world.setBlockMetadataWithNotify(i, j, k, l);
}
}
And those are my textures:
MagicDiamond.png
SpaceBox_SideBottom
SpaceBox_Top
SpaceBox_Front
Do you guys have any idea what I am doing wrong?
Sorry for filling your page with an information dump.
I'm not sure what else, but I can tell you right now that your lighting is wrong. You have it set to illuminate at 1.5. That tells the game to load a light level of 22.5, which cannot be rendered partially because it is not an integer and partially because it exceeds the limit of 15. Also, your hardness and resistance levels are exceedingly high, but I don't know if they'll crash the game. That's after a quick skimming; I'll tell you if I see anything else.
Rollback Post to RevisionRollBack
Go to http://adf.ly/2FK0k to show me your support and to play my personally-programmed games. Let me know if you find any bugs and I'll try to fix them!
cogito ergo sum: ego sum proinde ego messum diamonds
my view: its a fancy way of notating, in this case, random terrain generation. The term noise its self does mean sound but noise is random sound. Octaves being the varying degrees of that supposed random generator. The tricky part with that, which i think is what kills most custom terrain generating mods, is that it actually has nothing to do with sound. Now what i think i was confused by was the fact that those variable declarations (not .class') are named as fields which is not helpful in any way, and also the fact that they say noise instead of something like terrain.
Now thats just from me looking threw the code and making minor modifications to see what was happening. thoughts?
ya, there is.
do you have any clue on the code or how to do it?? ive seen this mod ages ago like portable house or somthing and u create a block and right click and makes a house. If i found that mod i could see if i could get the code from the person but for now i need to find out how to do it
Read this tutorial.
cogito ergo sum: ego sum proinde ego messum diamonds
Well, I think it's a better thought than mine.
cogito ergo sum: ego sum proinde ego messum diamonds
The textures themselves are fine. Now, a couple of thoughts come to mind.
Firstly, you're using images that aren't embedded into the standard Minecraft repertoire of images, so you'll have to teach it where they are. That might cause some problems.
Secondly, things might be a lot easier if you combine all the beds into a single block with multiple textures for multiple damages. Corresponding the different damages with the correct wool colors will make the crafting scripts a lot more compact.
Thirdly, you need to define "did not work." Does the game recompile? Does the item exist in-game? Is the item craftable? Is the item placeable? Does trying to sleep in it take you to dawn?
cogito ergo sum: ego sum proinde ego messum diamonds
If you told Block.java about your block, and told it that it's an ore block, you should probably put this under BlockOre.java. Otherwise, I'd recommend that you do that. Still, it would be nice if you could give us the exact error message. (right-click, select all, enter will put it onto clipboard)
cogito ergo sum: ego sum proinde ego messum diamonds
Because this was so simple, i just went ahead and did it for you.
here is your new block. name your new .java "BlockBlackDiamond.java" and just cut and paste:
In the file Block.java put this in its obvious location:
as well as this in its obvious location within Block.java:
---edit---
Let me know if anything is wrong. I think that should work though.
Heres what the info about the block: its almost exactly like a diamond except its named "Black Diamond". that's pretty much it. It has the same texture and properties as diamond ore.
What was the exact error message you got when you tried to recompile?
cogito ergo sum: ego sum proinde ego messum diamonds
well you can start by directly adjusting the terrain.png to work with your custom bed/s using something like gimp or photoshop and from were i assume you can work the texture magic for your bed/s, you can find in the area of Block.java were all the block properties are listed. :smile.gif:
well you dont have to make mods with mod loader to make them compatible with other mods. chances are if you code your mod without mod loader, it will run fine with many other mods; but if you've abandoned the project then nevermind i suppose.
well thats why you paint your block in a square that you hope no one has taken. perhaps to reduce the amount of squares you need, use all the same textures for your custom beds but paint some symbol at the foot of the bed (on top of the red sheets), to differentiate between the beds.
and ill check about that block.java thing, to see if thats were the texture is. ill edit this post to let ya know, should only take a minuet.
---edit---
ya, you'll find the lines of code needed to adjust the textures accordingly are located in Block.java
oh right, ya, im stupid lol. I forgot that the files override one-another
I have never touched mod loader but if you post what your trying to do code wise and a little info on how i can use modloader to adjust your code i'll take a look at it and see what i can do :smile.gif:
items have "shiftedIndex"es no blockID, their not blocks.
just curious but did you use the thing i typed up for you?
Thanks a lot! :smile.gif:
I'm not sure what else, but I can tell you right now that your lighting is wrong. You have it set to illuminate at 1.5. That tells the game to load a light level of 22.5, which cannot be rendered partially because it is not an integer and partially because it exceeds the limit of 15. Also, your hardness and resistance levels are exceedingly high, but I don't know if they'll crash the game. That's after a quick skimming; I'll tell you if I see anything else.
cogito ergo sum: ego sum proinde ego messum diamonds