
Darknesschaos
Members-
Posts
26 -
Joined
-
Last visited
Everything posted by Darknesschaos
-
[1.6.2] [Solved] Texture isn't loading...
Darknesschaos replied to samhalo007's topic in Modder Support
That doesn't work when you are testing, and I am unsure on how it is when you package your mod. You need to put the textures in the /minecraft/mod/[yourmod]/.... folder. (I have found that this works for me) Please if I am wrong and there is a better way I would love to be corrected. -
Your request lacks detail. I have no idea what your problem is.
-
Don't do that. Just do it when it is accessed by a player or a block next to it updates (to catch items piping or whatnot).
-
Well, we don't seem to have any information to help you at all. At best, we can provide you a "feels bad man". We do not have access to your code nor know what your playing environment looks like. So, what do you need from us?
-
I believe only Item numbers can only go that high.
-
Well, what are you doing right now? Creating a block or an item? This tutorial may be of interest: http://www.minecraftforge.net/wiki/Icons_and_Textures From what I can tell, the tutorial you listed is a little out of date for 1.5.1 but is mostly applicable.
-
[SOLVED] Explosive Sword not working
Darknesschaos replied to ThaxxelGaming's topic in Modder Support
I believe onBlockActivated only triggers when you right click it. But you never specified what button you are clicking with. Also, I advise using a switch system instead of your bunch of if(...) code. Not that efficiency here would matter too much, but any little bit always helps. edit: Or at least use an if else system. -
I was wondering the same about the player model in general.
-
Change vanilla block drop using special item (pickaxe)
Darknesschaos replied to Fashi's topic in Modder Support
I think your best bet would be to look into Java reflection and change how the block is dropped when beaten to oblivion by your new pick. -
You should always strive to use the least space possible when it comes to saves/ram usage and minimize the footprint of these blocks as much as possible. To me, that is just good practice. And seeing that these blocks are strictly cosmetic, I highly suggest looking into the log code more, as it seems that the log code is closes to what you are trying to achieve (save leaf support and vertical axis alignment). I will try to look into icon rotation later to see if it is easy to rotate the texture face on a block (just don't hold me to this please).
-
Please do not do this, it isn't worth the extra save file size cost. I would rather see you make a texture for the two separate possible directions and use the metadata to store the direction. Here is how I would do it: when deciding the icon for the face: if nbt (metadata) = 0 > choose north/south icon if nbt = 1 > choose east/west icon when placing the block: use the code above to tell if the player is facing north or south, if they are set the metadata to 0, otherwise set it to 1. From what you have said so far, I would assume this block is strictly visual and has no intended functionality other than being a block. There appears to be some code in the Minecraft source that handles icon face rotation, but I haven't played with that yet. maybe later, as I do see myself hitting a similar problem in the future.
-
Please do not do this, it isn't worth the extra save file size cost. I would rather see you make a texture for the two separate possible directions and use the metadata to store the direction. Here is how I would do it: when deciding the icon for the face: if nbt (metadata) = 0 > choose north/south icon if nbt = 1 > choose east/west icon when placing the block: use the code above to tell if the player is facing north or south, if they are set the metadata to 0, otherwise set it to 1. From what you have said so far, I would assume this block is strictly visual and has no intended functionality other than being a block. There appears to be some code in the Minecraft source that handles icon face rotation, but I haven't played with that yet. maybe later, as I do see myself hitting a similar problem in the future.
-
How are you storing the data that controls the orientation of your block then? Do you have the texture rendering code handling each possible wanted orientation of the block? If not, then this would be a good first step. If you do not mind sharing it, I would like to see how you are handling block orientation.
-
How are you storing the data that controls the orientation of your block then? Do you have the texture rendering code handling each possible wanted orientation of the block? If not, then this would be a good first step. If you do not mind sharing it, I would like to see how you are handling block orientation.
-
Best approach to connected textures?
Darknesschaos replied to Darknesschaos's topic in Modder Support
Hi All, I am working on a mod that I hope to use connected textures with. Now, my question before starting my research in implementing this, is there a 'best' (or easy) method in handling this, or will i need to evaluate each face and check all of the nearby blocks for computing the connected texture? Thanks in advance! -
Hi All, I am working on a mod that I hope to use connected textures with. Now, my question before starting my research in implementing this, is there a 'best' (or easy) method in handling this, or will i need to evaluate each face and check all of the nearby blocks for computing the connected texture? Thanks in advance!
-
I do not wish to offend, but you don't seem to understand the switch statement that the log code has within. It checks for all possible cases 0-5, each is specified to a face, and in doing so sets metadata according to the case. 0 and 1 are up and down, 2 and 3 are north and south, 4 and 5 are east and west. (once again, I would like to mention that the version of code I am using is 1.5.1 and the log code could have very well changed in the transition) Now, the log only needs to orient itself along 3 different axes where your block cares about the 4 or 6 potential directions. You can set the metadata according to the face that the player clicks on to place the block, that is what the log code is doing. like I said, you should handle how you want your block to handle the metadata before the placement mechanism, that way you can iron out the bugs better. edit: I feel that I need to establish my last statement more. I feel that you should test how your textures react to block metadata by setting the same metadata for each block as it is placed, this proves to you that the texture rendering code will handle proper metadata first. Setting the metadata with a placement handling code would be after you know that your metadata handling is correct (for example, if you want your block to face north, set 2 for the metadata, and have your texture rendering code handle facing the block north when metadata = 2 and so on.
-
I do not wish to offend, but you don't seem to understand the switch statement that the log code has within. It checks for all possible cases 0-5, each is specified to a face, and in doing so sets metadata according to the case. 0 and 1 are up and down, 2 and 3 are north and south, 4 and 5 are east and west. (once again, I would like to mention that the version of code I am using is 1.5.1 and the log code could have very well changed in the transition) Now, the log only needs to orient itself along 3 different axes where your block cares about the 4 or 6 potential directions. You can set the metadata according to the face that the player clicks on to place the block, that is what the log code is doing. like I said, you should handle how you want your block to handle the metadata before the placement mechanism, that way you can iron out the bugs better. edit: I feel that I need to establish my last statement more. I feel that you should test how your textures react to block metadata by setting the same metadata for each block as it is placed, this proves to you that the texture rendering code will handle proper metadata first. Setting the metadata with a placement handling code would be after you know that your metadata handling is correct (for example, if you want your block to face north, set 2 for the metadata, and have your texture rendering code handle facing the block north when metadata = 2 and so on.
-
Well, I haven't started programming for 1.4.7 yet, so I can only say what I have seen while modding for 1.5.1. But I would start by looking at the log placement code and copy that for the time being to be sure that your block can be oriented correctly first, then I would move over to looking that the players facing direction afterwards. The important thing is to be sure that you are handling the metadata correctly first then handle the more complicated things in terms of setting the metadata. Anyway, good luck!
-
Well, I haven't started programming for 1.4.7 yet, so I can only say what I have seen while modding for 1.5.1. But I would start by looking at the log placement code and copy that for the time being to be sure that your block can be oriented correctly first, then I would move over to looking that the players facing direction afterwards. The important thing is to be sure that you are handling the metadata correctly first then handle the more complicated things in terms of setting the metadata. Anyway, good luck!
-
I don't wanna sound stupid or anything but i don't understand how my code is modloader? I got MCP setup with Forge and installed it with the 'Install.bat' I though that it was FML, when i start the 'startclient.bat' and 'startserver.bat' it says its running FML, just confused me a little i understand it says 'Modloader.' but i though it gets it from FML since i import it from here I would say a good indicator would be this: import net.minecraft.src.ModLoader; However, your base mod class looks completely wrong from what forge uses.
-
I don't wanna sound stupid or anything but i don't understand how my code is modloader? I got MCP setup with Forge and installed it with the 'Install.bat' I though that it was FML, when i start the 'startclient.bat' and 'startserver.bat' it says its running FML, just confused me a little i understand it says 'Modloader.' but i though it gets it from FML since i import it from here I would say a good indicator would be this: import net.minecraft.src.ModLoader; However, your base mod class looks completely wrong from what forge uses.
-
It appears you are missing the flag argument in: world.setBlockMetadataWithNotify(i, j, k, dir); It should have a flag as that allows you to tell the clients to update with the proper information ex: world.setBlockMetadataWithNotify(i, j, k, dir,flag); - I advise the flag to be 3 (I think this updates the server and client) I don't remember what 4 does. Anyway, by wading through tooltips in eclipse you should eventually figure out what the different values are for the flags.
-
It appears you are missing the flag argument in: world.setBlockMetadataWithNotify(i, j, k, dir); It should have a flag as that allows you to tell the clients to update with the proper information ex: world.setBlockMetadataWithNotify(i, j, k, dir,flag); - I advise the flag to be 3 (I think this updates the server and client) I don't remember what 4 does. Anyway, by wading through tooltips in eclipse you should eventually figure out what the different values are for the flags.