Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. 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.
  2. 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.
  3. What is the result when System.out.println(first_input_index + ", " + input_slots + ", " + (first_input_index + input_slots)); prints out.
  4. 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
  5. 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.
  6. 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.
  7. Could I have a link to your Github and if you ever run into a NullPointerException locate what is null, insert != null checks.
  8. 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?
  9. 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.
  10. 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?
  11. 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?
  12. This super.drawScreen(mouseX, mouseY, partialTicks); Should probably be called at the start aswell. Might not be required, unless you already did that.
  13. Well boolean tabOfficial = true; And maybe two pixels is too small to notice?
  14. 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.
  15. 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?
  16. Try to do a print out of trueZone(). See if it ever returns true.
  17. Can i see the class that you are using for your pickaxe.
  18. 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.
  19. 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.
  20. 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 }
  21. 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.
×
×
  • Create New...

Important Information

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