Thank for the very good explanation! However, would you recommend changing the itemstack NBT every tick? For things like gun reload?
That's a design decision you're going to have to make. On the one hand, I can see where you're coming from: the player clicks and the gun fires immediately (for as many bullets as its clip holds, possibly only one), after which there is a short time during which the gun is being reloaded and can't be fired.
That makes sense, but is not optimal the way Minecraft is set up, as it will require you to read / write to NBT every tick until the gun is ready again (which isn't out of the question, just not the most efficient). In MC, there is already support built in for holding right click for a certain period until something happens (e.g. bow) which would be fairly efficient and not involve NBT at all depending on how you decide to implement the bullets / magazines.
So you could have your gun without any NBT at all, which would be much more efficient but it wouldn't feel the same, or you could check the NBT tag each tick and update the reload time as necessary, which may also necessitate sending packets at certain points (ready and not ready) if you need the client to know about it as well (such as when you are trying to shoot, which happens on both client and server side). Obviously option two is the one that gives the right 'feel', but it's up to you to determine if it's worth the cost. In my opinion, if you can code it, go for it, because on the scale of things happening in a Minecraft tick, this is just an extra raindrop in the pond.
This is going way off-topic, just open a new thread and ask the question(s) there and we will keep answering to the best of our knowledge there
That way it's better for everyone ^^
FML is mostly done for 1.7.2 now and the Forge update has slowly begun now! Those whom feel it's going to slow are free to CONTRIBUTE by going to the projects github and helping out
OK checking the Optifine and Forge websites and they all have 1.7.2 (No 1.7.4 Though)Forge 1.7 is out, so MCP 1.7 is ALSO out! Get modding everyone!Unless the forge team stopped using MCP
No, no, no. MCP is not out. Minecraft is not decompiled nor deobfuscated. We cannot see the Minecraft sources yet, only use the provided forge functions.
Forge has an Indev build out, it's still in testing and development for 1.7.X it's still to early to start updating mods.
MCP has released a public beta/pre-release which is the foundation for the FML works.
There's still some time remaining before we can start updating our mods for 1.7.X.
The beta of MCP was working except the fact that you cannot reobfuscate and that most of the code was not remapped to understandable varaibles and method names.
So i was able to update some features of my mod and test them in Eclipse, but not to export in Minecraft.
There is still the possibility to use the gradle system, there is an update today.
And MCP is still used by Forge, at least partially for deobfuscation and remapping.
That's a design decision you're going to have to make. On the one hand, I can see where you're coming from: the player clicks and the gun fires immediately (for as many bullets as its clip holds, possibly only one), after which there is a short time during which the gun is being reloaded and can't be fired.
That makes sense, but is not optimal the way Minecraft is set up, as it will require you to read / write to NBT every tick until the gun is ready again (which isn't out of the question, just not the most efficient). In MC, there is already support built in for holding right click for a certain period until something happens (e.g. bow) which would be fairly efficient and not involve NBT at all depending on how you decide to implement the bullets / magazines.
So you could have your gun without any NBT at all, which would be much more efficient but it wouldn't feel the same, or you could check the NBT tag each tick and update the reload time as necessary, which may also necessitate sending packets at certain points (ready and not ready) if you need the client to know about it as well (such as when you are trying to shoot, which happens on both client and server side). Obviously option two is the one that gives the right 'feel', but it's up to you to determine if it's worth the cost. In my opinion, if you can code it, go for it, because on the scale of things happening in a Minecraft tick, this is just an extra raindrop in the pond.
That way it's better for everyone ^^
FML is mostly done for 1.7.2 now and the Forge update has slowly begun now!
Those whom feel it's going to slow are free to CONTRIBUTE by going to the projects github and helping out
MCP has released a public beta/pre-release which is the foundation for the FML works.
There's still some time remaining before we can start updating our mods for 1.7.X.
So i was able to update some features of my mod and test them in Eclipse, but not to export in Minecraft.
There is still the possibility to use the gradle system, there is an update today.
And MCP is still used by Forge, at least partially for deobfuscation and remapping.
Just a heads up here. Optifine for 1.7 came out January the 2nd. Check the forum post or their website.Someone else posted this above. Sorry about that.
-TBA-