Since arrays go from element 0 to length-1, this writes just off the last element of the array, and crashes. Whups. :smile.gif:
Also, what's a "pixaxe"? :tongue.gif:
Thank you for your report, I'm fixing the bugs now. The fixes will be in the next version. As for the "pixaxe", not all of the team are native English speakers. The typo will still get fixed.
Thank you for your report, I'm fixing the bugs now.
Glad to help, this looks very promising. I'd previously been using ItemSpriteAPI, and found the conversion to this exceptionally simple. (As in, two lines of code.)
Finally someone/some people who have time to maintain a project like this. I was hoping this would happen as I am too lazy/busy to start one myself. I am all for this project. As mentioned by bfree380, I really hope we get Risugami and Shockah on board in some way. Just started using SAPI for blockharvest intercepts to remove modifications to vanilla MC classes.
Hopefully I can add my block metadata system in somehow. I'll have a better example with the next release of BetterOres+Alloys.
ok so im new to downloading mods and im kind of conufsed when you say drag the files from minecraftfroge into your bin do you mean just take the doc and src and just drag those in or open the src and then open all those folders and put in the files or open the doc and and then net and open up all those other folders and put that in there or what cuase this is really confusing me which one do i pick? and what is the difference? is one just for servers and the other singeplayer?
I can't really state how thrilled I am to see this, it's what I've always hoped for (one meta-mod you need to install and nothing else). If only modloader/modloadermp were able to be included...
As someone who's looked into making mods, I have a few minor questions:
Why isn't the API documentation visible on the site (or if it is, why isn't it linked from the OP)? I had to download the source to find it, and I was worried there would be no documentation included at all.
I assume the changes to base files are in the .patch file. An explanation of how to run this in eclipse would be a great addition for people who aren't as technically inclined. (Ok, that wasn't really a question).
The OP says this allows infinite sprites, but how do I do that? I don't see anything related to that here.
Why is there a method for adding pickaxe effectiveness against blocks, but not shovels or regular axes (or any other tool)?
And are there plans to add audio/achivement APIs? I know you don't want to add everything possible to it, but these two seem to be used very often.
I really hope this takes off, it has the potential to be amazing.
Btw, what about a ingame-ticking hook? The one modloader provides ticks far more frequently then ingame objects and thus varies from PC to PC... main reason of IC's jetpack bugs.
That's a good idea. The one in ModLoader is actually per frame, not per tick. I've added it to my list.
Well, that part is for modders, so we're kinda expecting these to be technically inclined ;-)
That being said, 1.0.1 which is to be released soon will work out of the box with regular decompilation from MCP.
I don't know how to apply a patch from Eclipse though - using the regular linux patch command.
Yeah, I completely understand that guess. It's just that the easier this kind of thing is for new people (modders, not consumers, at least for this point) to use it, the more likely they will be to use it, so I'd like to see the barrier to entry as low as possible to prevent people reinventing the wheel over and over again anyway. And I'd be willing to bet that the norm for minecraft modders is not linux :tongue.gif:
(I actually could use that patch file immediately were I on linux, ironically enough, but I use windows day to day)
The main reason I brought up audio and achievements is that I've seen a surprising amount of mods with audio that works great in SSP but doesn't work at all in SMP, so it seems something that regularly confuses people, and I've never gotten multiple mods with achievement additions to play nicely for some reason. Both seem areas that could use significant improvement. I totally understand not wanting to bloat the project with a ton of random stuff, though; I'm just trying to offer my advice based on what I've seen that seems like it could benefit from being a part of this project.
And I completely missed ITextureProvider somehow. Good job self.
Not having to import IMultiPassRenderer makes the merging much easier.
Is the unlimited terrain index support going to use texture switches?
Those aren't quite the same thing. Double-check the logic there. Especially watch out for 'flag'. I could clean it up a little, but it would require changing the file even more than it is already; this was pretty low impact.
EDIT: Oh, now I see why you want to avoid the import. You'll still end up being dependent on MinecraftForgeClient, though.
And yes, unlimited terrain textures rebind textures. There's a performance impact, but avoiding it would require rewriting a pretty large amount of base classes, and have the side-effect of breaking a number of mods with custom rendering.
Those aren't quite the same thing. Double-check the logic there. Especially watch out for 'flag'. I could clean it up a little, but it would require changing the file even more than it is already; this was pretty low impact.
EDIT: Oh, now I see why you want to avoid the import. You'll still end up being dependent on MinecraftForgeClient, though.
And yes, unlimited terrain textures rebind textures. There's a performance impact, but avoiding it would require rewriting a pretty large amount of base classes, and have the side-effect of breaking a number of mods with custom rendering.
This was just an example, the full version would be more like:
int renderType = MinecraftForgeClient.getBlockRenderType(blockId, pass, ...)
if(renderType == ...)
the return value defines how the rendering should proceed: not now, single render, multi-render, etc.
Calling a static method is easy to organize with reflection and it means no need to distribute different versions.
The complex logic should be hidden in the MinecraftForge classes and only the call should be in the render class. This will minimize the impact and make merging easier.
A better way to handle the infinite terrain textures would be to expand the base texture to be 32x32 icons for example and use scaled coordinates to render. This will require changing some base classes like RenderBlocks and ItemRenderer. The mods can get the texture index dimensions from MinecraftForgeClient and render with scaled coordinates if they need to. The idea is to avoid the texture switches, they are quite expensive.
if ((block instanceof IMultipassRender))
{
if (blockPass != renderPass)
{
flag = true;
}
IMultipassRender impr = (IMultipassRender)block;
if (impr.canRenderInPass(i2))
{
j3 = i2;
}
}
if (blockPass != renderPass)
{
flag = true;
}
else {
if (blockPass != renderPass)
continue;
MinecraftForgeClient.beforeBlockRender(block, renderblocks);
flag1 |= renderblocks.b(block, l2, j2, k2);
MinecraftForgeClient.afterBlockRender(block, renderblocks);
hasRenderedBlocks |= renderblocks.b(block, x, y, z);
}
}
I see a couple problems here. You're calling renderblocks twice, because 'flag1' and 'hasRenderedBlocks' appear to be the same thing. Also, blockPass, renderPass, j3 and i2 seem to have similar shadowing going on. Looks like the Optifine code de-obfuscated a couple names and didn't reobfuscate. Also the x,y,z vs l2,j2,k2 stands out.
Hi imanuel20 long time forums lurker, I'm way over my head and way out of my league here, basically after getting BuildCraft 2.0.0 and consequently installing the MCForge API I realised that OptiFine simply wouldn't work because of the two mods conflicting over dk.class or WorldRender.class so ...
Nice try. :smile.gif:
I was just thinking how to merge MCForge with OptiFine.
Awesome! Now we just need Risugami and Shockah and the other major modders :smile.gif:
In ItemTool.java, line 72, you have:
Since arrays go from element 0 to length-1, this writes just off the last element of the array, and crashes. Whups. :smile.gif:
Also, what's a "pixaxe"? :tongue.gif:
Thank you for your report, I'm fixing the bugs now. The fixes will be in the next version. As for the "pixaxe", not all of the team are native English speakers. The typo will still get fixed.
EDIT: The fix should be live within SVN now.
Glad to help, this looks very promising. I'd previously been using ItemSpriteAPI, and found the conversion to this exceptionally simple. (As in, two lines of code.)
Finally someone/some people who have time to maintain a project like this. I was hoping this would happen as I am too lazy/busy to start one myself. I am all for this project. As mentioned by bfree380, I really hope we get Risugami and Shockah on board in some way. Just started using SAPI for blockharvest intercepts to remove modifications to vanilla MC classes.
Hopefully I can add my block metadata system in somehow. I'll have a better example with the next release of BetterOres+Alloys.
As someone who's looked into making mods, I have a few minor questions:
Why isn't the API documentation visible on the site (or if it is, why isn't it linked from the OP)? I had to download the source to find it, and I was worried there would be no documentation included at all.
I assume the changes to base files are in the .patch file. An explanation of how to run this in eclipse would be a great addition for people who aren't as technically inclined. (Ok, that wasn't really a question).
The OP says this allows infinite sprites, but how do I do that? I don't see anything related to that here.
Why is there a method for adding pickaxe effectiveness against blocks, but not shovels or regular axes (or any other tool)?
And are there plans to add audio/achivement APIs? I know you don't want to add everything possible to it, but these two seem to be used very often.
I really hope this takes off, it has the potential to be amazing.
INFORMATION WANTS TO BE WRONG
"We will absolutely not keep in mind what external mapeditors will have to do to read data from the disk, that makes no sense whatsoever." - Grum
That's a good idea. The one in ModLoader is actually per frame, not per tick. I've added it to my list.
Implement ITextureProvider in your item class.
MinecraftForge is still young, we're just starting to respond to the needs of the users. I'll give a look to axe and shovel.
Those would be a ways off, but I'm certainly not ruling them out. Adding those two features came up in the discussion yesterday.
Of course with any of these features, or any other hooks, send me a patch! I'm guarding against poorly conceived hooks, but real needs go in.
"We will absolutely not keep in mind what external mapeditors will have to do to read data from the disk, that makes no sense whatsoever." - Grum
Yeah, I completely understand that guess. It's just that the easier this kind of thing is for new people (modders, not consumers, at least for this point) to use it, the more likely they will be to use it, so I'd like to see the barrier to entry as low as possible to prevent people reinventing the wheel over and over again anyway. And I'd be willing to bet that the norm for minecraft modders is not linux :tongue.gif:
(I actually could use that patch file immediately were I on linux, ironically enough, but I use windows day to day)
The main reason I brought up audio and achievements is that I've seen a surprising amount of mods with audio that works great in SSP but doesn't work at all in SMP, so it seems something that regularly confuses people, and I've never gotten multiple mods with achievement additions to play nicely for some reason. Both seem areas that could use significant improvement. I totally understand not wanting to bloat the project with a ton of random stuff, though; I'm just trying to offer my advice based on what I've seen that seems like it could benefit from being a part of this project.
And I completely missed ITextureProvider somehow. Good job self.
PS thanks for the replies!
INFORMATION WANTS TO BE WRONG
Yes, that's exactly it.
One place in WorldRenderer needs a little correction:
This can be replaced with one-liner which does not need to import IMultiPassRenderer, for example:
Not having to import IMultiPassRenderer makes the merging much easier.
Is the unlimited terrain index support going to use texture switches?
Those aren't quite the same thing. Double-check the logic there. Especially watch out for 'flag'. I could clean it up a little, but it would require changing the file even more than it is already; this was pretty low impact.
EDIT: Oh, now I see why you want to avoid the import. You'll still end up being dependent on MinecraftForgeClient, though.
And yes, unlimited terrain textures rebind textures. There's a performance impact, but avoiding it would require rewriting a pretty large amount of base classes, and have the side-effect of breaking a number of mods with custom rendering.
I don't think I've EVER attacked anyone's coding knowledge man. Don't sweat it
This was just an example, the full version would be more like:
the return value defines how the rendering should proceed: not now, single render, multi-render, etc.
Calling a static method is easy to organize with reflection and it means no need to distribute different versions.
The complex logic should be hidden in the MinecraftForge classes and only the call should be in the render class. This will minimize the impact and make merging easier.
A better way to handle the infinite terrain textures would be to expand the base texture to be 32x32 icons for example and use scaled coordinates to render. This will require changing some base classes like RenderBlocks and ItemRenderer. The mods can get the texture index dimensions from MinecraftForgeClient and render with scaled coordinates if they need to. The idea is to avoid the texture switches, they are quite expensive.
I see a couple problems here. You're calling renderblocks twice, because 'flag1' and 'hasRenderedBlocks' appear to be the same thing. Also, blockPass, renderPass, j3 and i2 seem to have similar shadowing going on. Looks like the Optifine code de-obfuscated a couple names and didn't reobfuscate. Also the x,y,z vs l2,j2,k2 stands out.
Nice try. :smile.gif:
I was just thinking how to merge MCForge with OptiFine.