
Bandayd
Members-
Posts
35 -
Joined
-
Last visited
Everything posted by Bandayd
-
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
I was already using bindTextureByName... buuuut... it didn't occur to me that I could load one texture.... render it, then load another texture! :-P Thanks N1xx1! Not only do I think that will work, but now I feel kinda dumb for not thinking of that! :-P lol I'll give that a shot tonight after I get home from work, and I'll report back here how it worked :-) Thanks again!!! :-D -
You're saying that you're both "installing" forge, AND "compiling". Are you sure you're doing everything right, because if you're installing forge, all you should be doing is going to the forge folder and hit install.cmd. Doing this will actually decompile and deobfuscate minecraft. I'm assuming you meant to say you were installing and decompiling? If so, then Lexmanos is right, but if you're hitting "compile.bat" in your mcp folder, then you're not installing it properly, you should go hit install.cmd in your forge folder. :-) Good luck! :-D
-
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Thank you DarkGuardsman, that helped a ton! I did dig around a lot in both WorldRenderer.java and RenderBlocks.java, and the best thing I can come up with would be for forge to add a hook into func_78588_a (on line 3692 of RenderBlocks.java), or wherever it is that I can render a second texture to the same block. :-) Now I'm one step further, I can render a block, and I can even make two separate "models" (rectangles), however, I am only able to apply one texture to both of these rectangles. :-( I need to be able to specify two separate textures, one for the plate, and one for the "block that I'm mimicking". I'm starting to wonder if this can be done with forge I'm going to keep digging though. I will be sure and update my post if I get anywhere, but at this point, I'm stuck on separating the textures of the two different pieces. Here is a picture, just showing how I'm able to do two different rectangles. So the next step would be, I need to be able to apply TWO textures to my "blocks" (I know it's only one block, but it's rendered as two). One texture will be my plate texture, and the other texture will be the texture of the block I'm mimicking. So I'm off to search for "how to render two textures to one TileEntitySpecialRenderer, OR, how to bindTileEntitySpecialRenderer TWO renderers to ONE class" :-P If anybody has any idea on how to do this, please don't hesitate to pitch in! :-D I'm starting to think I need forge to add a new hook for binding two textures to one TileEntitySpecialRenderer? What do you guys think? Also, if it helps any, here is my "TileEntitySpecialRenderer" class that I'm using which give me the awesome picture above... :-P But as you can see, the line "this.bindTextureByName("/myMod/Textures/blockPlate.png");" is only able to apply a single texture to the current TileEntity :-( -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Any chance you could point me to example code for something like that? Thanks for the quick response! :-D -
How about rather than all that, just use: /** * ejects contained items into the world, and notifies neighbours of an update, as appropriate */ @Override public void breakBlock(World world, int x, int y, int z, int par5, int par6) { //Do stuff here :-P //then use "world.getBlockMetadata(x, y, z);" to access your metadata :-) } (you would put that into your BlockNetherOres.java) And then in there you can code it to manually drop however many you choose. (Although I'm not quite sure why you need to access the metadata to determine the drop amount? :-P) Also, here is the code from "BlockOre.java", which I believe does what you asked... /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random par1Random) { return this.blockID == Block.oreLapis.blockID ? 4 + par1Random.nextInt(5) : 1; } Don't worry about the spoiler tags not working, they're a little weird with me too, but they work after awhile :-P
-
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
I've already re-coded everything to work how I think you suggested (with the block mimicking the block it's replacing). But I'm having trouble getting the information from the TileEntity, to the actual block texture, is there any way I can set the block texture of my block besides "getBlockTextureFromSideAndMetadata"? Because I don't think I can access the TileEntity from there? Thanks again for your help with this -
install.sh thinks the server jar is modified, errors
Bandayd replied to TorchicBlaziken's topic in Modder Support
@TorchicBlaziken You didn't mention your bin folder for minecraft. You need to have a bin folder, which means you have to have a vanilla minecraft (without any mods, or forge), then I think you have to fire it up once, just to make it generate the bin folder. Is it possible that's your problem? Really, if you download mcp, forge, minecraft_server, and minecraft (client). That should work perfectly. I know it took me a few tries because I had so many modded .jars, I wound up just re-downloading everything new. :-) -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Nope, I already store it in the tileentity, however, when I try and access the tileentity in the getBlockTextureFromSideAndMetadata function, in order to get the tileentity, I need to use world.getBlockTileEntity(x, y, z); But.... the function is defined as follows... public int getBlockTextureFromSideAndMetadata(int side, int metadata) and there's no way to get the x,y,z of the current block. :-( Unless you know of another way to render the block without using the getBlockTextureFromSideAndMetadata function? That would be GREAT if you could give me a hint? :-D -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Actually, I've been playing around with metadata and I got it where when you place the block, it backs up the block's metadata, and then when you break the plate, it restores the block's metadata. What's nice about that is, if you put the plate on a piston, it remembers which way the piston was facing, and if you put a plate on a jack-o-lantern, it remembers what type of pumpkin, and which the jack-o-lantern was facing. So I think I understand the whole metadata thing, which is how your normally determine how to render the block, the problem is, normally metadata is just a single integer. I need to be able to pass it an int, and 4 textures, and the name of the texture file. So I think I need a tileentity to do this, but you can't pass a tileentity to the getBlockTextureFromSideAndMetadata function. Any ideas? (sorry if I'm repeating myself a little :-P) -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Ok, I think I've gotten a lot further, but I'm still stuck, so here's how far I've gotten... When I try and place my plate, it first finds the block ID of the block that the plate is going against. Then it replaces the block with my mimicking/plate block, which also stores the block ID and anything else I could want. I actually set it up similar to a chest so it's actually holding a single stack of that block. Then when you hit it, it drops the plate, and places the original plate back (or at least one with the same block ID :-P). The problem I'm having is... in the "getBlockTextureFromSideAndMetadata" for my plate block, I need to be able to read the texture of the block I'm storing/mimicking. The problem is, the only way I know how to do that is to use "world.getBlockTileEntity(x,y,z)" and it would be smooth sailing from there, however, I can't get the x,y,z of our current block in that function. Here, I'll just post a few screenshots showing how it currently works..... Before placing the plate block After placing the plate block After hitting at the plate block Here is the code for my TileEntityPlate: Here is my tryPlaceItemIntoWorld from my ItemPlate.java: And lastly, here is the code from my PlateBlock.java that I think I need to use to control my block's texture, so I can make it mimic the blocks I need to: Now I think I'm doing what both of you guys suggested, when the item is placed, it backs up the block it's replacing inside the new block. When the new block gets destroyed, it just restores it back. My problem is.... I need to have access to my TileEntity inside my "public int getBlockTextureFromSideAndMetadata(int side, int par2)", that way, if the "side" parameter is the side my plate is on, I'll override that with my plate texture, but on the remaining sides, I'll just use the texture from my stored block, the problem is, I can't access the TiledEntity in getBlockTextureFromSideAndMetadata therefore I can't mimic the block like I need to. Is there somewhere else I can control my plate block's texture from? I thought getBlockTextureFromSideAndMetadata was the only place really? And remember, my whole problem is really the second picture I showed you (the one labeled "After placing the plate block"), because it's showing the plate texture on ALL sides, rather than displaying dirt on 5 sides, and my plate on 1 side. (I'm familiar with how to show different textures on different sides, but I need to be able to access the TileEntity information to be able to do that) Thanks in advance for all your help! :-D -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Ok, after again, thinking about how in the world I can get around this, I've decided to settle on making a "mimic" block, that pretends to be other blocks like DarkGuardsman suggested. I'm not happy about it, but, really it's the best way I can figure to get done what I needed without modding every class of block in minecraft. I'll mark this one as solved as soon as I manage to get a proof of concept working. Thanks for all your help! :-D -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Ok, after thinking about this WAY too much, I think there's really only one way to do what it is that I need.... I think I need to be able to define a class at runtime, then, if I could do that, here's how I could accomplish what I need.... Step 1: When I place my plate, I don't really place my plate, instead, I get the class of the block it's being put onto a: Therefore, I can dynamically generate a new class that extends the class of the block it's being put onto, but it overrides the texture to show a plate on one side and the amount of damage it can take Step 2: When the block gets hit with a tool/fist, have it only take 1 hit to destroy this modded block, but then when it gets destroyed, I'll have it replaces itself with a non-modded version of itself, and therefore making it seem like the plate was destroyed Does that sound like it would work? If so... um, could anybody point me to an easy way to implement what I need? The basic thing I'm currently missing is... I need to be able to do this: public class BlockPlatePositive extends UnknownClass{ Where UnknownClass can be any class that I need it to be. That way, if the plate is put on a piece of dirt, it will extend the dirt and put a plate on it. Actually I just thought of something, let's assume I could do what I'm saying.... I still don't think it would work though, because if I put down one plate that looked like dirt, then I put down another plate on a piece of wool. The first plate would now be on a piece of wool.... hmmmm.... apparently I'm back to where I started... so does anybody know how I might be able to do what I need? -
What you need to do is 2 things... (I know this because I recently had the exact same problem) 1. when the block gets placed, get the orientation of the player and store that in the block's metadata to indicate which way it should face. 2. then, use that metadata to change which texture is shown on which side Sounds easy right? .... well it's not :-P My best advice to you is to look at the ItemSign.java BlockSign.java TileEntitySign.java which you can find in common\net.minecraft.src\ They show examples of how to store the rotation angle, just like signs do! :-) Although, for signs, they have an item class for when you hold it, and a block class for when it's found in the world. In your case, those will be the same things. :-P Also, do NOT forget to do the following when your mod loads.... Make SURE you register your tileentity like this.... GameRegistry.registerTileEntity(TileEntityYourBlock.class, "direction"); Here's some code that you can put into your block class so when it gets placed it can store this value: int myAng = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; (it just gets the angle from the player's angle) Although you'll want to convert it to an integer, since you want it to face N, S, W, or E Don't feel bad if it takes you a bit to sort through all this junk, it took me about a week! :-P
-
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
I have already looked into the halfslabs/doubeslabs and that wont really help me, the way those work is, they store metadata to keep track of if it's single/double, etc... And so with those blocks, it's not really two blocks when you put a second one down, it just reads the metadata, makes the block bigger, and changes the texture. Sorry, no dice :-( -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
Actually no, although now I might have to take a look at that mod and see how they do things :-) The mod I'm referring to is actually a VERY awesome mod called UGOcraft, but the dev on that one is not very nice, and the mod is NOT compatible with forge at all :-( (also, the dev is NOT open to porting it to forge, or providing source, or anything) You know, I'd be ok with editing the main block class, just as long as I can make it act like it should. for example: If you hit the plate, the plate will drop off and the block it was attached to will stay and the plate will drop on the ground so the player can pick it back up. Is this behavior possible? Any pointers you could give me in that direction would be great! :-D -
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
Bandayd replied to Bandayd's topic in Modder Support
So if I understand you correctly, what I would wind up doing is, modding the dirt class to have metadata to know if it has a plate on each side of it, and then display that block appropriately showing the plate on that side. I had thought of that idea, and that would work, however, that leaves one problem. When the user tries to break the plate, I want them to be able to 1-shot the plate, but leave the dirt. How would I be able to accomplish that? Because I want it to show the plate being destroyed and have it drop on the ground, but I want it to leave the dirt. Also, I'm assuming I would have to mod every single type of block, which is FAR from ideal. Especially because this would now make it impossible for my mod to play nice with other mods because I can't mod blocks that don't exist right? So I believe that leaves me with 2 problems: 1. I'd have to mod EVERY block in minecraft 2. I don't believe it would look like the plate was being destroyed Please, tell me I'm wrong so that I can get this to work :-P Thanks! :-) Ok, sorry, I didn't read your post close enough the first time, so the way I'm understanding you now that I've read it more closely... I'd basically be making a block that when you place it, it actually replaces the block you're putting it on, but then looks exactly like it but with one side having my plate on it. That would almost work but the problem with that would be... if i put my plate on the side of, say, a redstone light, a jukebox, a noteblock etc.... these blocks would lose everything except how they look, and they would be disabled, until my plate "came off". Not to mention, the same would be true for any modded blocks from any other mod. That block would fail to work, it would just look like it did, until my plate came off. Isn't there some way to modify the base block class? I think that would work, then I could just add metadata to that to make it know if it has a plate on it, but I'm not sure that that can be done in forge because that would require me to mod the block.java class. :-( -
Hi, I'm writing a very big mod, and there's just one thing that's eluding me... I need to be able to place a block flat against another block (similar to how signs work, in vanilla 1.3.2), however, I need the player to be able to place a block up against the first block with the plate sandwiched in between. I have already created a block that acts like a flat plate and uses metadata to remember which side of the block it was on and it works great!, but.... if I try and place a block up against the plate, it actually puts a full block of space between the two. Here is a picture of how it currently works: As you can see the dirt block is floating 1 block above the plate block. But what I want it to do, is lay the dirt directly on top of the plate, almost like it's just sitting on the sand (but the plate is sandwiched in between) Here is the code for just the plate block, because I believe it is all that applies: Now my best idea is to somehow get the game to allow two blocks to overlap, because in order for the plate to get sandwiched in between the blocks, one of the blocks are going to have to share space with the plate, at least, that's how I understand it? If anybody has any ideas about how this could be accomplished that would be great! I do know this CAN be done because I've seen it done in a mod, however, that mod is A: Closed source, and B: is made by a dev that is NOT open to helping me in the slightest, and so I'm on my own on how to accomplish this magic trick, which is why I'm asking for your help! :-) Thanks dev community, you guys are awesome! :-D
-
[1.3.2][SOLVED] Problem with saving/loading block's data in NBT
Bandayd replied to bormoshka's topic in Modder Support
Ok, this if funny, I just went through this EXACT same problem, and for me the key lied in... signs! :-P If you look at how the signs metadata works, that's EXACTLY what you want... so, here's some of the legwork done for ya': Just look at ItemSign.java for how your ItemFlag.java should be BlockSign.java for how your BlockFlag.java should be TileEntitySign.java for how your TileEntityFlag.java should be Also, do NOT forget to do the following when your mod loads.... Make SURE you register your tileentity like this.... GameRegistry.registerTileEntity(TileEntityFlag.class, "ang"); Also, in your ItemFlag, you should probably pass the angle to it then using something like: int myAng = MathHelper.floor_double((double)((par2EntityPlayer.rotationYaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; (it just gets the angle from the player's angle) Now let me know if you still can't sort it out, but I believe most of what you're doing should be covered by the sign example. Also, you should really put the following line of code in your stuff so you can track what angle it's storing, and getting.... Minecraft mc = Minecraft.getMinecraft(); mc.thePlayer.sendChatMessage(""+ang); Now lastly, here's a brief overview of how your metadata should be working: When you place the flag ItemFlag gets the angle from the player, then it passes the data to the block's metadata The TileEntityFlag just handles the reading and writing of the metadata (which seems kinda repetitive and unnecessary to me, but that's how it is! :-P) The BlockFlag should then reads that metadata Now.... with all that said... are you sure you can't just extend the "Sign" class, override the render type and a few things, and call it good? :-P LOL Good luck to ya', let me know if you have any questions about my irrational ramblings! :-P I struggled with this same exact problem for a week though, and it took me that long, to reach this level of insanity (and yes, I finally got it working last night, due to registering my tileentity class) :-) -
Incompatible mod "Journeymap" (works with ML, but not FML)
Bandayd replied to Bandayd's topic in Support & Bug Reports
Thanks cpw, I appreciate the help... this isn't the first time you've helped me, you also helped me troubleshoot my mcmod.info file on my KeepItemsOnDeath mod.... /wave :-) Thanks for looking into it, this mod is truly over-the-top cool, and it doesn't surprise me that it pushes some of the boundaries that others don't (mainly with the web interface which can be accessed by a browser external to the game). If you guys could somehow include a hook/api so that it could somehow work, that would be awesome! (especially if it could just work in its current form since it already works with ML) Thanks again! :-) -
Hi, Journeymap 1.6b3 works great with Risugami's Modloader, however, when I use Forge Modloader, it still loads, but, the webserver portion of it fails to load properly. Below is the Modloader.txt file: Below is the ForgeModLoader-client-0.log: To let you know what it's supposed to do... The mod is supposed to display a map when you hit J ingame, and it's also supposed to display a map if you open the game, then go to 127.0.0.1:8080 in your webrowser. It does all this properly with modloader, however, with FML, the webroswer functionality doesn't work and there's an error displayed in FML's log. Can you guys please add a hook so that JourneyMap can work properly? that would be awesome!!! :-D BTW, if you'd like to download the mod for yourself, to see it in action, just download it from here: http://www.minecraftforum.net/topic/772071-132-journeymap-16-beta-create-daylight-moonlight-cave-maps-as-you-explore/ Here's the direct link: https://dl.dropbox.com/u/38077766/JourneyMap/JourneyMap1.6b3_MC1.3.2.zip Please let me know if there's anything more I can provide, I'm not afraid to get my hands a bit dirty, I made my own mod that works with FML, so FML isn't complete greek to me :-D Also, below is what it displays when I first log in to the game using FML: https://dl.dropbox.com/u/6762006/2012-09-04_18.28.32.png[/img] I should also mention, this was all done with the newest (as of now) version of FML "minecraftforge-universal-4.0.0.247" :-) Thanks! you guys rock!!!
-
To answer my own question (not really, cpw solved this one for me on another thread, kudos should go to him).... That was my problem, if you change "authors" to "authorList", it works exactly like it's supposed to! Thanks cpw!!! :-D
-
first of all I'd like to say THANK YOU cpw for your lightning-quick response speed! exactly 30 seconds between my post and your answer. That has to be some kind of record!!! :-P Secondly.... IT'S FIXED!!!! Thanks cpw for finding my problem! That WAS what was wrong :-) I had orignally taken my mcmod.info file format from this page: https://github.com/cpw/FML/wiki/FML-mod-information-file Which I took the liberty of correcting, is that where I should have gotten that from? Or is there another more official page showing the format of the mcmod.info files? Thanks again both cpw and SanAndreasP for both of your help getting me completely fixed :-D
-
Nope, still no dice, sorry :-( I tried the parser, which read correctly as soon as I put my original code in. The only thing I could think of was, the JSON parser took out the indentation (it removed any spaces on the left side). So just for the sake of being thorough I copied it out of there and pasted it into my zip file, still no dice, the Author is still showing up as blank like this picture shows: http://jaredscodingshack.abits.biz/Author%20not%20showing%20up.png[/img] Here's the updated code I was using in order to get this picture: I'm starting to think that forge's json parser for the author field is possibly broken? Here's the link for the mod if anybody else wants to toy around with it and prove me wrong, but I can't think of anything else I haven't tried. I'd even be open to only listing one author if that's what I have to do in order to get it working??? Again, thanks SanAndreasP for your continued help and patience with me :-)
-
I'm sorry but it still doesn't work for me. I even tried copying and pasting your exact code. :-( I would even be content if you could find another mod that DOES populate the author field properly. That way I could steal... I mean copy the mcmod.info file from them, and see if I can get it working on mine. I've tried copying and pasting your code you said should work. I've also tried putting 2 spaces in my original version. I've even tried putting in tabs instead of spaces for indenting. Here is my ForgeModLoader-client-0.log file: it doesn't say anything about an error reading the author, so I don't think it's any help but yeah, maybe if you could find a mod that actually loads the Authors properly (other than forge which is hardcoded in :-P) that I could simply copy the mcmod.info file from. I think that would be easiest. Either that, or if you have any other ideas, because I'm sorry, the two spaces didn't fix it :-( P.S. I'm not sure if it's intentional, but your signature shows up like this... And it doesn't show an image. It's possible that you're trying to show people how to set that up, in which case, no worries. I just wanted you to know it wasn't loading the image, or executing the code. :-P