-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Fence Gate rendering problem 1.10.2 (Solved)
Animefan8888 replied to jjattack's topic in Modder Support
When do you ever register the model. -
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
Lets try something instead of re creating the variables public final int fuel_slots = 1; public final int input_slots = 1; public final int output_slots = 2; just initialize them in the constructor. -
Ok the way I would recommend doing this is making a new project for 1.7.10 and copy all of your code into there. And downloading the forge source for 1.7.10 and setup your workspace.
-
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
What is the result when System.out.println(first_input_index + ", " + input_slots + ", " + (first_input_index + input_slots)); prints out. -
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
Could you post the new crash report anyway? -
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
The inventory variable, instead of passing in the TileEntity you passed in the players inventory and the last time I checked the player only has 36 normal inventory slots. :3 -
I couldn't tell you why and yeah it has been a while since I have used drawTextureModelRect I forgot the parameters. Once you have switch over it should be much easier to pinpoint the problem.
-
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
for (int x = 0; x < fuel_slots; x++) { int slotNumber = x + first_fuel_slot; addSlotToContainer(new SlotFuel(player, slotNumber, fuel_slots_xpos + slot_x_spacing * x, fuel_slots_ypos)); } //Input slots final int input_slots_xpos = 26; final int input_slots_ypos = 24; for (int x = 0; x < input_slots; x++) { int SlotNumber = x + first_input_slot; addSlotToContainer(new SlotProcessableInput(player, SlotNumber, input_slots_xpos + slot_x_spacing * x, input_slots_ypos)); } //Output slots final int output_slots_xpos = 134; final int output_slots_ypos = 24; for (int x = 0; x < output_slots; x++) { int SlotNumber = x + first_output_slot; addSlotToContainer(new SlotOutput(player, SlotNumber, output_slots_xpos + slot_x_spacing * x, output_slots_ypos)); } Look very hard at that and I'm sure you will see what you did wrong. -
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
Could I have a link to your Github and if you ever run into a NullPointerException locate what is null, insert != null checks. -
There are no tutorials for that, best option trial and error, come back to the forum once you have some code for us to help you with, ok?
-
[1.10.2] Loading custom gui for custom block
Animefan8888 replied to Messorix's topic in Modder Support
In the method fractionOfFuelRemaining just insert a != null check that will reset it not equal to null. And to reset it not equal to null I would create a boolean method to do this and make it return true if it could and false if it couldn't and if that method returns false make the method that ran fractionOfFuelRemaining return 0; or return; something default like that. -
Well if it worked before there are inconsistencies. And I would just switch over to the Vanilla GuiButton system it is much cleaner code. But why do you want to change the size when you click the button if the screen is going to change it won't render. Maybe you wanted it to render when it was being hovered over?
-
Interesting. I didn't know that. Did you want it to change size when you clicked it? Have you tried increasing the size it increases when you click it just to make sure that it is visible or not?
-
What error?
-
This super.drawScreen(mouseX, mouseY, partialTicks); Should probably be called at the start aswell. Might not be required, unless you already did that.
-
Well boolean tabOfficial = true; And maybe two pixels is too small to notice?
-
Don't use the default button I was saying use the default button "system". Make a class that extends GuiButton(which is where all the button rendering code is). Override the drawButton method and put your rendering code in there. And there is a method in GuiButton that checks if it is hovering over or not.
-
Also instead of Manually drawing the Button why don't you just create a class that extends GuiButton. Then use the vanilla button stuff in gui?
-
Try to do a print out of trueZone(). See if it ever returns true.
-
A screenshot would be helpful.
-
[1.10.2] Multiple Items/Blocks crash launcher
Animefan8888 replied to luckie12's topic in Modder Support
Can i see the class that you are using for your pickaxe. -
[1.10.2] Multiple Items/Blocks crash launcher
Animefan8888 replied to luckie12's topic in Modder Support
You only need one GameRegistry for items when you do it with blocks you are refistering the block and the item that corresponds with the block. -
[1.10.2] Multiple Items/Blocks crash launcher
Animefan8888 replied to luckie12's topic in Modder Support
That line of code points the mods block to the JSON model, then from there that handles all texture stuff. I would 1 check your model location 2 check your texture location. -
[1.10.2] Multiple Items/Blocks crash launcher
Animefan8888 replied to luckie12's topic in Modder Support
Code example private void registerBlock(Block block, String registryName) { GameRegistry.register(block.setRegistryName(registryName)); GameRegistry.register(new ItemBlock(block).setRegistryName(registryName)); } public void registerBlocks() { registerBlock(block1, "block1"); registerBlock(block2), "block2"); // Add more } -
[1.10.2] Multiple Items/Blocks crash launcher
Animefan8888 replied to luckie12's topic in Modder Support
Actually I was wrong at least the new error pointed that out, but your problem is that when you call registerBlock you set the registry twice GameRegistry.register(block.setRegistryName("copper_ore")); GameRegistry.register(new ItemBlock(block)); GameRegistry.register(block.setRegistryName("copper_block")); GameRegistry.register(new ItemBlock(block)); You only need this once, but you need to pass a string.