Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mazetar

Forge Modder
  • Joined

  • Last visited

Everything posted by Mazetar

  1. http://wiki.processing.org/w/Why_do_I_get_a_NullPointerException%3F
  2. 1. Do you understand what the code I quoted is doing?? Since you are not using a tE it seems to be quite weird for it to be there. 2. As he said above you need an GuiHandler it's a forgewiki page about Gui's and containers, if you learn that then skipp the tE and container (use GuiScreen) u should be good.
  3. Well you are only saying the lines of code and with the !world.isRemote it seems fine.. So where are you calling these lines from as mentioned above you need to call them inn a method the server reads at all. It would probably help you get help faster and better if you provided more of your code for the action you are trying to do
  4. Then explain your code:
  5. Yeah it could seem like that, but when something crashes while coding then it's usually your own fault and not the API or lib's fault There is probably an error inn my GUI as well tough since it's crashing inn the first place ^^
  6. Huh? Not sure what you mean here but the error log / StackTrace above is the one found inn the crash file. The full crash report can be found here: http://pastebin.com/QV20vHNJ I'm pretty sure that the above snippet is all the relevant data, as the rest is just the position of entities and such.
  7. Okay so I'm trying to get my head back into modding minecraft instead of work and programming lectures. So I decided to create all the stuff I know I already should know how to create and therefore I started to create an FurnaceChest. Which is exactly that but how it works is besides the point. I want a GUI looking like the vanilla chest to open and I want to be able to put items into and out of it. So I implement a block, a TileEntity along with a GUI and a Container. Upon activating the block, the game shows the GUI for 1sec before crashing. Or rather not crashing as far as I can tell it's stopping the server, then while trying to stop the server it crashes. So I'm not even sure why it's stopping the server, except that I probably fucked up somewhere big time Some names are still cryptic and contains their vanilla names, but hopefully it's not confusing. If it's unclear I will refactor and re-post. EDIT: I updated forge to get the crash report generation to work which made things a lot more clear. I followed the stacktrace and I see it's getting passed inn an array of 90 slots when mine is expecting 45. I'm not sure why yet but I will dig into it now Heres the new error log: Heres the error log/ Stack Trace, since it's short I'll post it here: Heres the console log into the crash: As you can see at 16:47:54 I enter the world, and 16:47:55 presumably I activate the block. and Bang. Okay so What I want and what happens is documented, here is my faulty code: The @Mod file: http://pastebin.com/zRK2mGTx BlockFurnaceChest - http://pastebin.com/QkGRNBSt Note: TileEntityMaz only contains methods for orientation and is probably irrelevant. TileEntityFurnaceChest - http://pastebin.com/iixziZTa ContainerFurnaceChest - http://pastebin.com/N2j2BQwE GuiFurnaceChest - http://pastebin.com/6phtUaYZ GUI Handler Methods: Well there is all the code related to the GUI and Block. I was unable to figure this out as the stack trace seemed to give me nothing, although the array made me think of the inventory size at the TileEntity I couldn't see what would be wrong there and surely it would be traces to one of my classes inn the StackTrace?
  8. Yes, look into learning openGL and then do the rendeirng yourself You can draw overlays of a texture on top pf another or whatever you want I believe there has been a few other posts about rendering overlays here, if you search around I'm sure they will show up
  9. Java is a great invention, maybe you should learn it? Or at least google the replied solution before you answer...
  10. Yeah you totally can! Makes your @Mod file look much nicer I do recommend that you take a look into Phaimar's tutorials (skip part 3 tough as part 4 is remake inn a much better way ) He's code is nicely organized and if you take a look into EE3's soruce code you can see some nice things he's doing to keep his code much more reader friendly I got a class called ModBlocks where I got all my blocks setup, so inn my @mod file all I do is this inn @PreIni method: ModBlocks.init(); This is the ModBlocks class: public class ModBlocks { public static BlockFurnaceChest blockFurnaceChest; public static void init(){ blockFurnaceChest = new BlockFurnaceChest(689, Material.anvil); GameRegistry.registerBlock(blockFurnaceChest, "FurnaceChest"); initializeRecipes(); } private static void initializeRecipes() { }
  11. Inn other words, if someone creates a blockBreak event which is neat, efficient and well thought then it will be implemented. That's quite reasonable
  12. public boolean isPoweringTo(World par1, int x, int y, int z, int side) { TileEntityAdvTinyChest tile = (TileEntityAdvTinyChest)par1.getBlockTileEntity(x, y, z); if(tile.isFull())return par5 == 0; else if(tile.isEmpty())return par5 == 1; else return false; } wtf is par5 here? it's not initialized anywhere?
  13. Also if you found my explanations hard to understand, why not ask for me to describe it even simpler instead of becoming angry/hostile with me?
  14. I'm sorry? I tried my best to keep my English as decent and grammaticly correct as I could, and keep my terms as simple as possible to make it harder to misunderstand me as my english sucks. Considering that my english skills are quite limited due to the fact that I'm scandinavian and we lack a proper english educational system. So I have no idea how I could in a simpler way ask you for your thoughts and poked you inn the correct direction?
  15. Yeah.. you could just read the code on how UE is doing it, or said you wanted to do it like UE, or in general be more clear about what you wanted to achieve. As far as I can tell the problem you stated would be solvable by my suggestion of getting the block or te from the location to the left of the cable.. So I still don't see you're problem nor any reason for your anger.
  16. 1. I'm trying to help you and you get pissed at me.. makes me wonder why I bother use my spare time to answer logic questions inn the first place. Come'on man.. 2. I know of the UE mod/framework and have used it earlier yeah, since you are looking at the code for it you could just see how he is checking if it's touching another cable? 3. I'm not sure I see you're problem really? My suggestion above would work to achieve what you asked for and you did not say "without checking the block" so WTF is your problem?
  17. Yeah I know what they are meant to do and I understand the concept perfectly, but at the same time I'm trying to teach you how it works and I also try to point out that the statement you made would not work out. I assumed you intended for them to change and not having to hard code them to be true or false. But what you said was that you intended them to not change from false to true. So you told me you needed a cable to be at the left location in order to connect to it, right? Well how do you detect if there's a block at a given position inn the world? Is there a method to let you know what block is at a given x,y,z position?
  18. 1. Yes that's the answer, there needs to be another cable there! So how do we check to see if there is a cable at that place? If you never will change the value false to true, what's the point of having them at all? If the value can't change from true to false and back to true depending on it's connection status what's the point of the variable then?
  19. well I think you missed the question, I didn't ask if the method needs to be true, not about the code at all. If you stop thinking about the code, just think that the system is working and everything is fine. If the cable connects to the left side, what needs to be on the left side?
  20. Yes I do understand what you mean, but I'm trying to ask you what logically must be true in order for it to connect to the left side? Edit: I don't mean for you to tell me some code for it, just tell me what you believe is needed to be true in order for it to connect to the left.
  21. Well then, you need to show your TE's code as well. Well what would it mean to be connected to the block to the left of you? What needs to be true for that to be the case?
  22. Your code can't possibly run, it will not compile if it's like this: public boolean isPoweringTo(World par1, int x, int y, int z, int side) { TileEntityAdvTinyChest tile = (TileEntityAdvTinyChest)par1.getBlockTileEntity(x, y, z); if(tile.isFull())return par5 == 0; else if(tile.isEmpty())return par5 == 1; else return false; } It's impossible that this code let's your game run. So are you sure this is the code producing the above result?
  23. So what you are saying is that the current code on github is the up to date code you have, just like it is in your eclipse workspace right now?
  24. Isn't this: if (tileEntity.isConnected[5] != false) { model.renderLeft(); } Checking to see if the tileEntity has a connection to the left side, and if it is it will render the left side connection for your block? For me it seems like the above code should work, if your renderLeft() method is written properly that is I'm not sure if I see what your problem is, you're code seems fine, so since it's not working I wonder if this part of the code is copied from a tutorial or some other code?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.