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


  • Posts

  • Joined

  • Last visited

Everything posted by ultra_reemun

  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.
  14. Is there an event for this that I can hook onto? I'm looking to: Detect when the player is blocking with a shield Detect when the player's shield blocks an attack Thanks for your help!
  15. Thanks for your help. My ShurikenEntity class already extends ProjectileItemEntity, however my issue lies with my constructor here: public ShurikenEntity(World worldIn, LivingEntity throwerIn) { super(ModEntityType.SHURIKEN_ENTITY, throwerIn, worldIn); } My IDE is returning the error: The constructor ProjectileItemEntity(RegistryObject<EntityType<ShurikenEntity>>, LivingEntity, World) is undefined And is suggesting the fix : Change Type of 'SHURIKEN_ENTITY' to 'EntityType<? extends ProjectileItemEntity>' Which is giving an error.
  16. My issue now is this: public class ModEntityType { public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.ENTITIES, Combat.MODID); public static final RegistryObject<EntityType<ShurikenEntity>> SHURIKEN_ENTITY = ENTITY_TYPES .register("shuriken_entity", () -> EntityType.Builder.<ShurikenEntity>create(ShurikenEntity::new, EntityClassification.MISC) .size(0.25F, 0.25F) .build(new ResourceLocation(Combat.MODID, "shuriken_entity").toString())); } I need to make SHURIKEN_ENTITY extend ProjectileItemEntity, does anone know how I'd go about doing that?
  17. Did you attempt to install optifine? To my knowledge it isn't included with forge so you shouldn't have to remove it. Your best bet would be to share your full crash logs so someone that's alot more knowledgable than me can help out!
  18. I must be mistaken then my apologies. I seem to remember the two being compatable for some reason, perhaps I was using OptiForge, which might be worth looking into aswell.
  19. Hi all, I've been trying to add a throwable item for a while now and I can't find any up to date resources on the topic. I've got my item and its class all sorted, with a cooldown in place etc but I don't know how to actually create my entity. (I think that's how it's done?). I need help on creating a class to initialise my entities (if it works similarly to items and blocks) and for the actual thrown entity, aswell as its collision etc. Any help would be greatly appreciated, or a link to a helpful site you know of! Thank you for your time.
  20. Ah that's a shame. How would I check if the held item extended sword item?
  21. One last question if anyone's got the time, ToolType only contains axe, pickaxe and shovel, what would I use to get the sword aswell? Thank you all for your help.
  22. Thanks for the help! How would I use that in relation to what my player is holding?
  • Create New...

Important Information

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