mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-26 15:03:18 +00:00
Added documentation and groomed code.
This commit is contained in:
1 parent
e22c5c5744
commit
a54c471f14
34 files changed
+771
-97
No files matched your search
@@ -12,6 +12,9 @@ import codechicken.multipart.handler.MultipartCPH
|
||||
import scala.collection.mutable.HashMap
|
||||
import net.minecraft.entity.player.EntityPlayer
|
||||
|
||||
/**
|
||||
* A class that maintains a map server<->client of which players are holding the control (or placement modifier key) much like sneaking.
|
||||
*/
|
||||
object ControlKeyModifer
|
||||
{
|
||||
implicit def playerControlValue(p:EntityPlayer) = new ControlKeyValue(p)
|
||||
@@ -22,8 +25,16 @@ object ControlKeyModifer
|
||||
}
|
||||
|
||||
val map = HashMap[EntityPlayer, Boolean]().withDefaultValue(false)
|
||||
|
||||
/**
|
||||
* Implicit static for Java users.
|
||||
*/
|
||||
def isControlDown(p:EntityPlayer) = p.isControlDown
|
||||
}
|
||||
|
||||
/**
|
||||
* Key Handler implementation
|
||||
*/
|
||||
object ControlKeyHandler extends KeyHandler (
|
||||
Array(new KeyBinding("key.control", Keyboard.KEY_LCONTROL)),
|
||||
Array(false))
|
||||
|
||||
Reference in new issue
Block a user