Jump to content

StevilKnevil

Members
  • Posts

    12
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

StevilKnevil's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I guess most people use Eclipse for mod development (right?). Is there an eclipse plugin that talks to MCP Bot (via IRC) to de-obfuscate fields? Seems like the sort of thing that might be useful and probably not too hard to write (though I have no experience of Eclipse plugin development!)
  2. My best thinking at the moment is to do something like this in WorldRender: if (block != null) { if (l1 == 0 && block.hasTileEntity(chunkcache.getBlockMetadata(k2, i2, j2))) { TileEntity tileentity = chunkcache.getBlockTileEntity(k2, i2, j2); if (TileEntityRenderer.instance.hasSpecialRenderer(tileentity)) { this.tileEntityRenderers.add(tileentity); } } int i3 = block.getRenderBlockPass(); if (i3 > l1) { flag = true; } // !!! NEW: Slight change here !!! if (block.canRenderInPass(l1)) { flag1 |= renderblocks.renderBlockByRenderType(block, k2, i2, j2); } } // !!! NEW !!! // Note that this can happen on air blocks (i.e. block == null) { /* * to handle special effects for blocks */ int i3 = ForgeHooksClient.getBlockEffectRenderPass(block, k2, i2, j2); if (i3 > l1) { flag = true; } if (i3 == l1) { // This is the correct render pass for this block effect flag1 |= ForgeHooksClient.renderBlockEffect(block, k2, i2, j2); } } // !!! END NEW !!!
  3. This is really useful stuff (and I'll definitely be using that hook) but for this particular use case the special effects on the blocks are relatively unchanging between frames rather than changing every frame; so for efficiencies sake I think it's better to bake this stuff into the render lists for the chunk rather than pay the per frame costs of rendering the effects. Please correct me if I'm mistaken!
  4. Very interesting, let me dig into that a little...
  5. I've got something working, but it's not the least invasive thing ever! I extended the BlocksRederer to be a BlockEffectRenderer. It's still responsible for rendering the blocks themselves, but it also has the option to render a BlockEffect for each block it handles. I had to do this because the block effect might be in renderpass 1, but if the block only renders in renderpass 0 then it all goes wrong So I needed to modify WorldRenderer to instantiate (and call) my BlockEffectRenderer, which was only around 5 lines of code that needed changing, but I might try and tweak it a bit more to clean it up even more.
  6. So I've got this kinda working for using entities to do this, but I'm tending away from this idea now. The 'highlighting' of the blocks is something that is going to change relatively infrequently (e.g. about as often as block creation/destruction) rather than every frame. I think it would be more efficient to have it as part of the block render list rather than an entity that is updated every frame. Or am I misundertanding how the block render lists are built? NB I've got no idea yet on how I'll achieve it!
  7. ASM? I did actually think another way might be to do some code injection to (for example) modify the WorldRenderer... but I think that's probably bordering on yuk ;-)
  8. Thanks! And for future reference here's how to actually use it: http://mcpold.ocean-labs.de/index.php/MCPBot
  9. I'm not entirely sure about how the wonder of Minecraft deobfuscation works (if you could point me to any background reading then I'd happily dig through it). However, what I was really wondering is: Is there a good way to contribute suggestions to future deobfuscations? I often come across functions that I dig through and work out sensible variable names and parameter names and it would be nice if I could feed those back to the community some how.
  10. FYI After a few more searches I found this, which might be an option to try:
  11. Hi, I've stared writing a mod and have had some good success so far (really impressed with Forge BTW!). However I think my ambitions lie somewhat outside the normal mods. I want to add a special effect to any block (or ultimately tile entity). Basically I want one player to be able to mark a set of blocks and then have that set of blocks be highlighted (for all players). Perhaps something a little like the black outline on the block in the centre of the screen, but persistant and on more than one block, or maybe some glow effect... I'm thinking that I can just render transparent a (very slightly larger) block over the top of the base block. The actual rendering style is to be decided, but I'm guessing it wouldn't affect the implementation too much. I've had a look through this forum as best I can and I've also dug through this tutorial: http://www.minecraftforge.net/wiki/Multiple_Pass_Render_Blocks but I've not had much success so far. Ideally I want to avoid modifying core Minecraft code, and keep all my code nicely isolated, so adding a new render pass doesn't seem like a good idea (for a number of reasons!). There seem to be a couple of pre/post block render Forge hooks but they seem to be commented out at the moment. I also don't think that would be the right place because if a block is not rendered in the transparent pass then it wouldn't get the hooks called that would allow me to overlay a glow. I've seen that there's a ISimpleBlockRenderingHandler, but I think if I implemented that then it would only get called for non-vanilla blocks, whereas I really want to be able to be able to do this for all blocks without having to customise all the existing blocks. Hopefully that's a decent enough description, could any one give me any pointers of things to look into? I'm happy to consider entirely different methods of achieving the same results by the way! but I am keen to keep the code as simple and non-invasive as possible. I just need a foot in the door, some places to put breakpoints and some code to read Thanks in advance!
×
×
  • Create New...

Important Information

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