Everything posted by Draco18s
-
[1.6.4]Rendering Liquid in a Tile Entity
Is TMBlocks.essentiaContainer non-null?
-
Weird random lag for 15 minutes+ each time
A friend of mine runs a server with over 230 mods.
-
BlockPlacedEvent
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).
-
Bug With Example Mod.
And which func would that be?
-
[1.7.2 -- SOLVED] ClassNotFoundException and some other errors
Looks like you didn't run either gradel setupDevWorkspace (sp?) or gradel eclipse
-
Suggestions for Efficient Mod Making Please?
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.
-
[1.6.4] Sword of Shape Shifting
Yup.
-
[1.6.4] Sword of Shape Shifting
http://ichun.us/mods/morph/ IIRC, it's open source. What you're trying to do, btw, is non-trivial.
-
Adding new deobfuscation info
http://mcpold.ocean-labs.de/index.php/MCPBot
-
[1.7.2] .OBJ loading problem
Dude, that's not the problem. net.minecraftforge.client.model.ModelFormatException: IO Exception reading model format
-
Suggestions for Efficient Mod Making Please?
My entire post on it WAS a tutorial. It's that freaking simple. Or see below. Yes, that's right. And yes, you do.
-
[1.6.4] Rendering items in a tileEntity (in world)
itemEnt.rotationYaw = 0; That value is randomized when item entities are instanciated.
-
Sending Packets?!
Did you set up your @NetworkMod annotation?
-
Sending Packets?!
I think your packet channel is too long. I think its limited to 16 characters.
-
[1.7.2] Reading Tile Entity in GUI
Client/server disparity probably.
-
[1.6.4] Rendering items in a tileEntity (in world)
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.
-
[1.6.4]Rendering TileEntities in Inventory
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); } } }
-
[1.6.4] Rendering items in a tileEntity (in world)
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.
-
Suggestions for Efficient Mod Making Please?
Easier to maintain. You don't need to recompile to make changes.
-
[Not Solved]Nbt integer values sometimes returning 0 ?
http://www.minecraftforge.net/wiki/Packet_Handling http://www.minecraftforge.net/wiki/Advanced_Packet_Handling
-
Suggestions for Efficient Mod Making Please?
But you don't need a LanguageRegistry at all ;_;
-
Textures Disappear When Reobfuscating
/assets are not moved into /reobf, you have to do that yourself.
-
Suggestions for Efficient Mod Making Please?
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.
-
[Not Solved]Nbt integer values sometimes returning 0 ?
Packets.
-
Suggestions for Efficient Mod Making Please?
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.
IPS spam blocked by CleanTalk.