Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. If you added the Items to a map of <Item, Item> where the first one was the original and the later one was the replacement you could just loop through that list to compare items. Then if the Items matched you would your replacement for the original item right there. Though that is only really useful if you have lets say 10+ plus replacements. And of course you could do the same for Blocks. *Edit Correction you could just use map.contains(item) then if true do the replacement. No need for a for loop.
  2. It works! I had already added the line idea{module{inheritOutputDirs = true}} but I didn't run again the ./gradlew setupDecompWorkspace. thanks for your help! Is that not step 2?
  3. Ok is the Item damagable? Post the whole class please.
  4. I did not understand your answer. I followed this guide that are in the README.txt file: at the step 3 the underlined and bold text I cannot import the file. I have just launch the gradlew program with arg --info and in the outputs I found that error: file or directory '/Users/noemurr/Downloads/forge-1.10.2-12.18.1.2011-mdk/src/api/resources', not found I think that it is important but I don't know I to resolve the problem. Are you sure you did steps 1/2?
  5. I may be an idiot that doesn't use IneliJ but I'm pretty sure you do not import the build.gradle project... I was indeed an idiot...
  6. You never set it to be anything other than 0...
  7. 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.
  8. The texture is the cross as tesselator (as far as i know) draws images and not "shapes".
  9. 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...
  10. Well first you need the a player variable, and once you have one call player.inventory.clear()
  11. That's interesting, is there a method that fires on removal of said piece of armor? Sadly no.
  12. As Draco said it doesn't get called unless it is equiped, solution subscribe to PlayerTickEvent in an EventHandler.
  13. 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.
  14. ...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.
  15. 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.
  16. 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).
  17. Instead of passing in tileEntity.getInventoryField() just pass tileEntity into the constructor. You would pass the players inventory the same way.
  18. 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.
  19. Also crtl + i will correct the cascading by it self and not line wrap.
  20. 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.
  21. If you are using eclipse press crtl + shift + f and it will format it for you.
  22. 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.
×
×
  • Create New...

Important Information

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