Jump to content

Recommended Posts

Posted

Is there a way to detect a item entity that is spawned into the world? 

For example,there is a dirt block onto the flaw, id like to be able to detect that.

 

Posted

Yes, exactly which method you want depends on what you are trying to do.

1 hour ago, logan121 said:

there is a dirt block onto the flaw

And I do not understand what you are trying to do.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

From what context? Do you want any dirt items any where in the world? Only around the player? Above a certain block?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Presumably its about to contact the lava, which means it will take damage, and die.

Both of which are detectable events.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

What would I put in the if statement? I thought itd be ItemEntity, but thats not there if im doing e.ItemEntity?

 

@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent e) {
    if()
}
Edited by logan121
Posted

java: cannot find symbol
  symbol:   method getEntity()
  location: class net.minecraftforge.fml.common.eventhandler.Ev

 

@SubscribeEvent
public void onEntityConstruct(EntityJoinWorldEvent e) {
    if (e != null) return;

    Event.getEntity();
    
    }

ent

Posted
2 minutes ago, Danebi said:

Sorry, I meant this:


e.getEntity()

 



Sorry to be a pain, but i end up getting the same error

 

@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent e) {
    if (e != null) return;

    e.getEntity();
    }

 

 

java: cannot find symbol
  symbol:   method getEntity()
  location: variable e of type net.minecraftforge.event.entity.EntityJoinWorldEvent

 

Posted
4 minutes ago, Beethoven92 said:

if (e != null) return;

Whats the point of this line? Also, which forge version are you using?

Just making sure no crashes occur, and im using 1.8.9.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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