Esempio n. 1
0
  private void registerEntities() {
    //		EntityRegistry.registerGlobalEntityID(EntityCausticBoat.class, "causticBoat",
    // EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.registerModEntity(
        EntityCausticBoat.class,
        "causticBoat",
        EntityRegistry.findGlobalUniqueEntityId(),
        this,
        64,
        40,
        true);

    //		EntityRegistry.registerGlobalEntityID(EntityAcidTNTPrimed.class, "acidTntPrimed",
    // EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.registerModEntity(
        EntityAcidTNTPrimed.class,
        "acidTntPrimed",
        EntityRegistry.findGlobalUniqueEntityId(),
        this,
        64,
        100,
        false);

    //		int acidGrenadeEntityID = EntityRegistry.findGlobalUniqueEntityId();
    //		EntityRegistry.registerModEntity(EntityAcidGrenade.class, "acidGrenade",
    // acidGrenadeEntityID, this, 32, 100, true);
  }
 /**
  * Register the mod entity type with FML
  *
  * @param entityClass The entity class
  * @param entityName A unique name for the entity
  * @param trackingRange The range at which MC will send tracking updates
  * @param updateFrequency The frequency of tracking updates
  * @param sendsVelocityUpdates Whether to send velocity information packets as well
  */
 public static void addMapping(
     Class<? extends Entity> entityClass,
     String entityName,
     int trackingRange,
     int updateFrequency,
     boolean sendsVelocityUpdates,
     boolean spawnerOrEgg) {
   if (spawnerOrEgg) {
     EntityRegistry.registerModEntity(
         entityClass,
         entityName,
         EntityRegistry.findGlobalUniqueEntityId(),
         mod,
         trackingRange,
         updateFrequency,
         sendsVelocityUpdates);
   } else {
     entityId++;
     EntityRegistry.registerModEntity(
         entityClass,
         entityName,
         entityId,
         mod,
         trackingRange,
         updateFrequency,
         sendsVelocityUpdates);
     //	EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityId);
   }
 }
Esempio n. 3
0
 public static void addMob(
     Class<? extends Entity> entity, String name, BasicRenderer renderer, int b, int f) {
   EntityRegistry.registerGlobalEntityID(
       entity, name, EntityRegistry.findGlobalUniqueEntityId(), b, f);
   entityList.add(entity);
   renderList.add(renderer);
 }
  public void registerEntity(
      Class<? extends Entity> entityClass, String entityName, int bkEggColour, int fgEggColour) {
    int id = EntityRegistry.findGlobalUniqueEntityId();

    EntityRegistry.registerGlobalEntityID(entityClass, entityName, id);
    EntityList.entityEggs.put(Integer.valueOf(id), new EntityEggInfo(id, bkEggColour, fgEggColour));
  }
Esempio n. 5
0
  public static void RegistrarEntityALoRandomSinSpawn(Class entityClass, String nombre) {
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    long seed = nombre.hashCode();
    Random rand = new Random(seed);

    EntityRegistry.registerGlobalEntityID(entityClass, nombre, entityID);
    EntityRegistry.registerModEntity(
        entityClass, nombre, entityID, RevolutionMain.instance, 64, 1, true);
  }
  public static void createEntity(
      Class entityClass, String entityName, int solidColor, int spotColor) {
    int randomId = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
    EntityRegistry.registerModEntity(
        entityClass, entityName, randomId, ProjectVelocityCore.instance, 64, 1, true);
    EntityRegistry.addSpawn(entityClass, 2, 0, 1, EnumCreatureType.creature, BiomeGenBase.forest);

    createEgg(randomId, solidColor, spotColor);
  }
 public static void createEntity(
     Class<? extends EntityLiving> entityClass, String name, int solidColor, int spotColor) {
   int randomID = EntityRegistry.findGlobalUniqueEntityId();
   EntityRegistry.registerGlobalEntityID(entityClass, name, randomID);
   EntityRegistry.registerModEntity(
       entityClass, name, randomID, MatterOverdrive.instance, 64, 1, true);
   spawnListEntry = new BiomeGenBase.SpawnListEntry(entityClass, 3, 1, 2);
   addInBiome(BiomeGenBase.getBiomeGenArray());
   createEgg(randomID, solidColor, spotColor);
 }
Esempio n. 8
0
  @EventHandler
  public void init(FMLInitializationEvent event) {
    EntityRegistry.registerGlobalEntityID(
        EntitySpear.class,
        "entitySpear",
        EntityRegistry.findGlobalUniqueEntityId(),
        new Color(0, 255, 0).getRGB(),
        new Color(255, 0, 0).getRGB());
    EntityRegistry.registerModEntity(
        EntitySpear.class, "entitySpear", 420, this.instance, 40, 1, true);

    EntityRegistry.registerGlobalEntityID(
        EntityGiantSpider.class,
        "giantSpider",
        EntityRegistry.findGlobalUniqueEntityId(),
        0x7AE8FF,
        0x47FFE2);

    MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
    proxy.registerRender();
  }
 @Override
 public void initRenderers() {
   EntityRegistry.registerGlobalEntityID(
       EntityDarkDruid.class,
       "darkDruid",
       EntityRegistry.findGlobalUniqueEntityId(),
       0x40FF00,
       0x0B610B); // the last two parameters are the colour of the spawnegg you can use HTML color
   // codes just replace the '#' with '0x'
   RenderingRegistry.registerEntityRenderingHandler(
       EntityDarkDruid.class,
       new RenderDarkDruid(new ModelDarkDruid(), 0.7F)); // the 0.5F is the shadowsize
 }
