當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityCaveSpider類代碼示例

本文整理匯總了Java中net.minecraft.entity.monster.EntityCaveSpider的典型用法代碼示例。如果您正苦於以下問題:Java EntityCaveSpider類的具體用法?Java EntityCaveSpider怎麽用?Java EntityCaveSpider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EntityCaveSpider類屬於net.minecraft.entity.monster包,在下文中一共展示了EntityCaveSpider類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onFinish

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@Override
public void onFinish(World world, BlockPos pos, EntityLivingBase entity, int amplifier) {
	if (amplifier >= 3) {
		EntityCaveSpider spider = new EntityCaveSpider(world);
		spider.setPosition(pos.getX(), pos.getY(), pos.getZ());
		world.spawnEntity(spider);
	}
	int box = 1 + (int) ((float) amplifier / 2F);

	BlockPos posI = pos.add(box, box, box);
	BlockPos posF = pos.add(-box, -box, -box);
	BlockPos.getAllInBox(posI, posF).forEach(
			pos1 -> {
				if (world.getBlockState(pos1).getBlock() == Blocks.AIR)
					world.setBlockState(pos1, Blocks.WEB.getDefaultState());
			}
	);
}
 
開發者ID:Um-Mitternacht,項目名稱:Bewitchment,代碼行數:19,代碼來源:SpiderNightmareBrew.java

示例2: initialize

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
public static void initialize()
{
    inLove = ReflectionHelper.findField(EntityAnimal.class, "field_70881_d", "inLove");

    //Standard
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityCow(world)),100));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntitySheep(world)),100));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityPig(world)),100));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityChicken(world)),50)); //Lower chance for egg hatching animal

    //Parent species
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,mother.createChild(mother)),100));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,father.createChild(father)),100));

    //Abominations
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySilverfish(world)),200));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntityCaveSpider(world)),100));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySlime(world)),50));

    //Enviroment dependent
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnEntityAt(world,pos,new EntitySquid(world)),0).setCustomWeight(AnimalCrossbreedHandler::getSquidWeight));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityWolf(world)),0).setCustomWeight(AnimalCrossbreedHandler::getWolfWeight));
    mutationSet.add(new AnimalMutation((world, pos, mother, father) -> spawnBabyAt(world,pos,new EntityOcelot(world)),0).setCustomWeight(AnimalCrossbreedHandler::getOcelotWeight));
}
 
開發者ID:DaedalusGame,項目名稱:BetterWithAddons,代碼行數:25,代碼來源:AnimalCrossbreedHandler.java

示例3: onMobDrops

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@SubscribeEvent
public void onMobDrops(LivingDropsEvent e)
{
    World world = e.getEntity().getEntityWorld();
    Random rng = world.rand;
    if (e.getEntity() instanceof EntitySkeleton) {
        EntitySkeleton skele = (EntitySkeleton) e.getEntity();
        if (skele.getSkeletonType() == 1) {
            if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05))
                e.getDrops().add(new EntityItem(world, skele.posX, skele.posY, skele.posZ, new ItemStack(ModItems.MobDust, 1, 0)));
        }
    }

    if (e.getEntity() instanceof EntityCaveSpider) {
        if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05))
            e.getDrops().add(new EntityItem(world, e.getEntity().posX, e.getEntity().posY, e.getEntity().posZ, new ItemStack(ModItems.MobDust, 1, 1)));
    }
}
 
開發者ID:GamingsModding,項目名稱:LittleThings-old,代碼行數:19,代碼來源:DustMobDrop.java

示例4: BiomRoofedForest

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
public BiomRoofedForest(int p_i45383_1_)
  {
      super(p_i45383_1_);
      
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6));
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6));
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6));
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6));

      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4));
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4));
      
this.topBlock = BlockRegister.GRASS;
this.fillerBlock = BlockRegister.DIRT;
this.setBiomeName("Mystic Roofed Forest");
this.theBiomeDecorator.grassPerChunk = 16;
      ((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6;
this.theBiomeDecorator.treesPerChunk = 10;
  }
 
開發者ID:GhostMonk3408,項目名稱:MidgarCrusade,代碼行數:20,代碼來源:BiomRoofedForest.java

示例5: BiomMagicForest

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
public BiomMagicForest(int p_i45383_1_)
  {
      super(p_i45383_1_);
      
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6));
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6));
      this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityStymph.class, 10, 4, 6));
      
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6));   
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6));
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4));
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4));
      this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGobelin.class, 8, 2, 4));
      
