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.

Manchou

Members
  • Joined

  • Last visited

  1. I'm confused too. One thing is sure, textures in Vanilla are in separate files. And another thing is sure, like any new code, MCP put generic names on variables and method on all code about the texturing, making it quite difficult to understand. If someone get how to add an item (with texture), it would be kind to share it. Everything else compile now. Though I can't test it.
  2. Thank you. That was what I need and more! Dunno what's the tracking registration. I don't find how to have the method called, and as said above, I have another, better solution. I know I shouldn't use ModLoader anymore and that's what I mostly do. But what's the method in Forge API to get a unique entity id?
  3. You mean that? EntityRegistry.registerGlobalEntityID(EntityDarwinCreature.class, "Creature", ModLoader.getUniqueEntityId(), 0x880000, 0x00FF00);
  4. I send my variable "genome" on each onUpdate() call. And well, it works. But it's a useless flood of packets. Why the methods of IEntityAdditionalSpawnData are not called? Did I do something wrong? Is it a bug?
  5. I wanted to share custom data with the client for my mobs. I first tried to send a custom packet but then I found this : http://www.minecraftforge.net/forum/index.php/topic,1410.msg12341.html#msg12341 So I made my Entity implement IEntityAdditionalSpawnData : /** * @author Manchou * */ public class EntityDarwinCreature extends EntityAnimal implements IEntityAdditionalSpawnData { private long genome; /** * @param par1World */ public EntityDarwinCreature(World world) { super(world); this.texture = "/net/darwin/darwinCreature.png"; genome = 0; } // specific code @Override public void writeSpawnData(ByteArrayDataOutput data) { data.writeLong(genome); System.out.println("writeSpawnData "+genome); } @Override public void readSpawnData(ByteArrayDataInput data) { genome = data.readLong(); System.out.println("readSpawnData "+genome); } public void setGenome(long genome) { this.genome = genome; } } And well, the methods write/readSpawnData() are never called. I tried to make them spawn with an monsterPlacer and with a spawn rule: EntityRegistry.addSpawn(EntityDarwinCreature.class, 20, 10, 10, EnumCreatureType.creature, new BiomeGenBase[]{desert, beach, iceMountains, icePlains, taiga, taigaHills, desertHills, forest, forestHills, plains, extremeHills, extremeHillsEdge, jungle, jungleHills}); The mob spawns but the data is not shared.

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.