Esempio n. 10
0
 private static void registerEntity(
     Class<? extends Entity> entityClass,
     String entityName,
     Object mod,
     int primaryColor,
     int secondaryColor) {
   int entityID = EntityRegistry.findGlobalUniqueEntityId();
   EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityID);
   EntityRegistry.registerModEntity(entityClass, entityName, entityID, mod, 64, 1, true);
   EntityList.entityEggs.put(
       Integer.valueOf(entityID),
       new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
 }
  public static void registerEntity(Class entityClass, String name, Boolean doEgg) {
    int entityId = EntityRegistry.findGlobalUniqueEntityId();
    long x = name.hashCode();
    Random random = new Random(x);
    int mainColor = random.nextInt() * 16777215;
    int subColor = random.nextInt() * 16777215;

    EntityRegistry.registerGlobalEntityID(entityClass, name, entityId);
    EntityRegistry.registerModEntity(entityClass, name, entityId, WTFtweaks.instance, 64, 1, true);
    if (doEgg) {
      EntityList.entityEggs.put(
          Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, mainColor, subColor));
    }
  }
Esempio n. 12
0
  public static void RegistrarEntityALoRandom(Class entityClass, String nombre) {
    int entityID = EntityRegistry.findGlobalUniqueEntityId();
    long seed = nombre.hashCode();
    Random rand = new Random(seed);
    int primaryColor = rand.nextInt() * 16777215;
    int secondaryColor = rand.nextInt() * 16777215;

    EntityRegistry.registerGlobalEntityID(entityClass, nombre, entityID);
    EntityRegistry.registerModEntity(
        entityClass, nombre, entityID, RevolutionMain.instance, 64, 1, true);
    EntityList.entityEggs.put(
        Integer.valueOf(entityID),
        new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
  }
Esempio n. 13
0
 public static void createEntity(
     Class<? extends Entity> entityClass, String entityName, int solidColor, int spotColor) {
   if (nextID < 1) {
     nextID = HTTYMDMod.getConfig().getStartEntityID();
     if (nextID == -1) nextID = EntityRegistry.findGlobalUniqueEntityId();
   } else nextID += 1;
   EntityRegistry.registerModEntity(
       entityClass, entityName, nextID, HTTYMDMod.INSTANCE, 50, 2, true);
   HTTYMDMod.registerDragonName(entityName);
   ItemSpawnEgg egg =
       (ItemSpawnEgg)
           new ItemSpawnEgg(entityName, solidColor, spotColor).setCreativeTab(currentTab);
   egg.registerItem();
   ItemRegistry.spawnEggIDMapping.put(nextID, egg);
 }
Esempio n. 14
0
  /** Initiates mod, registers block and item for use. Generates the necessary folders. */
  @EventHandler
  public void load(FMLInitializationEvent event) {
    initialize();
    registerBlocks();
    addNames();
    addSmelt();
    mkDirs();
    registerEntities();
    addRecipes();

    guihandler = new GuiHandler();
    GameRegistry.registerTileEntity(TileEntityCollision.class, "collide");
    GameRegistry.registerTileEntity(TileEntityExtractor.class, "extractor");
    GameRegistry.registerTileEntity(TileEntityParadoxCondenser.class, "condenser");
    GameRegistry.registerTileEntity(TileEntityTimeTravel.class, "timetravel");
    GameRegistry.registerTileEntity(TileEntityMarker.class, "marker");
    GameRegistry.registerTileEntity(TileEntityTimeDistorter.class, "timeDistorter");

    // TickRegistry.registerTickHandler(new TickerClient(), Side.CLIENT);
    GameRegistry.registerWorldGenerator(new StructureGenerator(), 0);
    NetworkRegistry.INSTANCE.registerGuiHandler(this, guihandler);
    EntityRegistry.registerGlobalEntityID(
        EntityPlayerPast.class,
        "PlayerPast",
        EntityRegistry.findGlobalUniqueEntityId(),
        0x191919,
        0x000000); // registers the mobs name and id
    EntityRegistry.registerGlobalEntityID(EntityChair.class, "Chiar", 1001);
    EntityRegistry.registerGlobalEntityID(EntityXPOrbTT.class, "XP Orb", 1002);

    DimensionManager.registerProviderType(
        TimeTraveler.dimensionId, WorldProviderFuture.class, false);
    DimensionManager.registerDimension(TimeTraveler.dimensionId, TimeTraveler.dimensionId);

    FluidContainerRegistry.registerFluidContainer(
        timeFluid, new ItemStack(bucket), new ItemStack(Items.bucket));

    proxy.initCapes();

    proxy.registerRenderThings();
  }
  @EventHandler
  public void Load(FMLPreInitializationEvent Event) {

    // Settings For Our Creative Tab
    hazzachooks_star_wars_addon_tab =
        new CreativeTabs("hazzachooks_star_wars_addon_tab") {
          public ItemStack getIconItemStack() {
            return new ItemStack(darkBlade, 1, 0);
          }
        };
    LanguageRegistry.instance()
        .addStringLocalization(
            "itemGroup.hazzachooks_star_wars_addon_tab",
            "en_US",
            "Hazzachooks Star Wars Addon Tab");

    // Settings For Our Items
    darkBlade =
        new DarkBlade(2000, dark_blade_enum)
            .setUnlocalizedName("dark blade")
            .setCreativeTab(this.hazzachooks_star_wars_addon_tab);

    // Settings For Our Mobs
    EntityRegistry.registerGlobalEntityID(Entity_deathwatch.class, "Deathwatch", 1);
    EntityRegistry.addSpawn(Entity_deathwatch.class, 20, 5, 20, EnumCreatureType.monster);
    EntityRegistry.findGlobalUniqueEntityId();
    registerEntityEgg(Entity_deathwatch.class, 0xF1EDED, 0x0020C2);
    RenderingRegistry.registerEntityRenderingHandler(
        Entity_deathwatch.class, new Renderdeathwatch(new Model_deathwatch(), 0.3F));
    EntityRegistry.registerGlobalEntityID(Entity_pre_vizsla.class, "Pre-Vizsla", 1);
    EntityRegistry.addSpawn(Entity_pre_vizsla.class, 20, 5, 20, EnumCreatureType.monster);
    registerEntityEgg(Entity_pre_vizsla.class, 0xF1EDED, 0x0020C2);
    RenderingRegistry.registerEntityRenderingHandler(
        Entity_pre_vizsla.class, new Renderprevizsla(new Model_pre_vizsla(), 0.3F));

    // Register Our Items
    GameRegistry.registerItem(darkBlade, "darkBlade");
    LanguageRegistry.addName(darkBlade, "Dark Saber");
  }
 @Override
 public void registerRenders() {
   EntityRegistry.registerGlobalEntityID(
       EntityBulletBlast.class, "BlastBullets", EntityRegistry.findGlobalUniqueEntityId());
 }
Esempio n. 17
0
 //	public static int getUniqueEntityId()
 //	{
 //		do
 //	  	{
 //			startEntityId++;
 //	  	}
 //		while (EntityList.getStringFromID(startEntityId) != null);
 //
 //		return startEntityId;
 //	}
 public static void registerEntityEgg(
     Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
   int id = EntityRegistry.findGlobalUniqueEntityId();
   EntityList.IDtoClassMapping.put(id, entity);
   EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
 }
Esempio n. 18
0
 private static void registerEntity(
     Class<? extends Entity> entityClass, String entityName, Object mod) {
   int entityID = EntityRegistry.findGlobalUniqueEntityId();
   EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityID);
   EntityRegistry.registerModEntity(entityClass, entityName, entityID, mod, 64, 1, true);
 }
