Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Wait are you registering your Blocks twice? Here and here. I'm not sure how I didn't notice this. And commenting out the registry event fixes the issue. Register your Blocks once and only once.
  2. Have you looked for getters? Also in the case of Screen::font just use Minecraft.getInstance().fontRenderer or use Reflection in order to get it. Doing raw additions probably isn't the best idea. Things should be based on the Screen's width and height or the window's width and height. You are correct it is not. I would instead just draw the portion you changed onto the screen not the whole gui. This event is called after the tinting effect is called not when the actual screen is called.
  3. In what way are your replacing the recipes? I believe you can override any recipe or maybe any of the ones forge doesn't override itself.
  4. It is usable for Entities. Check out the forge docs page here.
  5. As far as I am aware an Entity is never told that it is being unloaded. Therefore your first approach seems to be the only way.
  6. Post your code as a working github repo I would like to test this locally to find an answer. I might be blind or missing information.
  7. There's more information to this error that helps like a line number.
  8. If you don't show us your code no one on here can actually help you all we can do is make shortsighted guesses on what could be causing your problem. If you don't feel comfortable sharing your code then don't and know we can't really help you.
  9. I don't need to look at someone else's code when I am helping you with your own. I have no guarantee you did everything Cadiboo did unless you directly copy-pasted his code.
  10. This is not how you register things. Either use the events or the DeferredRegistry system.
  11. When you created your BlockItem instances did you set the ItemGroup via Item.Properties?
  12. The Block::onBlockActivated method is called per logical side per hand. IE 2 sides 2 hands 2*2=4.
  13. When does a statically intialized instance get initialized? It's hard to answer that question because you never know when. As such forge can't assign it the proper MODID for it's registry name. Also just noticing this now, but in the code snippets you posted you never set that blocks registry name in the first place.
  14. You should never statically initialize registry entry values.
  15. It would help if you showed more code. What does your Block look like what about your TileEntity? You are using a class for your Block and TileEntity right?
  16. Did you register a TileEntityType for your TileEntity?
  17. You send a pack to the server every frame the Screen is called... Also when handling the packet you reach across logical sides by using Minecraft.getInstance() You cannot do this Minecraft.class is client only. Instead whenever the currency is changed send it to the player aka the client. Then in your Screen you can just do Minecraft.getInstance().player.getCapability(...) to get your data from the capability. Your handle method for your packet should store the currency in the capability.
  18. You are doing this on the logical client you cannot do that. Do it on the logical server IE !world.isRemote
  19. If you make a json model for the item you can use the display tag(check out item/generated for an example) to translate the model. I think.
  20. It's actually better for you to use a BakedModel instead since the rotations and scales are finite. However, I am unsure of the 1.14 way of doing that.
  21. No it's not bad practice you have a pretty good jumping off point, and you understand that it won't all be the same and know where to look. You'll get used to 1.14 in no time.
  22. I don't think multipart models support offsetting the models no. You'll have to make a new model file. The correct way to do this is to override Block::getRenderLayer and return BlockRenderLayer.CUTOUT_MIPPED
  23. Override the Blocks.SPAWNER block in the registry with your own. Note you cannot change the BlockState of the Block. Then create your own version of the MobSpawnerTileEntity which does everything the vanilla one does except insert your feature into it.
×
×
  • Create New...

Important Information

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