Everything posted by Animefan8888
-
[1.10.2][CLOSED]Creating Non Existing Blocks
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.
-
[1.10.2][CLOSED]Creating Non Existing Blocks
The texture is the cross as tesselator (as far as i know) draws images and not "shapes".
-
[1.10.2][CLOSED]Creating Non Existing Blocks
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...
-
[Forge 1.10] Block that clears player inventory
Well first you need the a player variable, and once you have one call player.inventory.clear()
-
[1.10.2][CLOSED]Creating Non Existing Blocks
Do you know how the tesselator works?
-
[1.10.2] Chestplate with Flight?
That's interesting, is there a method that fires on removal of said piece of armor? Sadly no.
-
[1.10.2] Chestplate with Flight?
As Draco said it doesn't get called unless it is equiped, solution subscribe to PlayerTickEvent in an EventHandler.
-
Mod works in IDE but not as a jar after building??
What version is this?
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
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.
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
...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.
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
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.
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
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).
-
[1.10.2] IFluidHandler?
Use the capabilities.
-
Bugs with drag and drop and containers
Instead of passing in tileEntity.getInventoryField() just pass tileEntity into the constructor. You would pass the players inventory the same way.
-
Bugs with drag and drop and containers
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.
-
Throw-able explosive not working properly 1.10
Also crtl + i will correct the cascading by it self and not line wrap.
-
Bugs with drag and drop and containers
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.
-
Throw-able explosive not working properly 1.10
If you are using eclipse press crtl + shift + f and it will format it for you.
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
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.
-
[1.10.2]Need an algorithm to find a spot to put a grave-chest
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 }
-
Throw-able explosive not working properly 1.10
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; } }
-
[1.8] Block Texture not appearing in world
Post the solution was it the missing variant?
-
[1.8] Block Texture not appearing in world
Are you sure there is still no errors? The only thing I could think of is that you do not have the facing variants...
-
[1.10.2] Adding day/night cycle to the End after killing the Ender Dragon
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.
-
[1.8] Block Texture not appearing in world
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?
IPS spam blocked by CleanTalk.