Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GerbShert

Members
  • Joined

  • Last visited

Everything posted by GerbShert

  1. GerbShert posted a topic in Mods
    Project News: Thanks for over 2k downloads! Version 2.7 is now available. Everybody's favorite void bucket mod from 1.7.10 and 1.8.9 has now been brought to 1.9.4+ . Apart from the name change, there have been many additions. New chalices, cauldrons, and increased customization. The Oceans Are Yours to Shape. Issues || SRC || Twitter || Mod Info || Downloads Recipes: Mod Pack Usage: Please Do! If you want, send me a link to check it out. * * "Mod Installers" are not allowed. Mirroring the mod is not allowed. ** PS: I would prefer if you created the mod pack with Curse, thanks. Just want the void chalice? I will be re-releasing an updated stand alone soon.
  2. I was calling it like this public void preInit(FMLPreInitializationEvent event) { //Register Entities RegisterEntitys.RegisterFishyEntitys(); //Register Blocks RegisterBlocks.RegisterBlocks(); //Register Items RegisterItems.RegisterItems(); //Register Recipes FishyRecipes.RegisterFishyRecipes(); //Register Entity Spawns RegisterEntitySpawns.registerEntitySpawns(); } I will try to move it to post init.
  3. I am not trying to be rude but in the first post I said that "EntityRegistry.addSpawn(entity.class, spawnRate, min, max, creatureType, biome);" was exactly what I was using and it is not working. When I was using the global unique ID I was registering it to my entity (and diesieben07 said I should not do that so I registered them with my own IDs.) The spawn eggs and Summon command were(and are) not a problem. They work fine. My mob is not spawning naturally in the world. Here is ALL my current code I am using for entitys Registering Entitys : public class RegisterEntitys { public static void RegisterFishyEntitys() { GerbsEntityRegistrar.registerEntity(EntityCod.class, "entityCod", 8774806, 11784191,0); GerbsEntityRegistrar.registerEntity(EntitySalmon.class, "entitySalmon", 11295305, 16766904,1); GerbsEntityRegistrar.registerEntity(EntityPuffer.class, "entityPuffer", 16764928, 3839999,2); GerbsEntityRegistrar.registerEntity(EntityClown.class, "entityClown", 16740096, 16777215,3); } } public class GerbsEntityRegistrar { public static void registerEntity(Class entityClass, String name, Integer colorOne, Integer colorTwo, Integer gerbsEntityID) { int entityID = 354 + gerbsEntityID; int primaryColor = colorOne; int secondaryColor = colorTwo; EntityRegistry.registerModEntity(entityClass, name, entityID, FishyPlus.instance, 64, 1, true); EntityList.addMapping(entityClass, name, entityID, primaryColor, secondaryColor); System.out.println("Registering GerbShert's Fish entity " + name + " with ID of " + entityID); } } Making entities spawn in world public class RegisterEntitySpawns { static BiomeGenBase[] WaterBiomes = {BiomeGenBase.beach, BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.swampland, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver}; public static void registerEntitySpawns() { System.out.println("Registering natural fish spawns"); EntityRegistry.addSpawn(EntityCod.class, 50, 1,7, EnumCreatureType.WATER_CREATURE, BiomeGenBase.deepOcean); EntityRegistry.addSpawn(EntityClown.class, 20, 2, 5, EnumCreatureType.WATER_CREATURE, WaterBiomes); EntityRegistry.addSpawn(EntitySalmon.class, 20, 2, 7, EnumCreatureType.WATER_CREATURE, WaterBiomes); } }
  4. I looked at EntityList and figured out how to make spawn eggs. Replaced EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); with EntityList.addMapping(entityClass, name, entityID, primaryColor, secondaryColor); And now the spawn eggs work again and the /summon command works but now I still have my original problem... They can not be found naturally spawned in-world.
  5. New Entity Registration public class RegisterEntitys { public static void RegisterFishyEntitys() { GerbsEntityRegistrar.registerEntity(EntityCod.class, "entityCod", 8774806, 11784191,0); GerbsEntityRegistrar.registerEntity(EntitySalmon.class, "entitySalmon", 11295305, 16766904,1); GerbsEntityRegistrar.registerEntity(EntityPuffer.class, "entityPuffer", 16764928, 3839999,2); GerbsEntityRegistrar.registerEntity(EntityClown.class, "entityClown", 16740096, 16777215,3); } } public class GerbsEntityRegistrar { static int startEntityId = 354; public static void registerEntity(Class entityClass, String name, Integer colorOne, Integer colorTwo, Integer gerbsEntityID) { int entityID = 354 + gerbsEntityID; long seed = name.hashCode();; int primaryColor = colorOne; int secondaryColor = colorTwo; EntityRegistry.registerModEntity(entityClass, name, entityID, FishyPlus.instance, 64, 1, true); EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); } } Spawn eggs are in-game but when used they don't spawn and console says [16:41:29] [server thread/WARN]: Skipping Entity with id 358 [16:41:31] [server thread/WARN]: Skipping Entity with id 358 [16:41:31] [server thread/WARN]: Skipping Entity with id 358 [16:41:31] [server thread/WARN]: Skipping Entity with id 358 [16:41:31] [server thread/WARN]: Skipping Entity with id 358 They can be spawned with the summon command just fine.
  6. If I am setting the entity's ids myself how do i figure out which ones are already taken?
  7. I am new to this and followed a tutorial for registering the entities. So I do not know how to register them without using the global id. How would you do it?
  8. Registering Entitys public class RegisterEntitys { public static void RegisterFishyEntitys() { GerbsEntityRegistrar.registerEntity(EntityCod.class, "entityCod", 8774806, 11784191); GerbsEntityRegistrar.registerEntity(EntitySalmon.class, "entitySalmon", 11295305, 16766904); GerbsEntityRegistrar.registerEntity(EntityPuffer.class, "entityPuffer", 16764928, 3839999); GerbsEntityRegistrar.registerEntity(EntityClown.class, "entityClown", 16740096, 16777215); } } public class GerbsEntityRegistrar { public static void registerEntity(Class entityClass, String name, Integer colorOne, Integer colorTwo) { int entityID = EntityRegistry.findGlobalUniqueEntityId(); long seed = name.hashCode(); Random rand = new Random(seed); int primaryColor = colorOne; int secondaryColor = colorTwo; EntityRegistry.registerGlobalEntityID(entityClass, name, entityID); EntityRegistry.registerModEntity(entityClass, name, entityID, FishyPlus.instance, 64, 1, true); EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); } }
  9. Hello, I am trying to get a custom entity to spawn in the world. I can get it to spawn with it's spawn egg and with the /summon command but it does not spawn naturally. This is the current code I am using to try to spawn my creatures. public class RegisterEntitySpawns { static BiomeGenBase[] WaterBiomes = {BiomeGenBase.beach, BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.swampland, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver}; public static void registerEntitySpawns() { System.out.println("Registering natural fish spawns"); EntityRegistry.addSpawn(EntityCod.class, 10, 1,7, EnumCreatureType.WATER_CREATURE, BiomeGenBase.deepOcean); EntityRegistry.addSpawn(EntityClown.class, 20, 2, 5, EnumCreatureType.WATER_CREATURE, WaterBiomes); EntityRegistry.addSpawn(EntitySalmon.class, 20, 2, 7, EnumCreatureType.WATER_CREATURE, WaterBiomes); } } My mods full code can be seen on GitHub if that will help at all.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.