Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Registries are fired in order: Blocks -> Items -> Everything else (in a non-reliable order)
  2. Show this class.
  3. Yes, so, I see that you have a null pointer somewhere on line 202 of your ItemRegistryHandler. By using my telepathic powers It's probably that variable right there (you should see a blue floating finger pointing at line 202, if you do not, please contact your local psychics association).
  4. Have you used guis with a tileentity? Same thing, except you don't have a connection to any server objects. Its just a screen.
  5. No, that's where tags go. Dude: https://minecraft.gamepedia.com/Written_Book#Item_data
  6. What. This makes zero sense. Models are 3D models, which are client files. Written book content is NBT data. Go look at WrittenBookItem.
  7. Pretty sure the "complete set" in the creative tab is expected behavior. As for the book: https://github.com/jackokring/MinecraftMod/blob/master/src/main/java/uk/co/kring/mc/Jacko.java#L267-L271 I don't see where you are setting its text. As do most items in creative mode...
  8. minecraft-xl-core != minecraftxlcore
  9. by the way, e.getRegistry.registerAll() exists. Well, you don't register TEs, you register TE Types. So put those in an array. And yes, you'll probably need a helper function. Write a helper function and put its return value into the array.
  10. Non-ticking TEs do not generate appreciable amounts of lag.
  11. Your json file is not valid json.
  12. Ok. Now then. This doesn't happen by magic. You will need to subclass the various tool classes (sword, axe, hoe...) and override hasEffect in them too.
  13. But you haven't shown where its used. You've shown us that you register one item, an item that does not use the class.
  14. That's not the problem. That's just a different way to access a capability and ifPresent is perfectly acceptable (and indeed, preferred). I suspect the issue is that ClientTickEvent runs in the main menu before there is a world. Before there is a player and there is no null-check on line 92: Minecraft.getInstance().player.[...] player, there, may be null!
  15. if(this == MyBlocks.BlockA) { return new TileEntityA(); } if(this == MyBlocks.BlockB) { return new TileEntityB(); } ... ?
  16. You have the wrong interface Do not use IInventory, use Capabilities.
  17. IIRC there's a method (field?) in the FontRenderer that will return the right value. Its been a while since I was digging around in it, but a couple years back I was working on a Unity project where I was trying to replicate the Minecraft UI system (which is now useless, as uGUI is 1000 times better, but imGUI was way worse). All I remember at the moment was that I discovered the value as part of that process when I was not getting a consistent look on the Unity side. A hard coded 9 pixels is probably fine, but its worth spending a few minutes digging around to check.
  18. You do understand that this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L93 And this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L89 Do basically the same thing, right? Lines 89 and 91 each register one method specified, line 93 registers "all annotated methods" which happens to be...one method (line 137). Then you have this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L80 Which literally does the same thing as line 89, registering the same method a second time.
  19. Because all those bits of info are now specified in the mods.toml file.
  20. Show your main mod class and your mods.toml file.
  21. No. I'm saying that the two things are fundamentally unrelated: like temperature and weight. They appear to have a relationship (after all, objects have both temperature and weight...) in that a given block that has a tile entity will have createTileEntity called and it will return a value, but you can't 1:1 map those two things together in any meaningful sense. For example this: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/AxelBlock.java#L66-L77 Sometimes the block has a TE, sometimes it does not. Writing a condition that says "when the block has X state, it return TE_X, when it has Y state it returns TE_Y, when it is in Z state, it returns null." It is even possible to write two different blocks to have the same TE. The vanilla furnace for example: at one time the lit furnace and the unlit furnace were two, completely separate, blocks that the game would switch between in order to handle lighting. You simply cannot convert from one to the other because it does not make sense to even ask the question.
  22. You're right, my mistake. My next guess would be that the bound texture is getting messed up, but OP's rebinding it to a vanilla one and the one that's being rendered mistakenly doesn't look like a vanilla one...
×
×
  • Create New...

Important Information

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