net.minecraftforge.fml.common.registry.EntityRegistry Java Examples

The following examples show how to use net.minecraftforge.fml.common.registry.EntityRegistry. 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: TofuEntityRegister.java    From TofuCraftReload with MIT License 6 votes vote down vote up
public static void entityRegister() {
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofucow"), EntityTofuCow.class, prefix("TofuCow"), 1, TofuMain.instance, 80, 3, true, 0xEBE8E8, 0xA3A3A3);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofuslime"), EntityTofuSlime.class, prefix("TofuSlime"), 2, TofuMain.instance, 80, 3, true, 0xEBE8E8, 0x2E2E2E);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofunian"), EntityTofunian.class, prefix("Tofunian"), 3, TofuMain.instance, 80, 3, false, 0xEBE8E8, 0xCACFA1);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofuchinger"), EntityTofuChinger.class, prefix("TofuChinger"), 4, TofuMain.instance, 80, 3, true, 0xEBE8E8, 0xB3B3B3);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofuspider"), EntityTofuSpider.class, prefix("TofuSpider"), 5, TofuMain.instance, 80, 3, true, 0xEBE8E8, 0x080808);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "fukumame"), EntityFukumame.class, prefix("Fukumame"), 6, TofuMain.instance, 100, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "zundaarrow"), EntityZundaArrow.class, prefix("ZundaArrow"), 7, TofuMain.instance, 100, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofufish"), EntityTofuFish.class, prefix("TofuFish"), 8, TofuMain.instance, 80, 3, true, 0xEBE8E8, 0x3a3e3f);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofuturret"), EntityTofuTurret.class, prefix("TofuTurret"), 9, TofuMain.instance, 90, 3, true, 0xe5e0bd, 0x9cd6f5);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "beam"), EntityBeam.class, prefix("Beam"), 10, TofuMain.instance, 100, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofumindcore"), EntityTofuMindCore.class, prefix("TofuMindCore"), 11, TofuMain.instance, 90, 3, true, 0xe5e0bd, 0x9cd6f5);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "tofugandlem"), EntityTofuGandlem.class, prefix("TofuGandlem"), 12, TofuMain.instance, 120, 3, true, 0xe5e0bd, 0x9cd6f5);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "falltofu"), EntityFallTofu.class, prefix("FallTofu"), 13, TofuMain.instance, 120, 2, true);
    EntityRegistry.registerModEntity(new ResourceLocation(TofuMain.MODID, "chingerarrow"), EntityTippedChingerArrow.class, prefix("TippedChingerArrow"), 15, TofuMain.instance, 100, 1, true);
    EntitySpawnPlacementRegistry.setPlacementType(EntityTofuFish.class, EntityLiving.SpawnPlacementType.IN_WATER);
}
 
Example #2
Source File: CyberwareContent.java    From Cyberware with MIT License 6 votes vote down vote up
public static void postInit()
{
	
	if (!CyberwareConfig.NO_ZOMBIES)
	{
		List<Biome> biomes = new ArrayList<Biome>();
		
		for (ResourceLocation key : Biome.REGISTRY.getKeys())
		{
			Biome biome = Biome.REGISTRY.getObject(key);
			for (SpawnListEntry entry : biome.getSpawnableList(EnumCreatureType.MONSTER))
			{
				if (entry.entityClass == EntityZombie.class)
				{
					biomes.add(biome);
				}
			}
		}
		EntityRegistry.addSpawn(EntityCyberZombie.class, CyberwareConfig.ZOMBIE_WEIGHT, CyberwareConfig.ZOMBIE_MIN_PACK, CyberwareConfig.ZOMBIE_MAX_PACK, EnumCreatureType.MONSTER, biomes.toArray(new Biome[0]));
	}

}
 
