Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

warjort

Members
  • Joined

  • Last visited

Everything posted by warjort

  1. https://forums.minecraftforge.net/topic/118938-forge-4320-minecraft-1192-exception-in-thread-main-javalangillegalargumentexception-10-119-empty-pre-release/
  2. https://github.com/MinecraftForge/MinecraftForge/blob/b0a68b8c7947132411e44527dd3675f2f1d5fd6a/mdk/src/main/java/com/example/examplemod/ExampleMod.java#L27
  3. There is no optifine release for minecraft 1.19.3
  4. Issue with valhesia core. Others have said it is not compatible with optifine.
  5. NBT is a minecraft concept Similar to json. https://minecraft.fandom.com/wiki/NBT_format#:~:text=The Named Binary Tag (NBT,Binary Tag (SNBT) format. Pretty much all data is stored directly or indirectly in NBT. The forge documentation mostly concentrates on what forge changes rather than trying to document minecraft. If you expect minecraft to be documented, you will disappointed. It is a closed source project not designed to be modded (except by datapacks). You need to do as other modders do. Read the vanilla source to find things similar to what you want to do or if you can't, find other mods instead. Many modders will code this kind of processing as a serializable capability, so you can use java most of the time and only deal with NBT at load/save time: https://forge.gemwire.uk/wiki/Capabilities
  6. You need to explain better what you are doing. runclient is a gradle task used in development, it will not use anything from a production environment like curseforge If it can't find minecraft in the development environment, then you have likely broken your build.gradle in some way. Or you have not run the relevant gradle task to setup the run configurations for your IDE if you are starting it that way. https://forge.gemwire.uk/wiki/Getting_Started
  7. Issue with advancementtrophies. Check you have the latest version then contact then mod author.
  8. Look at the implementation of the method you are using. It adds the information to a CompoundTag (a map of name->value) with the key in this case being the attribute name. So any additional "adds" for the same attribute name will just overwrite the previous one. Also, your implementation is complete rubbish. Items are singletons. There is only ever one them. Your hits and swordStage will be shared by all swords in the game and so they will overwrite each others data. Instance data for items should be stored in the ItemStack NBT data like the attribute overrides you are playing with, or enchantments or item damage, etc. Use getOrCreateTagElement(modId) to create your own unique tag on the ItemStack to store this data.
  9. If you are posting compiler errors, you are in the wrong forum. You want a "learning java" forum. There are many level.getEntities() methods. It is an overloaded method name. And there are other helper methods that are built on top of these basic methods. Look at how vanilla code uses these methods. e.g. Level.getNearestEntity() defined on the EntityGetter interface
  10. https://github.com/search?l=Java&q=CreativeModeTabEvent&type=Code
  11. If its your sword, you pass it into the constructor. Otherwise you can apply attribute modifiers for ATTRIBUTES.ATTACK_DAMAGE on the ItemStack. Either directly or using ItemAttributeModifierEvent
  12. Update your java to a recent version.
  13. Look at CreativeModeTabEvent and its subclasses.
  14. Issue with advancementtrophies. Check you have the latest version then contact the mod author.
  15. https://github.com/Asek3/Oculus/issues/257
  16. The obfuscate mod is not a 1.18.2 mod.
  17. Issue with the fluidlogged mod. Check you have the latest version then contact the mod author.
  18. You need java 17 for minecraft 1.18.2
  19. If that really is the full log, post the launcher_log.txt before restarting the launcher. But maybe you have this problem? https://forums.minecraftforge.net/topic/119518-exit-code-1073740940/#comment-524102
  20. You can override BlockBehaviour.getDestroyProgress(). But in some places it just calls BlockState.getDestroySpeed() which is hardwired to return the value from the block properties. In vanilla it only does this to check for special values like 0 and -1 To really override all uses you would need to override the StateDefinition implementation created by the Block constructor so you can override the BlockState implementation to do your logic. Messy, but doable. An alternative would be submit a PR to forge to add something similar to the explosion method. https://docs.minecraftforge.net/en/latest/forgedev/prguidelines/
  21. They work by magic. Or maybe not. ๐Ÿ™‚ They work because somebody calls them from the relevant place in the code. I gave you the answer above. Pseudo code: public static void livingHurt(LivingHurtEvent event) { if (event.damageSource() == DamageSource.LIGHTNING_BOLT && event.getEntity() instanceof Player player && player.getItemInHand(MAIN_HAND).getItem() instanceof AxeItemEx axeItemEx ) { axeItemEx.onHurtByLightning(player, event.getAmount()); } }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.