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. Is TMBlocks.essentiaContainer non-null?
  2. A friend of mine runs a server with over 230 mods.
  3. There are in fact, two functions. onBlockAddedToWorld and onBlockPlacedBy If I am remembering the full names correctly. The first one will fire any time any block "becomes" your block (pushed by a piston, placed by endermen, added in worldgen, etc) the other is only when the player directly places it from their inventory (and which player is passed).
  4. And which func would that be?
  5. Looks like you didn't run either gradel setupDevWorkspace (sp?) or gradel eclipse
  6. You should set defaults in your config, yes. Forge handles a lot of that for you with its Configuration class, as it requires a default value, but you don't have to worry about file IO yourself.
  7. http://ichun.us/mods/morph/ IIRC, it's open source. What you're trying to do, btw, is non-trivial.
  8. http://mcpold.ocean-labs.de/index.php/MCPBot
  9. Dude, that's not the problem. net.minecraftforge.client.model.ModelFormatException: IO Exception reading model format
  10. My entire post on it WAS a tutorial. It's that freaking simple. Or see below. Yes, that's right. And yes, you do.
  11. itemEnt.rotationYaw = 0; That value is randomized when item entities are instanciated.
  12. Did you set up your @NetworkMod annotation?
  13. I think your packet channel is too long. I think its limited to 16 characters.
  14. Client/server disparity probably.
  15. That was the rotation of the block itself. It's based on metadata. Also, you will need to set the entity's age to 0 every frame or it will self-rotate like any other dropped item.
  16. Here's how I do mine: TileEntitySpecialRenderer render = new PedestalRenderer(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayPedestal.class, render); MinecraftForgeClient.registerItemRenderer(BlockPedestal.instance.blockID, new ItemRenderPedestal(render, new TileEntityDisplayPedestal())); public class ItemRenderPedestal implements IItemRenderer { TileEntitySpecialRenderer render; private TileEntity dummytile; public ItemRenderPedestal(TileEntitySpecialRenderer render, TileEntity dummy) { this.render = render; this.dummytile = dummy; } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == IItemRenderer.ItemRenderType.ENTITY) GL11.glTranslatef(-0.5F, 0.0F, -0.5F); this.render.renderTileEntityAt(this.dummytile, 0.0D, 0.0D, 0.0D, 0.0F); } } }
  17. Make an EntityItem of the item you want to display and then render it. I put this in my model class, because of rendering order, but you can put it in the render class as well. if(es.itemEnt != null) { GL11.glPushMatrix(); double angle = Math.toRadians(es.rotation); float sin = (float)(Math.sin(angle)); float cos = (float)(Math.cos(angle)); sin = Math.round(sin*100)/100; cos = Math.round(cos*100)/100; GL11.glTranslatef((float)x + 0.5F + (float)(sin*0.25), (float)y + 0.76F, (float)z + 0.5F - (float)(cos*0.25)); GL11.glRotatef(-1*es.rotation, 0, 1, 0); GL11.glRotatef(90, 1, 0, 0); RenderManager.instance.renderEntityWithPosYaw(es.itemEnt, 0, 0, 0, 0, 0); GL11.glPopMatrix(); } The rotation math was because the (2D) item was laying flat on the top of the TE.
  18. Easier to maintain. You don't need to recompile to make changes.
  19. http://www.minecraftforge.net/wiki/Packet_Handling http://www.minecraftforge.net/wiki/Advanced_Packet_Handling
  20. But you don't need a LanguageRegistry at all ;_;
  21. /assets are not moved into /reobf, you have to do that yourself.
  22. Yes. I'm doing it with a 1.6.2 mod. It's standard BBCode. [i ], [b ], etc. Only without a space. There's also a toolbar if you do a full reply instead of a quick reply.
  23. Personally I do registration right in my mod's main class file. Keep the static references there too (though I experimented with each block/item holding its own reference, as I'd seen someone else do, but I decided that there was no advantage to that). Did make my main class extremely large, but as things are broken out into sections (config, instanciation, registration, recipes) it's not difficult to navigate. As for the LanguageRegistry, don't use it. It's much much better to use language files. You just create a text file called en_US.lang inside your /assets/lang directory. Then add translations like so: this.to.translate=translate this Bam. Done.

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.