Example #3
Source File: CommonProxy.java    From TFC2 with GNU General Public License v3.0 6 votes vote down vote up
protected void registerEntities() 
{
	DataSerializersTFC.register();
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"cart"), EntityCart.class, "cart", 0, TFC.instance, 80, 3, true, 0x000000, 0x00ff00);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bear"), EntityBear.class, "bear", 1, TFC.instance, 80, 3, true, 0x000000, 0xff0000);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bearpanda"), EntityBearPanda.class, "bearpanda", 2, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"lion"), EntityLion.class, "lion", 3, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"tiger"), EntityTiger.class, "tiger", 4, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"rhino"), EntityRhino.class, "rhino", 5, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elephant"), EntityElephant.class, "elephant", 6, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"mammoth"), EntityMammoth.class, "mammoth", 7, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"boar"), EntityBoar.class, "boar", 8, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bison"), EntityBison.class, "bison", 9, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxred"), EntityFoxRed.class, "foxred", 10, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxarctic"), EntityFoxArctic.class, "foxarctic", 11, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxdesert"), EntityFoxDesert.class, "foxdesert", 12, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"hippo"), EntityHippo.class, "hippo", 13, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bigcat"), EntityBigCat.class, "bigcat", 14, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"sabertooth"), EntitySabertooth.class, "sabertooth", 15, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
	EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elk"), EntityElk.class, "elk", 16, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
}
 
Example #4
Source File: Mobycraft.java    From mobycraft with Apache License 2.0 6 votes vote down vote up
@EventHandler
public void init(FMLInitializationEvent event) {
	injector = Guice.createInjector(new MobycraftModule());

	// Helps render item textures
	mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();

	docker_block = new GenericBlock("docker_block", Material.iron, 5.0F,
			10.0F, "pickaxe", 1, Block.soundTypeMetal);
	registerBlock(docker_block, "docker_block");

	container_wand = new GenericItem("container_wand",
			CreativeTabs.tabTools).setMaxStackSize(1);
	registerItem(container_wand, "container_wand");

	container_essence = new GenericItem("container_essence",
			CreativeTabs.tabMaterials);
	registerItem(container_essence, "container_essence");

	RenderManager render = Minecraft.getMinecraft().getRenderManager();

	registerModEntity(EntityMoby.class, new RenderMoby(), "moby",
			EntityRegistry.findGlobalUniqueEntityId(), 0x24B8EB, 0x008BB8);
	registerModEntity(EntityChaosMonkey.class, new RenderChaosMonkey(),
			"chaos_monkey", EntityRegistry.findGlobalUniqueEntityId(),
			0x8E6400, 0xEAFF00);

	DimensionRegistry.mainRegistry();

	commands = injector.getInstance(MainCommand.class);
	commands.loadConfig();

	MinecraftForge.EVENT_BUS.register(commands);
	FMLCommonHandler.instance().bus().register(commands);

	GameRegistry.addRecipe(new ItemStack(container_wand), " ei", "ese",
			"se ", 'e', container_essence, 'i', Items.iron_ingot, 's',
			Items.stick);
}
 
Example #5
Source File: WailaCompat.java    From EnderZoo with Creative Commons Zero v1.0 Universal 6 votes vote down vote up
@Override
 public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
String name = ENTRY_MAP.get(entity.getClass());

if(name == null) {
	name = EntityRegistry.getEntry(entity.getClass()).getName();
	ENTRY_MAP.put(entity.getClass(), name);
}

   String locKey = "entity." + EnderZoo.MODID + "." + name + ".desc.";
   String loc = null;
   for (int line = 1; !(loc = EnderZoo.proxy.translate(locKey + line)).equals(locKey + line); line++) {
     currenttip.add(loc);
   }
   return currenttip;
 }
 
Example #6
Source File: Util.java    From IGW-mod with GNU General Public License v2.0 6 votes vote down vote up
public static String getModIdForEntity(Class<? extends Entity> entity){
    if(reflectionFailed) return "minecraft";
    if(entityNames == null) {
        try {
            entityNames = (HashMap<String, ModContainer>)ReflectionHelper.findField(EntityRegistry.class, "entityNames").get(EntityRegistry.instance());
        } catch(Exception e) {
            IGWLog.warning("IGW-Mod failed to perform reflection! A result of this is that wiki pages related to Entities will not be found. Report to MineMaarten please!");
            e.printStackTrace();
            reflectionFailed = true;
            return "minecraft";
        }
    }
    EntityRegistration entityReg = EntityRegistry.instance().lookupModSpawn(entity, true);
    if(entityReg == null) return "minecraft";
    ModContainer mod = entityNames.get(entityReg.getEntityName());
    if(mod == null) {
        IGWLog.info("Couldn't find the owning mod of the entity " + entityReg.getEntityName() + " even though it's registered through the EntityRegistry!");
        return "minecraft";
    } else {
        return mod.getModId().toLowerCase();
    }
}
 
