Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by vemerion

  1. You might have already done so, but if you haven't, then I recommend taking a look at the Forge Sounds Documentation. Among other things, it details which method to call based on if the code is run on the client/server/both sides.
  2. Last I tried, overriding the getAmbientOcclusionLightValue() method (called getShadeBrightness() in the official mappings) did the trick.
  3. I am not quite sure what you mean. Can you elaborate?
  4. I believe you can achieve that by overriding the getAmbientOcclusionLightValue() method (called getShadeBrightness() in the official mappings). Take a look at the AbstractGlassBlock class to see how vanilla does it.
  5. I believe what you are looking for is the defaultAmbientLightWorld() method (called fillBrightnessRamp() in the official mappings) in the DimensionType class.
  6. Placement configs were changed a bit in 1.16, so CountRangeConfig doesn't exist any more. See this thread for more details.
  7. I think this is the latest: mappings channel: 'snapshot', version: '20210309-1.16.5'
  8. But that mod is for 1.12, so A Soulspark won't be able to use that for their 1.16 mod. Or do you mean that the repo is a good place to look to get inspired on how to implement something similar for their mod?
  9. Forgive me if I am wrong, but wouldn't that only work for players, since potion effects are not synched to the client for other entities?
  10. Did you update the mappings, because hardnessAndResistance() should still work in 1.16.5? I think it is called strength() in the official mappings.
  11. I have never used an obj model before, but my guess is that you can still use the 'display' field in the item json model file to change the rotation/translation/scale of the item. Take a look at the Minecraft wiki article about it. That would solve issue 1 and 3 I think.
  12. I understand that, but when you have found the target entity, what do you want to do with it? I am trying to figure out if you really need to know the target entity on the client. From one of your earlier replies, you seem to imply that you need the target on the client because you want to deal damage to it, but that won't work anyway, because you can't deal damage on the client.
  13. What exactly do you need the target entity for on the client?
  14. InputEvent.ClickInputEvent is a client-side only event, so you probably don't want to use that. The AttackEntityEvent is exactly what you are looking for, it is fired when a player attacks, and you can get the entity the player is attacking with AttackEntityEvent.getTarget().
  15. Who are you and what have you done to JoppeGames3!?! I feel like there is something strange going on here...
  16. I'd recommend checking out the PigEntity and BoatEntity classes to see how vanilla does it.
  17. Well, you can't make a texture with data generators, only blockstate and model json files. What the error is saying is that it can not find a texture (a png) with the name 'chocolate_trapdoor.png', in the 'textures/block' folder. Have you forgot to put your texture there? Another problem could be that you have to refresh the project in your IDE, since it caches resource files (Eclipse does at least).
  18. Alright, thank you again! getUseDuration() has actually been a bit of a thorn in my side for some time. When I wanted to make the cast time of the spells dependent on the equipment of the player, I couldn't, because we don't have access to the player, only the itemstack... Anyway, thank you for your help!
  19. Alright, thank you! So, I should use the world to determine the side when possible, and in the few cases where I cannot, I have to use EffectiveSide.get(), correct? Should I be worried about the possibility of getting the wrong side from EffectiveSide.get(), or are the risks negligible?
  20. Hello everyone! In one of my mods, I have a JsonReloadListener for a data-driven spell system (Magics.java). These magics are synched via packets to the client. The problem is that on single-player, the logical server and client shares the same Magics instance, which means that the client will overwrite the magics for the server when it receives the synch packet (as well as other potential problems such as race-conditions). Now I want to fix this issue, by having separate Magics instances for the server and client. The problem then is that there are some cases (for instance in the
  21. Take a look at the vanilla screens, such as the ReadBookScreen class. All you really need to get started is to create a class that extends the Screen class, and then you can open the gui with Minecraft.displayGuiScreen() (which you can call for example in the onItemRightClick() method in your item).
  22. Besides IForgeBlock.isSlimeBlock() there is also IForgeBlock.isStickyBlock() and IForgeBlock.canStickTo() that you might need to override.
  23. You should never create a new instance of a world, the vanilla code handles that for you. In this case, you have access to the world via ItemUseContext.getWorld().
  24. You are right. I opted for the easy and wrong answer, and then tried to explain it away. I have updated my original answer, and I hope you can find it in your heart to forgive me! What you should do is change the type of your instance field to the type LazyOptional<IState>, which you should initialize to LazyOptional.of(() -> STATE_CAPABILITY.getDefaultInstance()), to avoid creating a new LazyOptional every time getCapability() is called. Note that you might have to slightly change some of your other methods to accommodate for the fact that instance now is a LazyOptiona
  25. Of course you are right! However I wanted to provide a as simple solution as possible, which is why I left out that part.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.