Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Getting The EntityPlayer List
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Av3ng3r5

Getting The EntityPlayer List

By Av3ng3r5, January 18 in Modder Support

  • Start new topic

Recommended Posts

Av3ng3r5    0

Av3ng3r5

Av3ng3r5    0

  • Tree Puncher
  • Av3ng3r5
  • Members
  • 0
  • 1 post
Posted January 18
World world = mc.world;
List<Entity> entities = world.loadedEntityList;

public void onTick(TickEvent.PlayerTickEvent e) {

  int i = 0;

  if (i < entities.size(); i++) {
    if (entities.get(i) instanceof EntityPlayer) {
      EntityPlayer targets = (EntityPlayer) entities.get(i);
    }
  }
}

Hi I am pretty new to mod development and am having some issues getting the (EntityList) of the players and i am getting errors in the following code i'm not sure about that i'm not sure about and if someone could help me out i would really appreciate it. Thanks.

 

Capture.PNG.5011c071bfcd64ee14070b745048368d.PNG

Share this post


Link to post
Share on other sites

diesieben07    7697

diesieben07

diesieben07    7697

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7697
  • 56382 posts
Posted January 18

1.12 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Rakaldo
      Forge not showing in the lanucher

      By Rakaldo · Posted 1 minute ago

      I have downloaded forge but it still wont show up in the launcher https://prnt.sc/10c4blb (btw its 1.16.4)
    • GhostGamesFSM
      1.16 Ore generation.

      By GhostGamesFSM · Posted 15 minutes ago

      sorry for the txt, but thanks for the comment. I don't have a BiomeLoadingEvent, but I just have to see how I do that. When I have that I send you a message if that works.
    • HOTSAUCEMAN
      help with loading my world

      By HOTSAUCEMAN · Posted 16 minutes ago

      just ran it again to get more updated logs  debug-1.log.gz
    • HOTSAUCEMAN
      help with loading my world

      By HOTSAUCEMAN · Posted 20 minutes ago

      when loading into my world it says its loading, and then changes to a dirt background with no text; i've looked at multiple threads, forums and videos but i can't find any issue similar to mine (at least on a similar version)  debug-1.log.gz
    • Beethoven92
      [1.16.5] Beacon Overwrite (Screen Error)

      By Beethoven92 · Posted 27 minutes ago

      I apologize...i misread the part where you say that your custom beacon inventory actually opens fine! Yeah, the proximity check is doing its job, the problem seems to be that when pressing the confirm button you are sending a vanilla CUpdateBeaconPacket, then handled by the server, which will check if your open container is a BeaconContainer. It would be helpful to see the complete code you have, please post a link to your repository
  • Topics

    • Rakaldo
      0
      Forge not showing in the lanucher

      By Rakaldo
      Started 1 minute ago

    • GhostGamesFSM
      2
      1.16 Ore generation.

      By GhostGamesFSM
      Started 17 hours ago

    • HOTSAUCEMAN
      1
      help with loading my world

      By HOTSAUCEMAN
      Started 20 minutes ago

    • Nyko
      3
      [1.16.5] Beacon Overwrite (Screen Error)

      By Nyko
      Started Yesterday at 07:22 AM

    • samjviana
      5
      [1.16.5] How to make EnchantedBook go to Custom ItemGroup

      By samjviana
      Started Sunday at 10:00 PM

  • Who's Online (See full list)

    • Rakaldo
    • EdekaKuchen
    • alexro871
    • GhostGamesFSM
    • Beethoven92
    • IntentScarab
    • CookieLukas
    • Tavi007
    • HOTSAUCEMAN
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Getting The EntityPlayer List
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community