Example #7
Source File: ItemOwlEgg.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
public static ItemOwlEgg create() {
  
  EntityRegistry.registerModEntity(new ResourceLocation(EnderZoo.MODID,"EntityOwlEgg"),
      EntityOwlEgg.class, "EntityOwlEgg", Config.entityOwlEggId, EnderZoo.instance, 64, 10, true);
  
  ItemOwlEgg res = new ItemOwlEgg();
  res.init();
  return res;
}
 
Example #8
Source File: BlockConfusingCharge.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
public static BlockConfusingCharge create() {

    PacketHandler.INSTANCE.registerMessage(PacketExplodeEffect.class, PacketExplodeEffect.class, PacketHandler.nextID(), Side.CLIENT);

    EntityRegistry.registerModEntity(new ResourceLocation(EnderZoo.MODID,"EntityPrimedCharge"),
        EntityPrimedCharge.class, "EntityPrimedCharge", Config.entityPrimedChargeId, EnderZoo.instance, 64, 100, false);
    if (!Config.confusingChargeEnabled) {
      return null;
    }

    BlockConfusingCharge res = new BlockConfusingCharge();
    res.init();
    return res;
  }
 
Example #9
Source File: EntityHelper.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
public static void addSpawnAllBiomes(final Class<? extends EntityLiving> entityClass,
                                    final int weightedProb, final int min, final int max,
                                    final EnumCreatureType typeOfCreature) {
  IForgeRegistry<Biome> biomeReg = GameRegistry.findRegistry(Biome.class);
  Biome[] biomes = biomeReg.getValues().toArray(new Biome[biomeReg.getValues().size()]);

  EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature, biomes);
}
 
Example #10
Source File: EntityHelper.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
public static void addSpawnFromType(final Class<? extends EntityLiving> entityClass,
                                    final int weightedProb, final int min, final int max,
                                    final EnumCreatureType typeOfCreature,
                                    final BiomeDictionary.Type... biomeTypes) {
  final ArrayList<Biome> biomes = new ArrayList<Biome>();
  for (final BiomeDictionary.Type biomeType : biomeTypes) {
    biomes.addAll(BiomeDictionary.getBiomes(biomeType));
  }

  EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature,
                          biomes.toArray(new Biome[biomes.size()]));
}
 
Example #11
Source File: EntityHelper.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
public static void registerEntity(final Class<? extends Entity> entityClass,
                                  final String entityName, final int trackingRange,
                                  final int updateFrequency, final boolean sendsVelocityUpdates,
                                  final int eggPrimary, final int eggSecondary) {
  EntityRegistry.registerModEntity(new ResourceLocation(ModInformation.MOD_ID, entityName),
                                   entityClass, ModInformation.MOD_ID + "." + entityName,
                                   getRegisteredEntityId(), MooFluids.getInstance(),
                                   trackingRange, updateFrequency, sendsVelocityUpdates,
                                   eggPrimary, eggSecondary);
}
 
Example #12
Source File: EntityHelper.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
public static void registerEntity(final Class<? extends Entity> entityClass,
                                  final String entityName, final int trackingRange,
                                  final int updateFrequency, final boolean sendsVelocityUpdates) {
  EntityRegistry.registerModEntity(new ResourceLocation(ModInformation.MOD_ID, entityName),
                                   entityClass, ModInformation.MOD_ID + "." + entityName,
                                   getRegisteredEntityId(), MooFluids.getInstance(),
                                   updateFrequency, trackingRange, sendsVelocityUpdates);
}
 
Example #13
Source File: CommonProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	GameRegistry.registerTileEntity(FWTile.class, "novaTile");
	GameRegistry.registerTileEntity(FWTileUpdater.class, "novaTileUpdater");
	int globalUniqueEntityId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(FWEntity.class, "novaEntity", globalUniqueEntityId);
	EntityRegistry.registerModEntity(FWEntity.class, "novaEntity", globalUniqueEntityId, NovaMinecraft.instance, 64, 20, true);
}
 
