Minecraft renderer crashing

Discussion in 'Bukkit Discussion' started by bombom3000, Jul 1, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    bombom3000

    NOTE: This error doesn't happen anymore for some reason.

    Hello, I was working on a Bukkit plugin and I ran this code:

    Code:java
    1. // Bat
    2. int b = 0;
    3. for (Entity bat : p.getWorld().getEntities()) {
    4. if (bat instanceof Bat) {
    5. ((Bat) bat).setHealth(0.0D);
    6. b++;
    7. }
    8. }
    9. sender.sendMessage("" + ChatColor.DARK_RED + b + ChatColor.GOLD
    10. + " bats where killed");
    11. getLogger().info("" + b + " bats were killed!");
    12. b = 0;
    13. // Slime
    14. int s = 0;
    15.  
    16. for (Entity slime : p.getWorld().getEntities()) {
    17. if (slime instanceof Slime) {
    18. ((Slime) slime).setHealth(0.0D);
    19. s++;
    20. }
    21. }
    22. sender.sendMessage("" + ChatColor.DARK_RED + s + ChatColor.GOLD
    23. + " slimes where killed");
    24. getLogger().info("" + s + " slimes were killed!");
    25. s = 0;
    26. }
    27.  


    When this was run with a bat and a slime in the world my screen went a blue colour, and a few seconds later, mob shadows disappear and then I cant do anything. When I press escape, my mouse comes back, but nothing happens in the game window.

    The server log showed that 1 bat and 1 slime was killed.

    This error didn't occur when there wasn't both of those animals being killed at once.

    The log also only showed that I had been disconnected after I closed the game and I could rejoin just fine after restarting it.

    Does anyone else have this problem? Or is it just me?

    (Note: I posted this in Bukkit Discussion because I didn't think that this question was suited for another category.)

    Charlie

    NOTE: This problem is not happening anymore

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page