Jump to content

Brian_Entei

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Brian_Entei

  1. Well, the whole adding items to the gui seems to not make any sense, so why don't we just leave the gui as-is and only focus on the slot? There really should be a way to add beacon payment items in forge. The only other way would be to manually edit the source code of minecraft via mcp, and I could do that, but then the mod I'm working on wouldn't be very compatable with other mods... So why edit the gui then? Why not just add functionality for registering itemstacks to the slot like I proposed in the op?
  2. Perhaps I can help. I've created my own class(Which so happens is also called 'FurnaceFuel') and I use it to make blocks and items burnable in a furnace all the time. Here's my FurnaceFuel class, and then below that the code in one of my block classes that adds itself as a burnable item: However, I think that my code won't really help you as it looks like you need a block from an itemstack. You can do that like so: Block yourBlock = Block.getBlockFromItem(someItemStack.getItem()); I hope this helps
  3. That sounds like a good idea, but then would the fact that the item CAN go into the slot have to change? Vanilla behaviour is: pick up itemstack and attempt to place it in the beacon slot. If minecraft lets the itemstack in(similar to armor slots), then it's accepted, but if the item isn't accepted, then nothing happens. So if it were to be that a red x sould show up, the code that prevents any non-valid items would have to be changed. If that's not too much, then I think that could work.
  4. I was fiddling around with various forge sources when I stumbled across GradleStart.java, which I recognized as the class that first starts minecraft with forge(at least in the development environment). So I decided to set up a dedicated workspace with all of it's required libraries(most if not all of the libraries are already included with the forge workspace) and then proceed to edit the class. I then managed to figure out how GradleStart operates the minecraft command line arguments and was able to add in support for twitch access tokens! So now you'll be able to stream your mods while they are under development! This opens up opportunities for a modding team to all be watching the same minecraft screen and be able to work together better, and a whole lot more! I can't wait to see where this goes(if it goes lol). Here's my edited version of GradleStart.java: http://redsandbox.no-ip.org/Files/Minecraft/Forge/Gradle/GradleStart.java P.S. I hope I'm in the right subforum lol.
  5. Okay, I'll set up the text in pastebin or just leave the link to the text document version on there. Would modder support be a better suited forum? If so, then yes please!
  6. Okay, so forgive me, but I am rather confused. What is the current solution, and can we just use that instead then? Yes! That is exactly what I was thinking. A modder would just override a function in their items' class just like with the blocks and the beacon base method. Okay, so I get that part now
  7. Ohh, okay. So forget the list, keep the boolean methods? I just think that there should be a way to register an itemstack as valid payment for the beacon. Maybe like you said it would be okay to leave the beacon gui alone since I guess there's not really a way to add a bunch of item icons to it without changing the "vanilla"-ness of it. As for metadata, wouldn't checking the itemstack's metadata work? Then you could just have a method to add a specific itemstack with metadata and then the beacon code would check that? P.S. Not sure if I'm reading your code right, but shouldn't the Item.isBeaconPayment() be returning a private boolean instead of another hard coded list? That way you could do CustomItem.setIsBeaconPayment(true) etc etc. Or maybe it would be better if it were "Item.isBeaconPayment(int metadata) {return false;(default, can be overridden by modders)}" ?
  8. OR! What if the items are only added to the list after you've tried them in the beacon slot! Item crafting/used stat style, you know, once you come into contact with the item, it shows up in the statistics page? What if something similar were done with the beacon? And the default iron, gold, diamond, emerald, etc items would already be in the beacon gui(or beacon gui's new window or what have you) since everyone knows that you can use those.
  9. Yea, I see.. hrrmm. Okay, so what if we go ahead and add in the code for accepting the items while we come up with ideas for the gui? Or are you maybe wanting to do it all at once? If so, that's fine too, I'm still going to be looking into the gui issue either way. Hey... Just a thought. What if we remove the items from the beacon gui, but in their place leave a button that would open a different gui that could better fit said hypothetical list of items? I don't think that would fix the list issue, but it would be better than having an incomplete assortment of item iicons being rendered on the beacon gui container. May have to sleep on this one.
  10. Hmm... I hadn't thought about the gui. What if it were a sort of list like hugo suggested, but instead of scrolling through the list automatically, the player can click on left and right arrows that are the same as the ones that are used in the villager trading gui? And instead of having a list in the beacon/tileEntityBeacon classes you could create two boolean methods in the Item class called "public boolean isBeaconItem() {return false;(default)}" and "public Item setIsBeaconItem(boolean isBeaconItem) {this.isBeaconItem = isBeaconItem;}" (or something of the like). That way users could make new items and call "this.customItem = (new CustomItem()).setIsBeaconItem(true).setCreativeTab(... etc" or whatever they would need to do. But if it were done that way, there would be no 'list' of valid items, just a lot of potential item candidates... hmmm. Thoughts?
  11. I used Gravatar to link mine and it worked right off the bat. Maybe you could try that?
  12. So I was wanting a block that I can place and have it's top surface face me wherever I place it, but I was using the source code from logs, and that wasn't working out too well, so I decided to base my block code off of the piston's code. Well, that worked, but some of the sides of the block(especially the bottom) were flipped/textured incorrectly or just looked weird, so I decided to learn how to make my own renderer based on the vanilla source code for pistons, and I found out that the minecraft source code has a feature that you can use to flip textures called "renderer.flipTexture". So great, I thought, now I can manually edit the block's sides based off of the block's metadata, right? Nope, only some of the sides would even listen to the renderer.flipTexture boolean, and I wanted to find out why(There's even a block rendering tutorial that tells you that renderFaceYNeg/Pos ignores renderer.flipTexture!). So, I dug deep into the minecraft code and found those renderFace**** methods and then I looked through them and, after hours of tinkering, I was able to reproduce working copies of those methods! And better yet, I was also able to add another kind of texture flipping: VERTICAL flipping! So I re-named the original texture flip boolean to "flipTextureHorizontally" and named the new one "flipTextureVertically" so that others can use it. I then tested those booleans out and MAN, did they work! I think it's so awesome that it would be selfish of me NOT to share this with others and see what they think, so here you go, here is the rendering class where all the magic is, and the block class that I used to test the rendering class: Rendering class: http://redsandbox.no-ip.org/Files/Minecraft/My_Mods/MINERSCROLLS/Java_Files/RenderCustomBlock.java Block class: http://redsandbox.no-ip.org/Files/Minecraft/My_Mods/MINERSCROLLS/Java_Files/MultiTexturedBlock.java I hope you guys find this useful! A lot of work and time went into this! P.S. Here's a link to that tutorial I mentioned: http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html EDIT: I've just finished changing and updating these two classes and have managed to create this so far: (Almost)Completely rotatable blocks: http://redsandbox.no-ip.org/FTP_Files/Pictures/2014-08-29_19.38.32.png Can only rotate vertical facing blocks so far: http://redsandbox.no-ip.org/FTP_Files/Pictures/2014-08-29_19.38.32_1.png
  13. Maybe try wiping all of your old gradle files including the main folder located in C:\Users\YOURUSERNAME\.gradle then downloading the recommended version of gradle from the minecraft forge file server?
  14. Wow, even with the issues you are currently having, this is all really cool! I hope I get as good as you guys one day
  15. Any news on this so far? I'm really looking forward to it! Thanks again for helping out
  16. Yeah, I was afraid of that, it's also hard coded in TileEntityBeacon.class as well... What if forge added a hook for adding items to the hard coded list? It would go something like this:
  17. I am working on a mod called "MINERSCROLLS - Reloading Minecraft (MSRM)" by Karrotsmuthi, and I am currently adding new ingots and blocks to the mod. However, I am having trouble with beacon blocks. I found out how to add blocks to the base of the beacon and have then be accepted by the beacon(thus 'lighting' the beacon), but now I need a way to add items to the acceptable item list for the beacon slot(the slot that you put emeralds, iron, gold, diamond, etc in). Does anyone know how to do this, or can it be done yet? Thanks for reading, -Brian_Entei
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.