Zombies falling through floor

Discussion in 'Spigot Plugin Development' started by TomTheDeveloper, Jul 22, 2015.

  1. TomTheDeveloper

    Supporter

    Hey,

    I have made custom zombies, however these zombies seem to fall through the floor or glitch into a wall sometimes. They also sometimes spawn but actually don't spawn. What I mean by that is that there is a new "FastZombie.class" instance however it is nowhere on the map. I have checked this latest thing with a one block world.

    (I don't know this for sure, but sometimes they seem to spawn on random places on the map. On places that are nowhere to be found in my code.

    Anybody has an idea on how I could possibly solve this?

    http://pastebin.com/5YHuyxfh

    How I spawn them:

    Code (Text):
     public void spawnFastZombie(Random random) {

            Location location = zombiespawns.get(random.nextInt(zombiespawns.size() - 1));
            net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
            FastZombie fastZombie = new FastZombie(location.getWorld());
            fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
            McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
            this.addZombie((Zombie) fastZombie.getBukkitEntity());

            zombiestospawn--;
        }
     
  2. there is a slight glitch i have found just playing minecraft and it was annoying with my villager farm on sky block... every so often a villager would just pop through the stone floor xD there is no fix for it other than to make the floor 2 blocks thick, and if you have already done that i would say it's because your using NMS 1.7 imports in the zombie class, but NMS 1.8 imports in the spawning class -.- i can't tell what version your server is from that... and any errors in console?
     
  3. I remember that my players where spawning in the floor. Without the 'zombies' issue, I would also make sure that here, in this case you would spawn the zombies Y:+1 block.
     
  4. Oh and because you said they are glitch ign into the walls, it also suggests that it's just server lag where the zombie keeps walking until the server tells it that there is a block in front of it, it's most likely a tragical glitch I get it a lot... Mostly just because of ping
     
  5. TomTheDeveloper

    Supporter

    My problem doesn't has much to do with this. But thanks for trying to help me.


    Oh, it are just two different examples. The plugin is backwards compatible with 1.8 and 1.7. Normally if I use a 1.7 zombie, then I my plugin will only use 1.7 NMS imports.

    I know that it's not possible to fix, however maybe somebody knows a quite simple solution (a sort of work around).