Jump to content

EvilGood

Members
  • Posts

    5
  • Joined

  • Last visited

EvilGood's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thank you, I guess I'll start with something else then.
  2. Do you know a link or guide that would help me with reflection, because I'm kinda stuck at the moment. ^ Thanks for helping, Evilgood
  3. This document. How do i get acces to the inTile function? forgeevents.html
  4. I was looking through a document that said that I should extend it. I removed it now and it works, so thank you for that, but not the way I intended. I want it to explode on impact. Its now exploding when the arrow spawns in the world. Do I have to use another event or another command? And when do I extend public class? Thanks for helping, Evilgood.
  5. Hello, I'm trying to learn Minecraft modding and was busy with an exploding arrow. But I was getting an error in my event where it said I had to add a constructor method. I don't know why this happened. Could someone help me please? Here is the Code: package com.evilgood.github.events; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityArrow; import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class ExplodingArrowEvent extends EntityEvent { @SubscribeEvent public void onImpact(EntityJoinWorldEvent e) { if(e.getEntity() instanceof EntityArrow) { EntityArrow arrow = (EntityArrow) e.getEntity(); arrow.getEntityWorld().createExplosion(arrow, arrow.getPosition().getX(), arrow.getPosition().getY(), arrow.getPosition().getZ(), 10, true); } } } Thanks in advance, EvilGood.
×
×
  • Create New...

Important Information

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