Skip 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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. WorldRenderer has become VertexBuffer and instead of addVertex it is the way diesieben said. You also must call vb.startDrawing(glnum, DefaultVertexFormats...) mess around with that last var because i do not know what it would be in this case.
  2. The texture is the cross as tesselator (as far as i know) draws images and not "shapes".
  3. First create a texture aka the one you want to draw. Once you have done that locate where you need to type the render code aka one of the rendering events. Use minecrafts texture manager to bund the texture you made. Then call GL11.translatef() to move the rendering to the block pos. Then use a tesselator to draw the image. Note: I may be missing a step...
  4. Well first you need the a player variable, and once you have one call player.inventory.clear()
  5. Do you know how the tesselator works?
  6. That's interesting, is there a method that fires on removal of said piece of armor? Sadly no.
  7. As Draco said it doesn't get called unless it is equiped, solution subscribe to PlayerTickEvent in an EventHandler.
  8. Go to RenderGlobal.class In Eclipse press ctrl + f and search for if (this.mc.theWorld.provider.isSurfaceWorld()) Look at that code as that handles all sky rendering if it is in the method renderSky(). You will find all of the variables it uses in there and how it does the sun and moon logic. For fog just search for fog in WorldProvider and WorldProvider... and see how they handle that. Final question: where do I write down my own code for the renderSky()? Do I make an extension of RenderGlobal overriding that function? Do I make a new class and call it from the WorldProvider? These might be dumb questions, but they're probably my biggest problem when it comes to Java. (Where to actually write stuff) Thanks for everything so far. You have a IRenderHandler field in your WorldProvider. You set that equal to your IRenderHandler. In your IRenderHandler there should be a required method called render() (Or something similar). Then with the method I told you to override if "blank" return your IRenderField. RenderGlobal calls the method i provided earlier and renders from there if there is one.
  9. ...Forge why did you name a class "I"RenderHandler...Anyways you do want to extend it, since it was prefixed with I I assumed it was an interface that needed to be implemented. Alright, that got rid of the static-ish sky. Next things are: - Sun, Moon and stars - Getting rid of the fog that doesn't let me see squat. (Looks like the Nether's red fog which limits your view distance) Go to RenderGlobal.class In Eclipse press ctrl + f and search for if (this.mc.theWorld.provider.isSurfaceWorld()) Look at that code as that handles all sky rendering if it is in the method renderSky(). You will find all of the variables it uses in there and how it does the sun and moon logic. For fog just search for fog in WorldProvider and WorldProvider... and see how they handle that.
  10. Okay, I see how to make the Sun rise after using the item, but we have a problem: I can't make a new class that implements IRenderHandler. It's an abstract class. I can only make my new class extend it, which I don't think will yield the results we're looking for here. Or am I misunderstanding something? ...Forge why did you name a class "I"RenderHandler...Anyways you do want to extend it, since it was prefixed with I I assumed it was an interface that needed to be implemented.
  11. I found that in RenderGlobal, but I still don't know what to put instead of null. I can see how the renderSky() function works. It has a variable net.minecraftforge.client.IRenderHandler renderer = this.theWorld.provider.getSkyRenderer();. I can't use this since it's accessing the world provider to asign this variable, and here I am configuring the world provider. Or am I wrong? Sorry. Still rough around the edges. Create a new class that implements IRenderHandler then make it render your sky. In the worldProvider#getSkyRenderer() make it return null when you want the sky to be the normal ends, but when you want it to be your sky return your IRenderHandler class. (Note make your IRenderHandler variable equal to a new instance of your IRenderHandler class).
  12. Use the capabilities.
  13. Instead of passing in tileEntity.getInventoryField() just pass tileEntity into the constructor. You would pass the players inventory the same way.
  14. I do not have time to check it out but you can get all of that data from the TileEntity so instead just call the second constructor and set the data from the TileEntity, then if you want to display some of this data on the gui look at how ContainerFurnace, TileEntityFurnace, and GuiFurnace sync that data.
  15. Also crtl + i will correct the cascading by it self and not line wrap.
  16. I'm pretty sure I figured it out, you never add any slots server side. You use the first constructor with just sets the variables inside the Container, but when creating a container in the Gui you add the slots.
  17. If you are using eclipse press crtl + shift + f and it will format it for you.
  18. Well, skyRenderer in WorldProvider is private, so I can't access it. I made one for my WorldProviderTTE named skyRenderer as well and set it to be equal to null (same as the WorldProvider's) and also added the function: @SideOnly(Side.CLIENT) public void setSkyRenderer(net.minecraftforge.client.IRenderHandler skyRenderer) { this.skyRenderer = skyRenderer; } and nothing happens. Probably be cause it is null you need to render the sky your self look at RenderGlobal that is where the sky is rendered based on the dimension ID.
  19. Use nested for loops to check what block is there though you will want to start from the center which can be a little tricky. for (int xOff = 0; xOff < radius; xOff++ { // Two more for loops with x and y... // Check all block positions //Do stuff }
  20. The answer you are looking for is you are not passing the right parameters, look in world at createExplosion it tells you the what each variable is. Also by formatted he means it kinda "cascades". public void example(int i) { if (i == 1) { i = 0; } }
  21. Post the solution was it the missing variant?
  22. Are you sure there is still no errors? The only thing I could think of is that you do not have the facing variants...
  23. Also isSkyColored(). *Edit and this @SideOnly(Side.CLIENT) public net.minecraftforge.client.IRenderHandler getSkyRenderer() { return this.skyRenderer; } Basically if "blank" return a different field that will render your sky otherwise it will always render the end sky as it is hardcoded.
  24. Woops didn't see the 1.8 sign... I was going off of 1.10.2... Where do you register the renders? Where is the blockstate JSON do you have one?

Important Information

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

Account

Navigation

Search

Search

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.