Esempio n. 19
0
  /** Registers the entities in this mod and adds mob spawns. */
  private void registerMobs() {
    DataWatcherHelper.init();

    int id = 0; // Mod-specific mob id

    // Initialize everything needed to make new spawn eggs
    boolean makeSpawnEggs = Properties.getBoolean(Properties.GENERAL, "spawn_eggs");
    Method eggIdClaimer = null;
    int eggId;
    if (makeSpawnEggs) {
      try {
        eggIdClaimer = EntityRegistry.class.getDeclaredMethod("validateAndClaimId", int.class);
        eggIdClaimer.setAccessible(true);
      } catch (Exception ex) {
        _SpecialMobs.console(
            "Error claiming spawn egg ID! Spawn eggs will probably be overwritten.");
        ex.printStackTrace();
      }
    }

    // Advanced Genetics compatibility
    Method advGeneticsAddAbility = null;
    String[][] advGeneticsAbilities = null;
    try {
      Class regHelper = Class.forName("com.advGenetics.API.RegistrationHelper");
      _SpecialMobs.console("Detected Advanced Genetics API, attempting to register mobs to it...");
      try {
        advGeneticsAddAbility =
            regHelper.getDeclaredMethod("addEntityToAbility", String.class, Class.class);
      } catch (Exception ex) {
        _SpecialMobs.console("Error finding Advanced Genetics registry!");
        ex.printStackTrace();
      }
      if (advGeneticsAddAbility != null) {
        advGeneticsAbilities =
            new String[][] {
              // Blaze
              {"fireballs"},
              // CaveSpider
              {"climb", "poison"},
              // Creeper
              {"selfexplode"},
              // Enderman
              {"deathenderchest", "teleport"},
              // Ghast
              {"fireballsexplode"},
              // LavaSlime
              // { "slimy", "lavaswim" },
              // PigZombie
              {"lavaswim"},
              // Silverfish
              {},
              // Skeleton
              {"infinity"},
              // Slime
              {"slimy"},
              // Spider
              {"climb"},
              // Witch
              {"potionthrower"},
              // Zombie
              {"resistance"}
            };
        for (String ability : advGeneticsAbilities[_SpecialMobs.monsterKey("Enderman")]) {
          try {
            advGeneticsAddAbility.invoke(null, ability, EntityEnderCreeper.class);
          } catch (Exception ex) {
            // Do nothing
          }
        }
      }
    } catch (Exception ex) {
      // Do nothing, Advanced Genetics not found
    }

    // Register main mobs
    String name;
    Class entityClass;
    for (int i = 0; i < _SpecialMobs.MONSTER_KEY.length; i++) {
      // Register vanilla replacement
      try {
        entityClass =
            Class.forName(
                "toast.specialMobs.entity."
                    + _SpecialMobs.MONSTER_KEY[i].toLowerCase()
                    + ".Entity_Special"
                    + _SpecialMobs.MONSTER_KEY[i]);
        EntityRegistry.registerModEntity(
            entityClass, "Special" + _SpecialMobs.MONSTER_KEY[i], id++, this, 80, 3, true);

        // Advanced Genetics compatibility
        if (advGeneticsAddAbility != null && advGeneticsAbilities != null) {
          for (String ability : advGeneticsAbilities[i]) {
            try {
              advGeneticsAddAbility.invoke(null, ability, entityClass);
            } catch (Exception ex) {
              // Do nothing
            }
          }
        }
      } catch (ClassNotFoundException ex) {
        _SpecialMobs.debugException("@" + _SpecialMobs.MONSTER_KEY[i] + ": class not found!");
      }

      // Register special variants
      for (int j = 0; j < _SpecialMobs.MONSTER_TYPES[i].length; j++) {
        name = _SpecialMobs.MONSTER_TYPES[i][j] + _SpecialMobs.MONSTER_KEY[i];
        try {
          entityClass =
              Class.forName(
                  "toast.specialMobs.entity."
                      + _SpecialMobs.MONSTER_KEY[i].toLowerCase()
                      + ".Entity"
                      + name);
          EntityRegistry.registerModEntity(entityClass, name, id++, this, 80, 3, true);

          // Add spawn egg by taking a global mob id
          if (makeSpawnEggs) {
            eggId = EntityRegistry.findGlobalUniqueEntityId();
            try {
              if (eggIdClaimer != null) {
                eggId =
                    ((Integer)
                            eggIdClaimer.invoke(EntityRegistry.instance(), Integer.valueOf(eggId)))
                        .intValue();
              }
            } catch (Exception ex) {
              // Do nothing
            }
            EntityList.IDtoClassMapping.put(Integer.valueOf(eggId), entityClass);
            EntityList.entityEggs.put(
                Integer.valueOf(eggId),
                new EntityEggInfo(
                    eggId,
                    _SpecialMobs.MONSTER_KEY_COLORS[i],
                    _SpecialMobs.MONSTER_TYPE_COLORS[i][j]));
          }

          // Advanced Genetics compatibility
          if (advGeneticsAddAbility != null && advGeneticsAbilities != null) {
            for (String ability : advGeneticsAbilities[i]) {
              try {
                advGeneticsAddAbility.invoke(null, ability, entityClass);
              } catch (Exception ex) {
                // Do nothing
              }
            }
          }
        } catch (ClassNotFoundException ex) {
          _SpecialMobs.debugException("@" + name + ": class not found!");
        }
      }
    }

    // Register other entities (like projectiles)
    EntityRegistry.registerModEntity(
        EntitySpecialFishHook.class, "SMFishHook", id++, this, 64, 5, true);
    EntityRegistry.registerModEntity(
        EntitySpecialSpitball.class, "SMSpitball", id++, this, 64, 5, true);

    // EntityRegistry.registerModEntity(EntitySpecialFireball.class, "SMFireball", id++, this, 64,
    // 10, true);

    DataWatcherHelper.verify();

    // Register extra mob spawns
    int spawnWeight;
    spawnWeight = Properties.getInt(Properties.SPAWNING, "end_ender_creeper");
    if (spawnWeight > 0) {
      EntityRegistry.addSpawn(
          EntityEnderCreeper.class, spawnWeight, 1, 1, EnumCreatureType.monster, BiomeGenBase.sky);
    }
    spawnWeight = Properties.getInt(Properties.SPAWNING, "nether_fire_creeper");
    if (spawnWeight > 0) {
      EntityRegistry.addSpawn(
          EntityFireCreeper.class, spawnWeight, 4, 4, EnumCreatureType.monster, BiomeGenBase.hell);
    }
    spawnWeight = Properties.getInt(Properties.SPAWNING, "overworld_ghast_mount");
    if (spawnWeight > 0) {
      EntityRegistry.addSpawn(
          EntityMiniGhast.class,
          spawnWeight,
          1,
          1,
          EnumCreatureType.monster,
          BiomeGenBase.ocean,
          BiomeGenBase.frozenOcean,
          BiomeGenBase.plains,
          BiomeGenBase.desert,
          BiomeGenBase.desertHills,
          BiomeGenBase.extremeHills,
          BiomeGenBase.extremeHillsEdge,
          BiomeGenBase.forest,
          BiomeGenBase.forestHills,
          BiomeGenBase.taiga,
          BiomeGenBase.taigaHills,
          BiomeGenBase.swampland,
          BiomeGenBase.river,
          BiomeGenBase.frozenRiver,
          BiomeGenBase.icePlains,
          BiomeGenBase.iceMountains,
          BiomeGenBase.beach,
          BiomeGenBase.jungle,
          BiomeGenBase.jungleHills);
    }
  }
  public static void initProperties(FMLPreInitializationEvent event) {
    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();

    AltarID = config.getBlock("Altar", 2621).getInt();
    AltarBlockID = config.getBlock("Altar Building Block", 2622).getInt();
    SewingID = config.getBlock("Sewing", 2623).getInt();
    BloodID = config.getBlock("Blood", 2625).getInt();
    ScentBurnerID = config.getBlock("Scent Burner", 2626).getInt();
    ScentID = config.getBlock("Scent", 2627).getInt();

    BucketBloodID = config.getItem("BloodStationary", 2621).getInt();
    ScytheID = config.getItem("Scythe", 2622).getInt();
    ScytheBoneID = config.getItem("Bone Scythe", 2629).getInt();
    GenericItemID = config.getItem("item", "main items", 2623).getInt();
    NecronomiconID = config.getItem("item", "necronomicon", 2624).getInt();
    OrgansID = config.getItem("item", "organs", 2625).getInt();
    BodyPartID = config.getItem("item", "bodyparts", 2626).getInt();
    SpawnerID = config.getItem("item", "spawner", 2628).getInt();

    SearchMinionID = config.get("Entity", "Search for free Minion ID", true).getBoolean(true);
    MinionID =
        SearchMinionID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Minion ID", 123).getInt();
    SearchTeddyID = config.get("Entity", "Search for free Teddy ID", true).getBoolean(true);
    TeddyID =
        SearchTeddyID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Teddy ID", 124).getInt();
    SearchIsaacID = config.get("Entity", "Search for free Isaac ID", true).getBoolean(true);
    IsaacID =
        SearchIsaacID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Isaac ID", 125).getInt();
    SearchIsaacBloodID =
        config.get("Entity", "Search for free Isaac Blood ID", true).getBoolean(true);
    IsaacBloodID =
        SearchIsaacBloodID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Isaac Blood ID", 126).getInt();
    SearchIsaacBodyID =
        config.get("Entity", "Search for free Isaac Body ID", true).getBoolean(true);
    IsaacBodyID =
        SearchIsaacBodyID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Isaac Body ID", 127).getInt();
    SearchIsaacHeadID =
        config.get("Entity", "Search for free Isaac Head ID", true).getBoolean(true);
    IsaacHeadID =
        SearchIsaacHeadID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Isaac Head ID", 128).getInt();
    SearchNecroVillagerID =
        config.get("Entity", "Search for free Necro Villager ID", true).getBoolean(true);
    NecroVillagerID =
        SearchNecroVillagerID
            ? EntityRegistry.findGlobalUniqueEntityId()
            : config.get("entity", "Necro Villager ID", 129).getInt();

    IsaacsHeadID = config.getItem("armor", "Isaac's Severed Head", 2627).getInt();

    Christmas = config.get("rendering", "christmas hats", false).getBoolean(false);

    RenderSpecialScythe =
        config
            .get("special scythes (only for a select number of people)", "Other", true)
            .getBoolean(false);
    InitDuringPreInit = config.get("Init items during pre init", "Other", false).getBoolean(false);
    NecroVillagerID = config.get("NecroVillagerID", "Other", 666).getInt();

    if (config.hasChanged()) {
      config.save();
    }
  }
  public static void init() {
    YGCCreativeTabs.tabMain =
        new CreativeTabs("yegamolchattels") {
          @Override
          public Item getTabIconItem() {
            return Item.getItemFromBlock(YGCBlocks.snowGlobe);
          }
        };

    YGCCreativeTabs.tabVitas =
        new CreativeTabs("ygc_entityvita") {
          @Override
          public Item getTabIconItem() {
            return YGCItems.entityVita;
          }
        };

    blockTreasurePileRenderType = RenderingRegistry.getNextAvailableRenderId();
    blockTikiTorchRenderType = RenderingRegistry.getNextAvailableRenderId();
    blockMicroBlockRenderType = RenderingRegistry.getNextAvailableRenderId();

    // --------------------------------Ghost--------------------------------

    YeGamolChattels.entityGhostGlobalID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        EntityGhost.class, "ygcGhost", YeGamolChattels.entityGhostGlobalID, 0x888888, 0x554444);
    EntityRegistry.registerModEntity(
        EntityGhost.class,
        "ygcGhost",
        YGCEntityList.ghostID,
        YeGamolChattels.instance,
        80,
        3,
        false);
    BiomeGenBase.mushroomIsland
        .getSpawnableList(EnumCreatureType.creature)
        .add(new BiomeGenBase.SpawnListEntry(EntityGhost.class, 1, 1, 4));

    // --------------------------------Tiki Torch--------------------------------

    tikiTorch =
        (new BlockTikiTorch())
            .setHardness(0.0F)
            .setLightLevel(0.9375F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("tikiTorch")
            .setBlockTextureName("tikiTorch")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(tikiTorch, ItemTikiTorch.class, "tikiTorch");

    // --------------------------------Banner--------------------------------

    EntityRegistry.registerModEntity(
        EntityBanner.class,
        "ygcBanner",
        YGCEntityList.bannerID,
        YeGamolChattels.instance,
        160,
        Integer.MAX_VALUE,
        false);

    bannerSmall =
        (new ItemBanner(0, "small"))
            .setUnlocalizedName("bannerSmall")
            .setTextureName(YeGamolChattels.textureBase + "banner_small")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    bannerLarge =
        (new ItemBanner(2, "large"))
            .setUnlocalizedName("bannerLarge")
            .setTextureName(YeGamolChattels.textureBase + "banner_large")
            .setCreativeTab(YGCCreativeTabs.tabMain);

    GameRegistry.registerItem(bannerSmall, "bannerSmall", YeGamolChattels.MODID);
    GameRegistry.registerItem(bannerLarge, "bannerLarge", YeGamolChattels.MODID);

    // --------------------------------Statue--------------------------------

    statue =
        (new BlockStatue())
            .setHardness(2.0F)
            .setStepSound(Block.soundTypeStone)
            .setBlockName("ygcStatue")
            .setBlockTextureName("statue")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(statue, ItemStatue.class, "statue", 0);

    GameRegistry.registerTileEntity(TileEntityStatue.class, "ygcStatue");

    entityVita =
        new ItemEntityVita()
            .setUnlocalizedName("ygcEntityVita")
            .setTextureName(YeGamolChattels.textureBase + "entity_vita")
            .setCreativeTab(YGCCreativeTabs.tabVitas);
    GameRegistry.registerItem(entityVita, "entity_vita", YeGamolChattels.MODID);

    EntityRegistry.registerModEntity(
        EntityFakePlayer.class,
        "fakePlayer",
        YGCEntityList.fakePlayerID,
        YeGamolChattels.instance,
        80,
        3,
        false);

    // --------------------------------Treasure piles--------------------------------

    treasurePile =
        new BlockTreasurePile()
            .setHardness(0.2F)
            .setStepSound(Block.soundTypeMetal)
            .setBlockName("treasurePile")
            .setBlockTextureName(YeGamolChattels.textureBase + "treasurePile")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(treasurePile, ItemBlock.class, "treasurePile");

    // --------------------------------Flags--------------------------------

    EntityRegistry.registerModEntity(
        EntityFlag.class,
        "ygcFlag",
        YGCEntityList.flagID,
        YeGamolChattels.instance,
        160,
        Integer.MAX_VALUE,
        false);

    flagSmall =
        (new ItemFlag(0, "small"))
            .setUnlocalizedName("flagSmall")
            .setTextureName(YeGamolChattels.textureBase + "flag_small")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    flagLarge =
        (new ItemFlag(2, "large"))
            .setUnlocalizedName("flagLarge")
            .setTextureName(YeGamolChattels.textureBase + "flag_large")
            .setCreativeTab(YGCCreativeTabs.tabMain);

    GameRegistry.registerItem(flagSmall, "flagSmall", YeGamolChattels.MODID);
    GameRegistry.registerItem(flagLarge, "flagLarge", YeGamolChattels.MODID);

    // --------------------------------Old Clock--------------------------------

    grandfatherClock =
        (new BlockGrandfatherClock(Material.wood))
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("grandfatherClock")
            .setBlockTextureName(YeGamolChattels.textureBase + "grandfatherClock")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(grandfatherClock, ItemGrandfatherClock.class, "grandfatherClock");

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntityGrandfatherClock.class, "ygcGrandfatherClock", "grandfatherClock");

    // --------------------------------Weapon Rack--------------------------------

    weaponRack =
        (new BlockWeaponRack(Material.wood))
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("weaponRack")
            .setBlockTextureName("weaponRack")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(weaponRack, ItemWeaponRack.class, "weaponRack");

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntityWeaponRack.class, "ygcWeaponRack", "weaponRack");

    // --------------------------------Grindstone--------------------------------

    grindstone =
        (new BlockGrindstone(Material.wood))
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("grindstone")
            .setBlockTextureName(YeGamolChattels.textureBase + "grindstoneBase")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(grindstone, ItemGrindstone.class, "grindstone");

    grindstoneStone =
        (new ItemGrindstoneStone())
            .setUnlocalizedName("grindstoneStone")
            .setTextureName(YeGamolChattels.textureBase + "grindstoneStone");
    GameRegistry.registerItem(grindstoneStone, "grindstoneStone", YeGamolChattels.MODID);

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntityGrindstone.class, "ygcGrindstone", "grindstone");

    // --------------------------------Gongs--------------------------------

    gong =
        (new BlockGong(Material.iron))
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeMetal)
            .setBlockName("gong");
    GameRegistry.registerBlock(gong, ItemGong.class, "gong");

    mallet =
        (new Item())
            .setUnlocalizedName("mallet")
            .setCreativeTab(YGCCreativeTabs.tabMain)
            .setMaxStackSize(1)
            .setTextureName(YeGamolChattels.textureBase + "mallet");
    GameRegistry.registerItem(mallet, "mallet", YeGamolChattels.MODID);

    GameRegistry.registerTileEntityWithAlternatives(TileEntityGong.class, "ygcGong", "gong");

    // --------------------------------Pedestal--------------------------------

    pedestal =
        (new BlockPedestal())
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("pedestal");
    GameRegistry.registerBlock(pedestal, ItemPedestal.class, "pedestal");

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntityPedestal.class, "ygcPedestal", "Pedestal");

    // --------------------------------Item Shelf--------------------------------

    itemShelf =
        new BlockItemShelf(Material.wood)
            .setHardness(1.5F)
            .setStepSound(Block.soundTypeWood)
            .setBlockName("ygcItemShelf")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(itemShelf, ItemItemShelf.class, "ygcItemShelf");

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntityItemShelfModel0.class, "ygcItemShelf", "Item Shelf");

    // --------------------------------Snow Globe--------------------------------

    snowGlobe =
        new BlockSnowGlobe().setBlockName("ygcSnowGlobe").setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(snowGlobe, ItemBlock.class, "ygcSnowGlobe");

    GameRegistry.registerTileEntityWithAlternatives(
        TileEntitySnowGlobe.class, "ygcSnowGlobe", "Snow Globe");

    // --------------------------------Carpentry--------------------------------

    plank =
        new ItemPlank()
            .setUnlocalizedName("plank")
            .setTextureName(YeGamolChattels.textureBase + "plank_")
            .setHasSubtypes(true)
            .setMaxDamage(0)
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerItem(plank, "plank", YeGamolChattels.MODID);
    OreDictionary.registerOre(DC_SINGLE_PLANK_WOOD, plank);

    smoothPlank =
        new ItemPlank()
            .setUnlocalizedName("smoothPlank")
            .setHasSubtypes(true)
            .setMaxDamage(0)
            .setTextureName(YeGamolChattels.textureBase + "plank_smooth_")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerItem(smoothPlank, "smooth_plank", YeGamolChattels.MODID);
    OreDictionary.registerOre(DC_SINGLE_PLANK_WOOD_SMOOTHED, smoothPlank);

    refinedPlank =
        new ItemPlank()
            .setUnlocalizedName("refinedPlank")
            .setHasSubtypes(true)
            .setMaxDamage(0)
            .setTextureName(YeGamolChattels.textureBase + "plank_refined_")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerItem(refinedPlank, "refined_plank", YeGamolChattels.MODID);
    OreDictionary.registerOre(DC_SINGLE_PLANK_WOOD_REFINED, refinedPlank);

    sawBench =
        new BlockSawBench()
            .setBlockName("ygcSawBench")
            .setBlockTextureName("planks_oak")
            .setHardness(1.5f)
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(sawBench, ItemSawBench.class, "plank_saw");
    GameRegistry.registerTileEntity(TileEntitySawBench.class, "ygcPlankSaw");

    tablePress =
        new BlockTablePress()
            .setBlockName("tablePress")
            .setBlockTextureName("planks_oak")
            .setHardness(1.5f)
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(tablePress, ItemTablePress.class, "table_press");
    GameRegistry.registerTileEntity(TileEntityTablePress.class, "ygcTablePress");

    sandpaper =
        new Item()
            .setUnlocalizedName("sandpaper")
            .setTextureName(YeGamolChattels.textureBase + "sandpaper")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    sandpaper.setMaxDamage(2048).setMaxStackSize(1).setNoRepair();
    GameRegistry.registerItem(sandpaper, "sandpaper", YeGamolChattels.MODID);

    linseedOil =
        new Item()
            .setUnlocalizedName("ygcLinseedOil")
            .setTextureName(YeGamolChattels.textureBase + "linseed_oil")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    linseedOil.setMaxDamage(2048).setMaxStackSize(1).setNoRepair();
    GameRegistry.registerItem(linseedOil, "linseed_oil", YeGamolChattels.MODID);

    ironSaw =
        new ItemSaw()
            .setUnlocalizedName("ygcSaw")
            .setTextureName(YeGamolChattels.textureBase + "saw_iron")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    ironSaw.setMaxDamage(128).setMaxStackSize(1);
    GameRegistry.registerItem(ironSaw, "iron_saw", YeGamolChattels.MODID);

    // --------------------------------Flax--------------------------------

    flaxPlant =
        new BlockFlaxPlant()
            .setBlockName("ygcFlaxPlant")
            .setBlockTextureName(YeGamolChattels.textureBase + "flax");
    GameRegistry.registerBlock(flaxPlant, ItemBlock.class, "flax_plant");
    OreDictionary.registerOre(DC_FLAX_CROP, flaxPlant);

    flaxSeeds =
        new ItemFlaxSeeds(flaxPlant, Blocks.farmland)
            .setUnlocalizedName("ygcFlaxSeeds")
            .setTextureName(YeGamolChattels.textureBase + "flax_seeds")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerItem(flaxSeeds, "flax_seeds", YeGamolChattels.MODID);
    OreDictionary.registerOre(DC_FLAX_SEEDS, flaxSeeds);

    flaxFiber =
        new Item()
            .setUnlocalizedName("ygcFlaxFiber")
            .setTextureName(YeGamolChattels.textureBase + "flax_fiber")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerItem(flaxFiber, "flax_fiber", YeGamolChattels.MODID);
    OreDictionary.registerOre(DC_FLAX_FIBER, flaxFiber);

    // --------------------------------Microblocks--------------------------------

    microBlock = new BlockMicroBlock().setBlockName("ygcMicroBlock").setHardness(1.0F);
    GameRegistry.registerBlock(microBlock, ItemMicroBlock.class, "micro_block");
    GameRegistry.registerTileEntity(TileEntityMicroBlock.class, "ygcMicroBlock");

    detailChiselIron =
        new ItemChisel(0, 1.0f, 0.0f, Item.ToolMaterial.IRON, Collections.emptySet(), true)
            .setUnlocalizedName("ygcChiselIron_point")
            .setTextureName(YeGamolChattels.textureBase + "chisel_iron_point")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    detailChiselIron.setMaxDamage(256).setMaxStackSize(1).setNoRepair();
    GameRegistry.registerItem(detailChiselIron, "iron_chisel_point", YeGamolChattels.MODID);

    carvingChiselIron =
        new ItemChisel(1, 0.9f, 0.0f, Item.ToolMaterial.IRON, Collections.emptySet(), false)
            .setUnlocalizedName("ygcChiselIron")
            .setTextureName(YeGamolChattels.textureBase + "chisel_iron")
            .setCreativeTab(YGCCreativeTabs.tabMain);
    carvingChiselIron.setMaxDamage(256).setMaxStackSize(1).setNoRepair();
    GameRegistry.registerItem(carvingChiselIron, "iron_chisel", YeGamolChattels.MODID);

    clubHammer =
        (ItemClubHammer)
            new ItemClubHammer(0.0f, Item.ToolMaterial.IRON, Collections.emptySet())
                .setUnlocalizedName("ygcClubHammer")
                .setTextureName(YeGamolChattels.textureBase + "club_hammer")
                .setCreativeTab(YGCCreativeTabs.tabMain);
    clubHammer.setMaxDamage(512).setMaxStackSize(1).setNoRepair();
    GameRegistry.registerItem(clubHammer, "club_hammer", YeGamolChattels.MODID);

    blockFragment = new ItemBlockFragment().setUnlocalizedName("ygcBlockFragment");
    GameRegistry.registerItem(blockFragment, "block_fragment", YeGamolChattels.MODID);

    // --------------------------------Loot Chest--------------------------------

    lootChest =
        new BlockLootChest()
            .setBlockName("ygcLootChest")
            .setHardness(1.5f)
            .setCreativeTab(YGCCreativeTabs.tabMain);
    GameRegistry.registerBlock(lootChest, ItemBlock.class, "loot_chest");
    GameRegistry.registerTileEntity(TileEntityLootChest.class, "ygcLootChest");
  }
  public static void mainRegistry() {

    int ChocolatePig = EntityRegistry.findGlobalUniqueEntityId();

    int CocoaCowID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(Entitycocoacow.class, "Cocoa Cow", CocoaCowID);
    EntityRegistry.registerModEntity(
        Entitycocoacow.class, "Cocoa Cow", CocoaCowID, MainRegistry.modInstance, 64, 1, true);
    EntityList.entityEggs.put(
        Integer.valueOf(CocoaCowID), new EntityList.EntityEggInfo(CocoaCowID, 0x4A2709, 10592673));
    registerEntity(Entitycocoacow.class, "Cocoa Cow");

    int DarkCocoaCowID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitydarkcocoacow.class, "Dark Cocoa Cow", DarkCocoaCowID);
    EntityRegistry.registerModEntity(
        Entitydarkcocoacow.class,
        "Dark Cocoa Cow",
        DarkCocoaCowID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(DarkCocoaCowID),
        new EntityList.EntityEggInfo(DarkCocoaCowID, 0x261505, 10592673));
    registerEntity(Entitydarkcocoacow.class, "Dark Cocoa Cow");

    int LightCocoaCowID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitylightcocoacow.class, "Light Cocoa Cow", LightCocoaCowID);
    EntityRegistry.registerModEntity(
        Entitylightcocoacow.class,
        "Light Cocoa Cow",
        LightCocoaCowID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(LightCocoaCowID),
        new EntityList.EntityEggInfo(LightCocoaCowID, 0x824611, 10592673));
    registerEntity(Entitylightcocoacow.class, "Light Cocoa Cow");

    int WhiteCocoaCowID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitywhitecocoacow.class, "White Cocoa Cow", WhiteCocoaCowID);
    EntityRegistry.registerModEntity(
        Entitywhitecocoacow.class,
        "White Cocoa Cow",
        WhiteCocoaCowID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(WhiteCocoaCowID),
        new EntityList.EntityEggInfo(WhiteCocoaCowID, 0xe7d558, 10592673));
    registerEntity(Entitywhitecocoacow.class, "White Cocoa Cow");

    int AlbinoMooshroomID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        EntityAlbinoMooshroom.class, "Albino Mooshroom", AlbinoMooshroomID);
    EntityRegistry.registerModEntity(
        EntityAlbinoMooshroom.class,
        "Albino Mooshroom",
        AlbinoMooshroomID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(AlbinoMooshroomID),
        new EntityList.EntityEggInfo(AlbinoMooshroomID, 0xD6D2D2, 0x4A2709));
    registerEntity(EntityAlbinoMooshroom.class, "Albino Mooshroom");

    int ChocolateChickenID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitychocolatechicken.class, "Chocolate Chicken", ChocolateChickenID);
    EntityRegistry.registerModEntity(
        Entitychocolatechicken.class,
        "Chocolate Chicken",
        ChocolateChickenID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(ChocolateChickenID),
        new EntityList.EntityEggInfo(ChocolateChickenID, 0x4A2709, 0x824611));
    createEntity(Entitychocolatechicken.class, "Chocolate Chicken");

    int ChocolateGlobID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitychocolateglob.class, "Chocolate Glob", ChocolateGlobID);
    EntityRegistry.registerModEntity(
        Entitychocolateglob.class,
        "Chocolate Glob",
        ChocolateGlobID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(ChocolateGlobID),
        new EntityList.EntityEggInfo(ChocolateGlobID, 0x4A2709, 0x824611));
    registerEntity(Entitychocolateglob.class, "Chocolate Glob");

    int DarkChocolateGlobID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitydarkchocolateglob.class, "Dark Chocolate Glob", DarkChocolateGlobID);
    EntityRegistry.registerModEntity(
        Entitydarkchocolateglob.class,
        "Dark Chocolate Glob",
        DarkChocolateGlobID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(DarkChocolateGlobID),
        new EntityList.EntityEggInfo(DarkChocolateGlobID, 0x261505, 0x824611));
    registerEntity(Entitydarkchocolateglob.class, "Dark Chocolate Glob");

    int LightChocolateGlobID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitylightchocolateglob.class, "Light Chocolate Glob", LightChocolateGlobID);
    EntityRegistry.registerModEntity(
        Entitylightchocolateglob.class,
        "Light Chocolate Glob",
        LightChocolateGlobID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(LightChocolateGlobID),
        new EntityList.EntityEggInfo(LightChocolateGlobID, 0x824611, 0x824611));
    registerEntity(Entitylightchocolateglob.class, "Light Chocolate Glob");

    int WhiteChocolateGlobID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitywhitechocolateglob.class, "White Chocolate Glob", WhiteChocolateGlobID);
    EntityRegistry.registerModEntity(
        Entitywhitechocolateglob.class,
        "White Chocolate Glob",
        WhiteChocolateGlobID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(WhiteChocolateGlobID),
        new EntityList.EntityEggInfo(WhiteChocolateGlobID, 0xe7d558, 0x824611));
    registerEntity(Entitywhitechocolateglob.class, "White Chocolate Glob");

    int ChocolateNinjaID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitychocolateninja.class, "Chocolate Ninja", ChocolateNinjaID);
    EntityRegistry.registerModEntity(
        Entitychocolateninja.class,
        "Chocolate Ninja",
        ChocolateNinjaID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(ChocolateNinjaID),
        new EntityList.EntityEggInfo(ChocolateNinjaID, 0x4A2709, 0x824611));
    registerEntity(Entitychocolateninja.class, "Chocolate Ninja");

    int ChocolateBarPigID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitychocolatepig.class, "ChocolateBar Pig", ChocolateBarPigID);
    EntityRegistry.registerModEntity(
        Entitychocolatepig.class,
        "ChocolateBar Pig",
        ChocolateBarPigID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(ChocolateBarPigID),
        new EntityList.EntityEggInfo(ChocolateBarPigID, 0x4A2709, 0x824611));
    registerEntity(Entitychocolatepig.class, "ChocolateBar Pig");

    int DarkChocolateBarPigID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitydarkchocolatepig.class, "Dark ChocolateBar Pig", DarkChocolateBarPigID);
    EntityRegistry.registerModEntity(
        Entitydarkchocolatepig.class,
        "Dark ChocolateBar Pig",
        DarkChocolateBarPigID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(DarkChocolateBarPigID),
        new EntityList.EntityEggInfo(DarkChocolateBarPigID, 0x261505, 0x824611));
    registerEntity(Entitydarkchocolatepig.class, "Dark ChocolateBar Pig");

    int LightChocolateBarPigID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitylightchocolatepig.class, "Light ChocolateBar Pig", LightChocolateBarPigID);
    EntityRegistry.registerModEntity(
        Entitylightchocolatepig.class,
        "LightChocolateBar Pig",
        LightChocolateBarPigID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(LightChocolateBarPigID),
        new EntityList.EntityEggInfo(LightChocolateBarPigID, 0x824611, 0x824611));
    registerEntity(Entitylightchocolatepig.class, "Light ChocolateBar Pig");

    int WhiteChocolateBarPigID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(
        Entitywhitechocolatepig.class, "White ChocolateBar Pig", WhiteChocolateBarPigID);
    EntityRegistry.registerModEntity(
        Entitywhitechocolatepig.class,
        "White ChocolateBar Pig",
        WhiteChocolateBarPigID,
        MainRegistry.modInstance,
        64,
        1,
        true);
    EntityList.entityEggs.put(
        Integer.valueOf(WhiteChocolateBarPigID),
        new EntityList.EntityEggInfo(WhiteChocolateBarPigID, 0xe7d558, 0x824611));
    registerEntity(Entitywhitechocolatepig.class, "White ChocolateBar Pig");

    EntityRegistry.registerModEntity(
        entitychocolatearrow.class, "ChocolateArrow", 1, Strings.MODID, 128, 1, true);
  }