Example #14
Source File: ReflectionUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static BiMap<Class<? extends Entity>, EntityRegistry.EntityRegistration> getEntityClassRegistrations() {
	try {
		return (BiMap<Class<? extends Entity>, EntityRegistry.EntityRegistration>) ENTITYREGISTRY_CLASSREGISTRATIONS.get(EntityRegistry.instance());
	} catch (IllegalArgumentException | IllegalAccessException ex) {
		return null;
	}
}
 
Example #15
Source File: SignalsConfig.java    From Signals with GNU General Public License v3.0 5 votes vote down vote up
public static boolean isBlacklisted(EntityMinecart cart, String[] config){
    if(config.length == 0) return false;
    EntityEntry entry = EntityRegistry.getEntry(cart.getClass());
    ResourceLocation cartID = ForgeRegistries.ENTITIES.getKey(entry);
    for(String blacklist : config) {
        if(cartID.equals(new ResourceLocation(blacklist))) {
            return true;
        }
    }
    return false;
}
 
Example #16
Source File: ValkyrienSkiesWorld.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
@EventHandler
protected void init(FMLInitializationEvent event) {
    EntityRegistry.registerModEntity(
        new ResourceLocation(ValkyrienSkiesWorld.MOD_ID, "fall_up_block_entity"),
        EntityFallingUpBlock.class,
        "fall_up_block_entity",
        75, ValkyrienSkiesWorld.INSTANCE, 80, 1, true);

    MinecraftForge.EVENT_BUS.register(worldEventsCommon);
    GameRegistry.registerWorldGenerator(new ValkyrienSkiesWorldGen(), 1);
    proxy.init(event);
}
 
Example #17
Source File: TofuEntityRegister.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static void entitySpawn() {
    List<BiomeManager.BiomeEntry> biomeEntries = new ArrayList<BiomeManager.BiomeEntry>();
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.COOL));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.DESERT));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.ICY));
    biomeEntries.addAll(BiomeManager.getBiomes(BiomeManager.BiomeType.WARM));
    List<Biome> biomes = new ArrayList<Biome>();
    for (BiomeManager.BiomeEntry b : biomeEntries) {
        biomes.add(b.biome);
    }
    biomes.addAll(BiomeManager.oceanBiomes);
    EntityRegistry.addSpawn(EntityTofuSlime.class, 105, 2, 3, EnumCreatureType.MONSTER, biomes.toArray(new Biome[biomes.size()]));
}
 
Example #18
Source File: BlockyEntities.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void onPreInit(FMLPreInitializationEvent event) {
	PacketHandler.registerMessages("hyperstellar");
	EntityRegistry.registerModEntity(new ResourceLocation(CommunityGlobals.MOD_ID, "BaseVehicle"), BaseVehicleEntity.class, "BaseVehicle", 45, CommunityMod.INSTANCE, 64, 3, true);
	if (!ForgeChunkManager.getConfig().hasCategory(CommunityGlobals.MOD_ID)) {
		ForgeChunkManager.getConfig().get(CommunityGlobals.MOD_ID, "maximumChunksPerTicket", MaxRocketSize / 16)
				.setMinValue(0);
		ForgeChunkManager.getConfig().get(CommunityGlobals.MOD_ID, "maximumTicketCount", 10000).setMinValue(0);
		ForgeChunkManager.getConfig().save();
	}
	HDataSerializers.register();
}
 
Example #19
Source File: CraftCustomEntity.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
public CraftCustomEntity(CraftServer server, Entity entity) {
    super(server, entity);
    this.entityName = EntityRegistry.entityTypeMap.get(entity.getClass());
    if (entityName == null) {
        entityName = entity.getName();
    }
}
 
Example #20
Source File: CraftLivingEntity.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
public CraftLivingEntity(final CraftServer server, final EntityLivingBase entity) {
    super(server, entity);

    if (entity instanceof EntityLiving || entity instanceof EntityArmorStand) {
        equipment = new CraftEntityEquipment(this);
    }
    this.entityName = EntityRegistry.getCustomEntityTypeName(entity.getClass());
    if (entityName == null) {
        entityName = entity.getName();
    }
}
 
