So finally I decide to clean up this page a bit.
Here's an update. I've been learning other people's code, and now Lockit is more reliable than before.
Install:
1. Install newest minecraft forge for 1.4.6 (I am on 471, the recommended for 1.4.6).
2. drop my jar into your coremods folder.
3. open my jar, get libssrckdtree-j-1.0.2.jar from it and drop it into your mods folder.
(This step can be avoided if the library I'm using had an explicit download link... but it doesn't, sorry for that)
This mod uses coremod's features. Make sure you drop it into your coremods folder, not the mods folder.
If you had the previous versions of this mod, make sure they don't exist in the mods folder. The libssrckdtree-j-1.0.2.jar file is an external library I'm using, so make sure it exists.
Updates:
0.1.2:
misc fixes. More reliable now.
0.1.0:
Mod rewritten. Completely rewritten. Don't use old config files or worlds, unless you tweak the config files to make the ids match.
Locks now look way better:
Added chisels:
You can carve words on any solid surface:
Added Ender Wallet:
It opens the first row of your Ender chest inventory. Save your keys there. If you die, craft another Ender Wallet and your keys are available.
0.0.6:
Tweaked hanged locked behavior. Now the key doesn't pop out until you right click the lock. You can put the key into the lock by shift-right clicking the lock with the key.
Fixed backward-incompatible lwjgl calls.
0.0.5:
The landmark block's radius of protection can be configured.
The landmark block can be configured to protect the sky.
Locks are not pushable by pistons.
Added a hanged lock - works pretty much like a mini-lock that can be used as a redstone switch also.
0.0.4
The landmark block now disables explosion within it's area.
The block and item ids are now configurable.
Mod Content:
1. The lock block
When placed, it will have a key in it. You can right click it to take out the key.
When the key is not in the lock, it will stop players from destroying/building/using the blocks immediately next to it. Just like what you would experience with Bukkit protection plugins.
2. The Landmark
When the landmark is locked by a lock, it will protect a 11x11x11 area from destroying/building blocks. Chests, switches and doors are still usable.
3. The keys
You can craft multiple keys together to hold them in one place. Right click with the chain of keys in hand to open a Gui that lets you modify the chain.
Keys are dyable like leather armor.
And only cost you 1 level to rename.
It looks like the anvil is not well-hooked at this stage, so I don't want to mod it any further yet. The key will cost you 9 levels to rename if you have already renamed it.
3. hanged lock (new!)
(sorry it's in Chinese)
The hanged lock can only be placed against a vertical surface of a solid block, or a chest, or furnace. It will only lock that block if it's locked.
The key to the hanged lock pops out as soon as you place it. It doesn't stay in the lock when you use it either.
The hanged lock will also power the block it hangs on, so you can open iron doors with it.
Permission of use :
I don't care. I'll be happy to know if you let me know what you are gonna use it for, though.
Texture stuff:
I am really struggling with this. Help will be much appreciated. I can make the lock have different textures on each side if I can have the image files.
Awesome! This is exactly the type of mods forge is starving for! I wish there was a hundred more people like you making security mods. The forge community needs many more mod developers thinking along these lines.
Anyway, great stuff and I hope you continue to flesh out this mod to great depth. Cheers!
Suggestion:
I would make the lock block a custom shape, to look more like a lock, not a block, and you could place it ON other blocks, similar to how you can do that with Wireless Modems in CC, and if you right clicked the lock while it was unlocked, it would open the block it is attached to, if it can be opened(Doors, Gates, Trapdoors). Also, the landmark could be a custom shape, like maybe some sort of torch-like object? Good work on the mod, by the way!
Suggestion:
I would make the lock block a custom shape, to look more like a lock, not a block, and you could place it ON other blocks, similar to how you can do that with Wireless Modems in CC, and if you right clicked the lock while it was unlocked, it would open the block it is attached to, if it can be opened(Doors, Gates, Trapdoors). Also, the landmark could be a custom shape, like maybe some sort of torch-like object? Good work on the mod, by the way!
Yeah I would prefer that way, but the related modeling and openGL stuff is a scary beast to me. I'll probably not get my hands dirty on that until I have the time to study related topics... Currently I don't even have the texture to give locks a different look on each side lol
If this was run on a traditional server, with most players not being OP's, what happens when the players loses their key?
That's why you can duplicate keys. Always back up some keys in your friend's house is a good idea.
I would expect the loss of keys to be a rare event. Like, rare enough so that you can tolerate waiting until an OP comes... lol
actually i am getting a bug that deletes my key, has happened twice. i use the key from the keychain on the lock, and if there is a bit of lag at that time, then the key is taken from your inventory, but is not placed in the lock, hence losing it.
yeah i really should make some backup keys, will do that from now on, the server i am on keeps items on death so i wasn't worrying about it till now.
actually i am getting a bug that deletes my key, has happened twice. i use the key from the keychain on the lock, and if there is a bit of lag at that time, then the key is taken from your inventory, but is not placed in the lock, hence losing it.
yeah i really should make some backup keys, will do that from now on, the server i am on keeps items on death so i wasn't worrying about it till now.
Sounds strange, the code that takes your key and place it into the lock is the same piece and runs on the server side, so if your lock is locked your key shouldn't be lost. Unless I did something wrong here. I probably did.
The other issue I was having was with inventory sorting. If you had your inventory sorted by some other mods like InvTweak while the keychain gui is open I would expect weird things happen, because I am overwriting the item in your hand when you close the keychain gui - that item is expected to be your original keychain if you don't use other mods. Still unable to come up with a way to get around this, but hopefully I can solve it someday.
also not sure if this is a way fix or not but, on our server we had someone get around your locks using pistons to push the blocks out of a land marked area, as well us pushing lock blocks off chests. atm i can get around it using furnaces around it but if possible could u make either the landmark area unable too work with pistons, or the locks unable to be moved by pistons.
sounds cool, but i want to know more about the method you used to protect the locks from being broken if someone is really really patient, suppose someone keeps chipping away for however long it takes what happens then? server crash like the mffs stuff? destroyed?
just wondering how that's handled exactly as for the most part when mods add indestructible blocks it really only translates to taking about 10 minutes to destroy.
Rollback Post to RevisionRollBack
24 hours gone again, wasted in futility, welcome to minecraft modding, that is (unfortunately) our community.
(an ode to minecraft modding)
i keep making the same mistake, i think "oh, i've given them a few months, surely it'll be fixed by now" THAT is why i seem to ALWAYS be angry to some of you, my advice is to get the lead out.
there were nice things here, until the mod author threw a tantrum.
sounds cool, but i want to know more about the method you used to protect the locks from being broken if someone is really really patient, suppose someone keeps chipping away for however long it takes what happens then? server crash like the mffs stuff? destroyed?
just wondering how that's handled exactly as for the most part when mods add indestructible blocks it really only translates to taking about 10 minutes to destroy.
By canceling the PlayerInteract event on the server side. I'll be canceling the event on the client side in the next update also. In effect, you won't see the block change after 100 hours of punching it with whatever tool (I'm not so positive about tools from other mods though, obviously).
In terms of indestructibility, I'm not sure about other mods, but I'm not just giving a big number to the block hardness value. Even if you go that way, I guess you can still use java's infinity literals to get a real infinite hardness though.
also not sure if this is a way fix or not but, on our server we had someone get around your locks using pistons to push the blocks out of a land marked area, as well us pushing lock blocks off chests. atm i can get around it using furnaces around it but if possible could u make either the landmark area unable too work with pistons, or the locks unable to be moved by pistons.
That's a pretty hardcore way to grief lol, but yeah I should make the lock not pushable, that shouldn't be hard to fix. Thanks for mentioning.
sounds like a pretty nice to have mod for larger servers then, cool to see this bukkit plugin as a small forge mod too.
Rollback Post to RevisionRollBack
24 hours gone again, wasted in futility, welcome to minecraft modding, that is (unfortunately) our community.
(an ode to minecraft modding)
i keep making the same mistake, i think "oh, i've given them a few months, surely it'll be fixed by now" THAT is why i seem to ALWAYS be angry to some of you, my advice is to get the lead out.
there were nice things here, until the mod author threw a tantrum.
So finally I decide to clean up this page a bit.
Here's an update. I've been learning other people's code, and now Lockit is more reliable than before.
Download:
Lockit 0.1.2 for Minecraft 1.4.6
Download Here
Install:
1. Install newest minecraft forge for 1.4.6 (I am on 471, the recommended for 1.4.6).
2. drop my jar into your coremods folder.
3. open my jar, get libssrckdtree-j-1.0.2.jar from it and drop it into your mods folder.
(This step can be avoided if the library I'm using had an explicit download link... but it doesn't, sorry for that)
This mod uses coremod's features. Make sure you drop it into your coremods folder, not the mods folder.
If you had the previous versions of this mod, make sure they don't exist in the mods folder. The libssrckdtree-j-1.0.2.jar file is an external library I'm using, so make sure it exists.
Updates:
0.1.2:
misc fixes. More reliable now.
0.1.0:
Mod rewritten. Completely rewritten. Don't use old config files or worlds, unless you tweak the config files to make the ids match.
Locks now look way better:
Added chisels:
You can carve words on any solid surface:
Added Ender Wallet:
It opens the first row of your Ender chest inventory. Save your keys there. If you die, craft another Ender Wallet and your keys are available.
0.0.6:
Tweaked hanged locked behavior. Now the key doesn't pop out until you right click the lock. You can put the key into the lock by shift-right clicking the lock with the key.
Fixed backward-incompatible lwjgl calls.
0.0.5:
The landmark block's radius of protection can be configured.
The landmark block can be configured to protect the sky.
Locks are not pushable by pistons.
Added a hanged lock - works pretty much like a mini-lock that can be used as a redstone switch also.
0.0.4
The landmark block now disables explosion within it's area.
The block and item ids are now configurable.
Mod Content:
1. The lock block
When placed, it will have a key in it. You can right click it to take out the key.
When the key is not in the lock, it will stop players from destroying/building/using the blocks immediately next to it. Just like what you would experience with Bukkit protection plugins.
2. The Landmark
When the landmark is locked by a lock, it will protect a 11x11x11 area from destroying/building blocks. Chests, switches and doors are still usable.
3. The keys
You can craft multiple keys together to hold them in one place. Right click with the chain of keys in hand to open a Gui that lets you modify the chain.
Keys are dyable like leather armor.
And only cost you 1 level to rename.
It looks like the anvil is not well-hooked at this stage, so I don't want to mod it any further yet. The key will cost you 9 levels to rename if you have already renamed it.
3. hanged lock (new!)
(sorry it's in Chinese)
The hanged lock can only be placed against a vertical surface of a solid block, or a chest, or furnace. It will only lock that block if it's locked.
The key to the hanged lock pops out as soon as you place it. It doesn't stay in the lock when you use it either.
The hanged lock will also power the block it hangs on, so you can open iron doors with it.
Permission of use :
I don't care. I'll be happy to know if you let me know what you are gonna use it for, though.
Texture stuff:
I am really struggling with this. Help will be much appreciated. I can make the lock have different textures on each side if I can have the image files.
edit: Ok, so I deleted the mod and then started the server. I then stopped the server and put the mod back in and it removed that block.
edit 2: It show's the key as a fertilizer lol. I do have forestry on the server.
There's a Skeleton Key in the Misc tab if you are on creative. It opens all locks...
And yeah Id issues happen all the time...
awesome!
This will help so much for my modded server....
luckily I ont run forestry, as buildcraft is incompadible with mcpatcher, hmm....
You can use Optifine to do mcpatcher's work ?
Anyway, great stuff and I hope you continue to flesh out this mod to great depth. Cheers!
I would make the lock block a custom shape, to look more like a lock, not a block, and you could place it ON other blocks, similar to how you can do that with Wireless Modems in CC, and if you right clicked the lock while it was unlocked, it would open the block it is attached to, if it can be opened(Doors, Gates, Trapdoors). Also, the landmark could be a custom shape, like maybe some sort of torch-like object? Good work on the mod, by the way!
Yeah I would prefer that way, but the related modeling and openGL stuff is a scary beast to me. I'll probably not get my hands dirty on that until I have the time to study related topics... Currently I don't even have the texture to give locks a different look on each side lol
That's why you can duplicate keys. Always back up some keys in your friend's house is a good idea.
I would expect the loss of keys to be a rare event. Like, rare enough so that you can tolerate waiting until an OP comes... lol
yeah i really should make some backup keys, will do that from now on, the server i am on keeps items on death so i wasn't worrying about it till now.
Sounds strange, the code that takes your key and place it into the lock is the same piece and runs on the server side, so if your lock is locked your key shouldn't be lost. Unless I did something wrong here. I probably did.
The other issue I was having was with inventory sorting. If you had your inventory sorted by some other mods like InvTweak while the keychain gui is open I would expect weird things happen, because I am overwriting the item in your hand when you close the keychain gui - that item is expected to be your original keychain if you don't use other mods. Still unable to come up with a way to get around this, but hopefully I can solve it someday.
just wondering how that's handled exactly as for the most part when mods add indestructible blocks it really only translates to taking about 10 minutes to destroy.
24 hours gone again, wasted in futility, welcome to minecraft modding, that is (unfortunately) our community.
(an ode to minecraft modding)
i keep making the same mistake, i think "oh, i've given them a few months, surely it'll be fixed by now" THAT is why i seem to ALWAYS be angry to some of you, my advice is to get the lead out.
there were nice things here, until the mod author threw a tantrum.
By canceling the PlayerInteract event on the server side. I'll be canceling the event on the client side in the next update also. In effect, you won't see the block change after 100 hours of punching it with whatever tool (I'm not so positive about tools from other mods though, obviously).
In terms of indestructibility, I'm not sure about other mods, but I'm not just giving a big number to the block hardness value. Even if you go that way, I guess you can still use java's infinity literals to get a real infinite hardness though.
That's a pretty hardcore way to grief lol, but yeah I should make the lock not pushable, that shouldn't be hard to fix. Thanks for mentioning.
Craft your key with any iron ingots in any arrangement... Sorry didn't mention that in the thread,
Cool. Thank you.
24 hours gone again, wasted in futility, welcome to minecraft modding, that is (unfortunately) our community.
(an ode to minecraft modding)
i keep making the same mistake, i think "oh, i've given them a few months, surely it'll be fixed by now" THAT is why i seem to ALWAYS be angry to some of you, my advice is to get the lead out.
there were nice things here, until the mod author threw a tantrum.