Skip 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Let me see your code.
  2. That's twenty levels I think. Try player.experience
  3. I have looked around for this and all I've found so far is a tutorial for 1.5 and "use EffectFX" which isn't helpful. Following the tutorial left me with nothing happening and I suspect there's some registration call that's needed, but I can't find it.
  4. TBH my class is basically a copy/paste of the Iron golem. I haven't dug in deeply enough to do a wholly custom mob like you are. I know it works, though.
  5. Voila, now all that needs to be fixed is the rendering registry. Lets see... I think you're rendering class is messed up. Take a look at mine: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/RenderClayGolem.java
  6. Remove this: protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getAttributeMap().func_111150_b(SharedMonsterAttributes.maxHealth); } You're telling the attribute map to register max health, which is already registered.
  7. EntityRegistry.registerGlobalEntityID(EntitySkeith.class, "Skeith", EntityRegistry.findGlobalUniqueEntityId(), 0xeaeae9, 0xc99a03); Remove that. Add this to your MAIN MOD class: EntityRegistry.registerModEntity(EntitySkeith.class, "Skeith", 0, this, 350, 5, false); EntityList.addMapping(EntitySkeith.class, "Skeith", 3, 0xeaeae9, 0xc99a03); You can hardly expect your entity to work properly if the server has no idea WTF it is.
  8. Need a few more pieces to help you out. Your main mod file (where you set up your egg and register your entity) and your client proxy (where you register the renderer)
  9. Yep. Just build it one piece at a time, printing out data as you go until you're ready to start using it.
  10. No no. All you need to do is send one integer. That integer says "I will be performing this set of actions" (see: my packet handler, the integer being discussed is the one that goes into the switch statement). In your case, that's all you need: an integer expressing which button was pressed. If you had additional information that needed to be passed, you'd also have to write and read those values (for example, my code handles a lot of potion effects, so I need the potion ID, power, and duration). And actually, you do have additional information to send: The location of the tile entity. This will require 4 more integers: dimension, X, Y, and Z. You can then use DimensionManager.getDimension(dimID).getBlockTileEntity(X, Y, Z) in order to get a reference to the TE and tell it to do something. (For sending, you can get the dim ID by world.provider.dimensionID)
  11. ItemStacks are saved to NBT data, which is convertable to packet data. The cool thing about TileEntities is that this is all handled automagically. You just need to override two functions thusly: public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); } Provided that your readFromNBT/writeToNBT functions are likewise up to date, this will work. Here's the thing though: this is server to client only. You need to implement a network handler and send a Packet250CustomData (sp?) when the user clicks the GUI button and have the server generate the item that goes in that slot.
  12. This will very likely not work with a dedicated server (... but feel free to test it out and report your findings). It won't You need to synch your TEs. public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); }
  13. Probably check to see that you have OpenGL drivers. I don't really know.
  14. Basically none. There are, however, existing permission system mods out there, although I think they're all Bukkit plugins.
  15. OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. You have far more problems than modding.
  16. Your zip file was probably not constructed properly. It should be [zip]/afg/flash/FlashMain.class
  17. public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) It's called any time the block receives an update.
  18. Vague post is vague. It would appear that you do not know how to program anything, let alone pull this off by yourself. I do not know what you mean by "edit a little."
  19. That DOES help. Here's your problem: int uraniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UraniumArmor_"); int copperRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/CopperArmor_"); int unobtaniumRenderID = SeroCraft.proxy.registerArmorRenderID("serocraft/UnobtaniumArmor_"); Compare and contrast to "serocraft:textures/armor/UnobtaniumArmor_1.png";
  20. http://docs.oracle.com/javase/tutorial/reflect/
  21. Its because of the magic of Java and Strings. http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java
  22. You need to stop using metadata entirely. It "breaks" when you use a metadata above 15 because metadata is a byte, so vales greater than 11112 will be truncated.
  23. No, it's not. You're not saying this.getIcon(par1,par2) , you're saying Block.planks.getIcon(par1,par2) So unless your block IS Block.planks (highly unlikely as it is final) then it won't loop forever.

Important Information

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

Account

Navigation

Search

Search

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.