WinneonSword Posted September 2, 2013 Share Posted September 2, 2013 Hello, Without modifying base classes such as GuiIngame.java, I'm not sure how I would do this. For example, how would I remove the armour or health bars from displaying at all? In my mind, using something like RenderGameOverlayEvent or TickType.RENDER would overlay or add something to the screen, but I don't think using it to delete something would be possible without something maybe like event.setCancelled(true); like Bukkit does. Does anyone else know how I would do this? Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 RenderGameOverlayEvent and cancel what you need ... Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
Mew Posted September 2, 2013 Share Posted September 2, 2013 RenderGameOverlayEvent and cancel what you need ... ez pz Quote I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there Link to comment Share on other sites More sharing options...
WinneonSword Posted September 2, 2013 Author Share Posted September 2, 2013 And how exactly would I do this? Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 1 register your event handler 2 in your handler check if its the thing you want to stop 3 cancel it Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
WinneonSword Posted September 2, 2013 Author Share Posted September 2, 2013 How would I check to see which is which... I can't find out how to locate the health GUI and they translate that into a method I can disable. Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 RenderGameOverlayEvent contains the type, check if its the type you want they are called very obvious names... like health,armor etc Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
WinneonSword Posted September 2, 2013 Author Share Posted September 2, 2013 Ok so I found the type method, and I registered the variable as ElementType health = e.type.HEALTH;. Now, I'm looking through the methods and I can't find anything that says to cancel it, except for the original e.setCancelled(boolean). But thats a boolean, and I'm not sure if you can find the variable to e... I'm so confused. I'm sorry if I'm a hassle. Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 except for the original e.setCancelled(boolean). But thats a boolean, so ? what do you expect to give to that method ? Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
WinneonSword Posted September 2, 2013 Author Share Posted September 2, 2013 That was just an example. I have the variable set, but I can't find out how to cancel it. Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 event.setCancelled(true); ... Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
WinneonSword Posted September 2, 2013 Author Share Posted September 2, 2013 OH I get it now. You would set the event type to RenderGameOverlayEvent to .Health and the end, and then do event.setCancelled(true);. Sorry for the trouble, thanks. Quote Link to comment Share on other sites More sharing options...
hydroflame Posted September 2, 2013 Share Posted September 2, 2013 no dont set it to health, it will eventually show up as health Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.