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. And now you know why I use lower case for everything asset related and tell new modders to always use all lower case for their assets, double and triple check.
  2. Enderman teleport I think is 64 or 128, but it's spread across a fairly wide area. 100k is orders of magnitude larger.
  3. 1) Don't use string compare. Use integers, they're faster. 2) Don't use a single packet handler. Split it up into a server and a client half, this keeps your code clean. 3) Here's why it's slow: for (int i=0; i<100000; i++) {
  4. (Slight difference in the kind of entity, but I had a similar section of code already open)
  5. At this point I don't know.
  6. No, where you Register your Renderers. With the RenderingRegistry. And you're going to need a common and client proxy at some point, or your mod won't work on servers.
  7. Sounds like you have an entity, but don't have a renderer.
  8. You're not even listening to me, are you? The code I posted is from VANILLA'S ItemHangingEntity class. I included it so you could see what the problem was. You were not supposed to ADD IT to your code. The only way to "fix" your problem is probably to duplicate the ItemHangingEntity class (and in all likelyhood, several other classes) and modify them to suit your needs.
  9. Either: In the registerIcons function use: this.blockIcon = Block.dirt.getIcon(0,0); //for dirt Or: In the constructor use the unlocalized block name: this.setTextureName("minecraft_dirt"); //I'm probably not right on the string, you'll have to look it up
  10. It's the class passed to ItemHangingEntity's constructor. Mojang didn't use reflection to just create a new instance of the class, which is kind of unfortunate.
  11. 1) Get the tile entity at the location (hint: EntityPlayer#getLookVec()) 2) Create a new, blank, NBT tag 3) TileEntity#writeToNBT()
  12. Also see EntityPlayer#getLookVec() and World#raycast_do_do()
  13. Mob behavior should probably be the latter, not the former. I was able to, however, implement some version of composition on top of the Item system. My last count (which was an estimation anyway) was 67 million combinations allowable.
  14. I know what the problem is. ItemHangingEntity doesn't take arbitrary classes. It looks like it does, but it doesn't: /** * Create the hanging entity associated to this item. */ private EntityHanging createHangingEntity(World par1World, int par2, int par3, int par4, int par5) { return (EntityHanging)(this.hangingEntityClass == EntityPainting.class ? new EntityPainting(par1World, par2, par3, par4, par5) : (this.hangingEntityClass == EntityItemFrame.class ? new EntityItemFrame(par1World, par2, par3, par4, par5) : null)); }
  15. Why are you using Timer? There's a perfectly good TickHandler.
  16. Have you considered this?
  17. Yeah, you have to copy the render stuff too. Like I said, failing of the Object Inheritance Model. You might be interested in this topic.
  18. The problem is that "center" isn't a property of a model. It's an idea.
  19. Diesieben07 has some advice for you. I can't tell where the problem is, even though I know what the problem is. Because forums are bad at autoformatting.
  20. Duplicate the zombie. Name it something else. Done. You have encountered the failing of the Object Inheritance Pattern.
  21. I am not sure you unterstood him right. Whoops, my mistake. I connected the title with the mod of the same name and wasn't able to see past it.
  22. Ah, clearly you didn't follow instructions. Run recompile.bat then reobfuscate_srg.bat, then package up the result. Seriously? Have you never used a BBCode forum before? !
  23. Same as it was all the way from 1.5 until 1.7? (The only change from 1.5 to 1.6 was the folder name: mods -> assets)
  24. You will almost certainly need packets. I know there are GUI elements that do text-entry, but I haven't used them.

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.