net.minecraft.entity.EntityList.EntityEggInfo Java Examples

The following examples show how to use net.minecraft.entity.EntityList.EntityEggInfo. 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: CraftStatistic.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
public static net.minecraft.stats.StatBase getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
    EntityEggInfo entityEggInfo = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(entity.getTypeId()));

    if (entityEggInfo != null) {
        return entityEggInfo.field_151512_d;
    }
    return null;
}
 
Example #2
Source File: BaseEntityRegistry.java    From Electro-Magic-Tools with GNU General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int colPrim, int colSec) {
    int id = getUniqueEntityID();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, colPrim, colSec));
    return;
}
 
Example #3
Source File: RegistryHandler.java    From EnderZoo with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
@SubscribeEvent
public void onEntityRegister(Register<EntityEntry> e) {
    for (MobInfo mob : MobInfo.values()) {
    	EntityEntry entry = new EntityEntry(mob.getClz(), mob.getName());
    	ResourceLocation name = new ResourceLocation(EnderZoo.MODID, mob.getName());
    	entry.setRegistryName(name);
    	entry.setEgg(new EntityEggInfo(name, mob.getEggBackgroundColor(), mob.getEggForegroundColor()));
    	e.getRegistry().register(entry);
        registerEntity(mob);
      }
}
 
Example #4
Source File: ItemInfo.java    From NotEnoughItems with MIT License 4 votes vote down vote up
private static void addEntityEgg(Class<?> entity, int i, int j) {
    int id = (Integer)EntityList.classToIDMapping.get(entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, i, j));
}
 
Example #5
Source File: EntityRegistrator.java    From PneumaticCraft with GNU General Public License v3.0 4 votes vote down vote up
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor){
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
 
Example #6
Source File: IMobEggHandler.java    From PneumaticCraft with GNU General Public License v3.0 2 votes vote down vote up
/**
 * @param safariNet The Safari Net that is looking for egg info.
 * @return An EntityEggInfo, or null if this instance cannot handle this mob.
 */
public EntityEggInfo getEgg(ItemStack safariNet);
 
Example #7
Source File: IMobEggHandler.java    From BigReactors with MIT License 2 votes vote down vote up
/**
 * @param safariNet The Safari Net that is looking for egg info.
 * @return An EntityEggInfo, or null if this instance cannot handle this mob.
 */
public EntityEggInfo getEgg(ItemStack safariNet);