this.topBlock = Blocks.grass;
this.fillerBlock = Blocks.dirt;
this.setBiomeName("Mystic Forest");
this.theBiomeDecorator.grassPerChunk = 16;
      ((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6;
this.theBiomeDecorator.treesPerChunk = 6;
  }
 
開發者ID:GhostMonk3408,項目名稱:MidgarCrusade,代碼行數:22,代碼來源:BiomMagicForest.java

示例6: init

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
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);
}
 
開發者ID:coolAlias,項目名稱:ZeldaSwordSkills,代碼行數:22,代碼來源:ZSSItemEvents.java

示例7: onLivingAttackEvent

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@SubscribeEvent
public void onLivingAttackEvent(LivingAttackEvent event) {
	if (spidersApplySlowness) {
		if (event.getSource().getDamageType().equals("mob")
				&& event.getSource().getEntity() instanceof EntitySpider) {
			event.getEntityLiving()
					.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 1));
		}
	}

	if (replaceCaveSpiderPoison) {
		if (event.getSource().getDamageType().equals("mob")
				&& event.getSource().getEntity() instanceof EntityCaveSpider) {
			poisonedEntities.add(event.getEntityLiving());
		}
	}
}
 
開發者ID:hea3ven,項目名稱:HardModeTweaks,代碼行數:18,代碼來源:MobsTweaksManager.java

示例8: addDefaultEntries

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
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);
}
 
開發者ID:MineMaarten,項目名稱:PneumaticCraft,代碼行數:27,代碼來源:HackableHandler.java

示例9: getRandomMonster

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
private static ResourceLocation getRandomMonster()
{
	ArrayList<ResourceLocation> entities = new ArrayList<ResourceLocation>();
	
	entities.add(EntityList.getKey(EntityZombie.class));
	entities.add(EntityList.getKey(EntitySpider.class));
	entities.add(EntityList.getKey(EntitySkeleton.class));
	entities.add(EntityList.getKey(EntityEnderman.class));
	entities.add(EntityList.getKey(EntityCreeper.class));
	entities.add(EntityList.getKey(EntityCaveSpider.class));
	
	return entities.get((int) (Math.random() * entities.size()));
}
 
開發者ID:TheXFactor117,項目名稱:Loot-Slash-Conquer,代碼行數:14,代碼來源:DungeonHelper.java

示例10: BiomeUnderworld

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
public BiomeUnderworld() {
	super(new BiomeProperties(LCDimensions.underworldName).setRainDisabled().setTemperature(2).setRainfall(0).setWaterColor(0));
	
	this.spawnableMonsterList.clear();
       this.spawnableCreatureList.clear();
       this.spawnableWaterCreatureList.clear();
       this.spawnableCaveCreatureList.clear();
	this.spawnableMonsterList.add(new SpawnListEntry(EntityDemonSoldier.class, 100, 2, 4));
	this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldCreeper.class, 30, 1, 2));
	this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldSlime.class, 20, 1, 1));
	this.spawnableMonsterList.add(new SpawnListEntry(EntityCaveSpider.class, 40, 1, 3));
	this.spawnableMonsterList.add(new SpawnListEntry(EntityUnderworldGhast.class, 20, 1, 1));
}
 
開發者ID:sblectric,項目名稱:LightningCraft,代碼行數:14,代碼來源:BiomeUnderworld.java

示例11: Config

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
public Config() {
	mobs = new ArrayList<Entity>(Arrays.asList(new Entity[]{
			new Entity(EntityBat.class), 
			new Entity(EntityChicken.class),
			new Entity(EntityCow.class),
			new Entity(EntityHorse.class),
			new Entity(EntityMooshroom.class),
			new Entity(EntityOcelot.class),
			new Entity(EntityPig.class),
			new Entity(EntityRabbit.class),
			new Entity(EntitySheep.class),
			new Entity(EntitySquid.class),
			new Entity(EntityVillager.class),
			new Entity(EntityWolf.class),
			new Entity(EntityBlaze.class),
			new Entity(EntityCaveSpider.class),
			new Entity(EntityCreeper.class),
			new Entity(EntityEnderman.class),
			new Entity(EntityGhast.class),
			new Entity(EntityGolem.class),
			new Entity(EntityGuardian.class),
			new Entity(EntityIronGolem.class),
			new Entity(EntityMagmaCube.class),
			new Entity(EntityPigZombie.class),
			new Entity(EntitySilverfish.class),
			new Entity(EntitySkeleton.class),
			new Entity(EntitySlime.class),
			new Entity(EntitySnowman.class),
			new Entity(EntitySpider.class),
			new Entity(EntityWitch.class),
			new Entity(EntityZombie.class),
			new Entity(EntityItem.class),
			new Entity(EntityMinecart.class),
			new Entity(EntityPlayer.class)
			}));
}
 
