net.minecraft.entity.passive.EntityCow Java Examples
The following examples show how to use
net.minecraft.entity.passive.EntityCow.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Nyan.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
private static Entity newNyanEntity(World world) { final int nextInt = random.nextInt(100); if(nextInt < 25) { return new EntityCow(world); } if(nextInt < 50) { return new EntityOvergrownSheep(world); } if(nextInt < 75) { return new EntityExplodingChicken(world); } if(nextInt < 95) { return new EntityOcelot(world); } if(nextInt < 99) { return new EntityGiantZombie(world); } return new EntityWither(world); }
Example #2
Source File: HackableHandler.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
public static void addDefaultEntries(){ PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class); PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class); PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class); PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class); PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class); PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class); PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class); PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class); PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class); PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class); PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class); PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class); PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class); PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class); PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class); PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class); PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class); }
Example #3
Source File: CustomSpawner.java From mocreaturesdev with GNU General Public License v3.0 | 6 votes |
public final int despawnVanillaAnimals(WorldServer worldObj) { int count = 0; for (int j = 0; j < worldObj.loadedEntityList.size(); j++) { Entity entity = (Entity) worldObj.loadedEntityList.get(j); if (!(entity instanceof EntityLiving)) { continue; } if ((entity instanceof EntityCow || entity instanceof EntitySheep || entity instanceof EntityPig || entity instanceof EntityOcelot || entity instanceof EntityChicken || entity instanceof EntitySquid || entity instanceof EntityWolf)) { count += entityDespawnCheck(worldObj, (EntityLiving) entity); } } return count; }
Example #4
Source File: MoCreatures.java From mocreaturesdev with GNU General Public License v3.0 | 6 votes |
public static void ClearVanillaSpawnLists() { for (int i = 0; i < BiomeGenBase.biomeList.length; i++) { if (BiomeGenBase.biomeList[i] != null) { EntityRegistry.removeSpawn(EntityCow.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityPig.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntitySheep.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityChicken.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityWolf.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntitySquid.class, EnumCreatureType.waterCreature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityOcelot.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityBat.class, EnumCreatureType.ambient, BiomeGenBase.biomeList[i]); } } }
Example #5
Source File: Chickenificator.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@SuppressWarnings("deprecation") @Override public void onInit(FMLInitializationEvent event) { FMLLog.log.info("Chickenification is beginning..."); //RenderingRegistry.registerEntityRenderingHandler(EntitySheep.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityCow.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityPig.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySquid.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityZombie.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySpider.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySkeleton.class, new RenderStupidChicken()); FMLLog.log.info("Chickenificated all the bois!"); }
Example #6
Source File: HackableCow.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void onHackFinished(Entity entity, EntityPlayer player){ if(!entity.worldObj.isRemote) { entity.setDead(); EntityMooshroom entitycow = new EntityMooshroom(entity.worldObj); entitycow.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); entitycow.setHealth(((EntityCow)entity).getHealth()); entitycow.renderYawOffset = ((EntityCow)entity).renderYawOffset; entity.worldObj.spawnEntityInWorld(entitycow); entity.worldObj.spawnParticle("largeexplode", entity.posX, entity.posY + entity.height / 2.0F, entity.posZ, 0.0D, 0.0D, 0.0D); } }
Example #7
Source File: CustomSpawner.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
public CustomSpawner() { biomeList = new ArrayList<BiomeGenBase>(); log.setParent(FMLLog.getLogger()); try { for (BiomeGenBase biomegenbase : BiomeGenBase.biomeList) { if (biomegenbase == null) { continue; } biomeList.add(biomegenbase); } customCreatureSpawnList = new List[biomeList.size()]; customMobSpawnList = new List[biomeList.size()]; customAmbientSpawnList = new List[biomeList.size()]; customAquaticSpawnList = new List[biomeList.size()]; entityClasses = new List[4]; vanillaClassList = new ArrayList<Class>(); vanillaClassList.add(EntityChicken.class); vanillaClassList.add(EntityCow.class); vanillaClassList.add(EntityPig.class); vanillaClassList.add(EntitySheep.class); vanillaClassList.add(EntityWolf.class); vanillaClassList.add(EntitySquid.class); vanillaClassList.add(EntityOcelot.class); vanillaClassList.add(EntityBat.class); clearLists(); } catch (Exception ex) { throw new RuntimeException(ex); } }
Example #8
Source File: MoCTools.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
public static int despawnVanillaAnimals(World worldObj, List[] classList) { int count = 0; for (int j = 0; j < worldObj.loadedEntityList.size(); j++) { Entity entity = (Entity) worldObj.loadedEntityList.get(j); if ((entity instanceof EntityLiving) && (entity instanceof EntityCow || entity instanceof EntitySheep || entity instanceof EntityPig || entity instanceof EntityChicken || entity instanceof EntitySquid || entity instanceof EntityWolf)) { count += entityDespawnCheck(worldObj, (EntityLiving) entity); } } return count; }
Example #9
Source File: CivilizationHandlers.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
private boolean isAnimal(EntityLivingBase victim) { return victim instanceof EntityCow || victim instanceof EntityHorse || victim instanceof EntityPig || victim instanceof EntityDonkey || victim instanceof EntityChicken || victim instanceof EntitySheep; }
Example #10
Source File: EventHandlers.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
@SubscribeEvent public void toroDontLikeYouHurtingCows(LivingHurtEvent event) { EntityLivingBase victim = event.getEntityLiving(); EntityLivingBase attacker = getAttacker(event); if (victim == null || attacker == null || !(victim instanceof EntityCow)) { return; } List<EntityToro> nearbyToros = victim.getEntityWorld().getEntitiesWithinAABB(EntityToro.class, victim.getEntityBoundingBox().expand(40.0D, 10.0D, 40.0D)); for (EntityToro toro : nearbyToros) { toro.setAttackTarget(attacker); } }
Example #11
Source File: EventHandlers.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
@SubscribeEvent public void spawnToroWhenCowPackSpawns(EntityJoinWorldEvent event) { if (event.getWorld().isRemote) { return; } Entity entity = event.getEntity(); if (entity == null || !(entity instanceof EntityCow)) { return; } if (entity.getEntityData().getBoolean("AddedToWorld")) { return; } entity.getEntityData().setBoolean("AddedToWorld", true); World world = event.getWorld(); if (world.rand.nextInt(8) != 0) { return; } BlockPos spawnPoint = findSurface(world, entity.getPosition()); if (spawnPoint == null) { return; } Entity toro = new EntityToro(world); toro.setPosition(spawnPoint.getX(), spawnPoint.getY() + 1, spawnPoint.getZ()); world.spawnEntity(toro); }
Example #12
Source File: CraftCow.java From Thermos with GNU General Public License v3.0 | 4 votes |
public CraftCow(CraftServer server, EntityCow entity) { super(server, entity); }
Example #13
Source File: CraftCow.java From Thermos with GNU General Public License v3.0 | 4 votes |
@Override public EntityCow getHandle() { return (EntityCow) entity; }
Example #14
Source File: RenderFluidCow.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@Override protected int getColorMultiplier(EntityCow entityLivingBase, float par2, float par3) { return ((EntityFluidCow) entityLivingBase).getOverlay(); }
Example #15
Source File: RenderEventCow.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@Override protected ResourceLocation getEntityTexture(EntityCow entity) { return new ResourceLocation(ModInformation.MOD_ID, ENTITY_RESOURCE_LOCATION + ((INamedEntity) entity).getEntityName() + ".png"); }
Example #16
Source File: RenderEventCow.java From Moo-Fluids with GNU General Public License v3.0 | 4 votes |
@Override public Render<? super EntityCow> createRenderFor(RenderManager renderManager) { return new RenderEventCow(renderManager); }
Example #17
Source File: EntityToro.java From ToroQuest with GNU General Public License v3.0 | 4 votes |
public EntityCow createChild(EntityAgeable ageable) { return new EntityCow(this.world); }
Example #18
Source File: HackableCow.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@Override public boolean canHack(Entity entity, EntityPlayer player){ return entity.getClass() == EntityCow.class; }
Example #19
Source File: CraftCow.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public EntityCow getHandle() { return (EntityCow) entity; }
Example #20
Source File: CraftCow.java From Kettle with GNU General Public License v3.0 | 4 votes |
public CraftCow(CraftServer server, EntityCow entity) { super(server, entity); }