Examples of onSpawnWithEgg()


Examples of net.minecraft.entity.EntityLiving.onSpawnWithEgg()

      EntityLiving living = (EntityLiving) spawn;
      spawn.setLocationAndAngles(x, y, z, MathHelper.wrapAngleTo180_float(world.rand.nextFloat() * 360.0f), 0.0f);
      living.rotationYawHead = living.rotationYaw;
      living.renderYawOffset = living.rotationYaw;
      living.onSpawnWithEgg((IEntityLivingData) null);
      world.spawnEntityInWorld(spawn);
      living.playLivingSound();
    }

    return spawn;
View Full Code Here

Examples of net.minecraft.entity.EntityLiving.onSpawnWithEgg()

                        skel.setCurrentItemOrArmor(0, new ItemStack(Items.bow));
                    }

                    mob.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.25F ? Blocks.lit_pumpkin : Blocks.pumpkin));
                } else if (living != null)
                    living.onSpawnWithEgg(null);

                this.worldObj.spawnEntityInWorld(mob);
                this.worldObj.playAuxSFX(2004, (int) x, (int) y, (int) z, 0);

                if (living != null)
View Full Code Here

Examples of net.minecraft.entity.EntityLiving.onSpawnWithEgg()

                              Event.Result canSpawn = ForgeEventFactory.canEntitySpawn(var39, par0WorldServer, var24, var25, var26);
                              if (canSpawn == Event.Result.ALLOW || (canSpawn == Event.Result.DEFAULT && var39.getCanSpawnHere())) {
                                ++var16;
                                par0WorldServer.spawnEntityInWorld(var39);
                                if (!ForgeEventFactory.doSpecialSpawn(var39, par0WorldServer, var24, var25, var26)) {
                                  unusedEntityLivingData = var39.onSpawnWithEgg(unusedEntityLivingData);
                                }

                                if (var16 >= var39.getMaxSpawnedInChunk()) {
                                  continue label110;
                                }
View Full Code Here

Examples of net.minecraft.entity.EntityLiving.onSpawnWithEgg()

              Event.Result canSpawn = ForgeEventFactory.canEntitySpawn(spawnedEntity, worldServer, ssX, ssY, ssZ);
              if (canSpawn == Event.Result.ALLOW || (canSpawn == Event.Result.DEFAULT && spawnedEntity.getCanSpawnHere())) {
                worldServer.spawnEntityInWorld(spawnedEntity);
                if (!ForgeEventFactory.doSpecialSpawn(spawnedEntity, worldServer, ssX, ssY, ssZ)) {
                  unusedEntityLivingData = spawnedEntity.onSpawnWithEgg(unusedEntityLivingData);
                }
              }
              attemptedSpawnedMobs++;
            } catch (Exception e) {
              Log.warning("Failed to spawn entity " + creatureClass, e);
View Full Code Here

Examples of pneumaticCraft.common.entity.living.EntityDrone.onSpawnWithEgg()

            }
            drone.readEntityFromNBT(entityTag);
            if(iStack.hasDisplayName()) drone.setCustomNameTag(iStack.getDisplayName());

            drone.naturallySpawned = false;
            drone.onSpawnWithEgg(null);
            iStack.stackSize--;
        }
        return true;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.