Example #21
Source File: CraftWorld.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
public Entity spawnEntity(Location loc, EntityType entityType) {
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null) {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null) {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.spawnEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    return spawn(loc, entityType.getEntityClass());
}
 
Example #22
Source File: ModEntities.java    From YouTubeModdingTutorial with MIT License 5 votes vote down vote up
public static void init() {
    int id = 1;

    EntityRegistry.registerModEntity(new ResourceLocation(MyMod.MODID, "mymod_guard"), EntityGuard.class, "mymod_guard", id++,
            MyMod.instance, 64, 3, true, 0x222222, 0x555555);
    EntityRegistry.registerModEntity(new ResourceLocation(MyMod.MODID, "mymod_sphere"), EntitySphere.class, "mymod_sphere", id++,
            MyMod.instance, 64, 1, false);
}
 
Example #23
Source File: Mobycraft.java    From mobycraft with Apache License 2.0 5 votes vote down vote up
public void registerModEntity(Class entityClass, Render render,
		String entityName, int entityId, int foregroundColor,
		int backgroundColor) {
	EntityRegistry.registerGlobalEntityID(entityClass, entityName,
			entityId, foregroundColor, backgroundColor);
	EntityRegistry.registerModEntity(entityClass, entityName, entityId,
			this, 80, 1, false);
	RenderingRegistry.registerEntityRenderingHandler(entityClass, render);
}
 
Example #24
Source File: EntityRainbowKing.java    From ToroQuest with GNU General Public License v3.0 4 votes vote down vote up
public static void init(int entityId) {
	EntityRegistry.registerModEntity(new ResourceLocation(ToroQuest.MODID, NAME), EntityRainbowKing.class, NAME, entityId, ToroQuest.INSTANCE, 60,
			2, true, 10040115, 3361970);
}
 
Example #25
Source File: SakuraEntityRegister.java    From Sakura_mod with MIT License 4 votes vote down vote up
public static void entityRegister() {
    EntityRegistry.registerModEntity(new ResourceLocation(SakuraMain.MODID, "deer"), EntityDeer.class, prefix("Deer"), 1, SakuraMain.instance, 90, 2, false, 0xe8a96d, 0xdcdcdc);
    EntityRegistry.registerModEntity(new ResourceLocation(SakuraMain.MODID, "samuraiillger"), EntitySamuraiIllager.class, prefix("SamuraiIllager"), 2, SakuraMain.instance, 90, 2, true, 9804699, 2580065);
}
 
Example #26
Source File: RegistryHandler.java    From EnderZoo with Creative Commons Zero v1.0 Universal 4 votes vote down vote up
private void registerEntity(MobInfo mob) {
	EntityRegistry.registerModEntity(new ResourceLocation(EnderZoo.MODID, mob.getName()),
	mob.getClz(), mob.getName(), mob.getEntityId(), EnderZoo.instance, 64, 3, true);
}
 
Example #27
Source File: MetaEntities.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void init() {
    EntityRegistry.registerModEntity(new ResourceLocation(GTValues.MODID, "dynamite"), DynamiteEntity.class, "Dynamite", 1, GregTechMod.instance, 64, 3, true);
}
 
Example #28
Source File: CommonProxy.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggPrimary, int eggSecondary)
{
    String prefixedName = Reference.MOD_ID + "." + entityName;
    ResourceLocation registryName = new ResourceLocation(Reference.MOD_ID, entityName);
    EntityRegistry.registerModEntity(registryName, entityClass, prefixedName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates, eggPrimary, eggSecondary);
}
 
Example #29
Source File: CommonProxy.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates)
{
    String prefixedName = Reference.MOD_ID + "." + entityName;
    ResourceLocation registryName = new ResourceLocation(Reference.MOD_ID, entityName);
    EntityRegistry.registerModEntity(registryName, entityClass, prefixedName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);
}
 
Example #30
Source File: ModEntities.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void registerEntity(ResourceLocation loc, Class<? extends Entity> entityClass, String entityName, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates) {
	EntityRegistry.registerModEntity(loc, entityClass, entityName, i, Wizardry.instance, trackingRange, updateFrequency, sendsVelocityUpdates);
	i++;
}