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. UUID = Universally Unique Identifier You're not supposed to be able to change it.
  2. Player dies -> Items automagically dropped.
  3. What do you mean by "save an integer"?
  4. ItemStack itemStack = slots[i]; slots[i].stackSize = 0; Mmm...pointers.... (Tip: ItemStack is passed by reference, not by value. When you set the stack size there, you're returning a stack of size zero: itemStack === slot[i] ).
  5. Entirely possible I figure that the dragon is handled similarly to other mobs that duplicating it would follow similar logic, but I guess not.
  6. Do you also have EntityRegistry.registerModEntity(...) somewhere?
  7. RenderingRegistry.registerEntityRenderingHandler(Class<? extends Entity> entityClass, Render renderer)
  8. Might want to take a peek at my project: https://github.com/Draco18s/Artifacts/tree/master/draco18s/artifacts/item https://github.com/Draco18s/Artifacts/tree/master/draco18s/artifacts/components It'll take a little parsing to find the exact parts you're looking for, but ComponentDamage handles increasing the player's attack value the same way vanilla swords do.
  9. JDGUI by itself is usually sufficient. Most mods don't obfuscate themselves, so you're left with only the Minecraft obfuscated parameters, but most you can figure out just by the context, the rest you can lookup using MCP I actually peeked inside Twilight Forest at the Anti-Builder to see if it had done anything special/clever to minimize get, save, check, and reset blocks (as I needed similar functionality). It was just a standard 3 dimensional for loop. I've also poked my nose into Mystcraft on occasion (notably when trying to figure out how to use XCompWiz's API, I'll get confused over the usage of one parameter, so I pull up base and take a look at how he was using it).
  10. !!! Do not create a new renderer, one is passed to you for all special renderers. Creating a new one will likely give you an "already tesselating" error.
  11. You mean like renderer.renderBlockUsingTexture(Block.stone, x, y, z, textureIcon);
  12. Yup, that too.
  13. "/textures Make that "textures A / is automatically inserted for you between your mod ID and your texture path: Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png That : is converted to a / when it attempts to load files.
  14. "Preloading" textures hasn't been necessary since 1.5.0 with the new texture system. Vanilla handles that for you.
  15. Here's what I used: List l = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getAABBPool().getAABB(xCoord-3, yCoord-3, zCoord-3, xCoord+3, yCoord+3, zCoord+3)); And it worked.
  16. Except that if I attempt to register a texture using setTextureName("MyMod:someImage.png") and use the same casing when I build my folder structure it will fail. If I recall correctly, it works in Eclipse, but does not work when compiled and zipped. I don't have a convenient setup at the moment to produce a test case, but I've had the problem and when I tell people to always use lower case, it works.
  17. Yes. ItemStack has a writeToNBT function. Just pass in a new NBTTagCompound and you'll get the "stored" version back out. Then just add that tag to another tag. All container objects do this to save their contents.
  18. Do you or do you not know what "a static reference" and a "a non-static field" are?
  19. You need to approach your problem from a different direction. onUpdate is called once every 1/20th of a second. If you need to wait 1 second you need to.... Let onUpdate get called 20 times.
  20. X, Y, Z, BlockID, Delay (in ticks)
  21. You haven't done any of the things suggested to you, your block class is still basically empty. You haven't set its name, texture, hardness, resistance, or anything.
  22. ...You are correct. It's iron golems that are in hostile. (And this emphasizes why the package differentiation is almost meaningless). I unfortunately don't have a solution for you. All my mob coding has been taking something that's close to what I want and modifying it.
  23. (You don't need to override registerIcons, but it will work using the same details as my post) this.setTextureName("MODID" + ":" + "BLOCKNAME") Where MODID is whatever you want to name your assets folder and BLOCKNAME is whatever you want to name the texture file. These must be lower case (if they're not, they will be converted). Now go to /src/minecraft/assets and create a new folder there called MODID, inside that a folder called textures inside that a folder called blocks inside that add your texture file named BLOCKNAME.png Voila. http://www.minecraftforge.net/wiki/Icons_and_Textures
  24. Look at what you do have access to and figure out if any of those objects have access to what you need, or can get it.
  25. I think zombies use EntityMob, but yes. EntityAnimal doesn't have the attack function. Which is why wolves are in the hostile mobs package.

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.