本文整理汇总了Java中net.minecraft.entity.EntitySpawnPlacementRegistry.setPlacementType方法的典型用法代码示例。如果您正苦于以下问题:Java EntitySpawnPlacementRegistry.setPlacementType方法的具体用法?Java EntitySpawnPlacementRegistry.setPlacementType怎么用?Java EntitySpawnPlacementRegistry.setPlacementType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.EntitySpawnPlacementRegistry
的用法示例。
在下文中一共展示了EntitySpawnPlacementRegistry.setPlacementType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.minecraft.entity.EntitySpawnPlacementRegistry; //导入方法依赖的package包/类
public static void init() {
int endermanEggColor1 = new Color(254, 85, 176).getRGB();
int endermanEggColor2 = new Color(97, 230, 150).getRGB();
EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "enderman_evolved"), EntityEvolvedEnderman.class, "evolved_enderman", 0, EndermanEvolution.INSTANCE, 80, 3, false, 0, endermanEggColor2);
EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "frienderman"), EntityFrienderman.class, "frienderman", 1, EndermanEvolution.INSTANCE, 80, 3, false, 0, endermanEggColor1);
EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "friender_pearl"), EntityFrienderPearl.class, "friender_pearl", 2, EndermanEvolution.INSTANCE, 80, 3, true);
EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "evolved_endermite"), EntityEvolvedEndermite.class, "evolved_endermite", 4, EndermanEvolution.INSTANCE, 80, 3, false, new Color(1, 66, 16).getRGB(), endermanEggColor2);
EntitySpawnPlacementRegistry.setPlacementType(EntityEvolvedEnderman.class, SpawnPlacementType.ON_GROUND);
EntitySpawnPlacementRegistry.setPlacementType(EntityFrienderman.class, SpawnPlacementType.ON_GROUND);
EntityRegistry.addSpawn(EntityEvolvedEnderman.class, ConfigOptions.ENDERMAN_PROBABILITY, 1, ConfigOptions.ENDERMAN_MAX_SPAWN, EnumCreatureType.MONSTER, getBiomeList());
EntityRegistry.addSpawn(EntityFrienderman.class, ConfigOptions.FRIENDERMAN_PROBABILITY, 1, ConfigOptions.FRIENDERMAN_MAX_SPAWN, EnumCreatureType.CREATURE, Biomes.SKY, Biomes.DESERT, Biomes.HELL);
}
示例2: init
import net.minecraft.entity.EntitySpawnPlacementRegistry; //导入方法依赖的package包/类
public static void init(){
ResourceLocation pigzombie = addEntity(EntityCrystalPigZombie.class, "crystalpigzombie");
EntityRegistry.registerEgg(pigzombie, /*PINK*/ 15373203, 0x6CE5F8);
EntitySpawnPlacementRegistry.setPlacementType(EntityCrystalPigZombie.class, SpawnPlacementType.ON_GROUND);
ResourceLocation cow = addEntity(EntityCrystalCow.class, "crystalcow");
EntityRegistry.registerEgg(cow, /*BROWN*/ 4470310, 0x6CE5F8);
EntitySpawnPlacementRegistry.setPlacementType(EntityCrystalCow.class, SpawnPlacementType.ON_GROUND);
ResourceLocation enderman = addEntity(EntityCrystalEnderman.class, "crystalenderman");
EntityRegistry.registerEgg(enderman, /*BLACK*/ 0, 0x6CE5F8);
EntitySpawnPlacementRegistry.setPlacementType(EntityCrystalEnderman.class, SpawnPlacementType.ON_GROUND);
addEntity(EntityMinionWorker.class, "minionworker");
addEntity(EntityMinionWarrior.class, "minionwarrior");
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartBlue.class, CrystalChestType.BLUE);
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartRed.class, CrystalChestType.RED);
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartGreen.class, CrystalChestType.GREEN);
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartDark.class, CrystalChestType.DARK);
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartPure.class, CrystalChestType.PURE);
EntityCrystalChestMinecartBase.register(EntityCrystalChestMinecartDarkIron.class, CrystalChestType.DARKIRON);
for(Entry<CrystalChestType, Class<? extends EntityCrystalChestMinecartBase>> entry : EntityCrystalChestMinecartBase.minecarts.entrySet()){
addEntity(entry.getValue(), "minecart_chest_"+entry.getKey().name().toLowerCase(), 64, 1, true);
}
addEntity(EntityBombomb.class, "bombomb");
addEntity(EntityWirelessChestMinecart.class, "minecart_wirelesschest", 64, 1, true);
addEntity(EntityEnderChestMinecart.class, "minecart_enderchest", 64, 1, true);
addEntity(EntityGrapplingHook.class, "grapplinghook", 900, 1, true);
addEntity(EntityCustomFallingBlock.class, "customfallingblock", 160, 20, true);
ResourceLocation angel = addEntity(EntityAngel.class, "pureangel");
EntityRegistry.registerEgg(angel, 0xFFFFFF, 0xFFFF00);
EntitySpawnPlacementRegistry.setPlacementType(EntityAngel.class, SpawnPlacementType.IN_AIR);
ResourceLocation devil = addEntity(EntityDevil.class, "darkdevil");
EntityRegistry.registerEgg(devil, 0, 0xFFFF00);
EntitySpawnPlacementRegistry.setPlacementType(EntityDevil.class, SpawnPlacementType.IN_AIR);
addEntity(EntityDarkarang.class, "darkarang", 160, 20, true);
addEntity(EntityDagger.class, "dagger", 160, 20, true);
ResourceLocation tamedPolarBear = addEntity(EntityTamedPolarBear.class, "polarbear_tamed");
EntityRegistry.registerEgg(tamedPolarBear, 15921906, 9803152);
addEntity(EntityBambooBoat.class, "bambooboat", 80, 3, true);
addEntity(EntityDart.class, "dart", 64, 24, false);
addEntity(EntityCrystalModPainting.class, "crystalmodpainting", 160, Integer.MAX_VALUE, false);
}
示例3: addSpawnWater
import net.minecraft.entity.EntitySpawnPlacementRegistry; //导入方法依赖的package包/类
private static void addSpawnWater(List<BiomeDictionary.Type> biomeTypes, Class<? extends EntityLiving> entityClass,
int spawnProbability, int spawnMinCount, int spawnMaxCount) {
addSpawn(biomeTypes, entityClass, EnumCreatureType.WATER_CREATURE, spawnProbability, spawnMinCount, spawnMaxCount);
EntitySpawnPlacementRegistry.setPlacementType(entityClass, EntityLiving.SpawnPlacementType.IN_WATER);
}
示例4: preInit
import net.minecraft.entity.EntitySpawnPlacementRegistry; //导入方法依赖的package包/类
@EventHandler
public void preInit(FMLPreInitializationEvent e)
{
registerConfig(e);
//Blocks
CryingObsidian = (new BlockCryingObsidian()).setHardness(50F).setResistance(2000F).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock);
Sponge = (new BlockAbsorb()).setHardness(0.6F).setStepSound(Block.soundTypeGrass).setCreativeTab(CreativeTabs.tabBlock);
Spikes = (new BlockSpikes()).setHardness(1.5F).setResistance(5.0F).setStepSound(Block.soundTypeWood);
DragonEggRed = (new BlockDragonEggRed()).setHardness(3.0F).setResistance(15.0F).setStepSound(Block.soundTypeStone).setLightLevel(0.125F).setCreativeTab(CreativeTabs.tabMisc);
RubyOre = (new BlockRubyOre("rubyore")).setHardness(3F).setResistance(5F).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock);
RubyBlock = (new BlockRuby("rubyblock")).setHardness(5F).setResistance(10F).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock);
Lantern = new BlockLantern();
LanternPhys = new BlockLanternPhys("lantern");
LockedChest = (new BlockLockedChest("lockedchest")).setHardness(0.0F).setLightLevel(1.0F).setStepSound(Block.soundTypeWood).setTickRandomly(true).setCreativeTab(CreativeTabs.tabDecorations);
Chair = (BlockChair)(new BlockChair()).setHardness(2.5F).setStepSound(Block.soundTypeWood);
Table = (BlockTable)(new BlockTable(0)).setHardness(2.5F).setStepSound(Block.soundTypeWood);
Lectern = (new BlockLectern()).setHardness(2.5F).setStepSound(Block.soundTypeWood);
LecternOpen = (new BlockLecternOpen()).setHardness(2.5F).setStepSound(Block.soundTypeWood);
CherrySlab = (BlockCherryHalfSlab)new BlockCherryHalfSlab().setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood);;
CherryDoubleSlab = (BlockCherryDoubleSlab)new BlockCherryDoubleSlab().setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood);;
DirtSlab = (BlockDirtHalfSlab)new BlockDirtHalfSlab().setHardness(0.5F).setStepSound(Block.soundTypeGravel);
DirtDoubleSlab = (BlockDirtDoubleSlab)new BlockDirtDoubleSlab().setHardness(0.5F).setStepSound(Block.soundTypeGravel);
Rose = (new BlockRose(0)).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
EmptyRoseBush = (BlockEmptyRoseBush)(new BlockEmptyRoseBush(0)).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
EmptyRoseBushTop = (new BlockEmptyRoseBushTop()).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
Peony = (new BlockPeony(0)).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
EmptyPeonyBush = (new BlockEmptyPeonyBush(0)).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
EmptyPeonyBushTop = (new BlockEmptyPeonyBushTop()).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
CherryLog = (BlockCherryLog)(new BlockCherryLog("log_cherry")).setHardness(2.0F).setStepSound(Block.soundTypeWood);
CherryLeaves = (new BlockCherryLeaves()).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundTypeGrass);
CherryPlank = (new BlockCherryWood("planks_cherry")).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeWood);
CherrySapling = (new BlockCherrySapling()).setHardness(0.0F).setStepSound(Block.soundTypeGrass);
CherryStairs = (new BlockCherryStairs(CherryPlank.getDefaultState()));
Gear = (new BlockGear()).setHardness(1.0F).setStepSound(Block.soundTypeMetal);
//Items
if(EnableQuivers){
Quiver = (new ItemQuiver( EnumArmorMaterialInvinc, 0, 1, "Quiver")).setCreativeTab(CreativeTabs.tabCombat);
LeatherQuiver = (new ItemQuiver( ArmorMaterial.LEATHER, 0, 1, "LeatherQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
ChainQuiver = (new ItemQuiver( ArmorMaterial.CHAIN, 0, 1, "ChainQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
GoldQuiver = (new ItemQuiver( ArmorMaterial.GOLD, 0, 1, "GoldQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
IronQuiver = (new ItemQuiver( ArmorMaterial.IRON, 0, 1, "IronQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
DiamondQuiver = (new ItemQuiver( ArmorMaterial.DIAMOND, 0, 1, "DiamondQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
LeatherChainQuiver = (new ItemQuiver(EnumArmorMaterialLC, 0, 1, "LeatherChainQuiver")).setContainerItem(Quiver).setCreativeTab(CreativeTabs.tabCombat);
}
LeatherChainHelmet = (new ItemLC( EnumArmorMaterialLC, 0, 0)).setCreativeTab(CreativeTabs.tabCombat);
LeatherChainChest = (new ItemLC( EnumArmorMaterialLC, 0, 1)).setCreativeTab(CreativeTabs.tabCombat);
LeatherChainLegs = (new ItemLC( EnumArmorMaterialLC, 0, 2)).setCreativeTab(CreativeTabs.tabCombat);
LeatherChainBoots = (new ItemLC( EnumArmorMaterialLC, 0, 3)).setCreativeTab(CreativeTabs.tabCombat);
gemRuby = (new ItemRuby()).setCreativeTab(CreativeTabs.tabMaterials);
RediscoveredPotion = (new ItemPotionRediscovered());
ItemLantern = new ItemLantern();
Scarecrow = (new ItemScarecrow()).setCreativeTab(CreativeTabs.tabDecorations);
DreamPillow = (new ItemDreamPillow()).setCreativeTab(CreativeTabs.tabMisc);
ItemGear = (new ItemGear()).setCreativeTab(CreativeTabs.tabRedstone);
heaven = (new BiomeGenSky(HeavenBiomeID)).setColor(16421912).setBiomeName("Heaven").setDisableRain();
instance = this;
MinecraftForge.EVENT_BUS.register(new com.stormister.rediscovered.RediscoveredEventHandler());
EntitySpawnPlacementRegistry.setPlacementType(EntityFish.class, EntityLiving.SpawnPlacementType.IN_WATER);
EntityRegistry.addSpawn(EntityFish.class, FishSpawn, 5, 20, EnumCreatureType.WATER_CREATURE, BiomeGenBase.beach, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.river, BiomeGenBase.swampland, this.heaven);
EntityRegistry.addSpawn(EntityZombieHorse.class, ZombieHorseSpawn, 1, 1, EnumCreatureType.MONSTER, BiomeGenBase.beach, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungleHills, BiomeGenBase.plains, BiomeGenBase.river, BiomeGenBase.swampland, BiomeGenBase.taiga, BiomeGenBase.icePlains, BiomeGenBase.desert, BiomeGenBase.megaTaiga, BiomeGenBase.roofedForest, BiomeGenBase.mesa, BiomeGenBase.savanna);
EntityRegistry.addSpawn(EntitySkeletonHorse.class, SkeletonHorseSpawn, 1, 1, EnumCreatureType.MONSTER, BiomeGenBase.beach, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungleHills, BiomeGenBase.plains, BiomeGenBase.river, BiomeGenBase.swampland, BiomeGenBase.taiga, BiomeGenBase.icePlains, BiomeGenBase.desert, BiomeGenBase.megaTaiga, BiomeGenBase.roofedForest, BiomeGenBase.mesa, BiomeGenBase.savanna);
registerGameRegistryThings();
}
示例5: registerEntities
import net.minecraft.entity.EntitySpawnPlacementRegistry; //导入方法依赖的package包/类
private static void registerEntities() {
int modEntityIndex = 0;
// PROJECTILES
EntityRegistry.registerModEntity(EntityArrowBomb.class, "arrow_bomb", ++modEntityIndex, ZSSMain.instance, 64, 20, true);
EntityRegistry.registerModEntity(EntityArrowCustom.class, "arrow_custom", ++modEntityIndex, ZSSMain.instance, 64, 20, true);
EntityRegistry.registerModEntity(EntityArrowElemental.class, "arrow_elemental", ++modEntityIndex, ZSSMain.instance, 64, 20, true);
EntityRegistry.registerModEntity(EntityBomb.class, "bomb", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityBombosFireball.class, "bombos_fireball", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityBoomerang.class, "boomerang", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityCeramicJar.class, "jar", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityCyclone.class, "cyclone", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityHookShot.class, "hookshot", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityLeapingBlow.class, "leaping_blow", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityMagicSpell.class, "magic_spell", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntitySeedShot.class, "seedshot", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntitySwordBeam.class, "sword_beam", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityThrowingRock.class, "rock", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
EntityRegistry.registerModEntity(EntityWhip.class, "whip", ++modEntityIndex, ZSSMain.instance, 64, 10, true);
// NATURALLY SPAWNING MOBS
EntityRegistry.registerModEntity(EntityDarknut.class, "darknut", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntityDarknut.class, "darknut", 0x1E1E1E, 0x8B2500, 0x1E1E1E, 0xFB2500);
EntitySpawnPlacementRegistry.setPlacementType(EntityDarknut.class, SpawnPlacementType.ON_GROUND);
registerEntity(EntityFairy.class, "fairy", ++modEntityIndex, 80, 0xADFF2F, 0xFFFF00);
EntitySpawnPlacementRegistry.setPlacementType(EntityFairy.class, SpawnPlacementType.ON_GROUND);
EntityRegistry.registerModEntity(EntityNavi.class, "navi", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
EntityRegistry.registerModEntity(EntityChu.class, "chu", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntityChu.class, "chu", 0x008000, 0xDC143C, 0x008000, 0x00EE00, 0x008000, 0x3A5FCD, 0x008000, 0xFFFF00);
EntitySpawnPlacementRegistry.setPlacementType(EntityChu.class, SpawnPlacementType.ON_GROUND);
registerEntity(EntityDekuBaba.class, "baba_deku", ++modEntityIndex, 80, 0x33CC33, 0x0000FF);
registerEntity(EntityDekuFire.class, "baba_fire", ++modEntityIndex, 80, 0xFF0000, 0x0000FF);
registerEntity(EntityDekuWithered.class, "baba_withered", ++modEntityIndex, 80, 0x8B5A00, 0x0000FF);
EntityRegistry.registerModEntity(EntityKeese.class, "keese", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntityKeese.class, "keese", 0x000000, 0x555555, 0x000000, 0xFF4500, 0x000000, 0x40E0D0, 0x000000, 0xFFD700, 0x000000, 0x800080);
EntitySpawnPlacementRegistry.setPlacementType(EntityKeese.class, SpawnPlacementType.ON_GROUND);
EntityRegistry.registerModEntity(EntityOctorok.class, "octorok", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntityOctorok.class, "octorok", 0x68228B, 0xBA55D3, 0x68228B, 0xFF00FF);
EntitySpawnPlacementRegistry.setPlacementType(EntityOctorok.class, SpawnPlacementType.IN_WATER);
EntityRegistry.registerModEntity(EntitySkulltula.class, "skulltula", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntitySkulltula.class, "skulltula", 0x080808, 0xFFFF00, 0x080808, 0xE68A00);
EntitySpawnPlacementRegistry.setPlacementType(EntitySkulltula.class, SpawnPlacementType.ON_GROUND);
EntityRegistry.registerModEntity(EntityWizzrobe.class, "wizzrobe", ++modEntityIndex, ZSSMain.instance, 80, 3, true);
CustomEntityList.addMapping(EntityWizzrobe.class, "wizzrobe", 0x8B2500, 0xFF0000, 0x8B2500, 0x00B2EE, 0x8B2500, 0xEEEE00, 0x8B2500, 0x00EE76);
EntitySpawnPlacementRegistry.setPlacementType(EntityWizzrobe.class, SpawnPlacementType.ON_GROUND);
// BOSSES
registerEntity(EntityBlackKnight.class, "darknut_boss", ++modEntityIndex, 80, 0x1E1E1E, 0x000000);
registerEntity(EntityGrandWizzrobe.class, "wizzrobe_grand", ++modEntityIndex, 80, 0x8B2500, 0x1E1E1E);
// NPCS
registerEntity(EntityGoron.class, "goron", ++modEntityIndex, 80, 0xB8860B, 0x8B5A00);
EntitySpawnPlacementRegistry.setPlacementType(EntityGoron.class, SpawnPlacementType.ON_GROUND);
registerEntity(EntityNpcBarnes.class, "npc.barnes", ++modEntityIndex, 80, 0x8B8378, 0xED9121);
registerEntity(EntityNpcMaskTrader.class, "npc.mask_trader", ++modEntityIndex, 80, 0x0000EE, 0x00C957);
registerEntity(EntityNpcOrca.class, "npc.orca", ++modEntityIndex, 80, 0x0000EE, 0x9A32CD);
registerEntity(EntityNpcZelda.class, "npc.zelda", ++modEntityIndex, 80, 0xCC0099, 0xFFFFFF);
}