開發者ID:TealNerd,項目名稱:CivRadar,代碼行數:37,代碼來源:Config.java

示例12: removeTheseMCMobs

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
private static void removeTheseMCMobs()
{
	// Don't spawn the normal Minecraft hostile mobs?
	if (!CoreBalance.GEN.mcHostileMobs)
	{
		for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++)
		{
			if (BiomeGenBase.getBiomeGenArray()[i] != null)
			{
				EntityRegistry.removeSpawn(EntityZombie.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntityCreeper.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntitySkeleton.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntitySpider.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntitySilverfish.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntityWitch.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntityEnderman.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
				EntityRegistry.removeSpawn(EntityCaveSpider.class, EnumCreatureType.MONSTER,
						BiomeGenBase.getBiomeGenArray()[i]);
			}
		}
	}
}
 
開發者ID:Archiving,項目名稱:ARKCraft-Code,代碼行數:30,代碼來源:GlobalAdditions.java

示例13: livingDrops

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@SubscribeEvent
public void livingDrops(LivingDropsEvent event) {
    if (event.entityLiving instanceof EntityCaveSpider) {
        if (itemRand.nextInt(100) >= 90) {
            event.drops.add(new EntityItem(((EntityCaveSpider) event.entityLiving).worldObj,event.entity.posX,event.entity.posY,event.entity.posZ,new ItemStack(ItemRegistry.spiderFang)));
        }
    }
    if (event.entityLiving instanceof EntityEnderman) {
        if (itemRand.nextInt(100) > 80) {
            event.drops.add(new EntityItem(((EntityEnderman) event.entityLiving).worldObj,event.entity.posX,event.entity.posY,event.entity.posZ,new ItemStack(ItemRegistry.dustsMeta,1,2)));
        }
    }
}
 
開發者ID:MagiciansArtificeTeam,項目名稱:Magicians-Artifice,代碼行數:14,代碼來源:ItemSpiderFang.java

示例14: onEntityInteract

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@SubscribeEvent
public void onEntityInteract(EntityInteractEvent event) {
	if (event.target instanceof EntitySpider && !(event.target instanceof EntityCrippledSpider) && !(event.target instanceof EntityCaveSpider)) {
		if (event.entityPlayer.getHeldItem() != null && event.entityPlayer.getHeldItem().getItem() == Items.shears) {
			EntityCrippledSpider.replace((EntitySpider) event.target, event.entityPlayer);
		}
	}
}
 
開發者ID:dmillerw,項目名稱:AlchemicalBling,代碼行數:9,代碼來源:EntityEventHandler.java

示例15: onHostileEntityDrop

import net.minecraft.entity.monster.EntityCaveSpider; //導入依賴的package包/類
@ForgeSubscribe
public void onHostileEntityDrop(LivingDropsEvent event) {
	if (event.source.getDamageType().equals("player")) {
		rand = Math.random();
		if (event.entityLiving instanceof EntitySkeleton || event.entityLiving instanceof EntityCreeper || event.entityLiving instanceof EntitySpider || event.entityLiving instanceof EntityCaveSpider || event.entityLiving instanceof EntityEnderman || event.entityLiving instanceof EntityZombie || event.entityLiving instanceof EntityPigZombie || event.entityLiving instanceof EntityIronGolem || event.entityLiving instanceof EntityBlaze || event.entityLiving instanceof EntitySlime || event.entityLiving instanceof EntityMagmaCube || event.entityLiving instanceof EntityWitch || event.entityLiving instanceof EntitySilverfish || event.entityLiving instanceof EntityGhast) {
			//The integer at the end relates to how many Items will be dropped(percentage). 
			if (rand < 0.22d && ConfigBooleans.munnyDrops){
				//The integer at the end relates to how many Items will be dropped(amount). 
				event.entityLiving.dropItem(AddedItems.Munny10.itemID, 1);
			}
		}
	}
}
 
開發者ID:Wehavecookies56,項目名稱:Kingdom-Keys,代碼行數:14,代碼來源:Munny10Drops.java


注:本文中的net.minecraft.entity.monster.EntityCaveSpider類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。