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.

ultra_reemun

Members
  • Joined

  • Last visited

  1. public static final EntityType<SpearIronEntity> ENTITY_TYPE = EntityType.Builder .<SpearIronEntity>create(SpearIronEntity::new, EntityClassification.MISC).size(0.5F, 0.5F) .build("combat:spear_iron_entity"); Apologies again, that's all setup here, which is copy pasted from minecraft's Trident code and then adapted to fit how I've been setting things up with my throwable items. This above code works with my throwable items, based off of code from a snowball, however I don't quite know how the trident fully works yet and therefore don't know what to do about rendering it. Thanks for all your help.
  2. Thank you for your reply, I'll try and figure out how it works
  3. Apologies, I pasted the wrong code I'm an idiot... RenderingRegistry.registerEntityRenderingHandler(ENTITY_TYPE, manager -> new SpriteRenderer<>(manager, Minecraft.getInstance().getItemRenderer())); The issue is that when I use this for my trident I get the error: Cannot infer type argument(s) for <T> registerEntityRenderingHandler(EntityType<T>, IRenderFactory<? super T>) Apologies for not being specific enough.
  4. Usually to render my thrown items, I use the code: event.getRegistry().register(ENTITY_TYPE.setRegistryName(new ResourceLocation("combat", "entity name"))); I now however am trying to add another trident to the game. This form of rendering does not work in this case, does anybody know how I would go about rendering a new trident?
  5. I think my conditional must have been to restrictive as I've simplified it and it's firing now, Thanks for reminding me to test it! Edit: I realised what's up, it's not registering an attack from a zombie for whatever reason
  6. Sorry to revisist this but I'm still having trouble, even after looking through all the entity events myself. When the player blocks with a shield, LivingAttackEvent is not fired, does anyone know of any events that would be? I can also confirm that LivingKnockBackEvent isn't either. I'm using LivingEntityUseItemEvent to determine when I'm blocking, but I can't tell when an attack is actually blocked.
  7. Thank you, You've been very helpful with all my enquiries
  8. Thanks for the advice! I feel bad for taking up all the team's time with basic questions so I'll start looking into the code myself, Thanks for all your help
  9. Thank you, how would I use ItemEntity to get my specific item?
  10. Thank you for your reply. I want a thrown Item to have a chance to drop itself when it hits the ground, would I still use Loot Tables for this?
  11. I want to be able to spawn an item as a drop, I think I need to use this.world.addEntity(); but I don't know how to get my item as an entity. Thanks for your help!
  12. Ah, clearly I didn't look for long enough! Thank you greatly, how did you check for a shield?
  13. Thanks for the reply, I've looked into it but there's nothing specific to blocking with a Shield. Unfortunately I don't think there's a specific event for what I'm after, which means I need another way around it.

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.