Skip 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. 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.
  2. 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
  3. https://github.com/search?l=Java&q=CreativeModeTabEvent&type=Code
  4. 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
  5. Update your java to a recent version.
  6. Look at CreativeModeTabEvent and its subclasses.
  7. Issue with advancementtrophies. Check you have the latest version then contact the mod author.
  8. https://github.com/Asek3/Oculus/issues/257
  9. The obfuscate mod is not a 1.18.2 mod.
  10. Issue with the fluidlogged mod. Check you have the latest version then contact the mod author.
  11. You need java 17 for minecraft 1.18.2
  12. 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
  13. 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/
  14. 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()); } }
  15. From 1.19.3 textures need to be in textures/block and textures/item. See Mojang's release notes.
  16. Check you have the latest version then contact the mod author.
  17. I would think you fix it the same way as you fixed it last time. Either reinstall the mod that has the POI (point of interest) or edit the save to remove this data. This time it is inside the chunk data. I believe POIs have their own directory? https://minecraft.fandom.com/wiki/Java_Edition_level_format#poi_format
  18. LivingHurtEvent The DamageSource will be LIGHTNING_BOLT I have no idea how your Axe relates to this. Maybe LivingEntity.getItemInHand() ?
  19. It says it can't find a village "Point of Interest". I would guess this is related to those world gen mods you removed and were having problems with in your previous thread?
  20. Your latest crash shows you using broken client side only mods on the server like "not enough animations" and "entity culling". They are broken because they are trying to load client side GUI classes on the server where they don't exist. Remove these from the server, you don't need them there.
  21. When you have a crash in a mixin like you have, look for the final "caused by" then look for mod names.
  22. Conflict between immersive portals and krypton. Check you have the latest versions then contact the mod authors.

Important Information

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

Account

Navigation

Search

Search

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.