Jump to content

ultra_reemun

Members
  • Posts

    60
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ultra_reemun's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  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.
×
×
  • Create New...

Important Information

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