Jump to content

V0idWa1k3r

Members
  • Posts

    1773
  • Joined

  • Last visited

  • Days Won

    61

V0idWa1k3r last won the day on May 8 2020

V0idWa1k3r had the most liked content!

Converted

  • Gender
    Male

Recent Profile Visitors

15520 profile views

V0idWa1k3r's Achievements

World Shaper

World Shaper (7/8)

392

Reputation

  1. Your errorlog doesn't match your code at all. As for the code you've provided: Don't extend Gui on your event handler class, that makes no sense. The resourcelocation currently points to assets/minecraft/vezythieme/vezy.png. if (e.getType() != null) { if (e.getType() == ElementType.TEXT) The first check is redundant. If the type is TEXT it can't be null. RenderGameOverlayEvent is a parent class for Pre and Post events. Pick the one you need. However that doesn't matter since your error log indicates that the code you are using is completely different. Make sure the file is actually there. Check that it isn't test.png.png or something like that, check that eclipse isn't being a derp and is actually including your resources, etc. A screenshot of the file in your folder structure would also help.
  2. This is not entirely true. https://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection In fact I am pretty sure I saw similar code in forge at some point. Doing this is not a good idea though. "In some cases they are better than reflection. That is in ALL of access cases." There is nothing wrong with using reflection and you should prefer reflection to ATs in most cases IMO. Use ATs if your reflective operation is too expensive(eg. called multiple times a frame).
  3. As I've said Your file isn't horse_armor_wood. It's horse_armor_wood.png(I presume anyway since you have file extensions hidden it may be any other image extension - and it has an image extension because it has an image thumbnail).
  4. What is "ctx associated with this type of textures"? Show what you've tried.
  5. This would not work since new Block() != new Block(). You must pass the same object to the ItemBlock that you have registered, not an identical one. https://mcforge.readthedocs.io/en/1.13.x/concepts/registries/#injecting-registry-values-into-fields
  6. Instantinate in the registry event. event.registerAll(new BlockA(), new BlockB(), new Block(Material.IRON).setRegistryName(...), new ...) One of the many reasons I chose a different IDE...
  7. Your system will not work. Registry entries MUST be instantinated in the appropriate registry event, now more than ever. Don't ever use static inializers for registry entries. Rework this right now, before it gets too big. You will also make your code much more readable and will write way less code. The code in your repository doesn't match the code you've posted. So yeah, fix the static initializer issue first, then I can debug your repository.
  8. Thanks. Override Block#isFullCube and return false. For propagating light either override Block#isOpaqueCube or Block#propagatesSkylightDown and return false.
  9. The title of your post suggests you are using 1.14.2. Please clarify what version are you actually using. And whether you are using forge at all. This has nothing to do with the model file of either of the blocks. OP just needs to override Block#isFullCube and Block#isOpaqueCube to return false.
  10. Where'd you get 1.14 forge from?
  11. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/SimpleBatteries.java#L24 A common proxy makes no sense. Proxies exist to separate sided-only code. If your code is common then it goes anywhere else but the proxy. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/content/ModBlocks.java#L15 Don't ever use static initializers for registry entries. They must be instantinated in the appropriate registry event. This is not how ObjectHolders are used. ObjectHolders inject values into fields. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/proxy/CommonProxy.java#L21 Your proxy can't be an event handler since it will load the class and crash the game. https://github.com/JGgithub2018/Simple-Batteries/blob/master/src/main/java/jgcodes/sb/content/blocks/BlockBase.java Don't do XBase. There is already a BlockBase, it's called Block. Do not abuse inheritance. Your issue is caused by you not setting the registry name for your blocks/items. You need to set the registry name before registering them.
  12. Just send the value as you change it. I doubt sending 4 bytes per tick is much overhead.
  13. LivingAttackEvent allows you to cancel the damage alltogether, with the effects. If you want to only cancel the effects then it's more tricky. You would need to use a tick handler and basically do the reverse of what the EntityLivingBase#attackEntityFrom does to the entity that took damage that you caught in this event.
  14. Don't hijack old threads. Make your own, especially since your issue is unrelated to the one OP once had. You put these in your block class of course.
×
×
  • Create New...

Important Information

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