EMC "Entity" changes - Distance to activate

Discussion in 'Empire Help & Support' started by Aikar, Jan 24, 2013.

  1. That's been such a long time minecraft bug... but least theyve improved it.
  2. Try using water to push them away from the walls.
  3. Right. I get that. Mostly, what I see here is there has to be some line drawn. What are we willing to give up for less lag. I would rather have a little block lag than have to stand on top of furnaces. We just have to figure out exactly what we are willing to pay for what we can get.
    M4nic_M1ner likes this.
  4. Not really possible, the pens are quite small.
    But not too small that they might push up against each other.
  5. To quote Aikar's signature :p

    "<@JustinGuy> When Aikar is done with performance we will be black and white and animals will move like robots"

    But on the serious note, it does end up having to have a few sacrifices to have a smooth running minecraft server. The programming to get things running right in java is nuts - it's just too bloated.

    Like Aikar said - furnaces aren't effected, and try it and see. I really doubt much difference will be noticed for the giant gains we're getting.
  6. Right now only monsters and animals are affected (living entities)

    Next up is to add Paintings/Item Frames (... NOONE will notice this) as these are also very silly in terms of lag
    and item drops too.

    You would never notice the itemframe/painting change even if i made the range 3!

    You will not notice a single thing with items either as water/falling excludes them from deactivation.

    The next changes to come really will be no visible difference to any players... So what you see now is the main change with animals sitting still and not regrowing if not in range.
  7. Ever thought about changing the sign text render distance? Is that even possible?
    RainbowChin likes this.
  8. thats purely client side. sign text is sent to your client on chunk load.
  9. Ahh ok. Is anything touched by water always loaded? Or is it just the water that is always loaded?
  10. this is by far, my favorite post. lol, its like a smack in the face, like, complaints about not liking update, little do they know, its been here for a week, and no one has noticed. that should automatically shut everyone up. lol.

    i'm dying of laughter.
    RainbowChin, jkjkjk182 and bonzd67 like this.
  11. Just an FYI this was tweaked so that animals that are in love or sheep missing wool will always be activated, so there should no longer be a gameplay hit on this.

    With that in mind, i will likely reduce animal range to 10ish or so, so that they will stay mostly stationary when no-one is near them.
    cadgamer101 likes this.
  12. The "Entity Activation Range"...
    The E.A.R...
    I like the ear =)

    And, what would happen for egg farms? all the chickens would stop swimming and get away from the farms.
    ninjaboy5656 likes this.
  13. What about baby animals? How will they be affected? Will we need to be within 10 blocks for them to mature?
  14. sorry forgot to state babies are also immune and will grow at normal rate.

    The chickens should stay activated since they are in water/flying.

    Code:
        public static boolean checkIfActive(Entity entity) {
            // quick checks.
            if (entity.ticksLived % 20 == 0 || !entity.onGround || entity.inWater || entity.passenger != null || entity.vehicle != null) {
                return true;
            }
            // special cases.
            if (entity instanceof EntityAnimal) {
                EntityAnimal animal = (EntityAnimal) entity;
                if (animal.isBaby() || animal.r() /*love*/) {
                    return true;
                }
                return (entity instanceof EntitySheep && ((EntitySheep) entity).isSheared());
            }
            return (entity instanceof EntityArrow && !((EntityArrow) entity).inGround);
        }
    
  15. One of these days I am going to learn and understand one of your code quotes. One day. :cool:
    troop53no likes this.
  16. Just to clarify, when you say that animals who are *in* love will always be activated, does that mean they have to have gone into love mode while you were within 10 blocks in order to stay active? For animals this seems fine since you have to be standing there to feed them anyway, but if that goes for villagers too, then wouldn't that mean that villagers will still not breed while you're further than 10 blocks because they have to be active in the first place in order to go into love mode?
    jkjkjk182 and Pab10S like this.
  17. When I harvest my water wheat farm all of the crops won't flow down unless I stand very close. I believe this was answered in another thread, but walking along having to watch my crops is a little frustrating.
    jkjkjk182 likes this.
  18. So when I'm at the left side of my residence, my pigs on the right side won't become mature?
  19. Baby animals are immune from this.

    607 and Lukas3226 like this.
  20. Depends on how mojang coded villagers...

    There is this value called "Ticks lived", that basically is the age of an entity. We update this even when inactive.