Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.4.6]Lockit - A lock mod for forge servers

smp forge 1.4.6

  • Please log in to reply
93 replies to this topic

#1

hypercross

Posted 24 November 2012 - 06:10 AM

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
https://www.box.com/...aoxwesuw14pvuaa

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:
Posted Image

Added chisels:
Posted Image

You can carve words on any solid surface:
Posted Image

Added Ender Wallet:
Posted Image

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.
Posted Image

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
Posted Image

When placed, it will have a key in it. You can right click it to take out the key.
Posted Image

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
Posted Image

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
Posted Image

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.
Posted Image

Keys are dyable like leather armor.
Posted Image

And only cost you 1 level to rename.
Posted Image

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!)

Posted Image
(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.

Posted Image

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.

Posted Image

The hanged lock will also power the block it hangs on, so you can open iron doors with it.

Posted Image

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.

Register or log in to remove.

#2

tracerman

Posted 24 November 2012 - 08:56 AM

Just installed it on my server, i'll test it out!

#3

tracerman

Posted 24 November 2012 - 09:01 AM

My inventory was full and it spit out the key and now its locked and i cant delete it. The key was lost. Any suggestions?

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.

Edited by tracerman, 24 November 2012 - 09:09 AM.


#4

arike
    arike

    Carpenter

  • Members
  • 56 posts
  • Location: Belgium
  • Minecraft: arikewaza

Posted 24 November 2012 - 01:55 PM

interesting , i'll try it soon
tx to your work
Youtube => arikewaza
Posted Image

#5

hypercross

Posted 24 November 2012 - 02:28 PM

View Posttracerman, on 24 November 2012 - 09:01 AM, said:

My inventory was full and it spit out the key and now its locked and i cant delete it. The key was lost. Any suggestions?

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...

#6

makermod1
    makermod1

    Obsidian Miner

  • Members
  • 1207 posts

Posted 24 November 2012 - 03:27 PM

View Posthypercross, on 24 November 2012 - 02:28 PM, said:

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....
Posted Image

#7

hypercross

Posted 24 November 2012 - 06:54 PM

View Postmakermod1, on 24 November 2012 - 03:27 PM, said:

awesome!
luckily I ont run forestry, as buildcraft is incompadible with mcpatcher, hmm....

You can use Optifine  to do mcpatcher's work ?

#8

Gecko357

Posted 26 November 2012 - 08:54 PM

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!

#9

mine_killer14

Posted 29 November 2012 - 03:38 AM

If this was run on a traditional server, with most players not being OP's, what happens when the players loses their key?

#10

Beaurocks161
  • Location: In front of my computer... why do you want to know?
  • Minecraft: Beaurocks16

Posted 29 November 2012 - 04:21 AM

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!
Working on the mod Minecraft+, check it out!

Posted Image


#11

hypercross

Posted 29 November 2012 - 05:45 AM

View PostBeaurocks161, on 29 November 2012 - 04:21 AM, said:

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

View Postmine_killer14, on 29 November 2012 - 03:38 AM, said:

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

#12

mine_killer14

Posted 30 November 2012 - 01:18 PM

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.

#13

hypercross

Posted 30 November 2012 - 02:20 PM

View Postmine_killer14, on 30 November 2012 - 01:18 PM, said:

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.

#14

mine_killer14

Posted 30 November 2012 - 08:22 PM

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.

#15

Too-DAMN-Much

Posted 30 November 2012 - 08:53 PM

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.

#16

hypercross

Posted 30 November 2012 - 10:30 PM

View PostToo-DAMN-Much, on 30 November 2012 - 08:53 PM, said:

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.


View Postmine_killer14, on 30 November 2012 - 08:22 PM, said:

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.

#17

SelectedLime375

Posted 01 December 2012 - 01:37 AM

Hey I just found out that you published your mod. I had seen it in the WIP section before. Great mod.:)

Posted Image


#18

SelectedLime375

Posted 01 December 2012 - 02:06 AM

Great job on the particle affects.:)

How do you duplicate keys?

Posted Image


#19

hypercross

Posted 01 December 2012 - 02:45 AM

View PostSelectedLime375, on 01 December 2012 - 02:06 AM, said:

Great job on the particle affects.Posted Image

How do you duplicate keys?

Craft your key with any iron ingots in any arrangement... Sorry didn't mention that in the thread,

#20

SelectedLime375

Posted 01 December 2012 - 02:49 AM

View Posthypercross, on 01 December 2012 - 02:45 AM, said:

Craft your key with any iron ingots in any arrangement... Sorry didn't mention that in the thread,
Cool. Thank you.

Posted Image