Java 类net.minecraft.entity.monster.EntityPigZombie 实例源码
项目:ForgeHax
文件:EntityUtils.java
/**
* Checks if the mob could be possibly hostile towards us (we can't detect their attack target easily)
* Current entities:
* PigZombie: Aggressive if arms are raised, when arms are put down a internal timer is slowly ticked down from 400
* Wolf: Aggressive if the owner isn't the local player and the wolf is angry
* Enderman: Aggressive if making screaming sounds
*/
public static boolean isMobAggressive(Entity entity) {
if(entity instanceof EntityPigZombie) {
// arms raised = aggressive, angry = either game or we have set the anger cooldown
if(((EntityPigZombie) entity).isArmsRaised() || ((EntityPigZombie) entity).isAngry()) {
if(!((EntityPigZombie) entity).isAngry()) {
// set pigmens anger to 400 if it hasn't been angered already
FastReflection.Fields.EntityPigZombie_angerLevel.set((EntityPigZombie)entity, 400);
}
return true;
}
} else if(entity instanceof EntityWolf) {
return ((EntityWolf) entity).isAngry() &&
!MC.player.equals(((EntityWolf) entity).getOwner());
} else if(entity instanceof EntityEnderman) {
return ((EntityEnderman) entity).isScreaming();
}
return false;
}
项目:DecompiledMinecraft
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:DecompiledMinecraft
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:BaseClient
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:BaseClient
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:Backmemed
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.world.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
entitypigzombie.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.world.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:Backmemed
文件:BlockPortal.java
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
super.updateTick(worldIn, pos, state, rand);
if (worldIn.provider.isSurfaceWorld() && worldIn.getGameRules().getBoolean("doMobSpawning") && rand.nextInt(2000) < worldIn.getDifficulty().getDifficultyId())
{
int i = pos.getY();
BlockPos blockpos;
for (blockpos = pos; !worldIn.getBlockState(blockpos).isFullyOpaque() && blockpos.getY() > 0; blockpos = blockpos.down())
{
;
}
if (i > 0 && !worldIn.getBlockState(blockpos.up()).isNormalCube())
{
Entity entity = ItemMonsterPlacer.spawnCreature(worldIn, EntityList.func_191306_a(EntityPigZombie.class), (double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 1.1D, (double)blockpos.getZ() + 0.5D);
if (entity != null)
{
entity.timeUntilPortal = entity.getPortalCooldown();
}
}
}
}
项目:CustomWorldGen
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:CustomWorldGen
文件:BlockPortal.java
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
super.updateTick(worldIn, pos, state, rand);
if (worldIn.provider.isSurfaceWorld() && worldIn.getGameRules().getBoolean("doMobSpawning") && rand.nextInt(2000) < worldIn.getDifficulty().getDifficultyId())
{
int i = pos.getY();
BlockPos blockpos;
for (blockpos = pos; !worldIn.getBlockState(blockpos).isFullyOpaque() && blockpos.getY() > 0; blockpos = blockpos.down())
{
;
}
if (i > 0 && !worldIn.getBlockState(blockpos.up()).isNormalCube())
{
Entity entity = ItemMonsterPlacer.spawnCreature(worldIn, EntityList.getEntityStringFromClass(EntityPigZombie.class), (double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 1.1D, (double)blockpos.getZ() + 0.5D);
if (entity != null)
{
entity.timeUntilPortal = entity.getPortalCooldown();
}
}
}
}
项目:CrystalMod
文件:ModEntites.java
public static void postInit(){
addToBiomes(EntityCrystalPigZombie.class, 50, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityPigZombie.class, EnumCreatureType.MONSTER));
addToBiomes(EntityCrystalCow.class, 6, 1, 4, EnumCreatureType.CREATURE, getBiomesThatCanSpawn(EntityCow.class, EnumCreatureType.CREATURE));
addToBiomes(EntityCrystalEnderman.class, 8, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER));
List<Biome> angelBiomeList = getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER);
Biome hell = Biome.REGISTRY.getObject(new ResourceLocation("hell"));
Biome sky = Biome.REGISTRY.getObject(new ResourceLocation("sky"));
if(sky !=null){
angelBiomeList.remove(sky);
}
if(hell !=null){
angelBiomeList.remove(hell);
List<Biome> listHell = Lists.newArrayList(hell);
addToBiomes(EntityAngel.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
addToBiomes(EntityDevil.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
}
addToBiomes(EntityAngel.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
addToBiomes(EntityDevil.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
}
项目:MineLittlePony
文件:MineLittlePony.java
private void saveCurrentRenderers(RenderManager rm) {
// villagers
saveRenderer(rm, EntityVillager.class);
saveRenderer(rm, EntityZombieVillager.class);
// zombies
saveRenderer(rm, EntityZombie.class);
saveRenderer(rm, EntityHusk.class);
// pig zombie
saveRenderer(rm, EntityPigZombie.class);
// skeletons
saveRenderer(rm, EntitySkeleton.class);
saveRenderer(rm, EntityStray.class);
saveRenderer(rm, EntityWitherSkeleton.class);
// illagers
saveRenderer(rm, EntityVex.class);
saveRenderer(rm, EntityEvoker.class);
saveRenderer(rm, EntityVindicator.class);
saveRenderer(rm, EntityIllusionIllager.class);
}
项目:Minecraft-Flux
文件:EntityActionEnergy.java
@Override
public long inputEnergy(long amount, boolean simulate) {
if (!simulate && !charged) {
if (creature instanceof EntityPig) {
final EntityPigZombie pigman = new EntityPigZombie(creature.world);
pigman.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_AXE));
pigman.setLocationAndAngles(creature.posX, creature.posY, creature.posZ, creature.rotationYaw, creature.rotationPitch);
pigman.setNoAI(creature.isAIDisabled());
if (creature.hasCustomName()) {
pigman.setCustomNameTag(creature.getCustomNameTag());
pigman.setAlwaysRenderNameTag(creature.getAlwaysRenderNameTag());
}
creature.world.spawnEntity(pigman);
creature.setDead();
} else if (creature instanceof EntityCreeper)
creature.onStruckByLightning(null);
charged = true;
return 1;
}
return charged ? 0 : 1;
}
项目:Hemomancy
文件:EntitySummon.java
@Override
protected void applyEntityAI()
{
// this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityMob.class, 1.0D, true));
this.tasks.addTask(9, new SummonAIMoveToArea(this, 1.0));
this.tasks.addTask(4, new SummonAIManipulateTargetBlock(this));
this.tasks.addTask(6, new SummonAIMoveToNextTargetBlock(this, 1.0));
this.tasks.addTask(3, new SummonAIMoveToChest(this, 1.0));
this.tasks.addTask(4, new SummonAIDumpToChest(this));
// this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, true));
}
项目:ZeroQuest
文件:BiomeGenDarkLand.java
public BiomeGenDarkLand(int id) {
super(id);
this.waterColorMultiplier = 0x666600;
this.theBiomeDecorator.treesPerChunk = 1;
this.theBiomeDecorator.grassPerChunk = 1;
this.theBiomeDecorator.flowersPerChunk = -999;
this.theBiomeDecorator.generateLakes = true;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityDarkZertum.class, 100, 4, 4));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 60, 1, 5));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 20, 2, 3));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 20, 1, 2));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityKurr.class, 10, 2, 2));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
}
项目:ZeroQuest
文件:BiomeGenDarkLand.java
public BiomeGenDarkLand(int id) {
super(id);
this.waterColorMultiplier = 0x666600;
this.theBiomeDecorator.treesPerChunk = 1;
this.theBiomeDecorator.grassPerChunk = 1;
this.theBiomeDecorator.flowersPerChunk = -999;
this.addFlower(ModBlocks.nileBlackFlower.getDefaultState(), 100);
this.theBiomeDecorator.generateLakes = true;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 60, 1, 5));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 20, 2, 3));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 20, 1, 2));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
}
项目:ExpandedRailsMod
文件:EntityPig.java
/**
* Called when a lightning bolt hits the entity.
*/
public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
if (!this.worldObj.isRemote && !this.isDead)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
entitypigzombie.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
entitypigzombie.setNoAI(this.isAIDisabled());
if (this.hasCustomName())
{
entitypigzombie.setCustomNameTag(this.getCustomNameTag());
entitypigzombie.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
}
this.worldObj.spawnEntityInWorld(entitypigzombie);
this.setDead();
}
}
项目:ExpandedRailsMod
文件:BlockPortal.java
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
super.updateTick(worldIn, pos, state, rand);
if (worldIn.provider.isSurfaceWorld() && worldIn.getGameRules().getBoolean("doMobSpawning") && rand.nextInt(2000) < worldIn.getDifficulty().getDifficultyId())
{
int i = pos.getY();
BlockPos blockpos;
for (blockpos = pos; !worldIn.getBlockState(blockpos).isFullyOpaque() && blockpos.getY() > 0; blockpos = blockpos.down())
{
;
}
if (i > 0 && !worldIn.getBlockState(blockpos.up()).isNormalCube())
{
Entity entity = ItemMonsterPlacer.spawnCreature(worldIn, EntityList.getEntityStringFromClass(EntityPigZombie.class), (double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 1.1D, (double)blockpos.getZ() + 0.5D);
if (entity != null)
{
entity.timeUntilPortal = entity.getPortalCooldown();
}
}
}
}
项目:SecurityCraft
文件:TileEntityProtecto.java
@Override
public boolean attackEntity(Entity entity){
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(worldObj, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getName().toLowerCase())))) ||
entity instanceof EntityPigZombie ||
(entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(worldObj, entity.posX, entity.posY, entity.posZ, true);
worldObj.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(worldObj, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
项目:SecurityCraft
文件:TileEntityProtecto.java
@Override
public boolean attackEntity(Entity entity){
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(world, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getName().toLowerCase())))) ||
entity instanceof EntityPigZombie ||
(entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(world, entity.posX, entity.posY, entity.posZ, true);
world.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(world, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
项目:SecurityCraft
文件:TileEntityProtecto.java
@Override
public boolean attackEntity(Entity entity){
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(worldObj, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getCommandSenderName().toLowerCase())))) ||
entity instanceof EntityPigZombie ||
(entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(worldObj, entity.posX, entity.posY, entity.posZ);
worldObj.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(worldObj, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
项目:SecurityCraft
文件:TileEntityProtecto.java
@Override
public boolean attackEntity(Entity entity){
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(worldObj, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getName().toLowerCase())))) ||
entity instanceof EntityPigZombie ||
(entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(worldObj, entity.posX, entity.posY, entity.posZ);
worldObj.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(worldObj, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
项目:SecurityCraft
文件:TileEntityProtecto.java
@Override
public boolean attackEntity(Entity entity){
if (entity instanceof EntityLivingBase) {
if ((entity instanceof EntityPlayer && (getOwner().isOwner((EntityPlayer) entity) || (hasModule(EnumCustomModules.WHITELIST) && ModuleUtils.getPlayersFromModule(world, pos, EnumCustomModules.WHITELIST).contains(((EntityLivingBase) entity).getName().toLowerCase())))) ||
entity instanceof EntityPigZombie ||
(entity instanceof EntityCreeper && ((EntityCreeper) entity).getPowered()))
return false;
EntityLightningBolt lightning = new EntityLightningBolt(world, entity.posX, entity.posY, entity.posZ, true);
world.addWeatherEffect(lightning);
BlockUtils.setBlockProperty(world, pos, BlockProtecto.ACTIVATED, false);
return true;
}
return false;
}
项目:Quantum-Anomalies
文件:BiomeHellAnomaly.java
public BiomeHellAnomaly(int id) {
super(id);
this.setBiomeName("Hell Anomaly");
this.rootHeight = -1F;
this.heightVariation = 3.5F;
this.setColor(16711680);
this.setDisableRain();
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
this.topBlock = Blocks.netherrack;
this.fillerBlock = Blocks.netherrack;
this.theBiomeDecorator = new BiomeAnomalyDecorator();
}
项目:Cauldron
文件:EntityPig.java
public void onStruckByLightning(EntityLightningBolt p_70077_1_)
{
if (!this.worldObj.isRemote)
{
EntityPigZombie entitypigzombie = new EntityPigZombie(this.worldObj);
// Cauldron start
if (p_70077_1_ != null)
{
// CraftBukkit start
if (CraftEventFactory.callPigZapEvent(this, p_70077_1_, entitypigzombie).isCancelled())
{
return;
}
// CraftBukkit end
}
// Cauldron end
entitypigzombie.setCurrentItemOrArmor(0, new ItemStack(Items.golden_sword));
entitypigzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
// CraftBukkit - added a reason for spawning this creature
this.worldObj.addEntity(entitypigzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
this.setDead();
}
}
项目:Rubedo
文件:MobEquipmentHandler.java
@SubscribeEvent
public void onEntityDrop(LivingDropsEvent event) {
ContentAI contentAI = Singleton.getInstance(ContentAI.class);
if (contentAI.pigmenDropSilver
&& event.entity instanceof EntityPigZombie) {
for (EntityItem drop : event.drops) {
if (drop.getEntityItem().getItem() == Items.gold_ingot)
drop.setEntityItemStack(new ItemStack(
ContentWorld.metalItems,
drop.getEntityItem().stackSize,
ContentWorld.metalItems
.getTextureIndex("silver_ingot")));
if (drop.getEntityItem().getItem() == Items.gold_nugget)
drop.setEntityItemStack(new ItemStack(
ContentWorld.metalItems,
drop.getEntityItem().stackSize,
ContentWorld.metalItems
.getTextureIndex("silver_nugget")));
if (drop.getEntityItem().getItem() == Singleton.getInstance(
ContentTools.class).getItem(ToolSword.class)) {
drop.getEntityItem().setItemDamage(0);
}
}
}
}
项目:ZeldaSwordSkills
文件:ZSSItemEvents.java
private static void init() {
addDrop(EntityCreeper.class, SkillBase.armorBreak);
addDrop(EntityIronGolem.class, SkillBase.armorBreak);
addDrop(EntitySilverfish.class, SkillBase.dash);
addDrop(EntityHorse.class, SkillBase.dash);
addDrop(EntityEnderman.class, SkillBase.dodge);
addDrop(EntityKeese.class, SkillBase.dodge);
addDrop(EntitySpider.class, SkillBase.endingBlow);
addDrop(EntityCaveSpider.class, SkillBase.leapingBlow);
addDrop(EntityMagmaCube.class, SkillBase.leapingBlow);
addDrop(EntityPigZombie.class, SkillBase.parry);
addDrop(EntityOcelot.class, SkillBase.parry);
addDrop(EntityOctorok.class, SkillBase.risingCut);
addDrop(EntityBlaze.class, SkillBase.spinAttack);
addDrop(EntityDarknut.class, SkillBase.spinAttack);
addDrop(EntityZombie.class, SkillBase.swordBasic);
addDrop(EntitySkeleton.class, SkillBase.swordBasic);
addDrop(EntityGhast.class, SkillBase.swordBeam);
addDrop(EntityWitch.class, SkillBase.swordBeam);
addDrop(EntityWizzrobe.class, SkillBase.swordBreak);
}
项目:CountryGamer_PlantsVsZombies
文件:EntDec.java
public static boolean entityUndeadCheck(MovingObjectPosition movObjPos) {
boolean result = false;
if ((movObjPos.entityHit instanceof EntityZombie)) {
result = true;
}
if ((movObjPos.entityHit instanceof EntitySkeleton)) {
result = true;
}
if ((movObjPos.entityHit instanceof EntityPigZombie)) {
result = true;
}
if ((!(movObjPos.entityHit instanceof EntityBlaze))
|| ((!(movObjPos.entityHit instanceof EntityWitherSkull)) || ((!(movObjPos.entityHit instanceof EntityWither)) || ((movObjPos.entityHit instanceof EntityGhast)))))
;
return result;
}
项目:harshencastle
文件:EntitySoullessKnight.java
public EntitySoullessKnight(World worldIn) {
super(worldIn);
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(0, new EntityAIAttackMelee(this, 1d, true));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEnderman.class, 50f, 1d, 2d));
this.tasks.addTask(0, new AIEntityWanderNoWater(this, 1d, 0));
this.tasks.addTask(0, new EntityAIMoveTowardsTarget(this, 1d, 100));
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));
this.experienceValue = 50;
}
项目:harshencastle
文件:ZombiPendant.java
@HarshenEvent
public void onLivingHurt(LivingHurtEvent event)
{
if(event.getSource() instanceof EntityDamageSource && ((EntityDamageSource)event.getSource()).getTrueSource() instanceof EntityZombie &&
!(((EntityDamageSource)event.getSource()).getTrueSource() instanceof EntityPigZombie))
event.setAmount(1);
}
项目:Infernum
文件:EntityPigMage.java
@Override
public void initEntityAI() {
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityPigZombieMage.class, 8.0F, 0.8D, 0.8D));
this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityPigZombie.class, 8.0F, 0.6D, 0.6D));
this.tasks.addTask(2, new EntityAIMoveIndoors(this));
this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
this.tasks.addTask(9, new EntityAIWanderAvoidWater(this, 0.6D));
this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
this.applyEntityAI();
}
项目:ForgeHax
文件:PigmenAngerCooldownService.java
@SubscribeEvent
public void onUpdate(LivingEvent.LivingUpdateEvent event) {
if(event.getEntityLiving() instanceof EntityPigZombie) {
// update pigmens anger level
EntityPigZombie pigZombie = (EntityPigZombie)event.getEntityLiving();
if(pigZombie.isArmsRaised()) {
FastReflection.Fields.EntityPigZombie_angerLevel.set(pigZombie, 400);
} else if(pigZombie.isAngry()) {
FastReflection.Fields.EntityPigZombie_angerLevel.set(pigZombie, FastReflection.Fields.EntityPigZombie_angerLevel.get(pigZombie) - 1);
}
}
}
项目:DecompiledMinecraft
文件:BiomeGenHell.java
public BiomeGenHell(int p_i1981_1_)
{
super(p_i1981_1_);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
}
项目:DecompiledMinecraft
文件:MapGenNetherBridge.java
public MapGenNetherBridge()
{
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
项目:DecompiledMinecraft
文件:BiomeGenHell.java
public BiomeGenHell(int p_i1981_1_)
{
super(p_i1981_1_);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
}
项目:DecompiledMinecraft
文件:MapGenNetherBridge.java
public MapGenNetherBridge()
{
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
项目:BaseClient
文件:BiomeGenHell.java
public BiomeGenHell(int p_i1981_1_)
{
super(p_i1981_1_);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
}
项目:BaseClient
文件:MapGenNetherBridge.java
public MapGenNetherBridge()
{
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
项目:BaseClient
文件:BiomeGenHell.java
public BiomeGenHell(int p_i1981_1_)
{
super(p_i1981_1_);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 1, 4, 4));
}
项目:BaseClient
文件:MapGenNetherBridge.java
public MapGenNetherBridge()
{
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityBlaze.class, 10, 2, 3));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
this.spawnList.add(new BiomeGenBase.SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
}
项目:Backmemed
文件:BiomeHell.java
public BiomeHell(Biome.BiomeProperties properties)
{
super(properties);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityMagmaCube.class, 2, 4, 4));
this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 1, 4, 4));
this.theBiomeDecorator = new BiomeHellDecorator();
}