diff --git a/.gitignore b/.gitignore
index a335998..1f787d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
/*
!/resource
!/resources
+!/mods
!/src
!/mcmod.info
!/build.xml
diff --git a/build.xml b/build.xml
index bdfb266..9a88746 100644
--- a/build.xml
+++ b/build.xml
@@ -4,15 +4,15 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/mcmod.info b/mcmod.info
index 1ff6f46..2effbc2 100644
--- a/mcmod.info
+++ b/mcmod.info
@@ -3,12 +3,12 @@
"name": "MachineMuse's Modular Powersuits",
"description": "A mod which adds modular power armor, power tool, and a tinker table to configure them. Uses UniversalElectricty or IC2 for energy.",
"version": "@MOD_VERSION@",
- "mcversion": "1.4.7",
+ "mcversion": "1.5.0",
"url": "http://machinemuse.net/",
"updateUrl": "",
"authors": [ "MachineMuse" ],
"credits": "Code by MachineMuse, Icons by WaterCandle, Modeling by SebK",
- "logoFile": "/resources/machinemuse/mmmpslogo_64.png",
+ "logoFile": "/mods/mmmPowersuits/textures/mmmpslogo_64.png",
"screenshots": [ ],
"parent": "",
"requiredMods": [ "Forge" ],
diff --git a/resources/machinemuse/sound/GUIInstall.ogg b/mods/mmmPowersuits/sound/GUIInstall.ogg
similarity index 100%
rename from resources/machinemuse/sound/GUIInstall.ogg
rename to mods/mmmPowersuits/sound/GUIInstall.ogg
diff --git a/resources/machinemuse/sound/GUISelect.ogg b/mods/mmmPowersuits/sound/GUISelect.ogg
similarity index 100%
rename from resources/machinemuse/sound/GUISelect.ogg
rename to mods/mmmPowersuits/sound/GUISelect.ogg
diff --git a/resources/machinemuse/sound/Glider.ogg b/mods/mmmPowersuits/sound/Glider.ogg
similarity index 100%
rename from resources/machinemuse/sound/Glider.ogg
rename to mods/mmmPowersuits/sound/Glider.ogg
diff --git a/resources/machinemuse/sound/JetBoots.ogg b/mods/mmmPowersuits/sound/JetBoots.ogg
similarity index 100%
rename from resources/machinemuse/sound/JetBoots.ogg
rename to mods/mmmPowersuits/sound/JetBoots.ogg
diff --git a/resources/machinemuse/sound/Jetpack.ogg b/mods/mmmPowersuits/sound/Jetpack.ogg
similarity index 100%
rename from resources/machinemuse/sound/Jetpack.ogg
rename to mods/mmmPowersuits/sound/Jetpack.ogg
diff --git a/resources/machinemuse/sound/JumpAssist.ogg b/mods/mmmPowersuits/sound/JumpAssist.ogg
similarity index 100%
rename from resources/machinemuse/sound/JumpAssist.ogg
rename to mods/mmmPowersuits/sound/JumpAssist.ogg
diff --git a/resources/machinemuse/sound/SwimAssist.ogg b/mods/mmmPowersuits/sound/SwimAssist.ogg
similarity index 100%
rename from resources/machinemuse/sound/SwimAssist.ogg
rename to mods/mmmPowersuits/sound/SwimAssist.ogg
diff --git a/resources/machinemuse/sound/WaterElectrolyzer.ogg b/mods/mmmPowersuits/sound/WaterElectrolyzer.ogg
similarity index 100%
rename from resources/machinemuse/sound/WaterElectrolyzer.ogg
rename to mods/mmmPowersuits/sound/WaterElectrolyzer.ogg
diff --git a/mods/mmmPowersuits/textures/items/advancedplating1.png b/mods/mmmPowersuits/textures/items/advancedplating1.png
new file mode 100644
index 0000000..c427335
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/advancedplating1.png differ
diff --git a/mods/mmmPowersuits/textures/items/advancedplating2.png b/mods/mmmPowersuits/textures/items/advancedplating2.png
new file mode 100644
index 0000000..3ed41e1
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/advancedplating2.png differ
diff --git a/mods/mmmPowersuits/textures/items/alien.png b/mods/mmmPowersuits/textures/items/alien.png
new file mode 100644
index 0000000..2edf3f7
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/alien.png differ
diff --git a/mods/mmmPowersuits/textures/items/aquaaffinity.png b/mods/mmmPowersuits/textures/items/aquaaffinity.png
new file mode 100644
index 0000000..fc42251
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/aquaaffinity.png differ
diff --git a/mods/mmmPowersuits/textures/items/arcreactor.png b/mods/mmmPowersuits/textures/items/arcreactor.png
new file mode 100644
index 0000000..dda773e
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/arcreactor.png differ
diff --git a/mods/mmmPowersuits/textures/items/armorfeet.png b/mods/mmmPowersuits/textures/items/armorfeet.png
new file mode 100644
index 0000000..e0f49ec
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/armorfeet.png differ
diff --git a/mods/mmmPowersuits/textures/items/armorhead.png b/mods/mmmPowersuits/textures/items/armorhead.png
new file mode 100644
index 0000000..54c49aa
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/armorhead.png differ
diff --git a/mods/mmmPowersuits/textures/items/armorlegs.png b/mods/mmmPowersuits/textures/items/armorlegs.png
new file mode 100644
index 0000000..d2aca98
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/armorlegs.png differ
diff --git a/mods/mmmPowersuits/textures/items/armortorso.png b/mods/mmmPowersuits/textures/items/armortorso.png
new file mode 100644
index 0000000..ace3e2f
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/armortorso.png differ
diff --git a/mods/mmmPowersuits/textures/items/artificialmuscle.png b/mods/mmmPowersuits/textures/items/artificialmuscle.png
new file mode 100644
index 0000000..be9c12a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/artificialmuscle.png differ
diff --git a/mods/mmmPowersuits/textures/items/basicplating1.png b/mods/mmmPowersuits/textures/items/basicplating1.png
new file mode 100644
index 0000000..3e34e36
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/basicplating1.png differ
diff --git a/mods/mmmPowersuits/textures/items/basicplating2.png b/mods/mmmPowersuits/textures/items/basicplating2.png
new file mode 100644
index 0000000..e8780d1
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/basicplating2.png differ
diff --git a/mods/mmmPowersuits/textures/items/bluedrone.png b/mods/mmmPowersuits/textures/items/bluedrone.png
new file mode 100644
index 0000000..0a4d326
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/bluedrone.png differ
diff --git a/mods/mmmPowersuits/textures/items/bluelight.png b/mods/mmmPowersuits/textures/items/bluelight.png
new file mode 100644
index 0000000..3befdbb
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/bluelight.png differ
diff --git a/mods/mmmPowersuits/textures/items/bluephaser.png b/mods/mmmPowersuits/textures/items/bluephaser.png
new file mode 100644
index 0000000..157fa48
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/bluephaser.png differ
diff --git a/mods/mmmPowersuits/textures/items/blueplate.png b/mods/mmmPowersuits/textures/items/blueplate.png
new file mode 100644
index 0000000..674291a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/blueplate.png differ
diff --git a/mods/mmmPowersuits/textures/items/bluestar.png b/mods/mmmPowersuits/textures/items/bluestar.png
new file mode 100644
index 0000000..a7fa0cb
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/bluestar.png differ
diff --git a/mods/mmmPowersuits/textures/items/clawclosed.png b/mods/mmmPowersuits/textures/items/clawclosed.png
new file mode 100644
index 0000000..b920a97
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/clawclosed.png differ
diff --git a/mods/mmmPowersuits/textures/items/clawlaser.png b/mods/mmmPowersuits/textures/items/clawlaser.png
new file mode 100644
index 0000000..c67fb8a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/clawlaser.png differ
diff --git a/mods/mmmPowersuits/textures/items/clawopen.png b/mods/mmmPowersuits/textures/items/clawopen.png
new file mode 100644
index 0000000..6553f33
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/clawopen.png differ
diff --git a/mods/mmmPowersuits/textures/items/climbassist.png b/mods/mmmPowersuits/textures/items/climbassist.png
new file mode 100644
index 0000000..a5e4d5d
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/climbassist.png differ
diff --git a/mods/mmmPowersuits/textures/items/controlcircuit.png b/mods/mmmPowersuits/textures/items/controlcircuit.png
new file mode 100644
index 0000000..5b00411
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/controlcircuit.png differ
diff --git a/mods/mmmPowersuits/textures/items/coolingsystem.png b/mods/mmmPowersuits/textures/items/coolingsystem.png
new file mode 100644
index 0000000..bea1937
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/coolingsystem.png differ
diff --git a/mods/mmmPowersuits/textures/items/crystalball.png b/mods/mmmPowersuits/textures/items/crystalball.png
new file mode 100644
index 0000000..3929653
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/crystalball.png differ
diff --git a/mods/mmmPowersuits/textures/items/crystalcapacitor.png b/mods/mmmPowersuits/textures/items/crystalcapacitor.png
new file mode 100644
index 0000000..20fd621
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/crystalcapacitor.png differ
diff --git a/mods/mmmPowersuits/textures/items/diamondupgrade.png b/mods/mmmPowersuits/textures/items/diamondupgrade.png
new file mode 100644
index 0000000..460f499
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/diamondupgrade.png differ
diff --git a/mods/mmmPowersuits/textures/items/electricweapon.png b/mods/mmmPowersuits/textures/items/electricweapon.png
new file mode 100644
index 0000000..b35e453
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/electricweapon.png differ
diff --git a/mods/mmmPowersuits/textures/items/energymeter.png b/mods/mmmPowersuits/textures/items/energymeter.png
new file mode 100644
index 0000000..b26480a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/energymeter.png differ
diff --git a/mods/mmmPowersuits/textures/items/energyshield.png b/mods/mmmPowersuits/textures/items/energyshield.png
new file mode 100644
index 0000000..48e89a2
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/energyshield.png differ
diff --git a/mods/mmmPowersuits/textures/items/fieldemitter.png b/mods/mmmPowersuits/textures/items/fieldemitter.png
new file mode 100644
index 0000000..f0ada41
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/fieldemitter.png differ
diff --git a/mods/mmmPowersuits/textures/items/fireweapon.png b/mods/mmmPowersuits/textures/items/fireweapon.png
new file mode 100644
index 0000000..462da5e
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/fireweapon.png differ
diff --git a/mods/mmmPowersuits/textures/items/glider.png b/mods/mmmPowersuits/textures/items/glider.png
new file mode 100644
index 0000000..92724e8
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/glider.png differ
diff --git a/mods/mmmPowersuits/textures/items/gliderwing.png b/mods/mmmPowersuits/textures/items/gliderwing.png
new file mode 100644
index 0000000..05fef48
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/gliderwing.png differ
diff --git a/mods/mmmPowersuits/textures/items/gravitydrive.png b/mods/mmmPowersuits/textures/items/gravitydrive.png
new file mode 100644
index 0000000..41a4a4a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/gravitydrive.png differ
diff --git a/mods/mmmPowersuits/textures/items/gravityweapon.png b/mods/mmmPowersuits/textures/items/gravityweapon.png
new file mode 100644
index 0000000..20e746d
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/gravityweapon.png differ
diff --git a/mods/mmmPowersuits/textures/items/greendrone.png b/mods/mmmPowersuits/textures/items/greendrone.png
new file mode 100644
index 0000000..93f9024
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greendrone.png differ
diff --git a/mods/mmmPowersuits/textures/items/greenfield.png b/mods/mmmPowersuits/textures/items/greenfield.png
new file mode 100644
index 0000000..ecb87e3
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greenfield.png differ
diff --git a/mods/mmmPowersuits/textures/items/greenlight.png b/mods/mmmPowersuits/textures/items/greenlight.png
new file mode 100644
index 0000000..0bbcd02
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greenlight.png differ
diff --git a/mods/mmmPowersuits/textures/items/greenphaser.png b/mods/mmmPowersuits/textures/items/greenphaser.png
new file mode 100644
index 0000000..1d3d94a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greenphaser.png differ
diff --git a/mods/mmmPowersuits/textures/items/greenplate.png b/mods/mmmPowersuits/textures/items/greenplate.png
new file mode 100644
index 0000000..10aea2c
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greenplate.png differ
diff --git a/mods/mmmPowersuits/textures/items/greenstar.png b/mods/mmmPowersuits/textures/items/greenstar.png
new file mode 100644
index 0000000..5be326a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/greenstar.png differ
diff --git a/mods/mmmPowersuits/textures/items/handitem.png b/mods/mmmPowersuits/textures/items/handitem.png
new file mode 100644
index 0000000..5d4ea0f
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/handitem.png differ
diff --git a/mods/mmmPowersuits/textures/items/heart.png b/mods/mmmPowersuits/textures/items/heart.png
new file mode 100644
index 0000000..1422d42
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/heart.png differ
diff --git a/mods/mmmPowersuits/textures/items/heatresistantplating.png b/mods/mmmPowersuits/textures/items/heatresistantplating.png
new file mode 100644
index 0000000..faea4d7
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/heatresistantplating.png differ
diff --git a/mods/mmmPowersuits/textures/items/heatresistantplating2.png b/mods/mmmPowersuits/textures/items/heatresistantplating2.png
new file mode 100644
index 0000000..dec76bd
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/heatresistantplating2.png differ
diff --git a/mods/mmmPowersuits/textures/items/hologramemitter.png b/mods/mmmPowersuits/textures/items/hologramemitter.png
new file mode 100644
index 0000000..298a228
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/hologramemitter.png differ
diff --git a/mods/mmmPowersuits/textures/items/hvcapacitor.png b/mods/mmmPowersuits/textures/items/hvcapacitor.png
new file mode 100644
index 0000000..7ff6aae
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/hvcapacitor.png differ
diff --git a/mods/mmmPowersuits/textures/items/ionthruster.png b/mods/mmmPowersuits/textures/items/ionthruster.png
new file mode 100644
index 0000000..8131f5a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/ionthruster.png differ
diff --git a/mods/mmmPowersuits/textures/items/jetboots.png b/mods/mmmPowersuits/textures/items/jetboots.png
new file mode 100644
index 0000000..1c6c4d7
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/jetboots.png differ
diff --git a/mods/mmmPowersuits/textures/items/jetpack.png b/mods/mmmPowersuits/textures/items/jetpack.png
new file mode 100644
index 0000000..eeda487
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/jetpack.png differ
diff --git a/mods/mmmPowersuits/textures/items/jumpassist.png b/mods/mmmPowersuits/textures/items/jumpassist.png
new file mode 100644
index 0000000..1d94153
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/jumpassist.png differ
diff --git a/mods/mmmPowersuits/textures/items/lantern.png b/mods/mmmPowersuits/textures/items/lantern.png
new file mode 100644
index 0000000..b5a46a4
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/lantern.png differ
diff --git a/mods/mmmPowersuits/textures/items/laser.png b/mods/mmmPowersuits/textures/items/laser.png
new file mode 100644
index 0000000..cbb8ad4
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/laser.png differ
diff --git a/mods/mmmPowersuits/textures/items/lvbattery.png b/mods/mmmPowersuits/textures/items/lvbattery.png
new file mode 100644
index 0000000..0141ed7
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/lvbattery.png differ
diff --git a/mods/mmmPowersuits/textures/items/lvcapacitor.png b/mods/mmmPowersuits/textures/items/lvcapacitor.png
new file mode 100644
index 0000000..5bcfbfd
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/lvcapacitor.png differ
diff --git a/mods/mmmPowersuits/textures/items/microbattery.png b/mods/mmmPowersuits/textures/items/microbattery.png
new file mode 100644
index 0000000..423df94
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/microbattery.png differ
diff --git a/mods/mmmPowersuits/textures/items/mvbattery.png b/mods/mmmPowersuits/textures/items/mvbattery.png
new file mode 100644
index 0000000..8b737a3
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/mvbattery.png differ
diff --git a/mods/mmmPowersuits/textures/items/mvcapacitor.png b/mods/mmmPowersuits/textures/items/mvcapacitor.png
new file mode 100644
index 0000000..14cb1de
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/mvcapacitor.png differ
diff --git a/mods/mmmPowersuits/textures/items/myofiber.png b/mods/mmmPowersuits/textures/items/myofiber.png
new file mode 100644
index 0000000..8a23a01
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/myofiber.png differ
diff --git a/mods/mmmPowersuits/textures/items/netherstar.png b/mods/mmmPowersuits/textures/items/netherstar.png
new file mode 100644
index 0000000..372ab30
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/netherstar.png differ
diff --git a/mods/mmmPowersuits/textures/items/nexuscrystal.png b/mods/mmmPowersuits/textures/items/nexuscrystal.png
new file mode 100644
index 0000000..663c9cd
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/nexuscrystal.png differ
diff --git a/mods/mmmPowersuits/textures/items/nightvision.png b/mods/mmmPowersuits/textures/items/nightvision.png
new file mode 100644
index 0000000..f65fc75
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/nightvision.png differ
diff --git a/mods/mmmPowersuits/textures/items/parachute.png b/mods/mmmPowersuits/textures/items/parachute.png
new file mode 100644
index 0000000..c14cf68
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/parachute.png differ
diff --git a/mods/mmmPowersuits/textures/items/parachuteitem.png b/mods/mmmPowersuits/textures/items/parachuteitem.png
new file mode 100644
index 0000000..229c3b6
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/parachuteitem.png differ
diff --git a/mods/mmmPowersuits/textures/items/paste.png b/mods/mmmPowersuits/textures/items/paste.png
new file mode 100644
index 0000000..68879f0
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/paste.png differ
diff --git a/mods/mmmPowersuits/textures/items/reddrone.png b/mods/mmmPowersuits/textures/items/reddrone.png
new file mode 100644
index 0000000..f0a9cca
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/reddrone.png differ
diff --git a/mods/mmmPowersuits/textures/items/redfield.png b/mods/mmmPowersuits/textures/items/redfield.png
new file mode 100644
index 0000000..b717fcf
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/redfield.png differ
diff --git a/mods/mmmPowersuits/textures/items/redlight.png b/mods/mmmPowersuits/textures/items/redlight.png
new file mode 100644
index 0000000..d85bc35
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/redlight.png differ
diff --git a/mods/mmmPowersuits/textures/items/redphaser.png b/mods/mmmPowersuits/textures/items/redphaser.png
new file mode 100644
index 0000000..7949abd
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/redphaser.png differ
diff --git a/mods/mmmPowersuits/textures/items/redplate.png b/mods/mmmPowersuits/textures/items/redplate.png
new file mode 100644
index 0000000..0186990
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/redplate.png differ
diff --git a/mods/mmmPowersuits/textures/items/redstar.png b/mods/mmmPowersuits/textures/items/redstar.png
new file mode 100644
index 0000000..3c2bf31
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/redstar.png differ
diff --git a/mods/mmmPowersuits/textures/items/servo.png b/mods/mmmPowersuits/textures/items/servo.png
new file mode 100644
index 0000000..23d8306
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/servo.png differ
diff --git a/mods/mmmPowersuits/textures/items/shockabsorber.png b/mods/mmmPowersuits/textures/items/shockabsorber.png
new file mode 100644
index 0000000..848a3fa
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/shockabsorber.png differ
diff --git a/mods/mmmPowersuits/textures/items/solenoid.png b/mods/mmmPowersuits/textures/items/solenoid.png
new file mode 100644
index 0000000..20d2542
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/solenoid.png differ
diff --git a/mods/mmmPowersuits/textures/items/soundweapon.png b/mods/mmmPowersuits/textures/items/soundweapon.png
new file mode 100644
index 0000000..cbe091c
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/soundweapon.png differ
diff --git a/mods/mmmPowersuits/textures/items/sprintassist.png b/mods/mmmPowersuits/textures/items/sprintassist.png
new file mode 100644
index 0000000..14364aa
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/sprintassist.png differ
diff --git a/mods/mmmPowersuits/textures/items/swimboost.png b/mods/mmmPowersuits/textures/items/swimboost.png
new file mode 100644
index 0000000..221511d
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/swimboost.png differ
diff --git a/mods/mmmPowersuits/textures/items/thermometer.png b/mods/mmmPowersuits/textures/items/thermometer.png
new file mode 100644
index 0000000..d80e3da
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/thermometer.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolaxe.png b/mods/mmmPowersuits/textures/items/toolaxe.png
new file mode 100644
index 0000000..e5062f6
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolaxe.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolfist.png b/mods/mmmPowersuits/textures/items/toolfist.png
new file mode 100644
index 0000000..0672241
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolfist.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolfisty.png b/mods/mmmPowersuits/textures/items/toolfisty.png
new file mode 100644
index 0000000..1a3ba27
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolfisty.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolpick.png b/mods/mmmPowersuits/textures/items/toolpick.png
new file mode 100644
index 0000000..a368847
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolpick.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolpinch.png b/mods/mmmPowersuits/textures/items/toolpinch.png
new file mode 100644
index 0000000..ee4390c
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolpinch.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolpointer.png b/mods/mmmPowersuits/textures/items/toolpointer.png
new file mode 100644
index 0000000..fcfc492
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolpointer.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolshears.png b/mods/mmmPowersuits/textures/items/toolshears.png
new file mode 100644
index 0000000..5db5494
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolshears.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolshovel.png b/mods/mmmPowersuits/textures/items/toolshovel.png
new file mode 100644
index 0000000..6461b4a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolshovel.png differ
diff --git a/mods/mmmPowersuits/textures/items/toolshovels.png b/mods/mmmPowersuits/textures/items/toolshovels.png
new file mode 100644
index 0000000..48e4489
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/toolshovels.png differ
diff --git a/mods/mmmPowersuits/textures/items/transparentarmor.png b/mods/mmmPowersuits/textures/items/transparentarmor.png
new file mode 100644
index 0000000..6c327f1
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/transparentarmor.png differ
diff --git a/mods/mmmPowersuits/textures/items/waterelectrolyzer.png b/mods/mmmPowersuits/textures/items/waterelectrolyzer.png
new file mode 100644
index 0000000..68e57e1
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/waterelectrolyzer.png differ
diff --git a/mods/mmmPowersuits/textures/items/wiring.png b/mods/mmmPowersuits/textures/items/wiring.png
new file mode 100644
index 0000000..030e94a
Binary files /dev/null and b/mods/mmmPowersuits/textures/items/wiring.png differ
diff --git a/resources/machinemuse/keybind.png b/mods/mmmPowersuits/textures/keybind.png
similarity index 100%
rename from resources/machinemuse/keybind.png
rename to mods/mmmPowersuits/textures/keybind.png
diff --git a/resources/machinemuse/mmmpsicon.png b/mods/mmmPowersuits/textures/mmmpsicon.png
similarity index 100%
rename from resources/machinemuse/mmmpsicon.png
rename to mods/mmmPowersuits/textures/mmmpsicon.png
diff --git a/resources/machinemuse/mmmpslogo_64.png b/mods/mmmPowersuits/textures/mmmpslogo_64.png
similarity index 100%
rename from resources/machinemuse/mmmpslogo_64.png
rename to mods/mmmPowersuits/textures/mmmpslogo_64.png
diff --git a/resources/machinemuse/blankarmor.png b/mods/mmmPowersuits/textures/models/blankarmor.png
similarity index 100%
rename from resources/machinemuse/blankarmor.png
rename to mods/mmmPowersuits/textures/models/blankarmor.png
diff --git a/resources/machinemuse/joearmor.png b/mods/mmmPowersuits/textures/models/joearmor.png
similarity index 100%
rename from resources/machinemuse/joearmor.png
rename to mods/mmmPowersuits/textures/models/joearmor.png
diff --git a/resources/machinemuse/joearmorpants.png b/mods/mmmPowersuits/textures/models/joearmorpants.png
similarity index 100%
rename from resources/machinemuse/joearmorpants.png
rename to mods/mmmPowersuits/textures/models/joearmorpants.png
diff --git a/resources/machinemuse/sebkarmor.png b/mods/mmmPowersuits/textures/models/sebkarmor.png
similarity index 100%
rename from resources/machinemuse/sebkarmor.png
rename to mods/mmmPowersuits/textures/models/sebkarmor.png
diff --git a/resources/machinemuse/sebkarmorpants.png b/mods/mmmPowersuits/textures/models/sebkarmorpants.png
similarity index 100%
rename from resources/machinemuse/sebkarmorpants.png
rename to mods/mmmPowersuits/textures/models/sebkarmorpants.png
diff --git a/resources/machinemuse/tinkertable_tx.png b/mods/mmmPowersuits/textures/models/tinkertable_tx.png
similarity index 100%
rename from resources/machinemuse/tinkertable_tx.png
rename to mods/mmmPowersuits/textures/models/tinkertable_tx.png
diff --git a/resources/machinemuse/tool.png b/mods/mmmPowersuits/textures/models/tool.png
similarity index 100%
rename from resources/machinemuse/tool.png
rename to mods/mmmPowersuits/textures/models/tool.png
diff --git a/resources/machinemuse/sebkicons.png b/mods/mmmPowersuits/textures/sebkicons.png
similarity index 100%
rename from resources/machinemuse/sebkicons.png
rename to mods/mmmPowersuits/textures/sebkicons.png
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,0.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,0.png
new file mode 100644
index 0000000..faf9a73
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,0.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,1.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,1.png
new file mode 100644
index 0000000..513ccc2
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,1.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,2.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,2.png
new file mode 100644
index 0000000..149ecdb
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,2.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,3.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,3.png
new file mode 100644
index 0000000..9595291
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,3.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,4.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,4.png
new file mode 100644
index 0000000..aad6c0e
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,4.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,5.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,5.png
new file mode 100644
index 0000000..ebca875
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,5.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,6.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,6.png
new file mode 100644
index 0000000..e6b6be4
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,6.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,7.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,7.png
new file mode 100644
index 0000000..dd1a669
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,7.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/0,8.png b/mods/mmmPowersuits/textures/sebkicons.png_out/0,8.png
new file mode 100644
index 0000000..8f434e6
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/0,8.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,0.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,0.png
new file mode 100644
index 0000000..2ee3842
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,0.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,1.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,1.png
new file mode 100644
index 0000000..4d0134f
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,1.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,2.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,2.png
new file mode 100644
index 0000000..0f86e78
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,2.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,3.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,3.png
new file mode 100644
index 0000000..df5d36b
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,3.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,4.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,4.png
new file mode 100644
index 0000000..43dfa2c
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,4.png differ
diff --git a/mods/mmmPowersuits/textures/sebkicons.png_out/1,5.png b/mods/mmmPowersuits/textures/sebkicons.png_out/1,5.png
new file mode 100644
index 0000000..ca957d9
Binary files /dev/null and b/mods/mmmPowersuits/textures/sebkicons.png_out/1,5.png differ
diff --git a/resources/machinemuse/watericons-2.png b/mods/mmmPowersuits/textures/watericons-2.png
similarity index 100%
rename from resources/machinemuse/watericons-2.png
rename to mods/mmmPowersuits/textures/watericons-2.png
diff --git a/resources/machinemuse/watericons.png b/mods/mmmPowersuits/textures/watericons.png
similarity index 100%
rename from resources/machinemuse/watericons.png
rename to mods/mmmPowersuits/textures/watericons.png
diff --git a/resources/machinemuse/iconstodo.txt b/resources/machinemuse/iconstodo.txt
deleted file mode 100644
index 18629b6..0000000
--- a/resources/machinemuse/iconstodo.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Icons for stuff which will likely be added soon
-============
-Laser/hologram projector (to be used as a component in the cosmetic as well as HUD upgrades...currently using that nether star design because it's pretty and multicoloured)
-Carbon Myofibers (artificial muscles)
-Glycerol (transparent goop)
-Carbon fiber strands
-
-Cooling systems
-
-Icons for stuff that will be added eventually
-============
-Generators of various types (kinetic, coal, uranium, fusion...)
\ No newline at end of file
diff --git a/resources/machinemuse/moreiconideas.txt b/resources/machinemuse/moreiconideas.txt
deleted file mode 100644
index 8f3885e..0000000
--- a/resources/machinemuse/moreiconideas.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-
-BTW, some new components that will be added soon (and added to the cost of existing modules as well as some new ones):
--Tungsten plating (for heat capacity)
--Cooling systems of some sort
--Carbon myofibers (artificial muscles, will supplement servos in movement modules)
--Control circuits (for modules that can be configured on-the-fly)
--Laser/hologram emitters (for HUD-related modules as well as cosmetic ones)
--Force field generators (to make energy shields more difficult to acquire, and perhaps add some some other things like an item magnet, hover mode, etc.)
diff --git a/src/minecraft/net/machinemuse/api/ElectricItemUtils.java b/src/minecraft/net/machinemuse/api/ElectricItemUtils.java
index f6c4dd7..b591b6f 100644
--- a/src/minecraft/net/machinemuse/api/ElectricItemUtils.java
+++ b/src/minecraft/net/machinemuse/api/ElectricItemUtils.java
@@ -9,7 +9,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import universalelectricity.core.implement.IItemElectric;
+import universalelectricity.core.item.IItemElectric;
public class ElectricItemUtils {
@@ -41,11 +41,11 @@ public class ElectricItemUtils {
IItemElectric item = (IItemElectric) (stack.getItem());
double joules = item.getJoules(stack);
if (joules > drainAmount) {
- item.onUse(drainAmount, stack);
+ // item.onUse(drainAmount, stack);
break;
} else {
drainAmount -= joules;
- item.onUse(joules, stack);
+ // item.onUse(joules, stack);
}
}
}
@@ -65,11 +65,11 @@ public class ElectricItemUtils {
IItemElectric item = (IItemElectric) (stack.getItem());
double missingjoules = item.getMaxJoules(stack) - item.getJoules(stack);
if (missingjoules > joulesToGive) {
- item.onUse(-joulesToGive, stack);
+ // item.onUse(-joulesToGive, stack);
break;
} else {
joulesToGive -= missingjoules;
- item.onUse(-missingjoules, stack);
+ // item.onUse(-missingjoules, stack);
}
}
}
diff --git a/src/minecraft/net/machinemuse/general/MuseRenderer.java b/src/minecraft/net/machinemuse/general/MuseRenderer.java
index f3b7657..96c7cb2 100644
--- a/src/minecraft/net/machinemuse/general/MuseRenderer.java
+++ b/src/minecraft/net/machinemuse/general/MuseRenderer.java
@@ -1,8 +1,6 @@
package net.machinemuse.general;
import java.nio.DoubleBuffer;
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.List;
@@ -23,7 +21,6 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Vec3;
-import net.minecraftforge.client.ForgeHooksClient;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
@@ -79,8 +76,7 @@ public abstract class MuseRenderer {
}
/**
- * Creates a list of points linearly interpolated between points a and b
- * noninclusive.
+ * Creates a list of points linearly interpolated between points a and b noninclusive.
*
* @return A list of num points
*/
@@ -129,8 +125,7 @@ public abstract class MuseRenderer {
* @param endangle
* End angle in radians
* @param radius
- * Radius of the circle (used in calculating number of segments
- * to draw as well as size of the arc)
+ * Radius of the circle (used in calculating number of segments to draw as well as size of the arc)
* @param xoffset
* Convenience parameter, added to every vertex
* @param yoffset
@@ -225,8 +220,7 @@ public abstract class MuseRenderer {
}
/**
- * Call before doing any pure geometry (ie. with colours rather than
- * textures).
+ * Call before doing any pure geometry (ie. with colours rather than textures).
*/
public static void texturelessOn() {
GL11.glDisable(GL11.GL_TEXTURE_2D);
@@ -234,8 +228,7 @@ public abstract class MuseRenderer {
}
/**
- * Call after doing pure geometry (ie. with colours) to go back to the
- * texture mode (default).
+ * Call after doing pure geometry (ie. with colours) to go back to the texture mode (default).
*/
public static void texturelessOff() {
GL11.glEnable(GL11.GL_TEXTURE_2D);
@@ -266,8 +259,7 @@ public abstract class MuseRenderer {
}
/**
- * Makes the appropriate openGL calls and draws an item and overlay using
- * the default icon
+ * Makes the appropriate openGL calls and draws an item and overlay using the default icon
*/
public static void drawItemAt(double x, double y, ItemStack item) {
GL11.glDisable(GL11.GL_DEPTH_TEST);
@@ -301,21 +293,20 @@ public abstract class MuseRenderer {
texturelessOff();
blendingOn();
- ForgeHooksClient.bindTexture(icon.getTexturefile(), 0);
-
if (colour != null) {
colour.doGL();
}
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
- float r = 0.0625f;
- float u = (icon.getIconIndex() % 16) * r;
- float v = (icon.getIconIndex() / 16) * r;
- tess.addVertexWithUV(x, y, 0, u, v);
- tess.addVertexWithUV(x, y + 16, 0, u, v + r);
- tess.addVertexWithUV(x + 16, y + 16, 0, u + r, v + r);
- tess.addVertexWithUV(x + 16, y, 0, u + r, v);
+ float u1 = icon.getIconRegistration().getU1();
+ float v1 = icon.getIconRegistration().getV1();
+ float u2 = icon.getIconRegistration().getU2();
+ float v2 = icon.getIconRegistration().getV2();
+ tess.addVertexWithUV(x, y, 0, u1, v1);
+ tess.addVertexWithUV(x, y + 16, 0, u1, v2);
+ tess.addVertexWithUV(x + 16, y + 16, 0, u2, v2);
+ tess.addVertexWithUV(x + 16, y, 0, u2, v1);
tess.draw();
MuseRenderer.blendingOff();
@@ -345,21 +336,25 @@ public abstract class MuseRenderer {
texturelessOff();
blendingOn();
- ForgeHooksClient.bindTexture(icon.getTexturefile(), 0);
-
if (colour != null) {
colour.doGL();
}
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
- double r = 0.0625;
- double u = (icon.getIconIndex() % 16) * r;
- double v = (icon.getIconIndex() / 16) * r;
- tess.addVertexWithUV(x + left, y + top, 0, u + r * r * left, v + r * r * top);
- tess.addVertexWithUV(x + left, y + bottom, 0, u + r * r * left, v + r * r * bottom);
- tess.addVertexWithUV(x + right, y + bottom, 0, u + r * r * right, v + r * r * bottom);
- tess.addVertexWithUV(x + right, y + top, 0, u + r * r * right, v + r * r * top);
+ float u1 = icon.getIconRegistration().getU1();
+ float v1 = icon.getIconRegistration().getV1();
+ float u2 = icon.getIconRegistration().getU2();
+ float v2 = icon.getIconRegistration().getV2();
+ double xoffset1 = left * (u2 - u1) / 16.0f;
+ double yoffset1 = top * (v2 - v1) / 16.0f;
+ double xoffset2 = right * (u2 - u1) / 16.0f;
+ double yoffset2 = bottom * (v2 - v1) / 16.0f;
+
+ tess.addVertexWithUV(x + left, y + top, 0, u1 + xoffset1, v1 + yoffset1);
+ tess.addVertexWithUV(x + left, y + bottom, 0, u1 + xoffset1, v2 + yoffset2);
+ tess.addVertexWithUV(x + right, y + bottom, 0, u1 + xoffset2, v2 + yoffset2);
+ tess.addVertexWithUV(x + right, y + top, 0, u1 + xoffset2, v1 + yoffset1);
tess.draw();
MuseRenderer.blendingOff();
@@ -371,8 +366,7 @@ public abstract class MuseRenderer {
}
/**
- * Switches to relative coordinate frame (where -1,-1 is top left of the
- * working area, and 1,1 is the bottom right)
+ * Switches to relative coordinate frame (where -1,-1 is top left of the working area, and 1,1 is the bottom right)
*/
public static void relativeCoords(MuseGui gui) {
GL11.glPushMatrix();
@@ -381,8 +375,7 @@ public abstract class MuseRenderer {
}
/**
- * Does the necessary openGL calls and calls the Minecraft font renderer to
- * draw a string at the specified coords
+ * Does the necessary openGL calls and calls the Minecraft font renderer to draw a string at the specified coords
*/
public static void drawString(String s, double x, double y) {
RenderHelper.disableStandardItemLighting();
@@ -390,8 +383,7 @@ public abstract class MuseRenderer {
}
/**
- * Does the necessary openGL calls and calls the Minecraft font renderer to
- * draw a string such that the xcoord is halfway through the string
+ * Does the necessary openGL calls and calls the Minecraft font renderer to draw a string such that the xcoord is halfway through the string
*/
public static void drawCenteredString(String s, double x, double y) {
double xradius = getFontRenderer().getStringWidth(s) / 2;
@@ -463,47 +455,6 @@ public abstract class MuseRenderer {
arraysOff();
}
- private static void drawTriangles3DT(float[] v, float[] textures2, int[] i) {
- arraysOnT();
- texturelessOff();
-
- // float subdivisions = 5f;
- // float radius = 0.5f;
-
- // GL11.glPushMatrix();
- // GL11.glTranslatef(-radius, -radius, 0);
- // for (int i1 = 0; i1 <= subdivisions * 2; i1++) {
- // for (int i2 = 0; i2 <= subdivisions * 2; i2++) {
- FloatBuffer vertices = BufferUtils.createFloatBuffer(v.length);
- vertices.put(v);
- vertices.flip();
-
- FloatBuffer textures = BufferUtils.createFloatBuffer(textures2.length);
- textures.put(textures2);
- textures.flip();
-
- IntBuffer indices = BufferUtils.createIntBuffer(i.length);
- indices.put(i);
- indices.flip();
-
- // GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL);
-
- GL11.glVertexPointer(3, 0, vertices);
- GL11.glTexCoordPointer(2, 0, textures);
-
- GL11.glDrawElements(GL11.GL_TRIANGLES, indices);
-
- // GL11.glTranslatef(0, radius / subdivisions, 0);
- // }
- // GL11.glTranslatef(radius / subdivisions, -radius * 2, 0);
- // }
- // GL11.glPopMatrix();
-
- texturelessOff();
- arraysOff();
-
- }
-
public static void drawStringsJustified(List words, double x1, double x2, double y) {
int totalwidth = 0;
for (String word : words) {
diff --git a/src/minecraft/net/machinemuse/general/gui/MuseGui.java b/src/minecraft/net/machinemuse/general/gui/MuseGui.java
index a0e2944..37c7768 100644
--- a/src/minecraft/net/machinemuse/general/gui/MuseGui.java
+++ b/src/minecraft/net/machinemuse/general/gui/MuseGui.java
@@ -44,7 +44,7 @@ public class MuseGui extends GuiScreen {
public void initGui() {
super.initGui();
this.frames.clear();
- this.controlList.clear();
+ //this.controlList.clear();
Keyboard.enableRepeatEvents(true);
creationTime = System.currentTimeMillis();
diff --git a/src/minecraft/net/machinemuse/general/gui/MuseIcon.java b/src/minecraft/net/machinemuse/general/gui/MuseIcon.java
index 67461e7..4e8ebb4 100644
--- a/src/minecraft/net/machinemuse/general/gui/MuseIcon.java
+++ b/src/minecraft/net/machinemuse/general/gui/MuseIcon.java
@@ -1,132 +1,127 @@
package net.machinemuse.general.gui;
-import net.machinemuse.powersuits.common.Config;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.util.Icon;
/**
- * MuseIcon is just a helper class to make it more convenient to have multiple
- * sprite sheets and to keep all the icon indices in one place.
+ * MuseIcon is just a helper class to make it more convenient to have multiple sprite sheets and to keep all the icon indices in one place.
*
* @author MachineMuse
*/
public class MuseIcon {
- public static final String SEBK_ICON_PATH = Config.SEBK_ICON_PATH;
- public static final String WC_ICON_PATH = Config.WC_ICON_PATH;
- public static final String MUSE_ICON_PATH = Config.MUSE_ICON_PATH;
+ public static final String ICON_PREFIX = "mmmPowersuits:";
// Placeholder icons
- public static final MuseIcon ORB_1_GREEN = new MuseIcon(SEBK_ICON_PATH, 0);
- public static final MuseIcon ORB_1_RED = new MuseIcon(SEBK_ICON_PATH, 1);
- public static final MuseIcon ORB_1_BLUE = new MuseIcon(SEBK_ICON_PATH, 2);
- public static final MuseIcon PLATE_1_GREEN = new MuseIcon(SEBK_ICON_PATH, 3);
- public static final MuseIcon PLATE_1_RED = new MuseIcon(SEBK_ICON_PATH, 4);
- public static final MuseIcon PLATE_1_BLUE = new MuseIcon(SEBK_ICON_PATH, 5);
- public static final MuseIcon NEXUS_1_RED = new MuseIcon(SEBK_ICON_PATH, 6);
- public static final MuseIcon NEXUS_1_GREEN = new MuseIcon(SEBK_ICON_PATH, 7);
- public static final MuseIcon NEXUS_1_BLUE = new MuseIcon(SEBK_ICON_PATH, 8);
- public static final MuseIcon PLATE_2_GREEN = new MuseIcon(SEBK_ICON_PATH, 16);
- public static final MuseIcon PLATE_2_BLUE = new MuseIcon(SEBK_ICON_PATH, 17);
- public static final MuseIcon PLATE_2_RED = new MuseIcon(SEBK_ICON_PATH, 18);
- public static final MuseIcon INDICATOR_1_GREEN = new MuseIcon(SEBK_ICON_PATH, 19);
- public static final MuseIcon INDICATOR_1_RED = new MuseIcon(SEBK_ICON_PATH, 20);
- public static final MuseIcon INDICATOR_1_BLUE = new MuseIcon(SEBK_ICON_PATH, 21);
+ public static final MuseIcon ORB_1_GREEN = new MuseIcon("greendrone");
+ public static final MuseIcon ORB_1_RED = new MuseIcon("reddrone");
+ public static final MuseIcon ORB_1_BLUE = new MuseIcon("bluedrone");
+ public static final MuseIcon PLATE_1_GREEN = new MuseIcon("greenlight");
+ public static final MuseIcon PLATE_1_RED = new MuseIcon("redlight");
+ public static final MuseIcon PLATE_1_BLUE = new MuseIcon("bluelight");
+ public static final MuseIcon NEXUS_1_RED = new MuseIcon("redstar");
+ public static final MuseIcon NEXUS_1_GREEN = new MuseIcon("greenstar");
+ public static final MuseIcon NEXUS_1_BLUE = new MuseIcon("bluestar");
+ public static final MuseIcon PLATE_2_GREEN = new MuseIcon("greenplate");
+ public static final MuseIcon PLATE_2_BLUE = new MuseIcon("blueplate");
+ public static final MuseIcon PLATE_2_RED = new MuseIcon("redplate");
+ public static final MuseIcon INDICATOR_1_GREEN = new MuseIcon("greenphaser");
+ public static final MuseIcon INDICATOR_1_RED = new MuseIcon("redphaser");
+ public static final MuseIcon INDICATOR_1_BLUE = new MuseIcon("bluephaser");
// Item icons
- public static final MuseIcon ARMOR_HEAD = new MuseIcon(SEBK_ICON_PATH, 15);
- public static final MuseIcon ARMOR_TORSO = new MuseIcon(SEBK_ICON_PATH, 31);
- public static final MuseIcon ARMOR_LEGS = new MuseIcon(SEBK_ICON_PATH, 47);
- public static final MuseIcon ARMOR_FEET = new MuseIcon(SEBK_ICON_PATH, 63);
- public static final MuseIcon TOOL_AXE = new MuseIcon(SEBK_ICON_PATH, 9);
- public static final MuseIcon TOOL_PICK = new MuseIcon(SEBK_ICON_PATH, 10);
- public static final MuseIcon TOOL_SHOVEL = new MuseIcon(SEBK_ICON_PATH, 11);
- public static final MuseIcon TOOL_SHEARS = new MuseIcon(SEBK_ICON_PATH, 12);
- public static final MuseIcon TOOL_FIST = new MuseIcon(SEBK_ICON_PATH, 13);
- public static final MuseIcon TOOL_PINCH = new MuseIcon(SEBK_ICON_PATH, 14);
+ public static final MuseIcon ARMOR_HEAD = new MuseIcon("armorhead");
+ public static final MuseIcon ARMOR_TORSO = new MuseIcon("armorhead");
+ public static final MuseIcon ARMOR_LEGS = new MuseIcon("armorhead");
+ public static final MuseIcon ARMOR_FEET = new MuseIcon("armorhead");
+ public static final MuseIcon TOOL_AXE = new MuseIcon("toolaxe");
+ public static final MuseIcon TOOL_PICK = new MuseIcon("toolaxe");
+ public static final MuseIcon TOOL_SHOVEL = new MuseIcon("toolaxe");
+ public static final MuseIcon TOOL_SHEARS = new MuseIcon("toolaxe");
+ public static final MuseIcon TOOL_FIST = new MuseIcon("toolaxe");
+ public static final MuseIcon TOOL_PINCH = new MuseIcon("toolaxe");
// Module icons
- public static final MuseIcon JETBOOTS = new MuseIcon(WC_ICON_PATH, 0);
- public static final MuseIcon JETPACK = new MuseIcon(WC_ICON_PATH, 1);
- public static final MuseIcon GLIDER = new MuseIcon(WC_ICON_PATH, 2);
- public static final MuseIcon GRAVITY_ENGINE = new MuseIcon(WC_ICON_PATH, 3);
- public static final MuseIcon SPRINT_ASSIST = new MuseIcon(WC_ICON_PATH, 4);
- public static final MuseIcon JUMP_ASSIST = new MuseIcon(WC_ICON_PATH, 5);
- public static final MuseIcon ENERGY_SHIELD = new MuseIcon(WC_ICON_PATH, 6);
- public static final MuseIcon ITEM_IRON_PLATING = new MuseIcon(WC_ICON_PATH, 7);
- public static final MuseIcon ITEM_DIAMOND_PLATING = new MuseIcon(WC_ICON_PATH, 8);
- public static final MuseIcon ITEM_TUNGSTEN_PLATING = new MuseIcon(WC_ICON_PATH, 9);
- public static final MuseIcon CLAW_OPEN = new MuseIcon(WC_ICON_PATH, 11);
- public static final MuseIcon WEAPON_FIRE = new MuseIcon(WC_ICON_PATH, 12);
- public static final MuseIcon HEART = new MuseIcon(WC_ICON_PATH, 13);
- public static final MuseIcon FIELD_EMITTER_GREEN = new MuseIcon(WC_ICON_PATH, 14);
- public static final MuseIcon FIELD_EMITTER_RED = new MuseIcon(WC_ICON_PATH, 15);
- public static final MuseIcon SHOCK_ABSORBER = new MuseIcon(WC_ICON_PATH, 16);
- public static final MuseIcon PARACHUTE_MODULE = new MuseIcon(WC_ICON_PATH, 18);
- public static final MuseIcon WATER_ELECTROLYZER = new MuseIcon(WC_ICON_PATH, 19);
- public static final MuseIcon TRANSPARENT_ARMOR = new MuseIcon(WC_ICON_PATH, 20);
- public static final MuseIcon SWIM_BOOST = new MuseIcon(WC_ICON_PATH, 21);
- public static final MuseIcon STEP_ASSIST = new MuseIcon(WC_ICON_PATH, 22);
- public static final MuseIcon DIAMOND_PICK = new MuseIcon(WC_ICON_PATH, 26);
- public static final MuseIcon CLAW_CLOSED = new MuseIcon(WC_ICON_PATH, 27);
- public static final MuseIcon WEAPON_ELECTRIC = new MuseIcon(WC_ICON_PATH, 28);
- public static final MuseIcon BATTERY1 = new MuseIcon(WC_ICON_PATH, 30);
- public static final MuseIcon CIRCUIT = new MuseIcon(WC_ICON_PATH, 31);
- public static final MuseIcon WIRING = new MuseIcon(WC_ICON_PATH, 32);
- public static final MuseIcon SOLENOID = new MuseIcon(WC_ICON_PATH, 33);
- public static final MuseIcon SERVOMOTOR = new MuseIcon(WC_ICON_PATH, 34);
- public static final MuseIcon GLIDERWING = new MuseIcon(WC_ICON_PATH, 35);
- public static final MuseIcon IONTHRUSTER = new MuseIcon(WC_ICON_PATH, 36);
- public static final MuseIcon LVCAPACITOR = new MuseIcon(WC_ICON_PATH, 37);
- public static final MuseIcon PARACHUTE = new MuseIcon(WC_ICON_PATH, 38);
- public static final MuseIcon AQUA_AFFINITY = new MuseIcon(WC_ICON_PATH, 42);
- public static final MuseIcon CLAW_LASER = new MuseIcon(WC_ICON_PATH, 43);
- public static final MuseIcon WEAPON_SOUND = new MuseIcon(WC_ICON_PATH, 44);
- public static final MuseIcon BATTERY2 = new MuseIcon(WC_ICON_PATH, 46);
- public static final MuseIcon LAMP = new MuseIcon(WC_ICON_PATH, 47);
- public static final MuseIcon MYOFIBER_PASTE = new MuseIcon(WC_ICON_PATH, 48);
- public static final MuseIcon CARBON_MYOFIBER = new MuseIcon(WC_ICON_PATH, 49);
- public static final MuseIcon ARTIFICIAL_MUSCLE = new MuseIcon(WC_ICON_PATH, 50);
- public static final MuseIcon CRYSTAL_BUBBLE = new MuseIcon(WC_ICON_PATH, 51);
- public static final MuseIcon COOLING_SYSTEM = new MuseIcon(WC_ICON_PATH, 52);
- public static final MuseIcon MVCAPACITOR = new MuseIcon(WC_ICON_PATH, 53);
- public static final MuseIcon SCANNER = new MuseIcon(WC_ICON_PATH, 54);
- public static final MuseIcon POWERTOOL = new MuseIcon(WC_ICON_PATH, 59);
- public static final MuseIcon WEAPON_GRAVITY = new MuseIcon(WC_ICON_PATH, 60);
- public static final MuseIcon BATTERYCRYSTAL = new MuseIcon(WC_ICON_PATH, 62);
- public static final MuseIcon FLOATING_CRYSTAL = new MuseIcon(WC_ICON_PATH, 63);
- public static final MuseIcon MODULE_IRON_PLATING = new MuseIcon(WC_ICON_PATH, 64);
- public static final MuseIcon MODULE_DIAMOND_PLATING = new MuseIcon(WC_ICON_PATH, 65);
- public static final MuseIcon MODULE_TUNGSTEN_PLATING = new MuseIcon(WC_ICON_PATH, 66);
- public static final MuseIcon FIELD_GENERATOR = new MuseIcon(WC_ICON_PATH, 67);
- public static final MuseIcon HVCAPACITOR = new MuseIcon(WC_ICON_PATH, 69);
- public static final MuseIcon HOLOGRAM_EMITTER = new MuseIcon(WC_ICON_PATH, 70);
- public static final MuseIcon LASER = new MuseIcon(WC_ICON_PATH, 71);
- public static final MuseIcon ALIEN = new MuseIcon(WC_ICON_PATH, 78);
- public static final MuseIcon NETHERSTAR = new MuseIcon(WC_ICON_PATH, 94);
- public static final MuseIcon ARCREACTOR = new MuseIcon(WC_ICON_PATH, 110);
- public static final MuseIcon PUNCHY = new MuseIcon(WC_ICON_PATH, 233);
+ public static final MuseIcon JETBOOTS = new MuseIcon("jetboots");
+ public static final MuseIcon JETPACK = new MuseIcon("jetboots");
+ public static final MuseIcon GLIDER = new MuseIcon("jetboots");
+ public static final MuseIcon GRAVITY_ENGINE = new MuseIcon("jetboots");
+ public static final MuseIcon SPRINT_ASSIST = new MuseIcon("jetboots");
+ public static final MuseIcon JUMP_ASSIST = new MuseIcon("jetboots");
+ public static final MuseIcon ENERGY_SHIELD = new MuseIcon("jetboots");
+ public static final MuseIcon ITEM_IRON_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon ITEM_DIAMOND_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon ITEM_TUNGSTEN_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon CLAW_OPEN = new MuseIcon("jetboots");
+ public static final MuseIcon WEAPON_FIRE = new MuseIcon("jetboots");
+ public static final MuseIcon HEART = new MuseIcon("jetboots");
+ public static final MuseIcon FIELD_EMITTER_GREEN = new MuseIcon("jetboots");
+ public static final MuseIcon FIELD_EMITTER_RED = new MuseIcon("jetboots");
+ public static final MuseIcon SHOCK_ABSORBER = new MuseIcon("jetboots");
+ public static final MuseIcon PARACHUTE_MODULE = new MuseIcon("jetboots");
+ public static final MuseIcon WATER_ELECTROLYZER = new MuseIcon("jetboots");
+ public static final MuseIcon TRANSPARENT_ARMOR = new MuseIcon("jetboots");
+ public static final MuseIcon SWIM_BOOST = new MuseIcon("jetboots");
+ public static final MuseIcon STEP_ASSIST = new MuseIcon("jetboots");
+ public static final MuseIcon DIAMOND_PICK = new MuseIcon("jetboots");
+ public static final MuseIcon CLAW_CLOSED = new MuseIcon("jetboots");
+ public static final MuseIcon WEAPON_ELECTRIC = new MuseIcon("jetboots");
+ public static final MuseIcon BATTERY1 = new MuseIcon("jetboots");
+ public static final MuseIcon CIRCUIT = new MuseIcon("jetboots");
+ public static final MuseIcon WIRING = new MuseIcon("jetboots");
+ public static final MuseIcon SOLENOID = new MuseIcon("jetboots");
+ public static final MuseIcon SERVOMOTOR = new MuseIcon("jetboots");
+ public static final MuseIcon GLIDERWING = new MuseIcon("jetboots");
+ public static final MuseIcon IONTHRUSTER = new MuseIcon("jetboots");
+ public static final MuseIcon LVCAPACITOR = new MuseIcon("jetboots");
+ public static final MuseIcon PARACHUTE = new MuseIcon("jetboots");
+ public static final MuseIcon AQUA_AFFINITY = new MuseIcon("jetboots");
+ public static final MuseIcon CLAW_LASER = new MuseIcon("jetboots");
+ public static final MuseIcon WEAPON_SOUND = new MuseIcon("jetboots");
+ public static final MuseIcon BATTERY2 = new MuseIcon("jetboots");
+ public static final MuseIcon LAMP = new MuseIcon("jetboots");
+ public static final MuseIcon MYOFIBER_PASTE = new MuseIcon("jetboots");
+ public static final MuseIcon CARBON_MYOFIBER = new MuseIcon("jetboots");
+ public static final MuseIcon ARTIFICIAL_MUSCLE = new MuseIcon("jetboots");
+ public static final MuseIcon CRYSTAL_BUBBLE = new MuseIcon("jetboots");
+ public static final MuseIcon COOLING_SYSTEM = new MuseIcon("jetboots");
+ public static final MuseIcon MVCAPACITOR = new MuseIcon("jetboots");
+ public static final MuseIcon SCANNER = new MuseIcon("jetboots");
+ public static final MuseIcon POWERTOOL = new MuseIcon("jetboots");
+ public static final MuseIcon WEAPON_GRAVITY = new MuseIcon("jetboots");
+ public static final MuseIcon BATTERYCRYSTAL = new MuseIcon("jetboots");
+ public static final MuseIcon FLOATING_CRYSTAL = new MuseIcon("jetboots");
+ public static final MuseIcon MODULE_IRON_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon MODULE_DIAMOND_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon MODULE_TUNGSTEN_PLATING = new MuseIcon("jetboots");
+ public static final MuseIcon FIELD_GENERATOR = new MuseIcon("jetboots");
+ public static final MuseIcon HVCAPACITOR = new MuseIcon("jetboots");
+ public static final MuseIcon HOLOGRAM_EMITTER = new MuseIcon("jetboots");
+ public static final MuseIcon LASER = new MuseIcon("jetboots");
+ public static final MuseIcon ALIEN = new MuseIcon("jetboots");
+ public static final MuseIcon NETHERSTAR = new MuseIcon("jetboots");
+ public static final MuseIcon ARCREACTOR = new MuseIcon("jetboots");
+ public static final MuseIcon PUNCHY = new MuseIcon("jetboots");
- String texturefile;
- int index;
+ String texturename;
+ Icon icon;
- public MuseIcon(String texturefile, int index) {
+ public MuseIcon(String texturename) {
super();
- this.texturefile = texturefile;
- this.index = index;
+ this.texturename = texturename;
+ this.icon = null;
}
- public String getTexturefile() {
- return texturefile;
+ public String getTexturename() {
+ return texturename;
}
- public void setTexturefile(String texturefile) {
- this.texturefile = texturefile;
+ public Icon getIconRegistration() {
+ return icon;
}
- public int getIconIndex() {
- return index;
- }
+ public void register(IconRegister iconRegister) {
+ icon = iconRegister.registerIcon(ICON_PREFIX + texturename);
- public void setIconIndex(int index) {
- this.index = index;
}
}
diff --git a/src/minecraft/net/machinemuse/general/gui/PortableCraftingGui.java b/src/minecraft/net/machinemuse/general/gui/PortableCraftingGui.java
index b67279f..bd552d9 100644
--- a/src/minecraft/net/machinemuse/general/gui/PortableCraftingGui.java
+++ b/src/minecraft/net/machinemuse/general/gui/PortableCraftingGui.java
@@ -1,43 +1,38 @@
package net.machinemuse.general.gui;
-import org.lwjgl.opengl.GL11;
-
import net.machinemuse.powersuits.container.PortableCraftingContainer;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+
public class PortableCraftingGui extends GuiContainer {
public PortableCraftingGui(EntityPlayer player, World world, int x, int y, int z) {
- super(new PortableCraftingContainer(player.inventory, world, x, y, z));
- }
+ super(new PortableCraftingContainer(player.inventory, world, x, y, z));
+ }
- /**
-* Draw the foreground layer for the GuiContainer (everything in front of
-* the items)
-*/
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRenderer.drawString(StatCollector.translateToLocal("container.crafting"), 28, 6, 4210752);
- this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
- }
+ /**
+ * Draw the foreground layer for the GuiContainer (everything in front of the items)
+ */
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ this.fontRenderer.drawString(StatCollector.translateToLocal("container.crafting"), 28, 6, 4210752);
+ this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
+ }
- /**
-* Draw the background layer for the GuiContainer (everything behind the
-* items)
-*/
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ /**
+ * Draw the background layer for the GuiContainer (everything behind the items)
+ */
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/gui/crafting.png");
+ int centerx = (this.width - this.xSize) / 2;
+ int var6 = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(centerx, var6, 0, 0, this.xSize, this.ySize);
+ }
- // TODO Variable-ize this
- int var4 = this.mc.renderEngine.getTexture("/gui/crafting.png");
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(var4);
- int var5 = (this.width - this.xSize) / 2;
- int var6 = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
- }
-
- public void onGuiClosed() {
- super.onGuiClosed();
- }
+ public void onGuiClosed() {
+ super.onGuiClosed();
+ }
}
diff --git a/src/minecraft/net/machinemuse/powersuits/block/BlockTinkerTable.java b/src/minecraft/net/machinemuse/powersuits/block/BlockTinkerTable.java
index d4b541e..8fef388 100644
--- a/src/minecraft/net/machinemuse/powersuits/block/BlockTinkerTable.java
+++ b/src/minecraft/net/machinemuse/powersuits/block/BlockTinkerTable.java
@@ -1,24 +1,23 @@
package net.machinemuse.powersuits.block;
-import java.util.List;
-
-import net.machinemuse.general.MuseStringUtils;
+import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.common.ModularPowersuits;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
/**
- * This is the tinkertable block. It doesn't do much except look pretty
- * (eventually) and provide a way for the player to access the TinkerTable GUI.
+ * This is the tinkertable block. It doesn't do much except look pretty (eventually) and provide a way for the player to access the TinkerTable GUI.
*
* @author MachineMuse
*
@@ -37,17 +36,15 @@ public class BlockTinkerTable extends Block {
public BlockTinkerTable() {
// Block constructor call
super(
- // Block ID
+ // Block ID
Config.getAssignedBlockID(Config.Blocks.TinkerTable),
- // Texture index (not used since we have a custom renderer)
- Config.Blocks.TinkerTable.textureIndex,
// Material (used for various things like whether it can burn,
// whether it requires a tool, and whether it can be moved by a
// piston
Material.iron);
// Block's internal/ID name
- setBlockName(Config.Blocks.TinkerTable.idName);
+ // setBlockName(Config.Blocks.TinkerTable.idName);
// Block's creative tab
setCreativeTab(Config.getCreativeTab());
@@ -83,37 +80,36 @@ public class BlockTinkerTable extends Block {
// Register the tile entity, which is only used for rendering at the
// moment
- GameRegistry.registerTileEntity(TileEntityTinkerTable.class,
- Config.Blocks.TinkerTable.idName);
+ GameRegistry.registerTileEntity(TileEntityTinkerTable.class, Config.Blocks.TinkerTable.idName);
// Finally, register the block so that it appears in the game. New
// standard requires a name to be passed.
GameRegistry.registerBlock(this, Config.Blocks.TinkerTable.idName);
}
-
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister iconRegister) {
+ MuseIcon.PLATE_1_GREEN.register(iconRegister);
+ this.blockIcon = MuseIcon.PLATE_1_GREEN.getIconRegistration();
+ }
+
/**
* Called upon block activation (right click on the block.)
*/
@Override
- public boolean onBlockActivated(World world, int x, int y,
- int z, EntityPlayer player, int par6, float par7,
- float par8, float par9)
- {
+ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (player.isSneaking()) {
return false;
}
- player.openGui(ModularPowersuits.instance,
- Config.Guis.GuiTinkerTable.ordinal(),
- world, x, y, z);
+ player.openGui(ModularPowersuits.instance, Config.Guis.GuiTinkerTable.ordinal(), world, x, y, z);
return true;
}
/**
- * returns some value from 0 to 30 or so for different models. Since we're
- * using a custom renderer, we pass in a completely different ID: the
- * assigned block ID. It won't conflict with other mods, since Forge looks
- * it up in a table anyway, but it's still best to have different internal
+ * returns some value from 0 to 30 or so for different models. Since we're using a custom renderer, we pass in a completely different ID: the
+ * assigned block ID. It won't conflict with other mods, since Forge looks it up in a table anyway, but it's still best to have different internal
* IDs.
*/
@Override
@@ -122,8 +118,7 @@ public class BlockTinkerTable extends Block {
}
/**
- * This method is called on a block after all other blocks gets already
- * created. You can use it to reference and configure something on the block
+ * This method is called on a block after all other blocks gets already created. You can use it to reference and configure something on the block
* that needs the others ones.
*/
@Override
@@ -131,12 +126,10 @@ public class BlockTinkerTable extends Block {
}
/**
- * If this block doesn't render as an ordinary block it will return False
- * (examples: signs, buttons, stairs, etc)
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
@Override
- public boolean renderAsNormalBlock()
- {
+ public boolean renderAsNormalBlock() {
return false;
}
@@ -250,14 +243,11 @@ public class BlockTinkerTable extends Block {
// }
/**
- * Returns Returns true if the given side of this block type should be
- * rendered (if it's solid or not), if the adjacent block is at the given
+ * Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the adjacent block is at the given
* coordinates. Args: blockAccess, x, y, z, side
*/
@Override
- public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int
- par3, int par4, int par5)
- {
+ public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
return true;
}
@@ -339,13 +329,11 @@ public class BlockTinkerTable extends Block {
// }
//
/**
- * Is this block (a) opaque and (b) a full 1m cube? This determines whether
- * or not to render the shared face of two adjacent blocks and also whether
- * the player can attach torches, redstone wire, etc to this block.
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also
+ * whether the player can attach torches, redstone wire, etc to this block.
*/
@Override
- public boolean isOpaqueCube()
- {
+ public boolean isOpaqueCube() {
return false;
}
@@ -1576,10 +1564,8 @@ public class BlockTinkerTable extends Block {
// }
/**
- * Called throughout the code as a replacement for block instanceof
- * BlockContainer Moving this to the Block base class allows for mods that
- * wish to extend vinella blocks, and also want to have a tile entity on
- * that block, may.
+ * Called throughout the code as a replacement for block instanceof BlockContainer Moving this to the Block base class allows for mods that wish
+ * to extend vinella blocks, and also want to have a tile entity on that block, may.
*
* Return true from this function to specify this block has a tile entity.
*
@@ -1588,24 +1574,20 @@ public class BlockTinkerTable extends Block {
* @return True if block has a tile entity, false otherwise
*/
@Override
- public boolean hasTileEntity(int metadata)
- {
+ public boolean hasTileEntity(int metadata) {
return true;
}
/**
- * Called throughout the code as a replacement for
- * BlockContainer.getBlockEntity Return the same thing you would from that
- * function. This will fall back to BlockContainer.getBlockEntity if this
- * block is a BlockContainer.
+ * Called throughout the code as a replacement for BlockContainer.getBlockEntity Return the same thing you would from that function. This will
+ * fall back to BlockContainer.getBlockEntity if this block is a BlockContainer.
*
* @param metadata
* The Metadata of the current block
* @return A instance of a class extending TileEntity
*/
@Override
- public TileEntity createTileEntity(World world, int metadata)
- {
+ public TileEntity createTileEntity(World world, int metadata) {
return new TileEntityTinkerTable();
}
@@ -2108,12 +2090,10 @@ public class BlockTinkerTable extends Block {
// }
//
/**
- * Location aware and overrideable version of the lightOpacity array, return
- * the number to subtract from the light value when it passes through this
- * block.
+ * Location aware and overrideable version of the lightOpacity array, return the number to subtract from the light value when it passes through
+ * this block.
*
- * This is not guaranteed to have the tile entity in place before this is
- * called, so it is Recommended that you have your tile entity call relight
+ * This is not guaranteed to have the tile entity in place before this is called, so it is Recommended that you have your tile entity call relight
* after being placed if you rely on it for light info.
*
* @param world
@@ -2127,8 +2107,7 @@ public class BlockTinkerTable extends Block {
* @return The amount of light to block, 0 for air, 255 for fully opaque.
*/
@Override
- public int getLightOpacity(World world, int x, int y, int z)
- {
+ public int getLightOpacity(World world, int x, int y, int z) {
return 0;
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/client/ClientProxy.java b/src/minecraft/net/machinemuse/powersuits/client/ClientProxy.java
index ffdcec4..41133e5 100644
--- a/src/minecraft/net/machinemuse/powersuits/client/ClientProxy.java
+++ b/src/minecraft/net/machinemuse/powersuits/client/ClientProxy.java
@@ -24,8 +24,7 @@ import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
/**
- * The Client Proxy does all the things that should only be done client-side,
- * like registering client-side handlers and renderers.
+ * The Client Proxy does all the things that should only be done client-side, like registering client-side handlers and renderers.
*
* @author MachineMuse
*
@@ -50,15 +49,17 @@ public class ClientProxy extends CommonProxy {
RenderingRegistry.registerBlockHandler(tinkTableRenderer);
RenderingRegistry.registerEntityRenderingHandler(EntityPlasmaBolt.class, new RenderPlasmaBolt());
- MinecraftForgeClient.preloadTexture(Config.SEBK_ICON_PATH);
- MinecraftForgeClient.preloadTexture(Config.WC_ICON_PATH);
MinecraftForgeClient.preloadTexture(Config.TINKERTABLE_TEXTURE_PATH);
MinecraftForgeClient.preloadTexture(Config.BLANK_ARMOR_MODEL_PATH);
+ MinecraftForgeClient.preloadTexture(Config.SEBK_ARMOR_PATH);
+ MinecraftForgeClient.preloadTexture(Config.SEBK_ARMORPANTS_PATH);
+ MinecraftForgeClient.preloadTexture(Config.CITIZENJOE_ARMOR_PATH);
+ MinecraftForgeClient.preloadTexture(Config.CITIZENJOE_ARMORPANTS_PATH);
+ MinecraftForgeClient.preloadTexture(Config.SEBK_TOOL_TEXTURE);
}
/**
- * Register the tick handler (for on-tick behaviour) and packet handler (for
- * network synchronization and permission stuff).
+ * Register the tick handler (for on-tick behaviour) and packet handler (for network synchronization and permission stuff).
*/
@Override
public void registerHandlers() {
diff --git a/src/minecraft/net/machinemuse/powersuits/client/render/TinkerTableRenderer.java b/src/minecraft/net/machinemuse/powersuits/client/render/TinkerTableRenderer.java
index fbd7052..6a47cec 100644
--- a/src/minecraft/net/machinemuse/powersuits/client/render/TinkerTableRenderer.java
+++ b/src/minecraft/net/machinemuse/powersuits/client/render/TinkerTableRenderer.java
@@ -5,11 +5,11 @@ package net.machinemuse.powersuits.client.render;
import net.machinemuse.powersuits.common.Config;
import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
-import net.minecraftforge.client.ForgeHooksClient;
import org.lwjgl.opengl.GL11;
@@ -20,8 +20,7 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
*
* @author MachineMuse
*/
-public class TinkerTableRenderer extends TileEntitySpecialRenderer implements
- ISimpleBlockRenderingHandler {
+public class TinkerTableRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler {
protected TinkerTableModel model;
protected int renderId;
@@ -31,9 +30,8 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements
}
@Override
- public void renderTileEntityAt(TileEntity tileEntity, double x, double y,
- double z, float partialTickTime) {
- ForgeHooksClient.bindTexture(Config.TINKERTABLE_TEXTURE_PATH, 0);
+ public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTickTime) {
+ Minecraft.getMinecraft().renderEngine.bindTexture(Config.TINKERTABLE_TEXTURE_PATH);
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
model.doRender(null, x, y, z, partialTickTime, partialTickTime);
@@ -52,9 +50,9 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements
}
@Override
- public void renderInventoryBlock(Block block, int metadata, int modelID,
- RenderBlocks renderer) {
- ForgeHooksClient.bindTexture(Config.TINKERTABLE_TEXTURE_PATH, 0);
+ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
+ Minecraft.getMinecraft().renderEngine.bindTexture(Config.TINKERTABLE_TEXTURE_PATH);
+
GL11.glPushMatrix();
GL11.glTranslated(-0.5, -0.5 + -1.0 / 16.0, -0.5);
model.doRender(null, 0, 0, 0, 0, 0);
@@ -65,8 +63,7 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements
// Should do nothing since the tile entity handles all the rendering of the
// world block
@Override
- public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
- Block block, int modelId, RenderBlocks renderer) {
+ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
return true;
}
diff --git a/src/minecraft/net/machinemuse/powersuits/client/render/ToolModel.java b/src/minecraft/net/machinemuse/powersuits/client/render/ToolModel.java
index 9497973..6cd7e42 100644
--- a/src/minecraft/net/machinemuse/powersuits/client/render/ToolModel.java
+++ b/src/minecraft/net/machinemuse/powersuits/client/render/ToolModel.java
@@ -18,13 +18,11 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-import net.minecraftforge.client.ForgeHooksClient;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
-public class ToolModel extends ModelBase
-{
+public class ToolModel extends ModelBase {
public int boltSize;
// fields
@@ -64,8 +62,7 @@ public class ToolModel extends ModelBase
ModelRenderer supportleft4;
ModelRenderer supportleft5;
- public ToolModel()
- {
+ public ToolModel() {
textureWidth = 64;
textureHeight = 32;
@@ -320,8 +317,7 @@ public class ToolModel extends ModelBase
child.rotateAngleZ -= parent.rotateAngleZ;
}
- public void render(Entity entity, float scale, boolean renderTypeIsFirstPerson, Colour c1)
- {
+ public void render(Entity entity, float scale, boolean renderTypeIsFirstPerson, Colour c1) {
// super.render(entity, f, f1, f2, f3, f4, f5);
int numsegments = 16;
if (!tap) {
@@ -360,13 +356,9 @@ public class ToolModel extends ModelBase
tap = true;
}
} else {
- if (!Keyboard.isKeyDown(Keyboard.KEY_NUMPAD0)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5)
- && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD6)) {
+ if (!Keyboard.isKeyDown(Keyboard.KEY_NUMPAD0) && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1) && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD2)
+ && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD3) && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4)
+ && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5) && !Keyboard.isKeyDown(Keyboard.KEY_NUMPAD6)) {
tap = false;
}
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
@@ -375,7 +367,7 @@ public class ToolModel extends ModelBase
}
GL11.glPushMatrix();
- ForgeHooksClient.bindTexture(Config.SEBK_TOOL_TEXTURE, 0);
+ Minecraft.getMinecraft().renderEngine.bindTexture(Config.SEBK_TOOL_TEXTURE);
if (c1 != null) {
c1.doGL();
@@ -491,18 +483,15 @@ public class ToolModel extends ModelBase
GL11.glPopMatrix();
}
- private void setRotation(ModelRenderer model, float x, float y, float z)
- {
+ private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
/**
- * Sets the model's various rotation angles. For bipeds, par1 and par2 are
- * used for animating the movement of arms and legs, where par1 represents
- * the time(so that arms and legs swing back and forth) and par2 represents
- * how "far" arms and legs can swing at most.
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms and legs, where par1 represents
+ * the time(so that arms and legs swing back and forth) and par2 represents how "far" arms and legs can swing at most.
*/
public void setPose(float indexOpen, float indexFlex, float thumbOpen, float thumbFlex, float otherFingersOpen, float otherFingersFlex) {
index1.rotateAngleX = indexOpen;
diff --git a/src/minecraft/net/machinemuse/powersuits/common/Config.java b/src/minecraft/net/machinemuse/powersuits/common/Config.java
index 998ca23..0bd0a80 100644
--- a/src/minecraft/net/machinemuse/powersuits/common/Config.java
+++ b/src/minecraft/net/machinemuse/powersuits/common/Config.java
@@ -31,23 +31,26 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
/**
- * Initial attempt at storing all tweakable/configurable values in one class.
- * This got really messy really fast so it's in the process of being reworked.
+ * Initial attempt at storing all tweakable/configurable values in one class. This got really messy really fast so it's in the process of being
+ * reworked.
*
* @author MachineMuse
*
*/
public class Config {
- public static final String SEBK_ICON_PATH = "/resources/machinemuse/sebkicons.png";
- public static final String SEBK_ARMOR_PATH = "/resources/machinemuse/sebkarmor.png";
- public static final String SEBK_ARMORPANTS_PATH = "/resources/machinemuse/sebkarmorpants.png";
- public static final String WC_ICON_PATH = "/resources/machinemuse/watericons.png";
- public static final String TINKERTABLE_TEXTURE_PATH = "/resources/machinemuse/tinkertable_tx.png";
- public static final String BLANK_ARMOR_MODEL_PATH = "/resources/machinemuse/blankarmor.png";
- public static final String MUSE_ICON_PATH = "/resources/machinemuse/museicons.png";
- public static final String SEBK_TOOL_TEXTURE = "/resources/machinemuse/tool.png";
- public static final String CITIZENJOE_ARMOR_PATH = "/resources/machinemuse/joearmor.png";
- public static final String CITIZENJOE_ARMORPANTS_PATH = "/resources/machinemuse/joearmorpants.png";
+ public static final String RESOURCE_PREFIX = "/mods/mmmPowersuits/";
+ public static final String TEXTURE_PREFIX = RESOURCE_PREFIX + "textures/";
+ public static final String SOUND_PREFIX = RESOURCE_PREFIX + "sound/";
+ // public static final String SEBK_ICON_PATH = "/mods/mmmPowersuits//machinemuse/sebkicons.png";
+ public static final String SEBK_ARMOR_PATH = TEXTURE_PREFIX + "models/sebkarmor.png";
+ public static final String SEBK_ARMORPANTS_PATH = TEXTURE_PREFIX + "models/sebkarmorpants.png";
+ // public static final String WC_ICON_PATH = "/resources/machinemuse/watericons.png";
+ public static final String TINKERTABLE_TEXTURE_PATH = TEXTURE_PREFIX + "models/tinkertable_tx.png";
+ public static final String BLANK_ARMOR_MODEL_PATH = TEXTURE_PREFIX + "models/blankarmor.png";
+ // public static final String MUSE_ICON_PATH = "/resources/machinemuse/museicons.png";
+ public static final String SEBK_TOOL_TEXTURE = TEXTURE_PREFIX + "models/tool.png";
+ public static final String CITIZENJOE_ARMOR_PATH = TEXTURE_PREFIX + "models/joearmor.png";
+ public static final String CITIZENJOE_ARMORPANTS_PATH = TEXTURE_PREFIX + "models/joearmorpants.png";
private static final int[] assignedItemIDs = new int[Items.values().length];
private static final int[] assignedBlockIDs = new int[Blocks.values().length];
@@ -55,12 +58,10 @@ public class Config {
private static Configuration config;
/**
- * Called in the pre-init phase of initialization, informs Forge that we
- * want the following blockIDs.
+ * Called in the pre-init phase of initialization, informs Forge that we want the following blockIDs.
*
* @param config
- * The Forge configuration object which will handle such
- * requests.
+ * The Forge configuration object which will handle such requests.
*/
public static void init(Configuration config) {
Config.config = config;
@@ -68,21 +69,18 @@ public class Config {
// Request block IDs
for (Blocks b : Blocks.values()) {
- assignedBlockIDs[b.ordinal()] =
- config.getBlock(b.englishName, b.defaultBlockId).getInt();
+ assignedBlockIDs[b.ordinal()] = config.getBlock(b.englishName, b.defaultBlockId).getInt();
}
// Request item IDs
for (Items i : Items.values()) {
- assignedItemIDs[i.ordinal()] =
- config.getItem(i.englishName, i.defaultItemID).getInt();
+ assignedItemIDs[i.ordinal()] = config.getItem(i.englishName, i.defaultItemID).getInt();
}
config.save();
}
/**
- * The packet channel for this mod. We will only listen for and send packets
- * on this 'channel'. Max of 16 characters.
+ * The packet channel for this mod. We will only listen for and send packets on this 'channel'. Max of 16 characters.
*
* @return
*/
@@ -91,8 +89,7 @@ public class Config {
}
/**
- * The default creative tab to add all these items to. This behaviour may
- * change if more items are added, but for now there are only 5 items and 1
+ * The default creative tab to add all these items to. This behaviour may change if more items are added, but for now there are only 5 items and 1
* block, so misc is the most appropriate target.
*
* @return
@@ -109,10 +106,9 @@ public class Config {
public static double getSalvageChance() {
return config.get(Configuration.CATEGORY_GENERAL, "Salvage Ratio", 0.9).getDouble(0.9);
}
-
+
/**
- * The maximum amount of armor contribution allowed per armor piece. Total
- * armor when the full set is worn can never exceed 4 times this amount.
+ * The maximum amount of armor contribution allowed per armor piece. Total armor when the full set is worn can never exceed 4 times this amount.
*
* @return
*/
@@ -132,8 +128,7 @@ public class Config {
}
/**
- * Once Forge has assigned IDs for all our items, this function will tell us
- * what was actually assigned.
+ * Once Forge has assigned IDs for all our items, this function will tell us what was actually assigned.
*
* @param item
* @return
@@ -146,8 +141,7 @@ public class Config {
}
/**
- * Once Forge has assigned IDs for all our blocks, this function will tell
- * us what was actually assigned.
+ * Once Forge has assigned IDs for all our blocks, this function will tell us what was actually assigned.
*
* @param item
* @return
@@ -160,8 +154,7 @@ public class Config {
}
/**
- * Helper function for making recipes. Returns a copy of the itemstack with
- * the specified stacksize.
+ * Helper function for making recipes. Returns a copy of the itemstack with the specified stacksize.
*
* @param stack
* Itemstack to copy
@@ -180,18 +173,14 @@ public class Config {
}
/**
- * Load all the modules in the config file into memory. Eventually. For now,
- * they are hardcoded.
+ * Load all the modules in the config file into memory. Eventually. For now, they are hardcoded.
*/
public static void loadPowerModules() {
// loadModularProperties();
- List ARMORONLY = Arrays.asList((IModularItem)
- ModularPowersuits.powerArmorHead, ModularPowersuits.powerArmorTorso,
+ List ARMORONLY = Arrays.asList((IModularItem) ModularPowersuits.powerArmorHead, ModularPowersuits.powerArmorTorso,
ModularPowersuits.powerArmorLegs, ModularPowersuits.powerArmorFeet);
- List ALLITEMS = Arrays.asList((IModularItem)
- ModularPowersuits.powerArmorHead, ModularPowersuits.powerArmorTorso,
- ModularPowersuits.powerArmorLegs, ModularPowersuits.powerArmorFeet,
- ModularPowersuits.powerTool);
+ List ALLITEMS = Arrays.asList((IModularItem) ModularPowersuits.powerArmorHead, ModularPowersuits.powerArmorTorso,
+ ModularPowersuits.powerArmorLegs, ModularPowersuits.powerArmorFeet, ModularPowersuits.powerTool);
List HEADONLY = Arrays.asList((IModularItem) ModularPowersuits.powerArmorHead);
List TORSOONLY = Arrays.asList((IModularItem) ModularPowersuits.powerArmorTorso);
List LEGSONLY = Arrays.asList((IModularItem) ModularPowersuits.powerArmorLegs);
@@ -202,21 +191,17 @@ public class Config {
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_NIGHT_VISION, HEADONLY, MuseIcon.SCANNER, MuseCommonStrings.CATEGORY_SPECIAL)
.setDescription("A pair of augmented vision goggles to help you see at night and underwater.")
- .addInstallCost(copyAndResize(ItemComponent.laserHologram, 1))
- .addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
+ .addInstallCost(copyAndResize(ItemComponent.laserHologram, 1)).addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_ACTIVE_CAMOUFLAGE, TORSOONLY, MuseIcon.ORB_1_BLUE,
- MuseCommonStrings.CATEGORY_SPECIAL)
- .setDescription("Emit a hologram of your surroundings to make yourself almost imperceptible.")
- .addInstallCost(copyAndResize(ItemComponent.laserHologram, 4))
- .addInstallCost(copyAndResize(ItemComponent.fieldEmitter, 2))
+ MuseCommonStrings.CATEGORY_SPECIAL).setDescription("Emit a hologram of your surroundings to make yourself almost imperceptible.")
+ .addInstallCost(copyAndResize(ItemComponent.laserHologram, 4)).addInstallCost(copyAndResize(ItemComponent.fieldEmitter, 2))
.addInstallCost(copyAndResize(ItemComponent.controlCircuit, 2));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_FLIGHT_CONTROL, HEADONLY, MuseIcon.INDICATOR_1_GREEN,
- MuseCommonStrings.CATEGORY_SPECIAL)
- .setDescription("An integrated control circuit to help you fly better. Press Z to go down.")
+ MuseCommonStrings.CATEGORY_SPECIAL).setDescription("An integrated control circuit to help you fly better. Press Z to go down.")
.addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
addModule(module);
@@ -224,14 +209,12 @@ public class Config {
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_MELEE_ASSIST, TOOLONLY, MuseIcon.PUNCHY, MuseCommonStrings.CATEGORY_WEAPON)
.setDescription("A much simpler addon, makes your powertool punches hit harder.")
- .addBaseProperty(MuseCommonStrings.PUNCH_ENERGY, 10, "J")
- .addBaseProperty(MuseCommonStrings.PUNCH_DAMAGE, 2, "pt")
+ .addBaseProperty(MuseCommonStrings.PUNCH_ENERGY, 10, "J").addBaseProperty(MuseCommonStrings.PUNCH_DAMAGE, 2, "pt")
.addTradeoffProperty("Impact", MuseCommonStrings.PUNCH_ENERGY, 100, "J")
.addTradeoffProperty("Impact", MuseCommonStrings.PUNCH_DAMAGE, 8, "pt")
.addTradeoffProperty("Carry-through", MuseCommonStrings.PUNCH_ENERGY, 20, "J")
.addTradeoffProperty("Carry-through", MuseCommonStrings.PUNCH_KNOCKBACK, 1, "P")
- .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
- .addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1));
+ .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2)).addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1));
addModule(module);
addModule(new RailgunModule(TOOLONLY));
@@ -240,20 +223,16 @@ public class Config {
addModule(new BlinkDriveModule(TOOLONLY));
module = new PowerModule(MuseCommonStrings.MODULE_KINETIC_GENERATOR, LEGSONLY, MuseIcon.NEXUS_1_RED, MuseCommonStrings.CATEGORY_ENERGY)
- .setDescription("Generate power with your movement.")
- .addBaseProperty(MuseCommonStrings.WEIGHT, 1000)
+ .setDescription("Generate power with your movement.").addBaseProperty(MuseCommonStrings.WEIGHT, 1000)
.addBaseProperty(MuseCommonStrings.KINETIC_ENERGY_GENERATION, 250)
.addTradeoffProperty("Energy Generated", MuseCommonStrings.KINETIC_ENERGY_GENERATION, 750, " Joules")
.addTradeoffProperty("Energy Generated", MuseCommonStrings.WEIGHT, 3000, "g")
- .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
- .addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
+ .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2)).addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_SOLAR_GENERATOR, HEADONLY, MuseIcon.NEXUS_1_GREEN, MuseCommonStrings.CATEGORY_ENERGY)
- .setDescription("Let the sun power your adventures.")
- .addBaseProperty(MuseCommonStrings.SOLAR_ENERGY_GENERATION_DAY, 2000)
- .addBaseProperty(MuseCommonStrings.SOLAR_ENERGY_GENERATION_NIGHT, 200)
- .addInstallCost(copyAndResize(ItemComponent.solarPanel, 1))
+ .setDescription("Let the sun power your adventures.").addBaseProperty(MuseCommonStrings.SOLAR_ENERGY_GENERATION_DAY, 2000)
+ .addBaseProperty(MuseCommonStrings.SOLAR_ENERGY_GENERATION_NIGHT, 200).addInstallCost(copyAndResize(ItemComponent.solarPanel, 1))
.addInstallCost(copyAndResize(ItemComponent.controlCircuit, 2));
addModule(module);
@@ -261,17 +240,14 @@ public class Config {
MuseCommonStrings.CATEGORY_ENVIRONMENTAL)
.setDescription(
"Whenever you're hungry, this module will grab the bottom-left-most food item from your inventory and feed it to you, storing the rest for later.")
- .addBaseProperty(MuseCommonStrings.EATING_ENERGY_CONSUMPTION, 100)
- .addBaseProperty(MuseCommonStrings.EATING_EFFICIENCY, 50)
+ .addBaseProperty(MuseCommonStrings.EATING_ENERGY_CONSUMPTION, 100).addBaseProperty(MuseCommonStrings.EATING_EFFICIENCY, 50)
.addTradeoffProperty("Efficiency", MuseCommonStrings.EATING_ENERGY_CONSUMPTION, 100)
.addTradeoffProperty("Efficiency", MuseCommonStrings.EATING_EFFICIENCY, 50)
- .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
- .addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
+ .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2)).addInstallCost(copyAndResize(ItemComponent.controlCircuit, 1));
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_BASIC_PLATING, ARMORONLY, MuseIcon.MODULE_IRON_PLATING, MuseCommonStrings.CATEGORY_ARMOR)
- .setDescription("Basic plating is heavy but protective.")
- .addInstallCost(copyAndResize(ItemComponent.basicPlating, 1))
+ .setDescription("Basic plating is heavy but protective.").addInstallCost(copyAndResize(ItemComponent.basicPlating, 1))
.addTradeoffProperty("Plating Thickness", MuseCommonStrings.ARMOR_VALUE_PHYSICAL, 5, " Points")
.addTradeoffProperty("Plating Thickness", MuseCommonStrings.WEIGHT, 10000, "g");
addModule(module);
@@ -292,30 +268,24 @@ public class Config {
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_SHOVEL, TOOLONLY, MuseIcon.TOOL_SHOVEL, MuseCommonStrings.CATEGORY_TOOL)
- .setDescription("Shovels are good for soft materials like dirt and sand.")
- .addInstallCost(new ItemStack(Item.ingotIron, 3))
- .addInstallCost(copyAndResize(ItemComponent.solenoid, 1))
- .addBaseProperty(MuseCommonStrings.SHOVEL_ENERGY_CONSUMPTION, 50, "J")
+ .setDescription("Shovels are good for soft materials like dirt and sand.").addInstallCost(new ItemStack(Item.ingotIron, 3))
+ .addInstallCost(copyAndResize(ItemComponent.solenoid, 1)).addBaseProperty(MuseCommonStrings.SHOVEL_ENERGY_CONSUMPTION, 50, "J")
.addBaseProperty(MuseCommonStrings.SHOVEL_HARVEST_SPEED, 8, "x")
.addTradeoffProperty("Overclock", MuseCommonStrings.SHOVEL_ENERGY_CONSUMPTION, 950)
.addTradeoffProperty("Overclock", MuseCommonStrings.SHOVEL_HARVEST_SPEED, 22);
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_PICKAXE, TOOLONLY, MuseIcon.TOOL_PICK, MuseCommonStrings.CATEGORY_TOOL)
- .setDescription("Picks are good for harder materials like stone and ore.")
- .addInstallCost(new ItemStack(Item.ingotIron, 3))
- .addInstallCost(copyAndResize(ItemComponent.solenoid, 1))
- .addBaseProperty(MuseCommonStrings.PICKAXE_ENERGY_CONSUMPTION, 50, "J")
+ .setDescription("Picks are good for harder materials like stone and ore.").addInstallCost(new ItemStack(Item.ingotIron, 3))
+ .addInstallCost(copyAndResize(ItemComponent.solenoid, 1)).addBaseProperty(MuseCommonStrings.PICKAXE_ENERGY_CONSUMPTION, 50, "J")
.addBaseProperty(MuseCommonStrings.PICKAXE_HARVEST_SPEED, 8, "x")
.addTradeoffProperty("Overclock", MuseCommonStrings.PICKAXE_ENERGY_CONSUMPTION, 950)
.addTradeoffProperty("Overclock", MuseCommonStrings.PICKAXE_HARVEST_SPEED, 22);
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_AXE, TOOLONLY, MuseIcon.TOOL_AXE, MuseCommonStrings.CATEGORY_TOOL)
- .setDescription("Axes are mostly for chopping trees.")
- .addInstallCost(new ItemStack(Item.ingotIron, 3))
- .addInstallCost(copyAndResize(ItemComponent.solenoid, 1))
- .addBaseProperty(MuseCommonStrings.AXE_ENERGY_CONSUMPTION, 50, "J")
+ .setDescription("Axes are mostly for chopping trees.").addInstallCost(new ItemStack(Item.ingotIron, 3))
+ .addInstallCost(copyAndResize(ItemComponent.solenoid, 1)).addBaseProperty(MuseCommonStrings.AXE_ENERGY_CONSUMPTION, 50, "J")
.addBaseProperty(MuseCommonStrings.AXE_HARVEST_SPEED, 8, "x")
.addTradeoffProperty("Overclock", MuseCommonStrings.AXE_ENERGY_CONSUMPTION, 950)
.addTradeoffProperty("Overclock", MuseCommonStrings.AXE_HARVEST_SPEED, 22);
@@ -323,13 +293,11 @@ public class Config {
module = new PowerModule(MuseCommonStrings.MODULE_DIAMOND_PICK_UPGRADE, TOOLONLY, MuseIcon.DIAMOND_PICK, MuseCommonStrings.CATEGORY_SPECIAL)
.setDescription("Add diamonds to allow your pickaxe module to mine Obsidian. *REQUIRES PICKAXE MODULE TO WORK*")
- .addInstallCost(copyAndResize(ItemComponent.solenoid, 1))
- .addInstallCost(new ItemStack(Item.diamond, 3));
+ .addInstallCost(copyAndResize(ItemComponent.solenoid, 1)).addInstallCost(new ItemStack(Item.diamond, 3));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_AQUA_AFFINITY, TOOLONLY, MuseIcon.AQUA_AFFINITY,
- MuseCommonStrings.CATEGORY_SPECIAL)
- .setDescription("Reduces the speed penalty for using your tool underwater.")
+ MuseCommonStrings.CATEGORY_SPECIAL).setDescription("Reduces the speed penalty for using your tool underwater.")
.addInstallCost(copyAndResize(ItemComponent.servoMotor, 1))
.addBaseProperty(MuseCommonStrings.AQUA_AFFINITY_ENERGY_CONSUMPTION, 0, "J")
.addBaseProperty(MuseCommonStrings.UNDERWATER_HARVEST_SPEED, 0.2, "%")
@@ -338,29 +306,23 @@ public class Config {
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_BATTERY_BASIC, ALLITEMS, MuseIcon.BATTERY1, MuseCommonStrings.CATEGORY_ENERGY)
- .setDescription("Integrate a battery to allow the item to store energy.")
- .addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1))
- .addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 20000, "J")
- .addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g")
+ .setDescription("Integrate a battery to allow the item to store energy.").addInstallCost(copyAndResize(ItemComponent.lvcapacitor, 1))
+ .addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 20000, "J").addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g")
.addTradeoffProperty("Battery Size", ElectricItemUtils.MAXIMUM_ENERGY, 80000)
.addTradeoffProperty("Battery Size", MuseCommonStrings.WEIGHT, 8000);
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_BATTERY_ADVANCED, ALLITEMS, MuseIcon.BATTERY2, MuseCommonStrings.CATEGORY_ENERGY)
.setDescription("Integrate a more advanced battery to store more energy.")
- .addInstallCost(copyAndResize(ItemComponent.mvcapacitor, 1))
- .addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 100000, "J")
- .addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g")
- .addTradeoffProperty("Battery Size", ElectricItemUtils.MAXIMUM_ENERGY, 400000)
+ .addInstallCost(copyAndResize(ItemComponent.mvcapacitor, 1)).addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 100000, "J")
+ .addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g").addTradeoffProperty("Battery Size", ElectricItemUtils.MAXIMUM_ENERGY, 400000)
.addTradeoffProperty("Battery Size", MuseCommonStrings.WEIGHT, 8000);
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_BATTERY_ELITE, ALLITEMS, MuseIcon.BATTERYCRYSTAL, MuseCommonStrings.CATEGORY_ENERGY)
.setDescription("Integrate a the most advanced battery to store an extensive amount of energy.")
- .addInstallCost(copyAndResize(ItemComponent.hvcapacitor, 1))
- .addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 750000, "J")
- .addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g")
- .addTradeoffProperty("Battery Size", ElectricItemUtils.MAXIMUM_ENERGY, 4250000)
+ .addInstallCost(copyAndResize(ItemComponent.hvcapacitor, 1)).addBaseProperty(ElectricItemUtils.MAXIMUM_ENERGY, 750000, "J")
+ .addBaseProperty(MuseCommonStrings.WEIGHT, 2000, "g").addTradeoffProperty("Battery Size", ElectricItemUtils.MAXIMUM_ENERGY, 4250000)
.addTradeoffProperty("Battery Size", MuseCommonStrings.WEIGHT, 8000);
addModule(module);
@@ -368,54 +330,41 @@ public class Config {
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_JUMP_ASSIST, LEGSONLY, MuseIcon.JUMP_ASSIST, MuseCommonStrings.CATEGORY_MOVEMENT)
.setDescription("Another set of servo motors to help you jump higher.")
- .addSimpleTradeoff(
- module, "Power",
- MuseCommonStrings.JUMP_ENERGY_CONSUMPTION, "J", 0, 25,
- MuseCommonStrings.JUMP_MULTIPLIER, "%", 1, 4)
- .addSimpleTradeoff(
- module, "Compensation",
- MuseCommonStrings.JUMP_ENERGY_CONSUMPTION, "J", 0, 5,
- MuseCommonStrings.JUMP_FOOD_COMPENSATION, "%", 0, 1)
- .addInstallCost(copyAndResize(ItemComponent.servoMotor, 4));
+ .addSimpleTradeoff(module, "Power", MuseCommonStrings.JUMP_ENERGY_CONSUMPTION, "J", 0, 25, MuseCommonStrings.JUMP_MULTIPLIER, "%", 1,
+ 4)
+ .addSimpleTradeoff(module, "Compensation", MuseCommonStrings.JUMP_ENERGY_CONSUMPTION, "J", 0, 5,
+ MuseCommonStrings.JUMP_FOOD_COMPENSATION, "%", 0, 1).addInstallCost(copyAndResize(ItemComponent.servoMotor, 4));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_SHOCK_ABSORBER, FEETONLY, MuseIcon.SHOCK_ABSORBER,
MuseCommonStrings.CATEGORY_MOVEMENT)
.setDescription("With some servos, springs, and padding, you should be able to negate a portion of fall damage.")
- .addSimpleTradeoff(
- module, "Power",
- MuseCommonStrings.SHOCK_ABSORB_ENERGY_CONSUMPTION, "J/m", 0, 10,
- MuseCommonStrings.SHOCK_ABSORB_MULTIPLIER, "%", 0, 1)
- .addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
+ .addSimpleTradeoff(module, "Power", MuseCommonStrings.SHOCK_ABSORB_ENERGY_CONSUMPTION, "J/m", 0, 10,
+ MuseCommonStrings.SHOCK_ABSORB_MULTIPLIER, "%", 0, 1).addInstallCost(copyAndResize(ItemComponent.servoMotor, 2))
.addInstallCost(new ItemStack(Block.cloth, 2));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_GLIDER, TORSOONLY, MuseIcon.GLIDER, MuseCommonStrings.CATEGORY_MOVEMENT)
- .setDescription(
- "Tack on some wings to turn downward into forward momentum. Press sneak+forward while falling to activate.")
+ .setDescription("Tack on some wings to turn downward into forward momentum. Press sneak+forward while falling to activate.")
.addInstallCost(copyAndResize(ItemComponent.gliderWing, 2));
addModule(module);
module = new PowerModule(MuseCommonStrings.MODULE_PARACHUTE, TORSOONLY, MuseIcon.PARACHUTE_MODULE, MuseCommonStrings.CATEGORY_MOVEMENT)
- .setDescription("Add a parachute to slow your descent. Activate by pressing sneak (defaults to Shift) in midair.")
- .addInstallCost(copyAndResize(ItemComponent.parachute, 2));
+ .setDescription("Add a parachute to slow your descent. Activate by pressing sneak (defaults to Shift) in midair.").addInstallCost(
+ copyAndResize(ItemComponent.parachute, 2));
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_JETPACK, TORSOONLY, MuseIcon.JETPACK, MuseCommonStrings.CATEGORY_MOVEMENT)
.setDescription("A jetpack should allow you to jump indefinitely, or at least until you run out of power.")
- .addInstallCost(copyAndResize(ItemComponent.ionThruster, 4))
- .addBaseProperty(MuseCommonStrings.JET_ENERGY_CONSUMPTION, 0, "J/t")
- .addBaseProperty(MuseCommonStrings.JET_THRUST, 0, "N")
- .addTradeoffProperty("Thrust", MuseCommonStrings.JET_ENERGY_CONSUMPTION, 150)
+ .addInstallCost(copyAndResize(ItemComponent.ionThruster, 4)).addBaseProperty(MuseCommonStrings.JET_ENERGY_CONSUMPTION, 0, "J/t")
+ .addBaseProperty(MuseCommonStrings.JET_THRUST, 0, "N").addTradeoffProperty("Thrust", MuseCommonStrings.JET_ENERGY_CONSUMPTION, 150)
.addTradeoffProperty("Thrust", MuseCommonStrings.JET_THRUST, 0.16);
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_JETBOOTS, FEETONLY, MuseIcon.JETBOOTS, MuseCommonStrings.CATEGORY_MOVEMENT)
.setDescription("Jet boots are not as strong as a jetpack, but they should at least be strong enough to counteract gravity.")
- .addInstallCost(copyAndResize(ItemComponent.ionThruster, 2))
- .addBaseProperty(MuseCommonStrings.JET_ENERGY_CONSUMPTION, 0)
- .addBaseProperty(MuseCommonStrings.JET_THRUST, 0)
- .addTradeoffProperty("Thrust", MuseCommonStrings.JET_ENERGY_CONSUMPTION, 75)
+ .addInstallCost(copyAndResize(ItemComponent.ionThruster, 2)).addBaseProperty(MuseCommonStrings.JET_ENERGY_CONSUMPTION, 0)
+ .addBaseProperty(MuseCommonStrings.JET_THRUST, 0).addTradeoffProperty("Thrust", MuseCommonStrings.JET_ENERGY_CONSUMPTION, 75)
.addTradeoffProperty("Thrust", MuseCommonStrings.JET_THRUST, 0.08);
addModule(module);
@@ -429,8 +378,7 @@ public class Config {
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_SWIM_BOOST, LEGSONLY, MuseIcon.SWIM_BOOST, MuseCommonStrings.CATEGORY_MOVEMENT)
.setDescription(
"By refitting an ion thruster for underwater use, you may be able to add extra forward (or backward) thrust when underwater.")
- .addInstallCost(copyAndResize(ItemComponent.ionThruster, 1))
- .addInstallCost(copyAndResize(ItemComponent.solenoid, 2))
+ .addInstallCost(copyAndResize(ItemComponent.ionThruster, 1)).addInstallCost(copyAndResize(ItemComponent.solenoid, 2))
.addTradeoffProperty("Thrust", MuseCommonStrings.SWIM_BOOST_ENERGY_CONSUMPTION, 100, "J")
.addTradeoffProperty("Thrust", MuseCommonStrings.SWIM_BOOST_AMOUNT, 1, "m/s");
addModule(module);
@@ -446,24 +394,22 @@ public class Config {
addModule(module);
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_TRANSPARENT_ARMOR, ARMORONLY, MuseIcon.TRANSPARENT_ARMOR,
- MuseCommonStrings.CATEGORY_COSMETIC)
- .setDescription("Make the item transparent, so you can show off your skin without losing armor.")
+ MuseCommonStrings.CATEGORY_COSMETIC).setDescription("Make the item transparent, so you can show off your skin without losing armor.")
.addInstallCost(copyAndResize(ItemComponent.laserHologram, 1));
addModule(module);
module = new PowerModule(MuseCommonStrings.CITIZEN_JOE_STYLE, ARMORONLY, MuseIcon.ORB_1_GREEN, MuseCommonStrings.CATEGORY_COSMETIC)
.setDescription("An alternative armor texture, c/o CitizenJoe of IC2 forums.");
addModule(module);
-
+
// Make the maximum armor per piece value show up in config file
getMaximumArmorPerPiece();
-
+
// red = 1, green = 2, blue = 4
}
/**
- * An enum listing all the blocks that this mod adds. Used for assigning IDs
- * and various other things.
+ * An enum listing all the blocks that this mod adds. Used for assigning IDs and various other things.
*
* @author MachineMuse
*
@@ -476,9 +422,7 @@ public class Config {
public final String idName;
public final String englishName;
- private Blocks(
- int defaultBlockId, int textureIndex, String idName,
- String englishName) {
+ private Blocks(int defaultBlockId, int textureIndex, String idName, String englishName) {
this.defaultBlockId = defaultBlockId;
this.textureIndex = textureIndex;
this.idName = idName;
@@ -488,20 +432,16 @@ public class Config {
}
/**
- * An enum listing all the items that this mod adds. Used for assigning IDs
- * and various other things.
+ * An enum listing all the items that this mod adds. Used for assigning IDs and various other things.
*
* @author MachineMuse
*
*/
public static enum Items {
// Icon index, ID name, English name, Armor Type
- PowerArmorHead(24770, 0, "powerArmorHead", "Power Armor Head"),
- PowerArmorTorso(24771, 1, "powerArmorTorso", "Power Armor Torso"),
- PowerArmorLegs(24772, 2, "powerArmorLegs", "Power Armor Legs"),
- PowerArmorFeet(24773, 3, "powerArmorFeet", "Power Armor Feet"),
- PowerTool(24774, 4, "powerTool", "Power Tool"),
- PowerArmorComponent(24775, 5, "powerArmorComponent", "Power Armor Component"),
+ PowerArmorHead(24770, 0, "powerArmorHead", "Power Armor Head"), PowerArmorTorso(24771, 1, "powerArmorTorso", "Power Armor Torso"), PowerArmorLegs(
+ 24772, 2, "powerArmorLegs", "Power Armor Legs"), PowerArmorFeet(24773, 3, "powerArmorFeet", "Power Armor Feet"), PowerTool(24774, 4,
+ "powerTool", "Power Tool"), PowerArmorComponent(24775, 5, "powerArmorComponent", "Power Armor Component"),
;
@@ -510,8 +450,7 @@ public class Config {
public final String idName;
public final String englishName;
- Items(int defaultItemID, int iconIndex,
- String idName, String englishName) {
+ Items(int defaultItemID, int iconIndex, String idName, String englishName) {
this.defaultItemID = defaultItemID;
this.iconIndex = iconIndex;
this.idName = idName;
@@ -521,16 +460,13 @@ public class Config {
}
/**
- * An enum to describe the various GUI windows which can appear. IDs are
- * less important here since this data isn't saved or synced.
+ * An enum to describe the various GUI windows which can appear. IDs are less important here since this data isn't saved or synced.
*
* @author MachineMuse
*
*/
public static enum Guis {
- GuiTinkerTable,
- GuiSuitManager,
- GuiPortableCrafting;
+ GuiTinkerTable, GuiSuitManager, GuiPortableCrafting;
}
public static Configuration getConfig() {
@@ -548,10 +484,7 @@ public class Config {
public static Object additionalInfoInstructions() {
String message = "Press SHIFT for more information.";
- message = MuseStringUtils.wrapMultipleFormatTags(
- message,
- MuseStringUtils.FormatCodes.Grey,
- MuseStringUtils.FormatCodes.Italic);
+ message = MuseStringUtils.wrapMultipleFormatTags(message, MuseStringUtils.FormatCodes.Grey, MuseStringUtils.FormatCodes.Italic);
return message;
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/common/ModCompatability.java b/src/minecraft/net/machinemuse/powersuits/common/ModCompatability.java
index a9d0af0..53ac5d0 100644
--- a/src/minecraft/net/machinemuse/powersuits/common/ModCompatability.java
+++ b/src/minecraft/net/machinemuse/powersuits/common/ModCompatability.java
@@ -136,11 +136,10 @@ public class ModCompatability {
Item goggles = (Item) itemGoggles.get(itemGoggles);
gogglesStack = new ItemStack(goggles);
IPowerModule module = new PowerModule("Aurameter", Arrays.asList((IModularItem) ModularPowersuits.powerArmorHead), new MuseIcon(
- "/thaumcraft/resources/ss_core.png", 144), MuseCommonStrings.CATEGORY_SPECIAL)
+ "thaumcraft:ss_core"), MuseCommonStrings.CATEGORY_SPECIAL)
.setDescription(
"Connect up some Thaumic goggles to show the nearby aura values. (Does not reveal aura nodes, only shows the HUD)")
- .addInstallCost(ItemComponent.laserHologram.copy())
- .addInstallCost(gogglesStack);
+ .addInstallCost(ItemComponent.laserHologram.copy()).addInstallCost(gogglesStack);
ModuleManager.addModule(module);
} catch (Exception e) {
e.printStackTrace();
@@ -151,38 +150,35 @@ public class ModCompatability {
// Add UE multimeter module
if (ModCompatability.isBasicComponentsLoaded()) {
IPowerModule module = new RightClickPowerModule(MuseCommonStrings.MODULE_MULTIMETER,
- Arrays.asList((IModularItem) ModularPowersuits.powerTool),
- MuseIcon.PLATE_2_RED, MuseCommonStrings.CATEGORY_TOOL)
+ Arrays.asList((IModularItem) ModularPowersuits.powerTool), MuseIcon.PLATE_2_RED, MuseCommonStrings.CATEGORY_TOOL)
.setDescription("A tool addon that reads the Universal Electricity power generation in a wire.")
- .addInstallCost(Config.copyAndResize(ItemComponent.wiring, 2))
- .addInstallCost(Config.copyAndResize(ItemComponent.solenoid, 1));
+ .addInstallCost(Config.copyAndResize(ItemComponent.wiring, 2)).addInstallCost(Config.copyAndResize(ItemComponent.solenoid, 1));
ModuleManager.addModule(module);
}
if (ModCompatability.isAtomicScienceLoaded()) {
- IPowerModule module = new ToggleablePowerModule(MuseCommonStrings.MODULE_HAZMAT,
- Arrays.asList((IModularItem) ModularPowersuits.powerArmorHead, (IModularItem) ModularPowersuits.powerArmorTorso,
- (IModularItem) ModularPowersuits.powerArmorLegs, (IModularItem) ModularPowersuits.powerArmorFeet),
- MuseIcon.FIELD_EMITTER_GREEN, MuseCommonStrings.CATEGORY_ARMOR)
+ IPowerModule module = new ToggleablePowerModule(MuseCommonStrings.MODULE_HAZMAT, Arrays.asList(
+ (IModularItem) ModularPowersuits.powerArmorHead, (IModularItem) ModularPowersuits.powerArmorTorso,
+ (IModularItem) ModularPowersuits.powerArmorLegs, (IModularItem) ModularPowersuits.powerArmorFeet), MuseIcon.FIELD_EMITTER_GREEN,
+ MuseCommonStrings.CATEGORY_ARMOR)
.setDescription("Protect yourself from that pesky radiation poisoning. *Must be on every piece*")
- .addInstallCost(Config.copyAndResize(ItemComponent.basicPlating, 3))
- .addBaseProperty(MuseCommonStrings.WEIGHT, 0.5);
+ .addInstallCost(Config.copyAndResize(ItemComponent.basicPlating, 3)).addBaseProperty(MuseCommonStrings.WEIGHT, 0.5);
ModuleManager.addModule(module);
}
}
public static ItemStack getThermexItem(String string, int quantity) {
- try {
- ItemStack item = thermalexpansion.api.core.ItemRegistry.getItem(string, quantity);
- if (item != null) {
- return item;
- }
- } catch (Exception e) {
- }
- thermalexpansion.api.core.ItemRegistry.printItemNames();
- MuseLogger.logError("Failed to get Thermal Expansion item " + string);
+ // try {
+ // ItemStack item = thermalexpansion.api.core.ItemRegistry.getItem(string, quantity);
+ // if (item != null) {
+ // return item;
+ // }
+ // } catch (Exception e) {
+ // }
+ // thermalexpansion.api.core.ItemRegistry.printItemNames();
+ // MuseLogger.logError("Failed to get Thermal Expansion item " + string);
return null;
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/common/RecipeManager.java b/src/minecraft/net/machinemuse/powersuits/common/RecipeManager.java
index 5bfd74b..d9f26d2 100644
--- a/src/minecraft/net/machinemuse/powersuits/common/RecipeManager.java
+++ b/src/minecraft/net/machinemuse/powersuits/common/RecipeManager.java
@@ -1,6 +1,5 @@
package net.machinemuse.powersuits.common;
-import ic2.api.Ic2Recipes;
import net.machinemuse.powersuits.item.ItemComponent;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
@@ -39,147 +38,53 @@ public class RecipeManager {
ItemStack stone = new ItemStack(Block.stone);
if (ModCompatability.vanillaRecipesEnabled()) {
- GameRegistry.addRecipe(ItemComponent.basicPlating,
- "II",
- "CI",
- "II",
- 'C', ItemComponent.wiring,
- 'I', iron);
+ GameRegistry.addRecipe(ItemComponent.basicPlating, "II", "CI", "II", 'C', ItemComponent.wiring, 'I', iron);
- GameRegistry.addRecipe(ItemComponent.advancedPlating,
- "II",
- "CI",
- "II",
- 'C', ItemComponent.solenoid,
- 'I', diamond);
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
- "WCI",
- "RGC",
- "IRW",
- 'W', ItemComponent.wiring,
- 'C', cactusgreen,
- 'I', ingotGold,
- 'G', glowstone,
- 'R', redstone));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iron, 5), true,
- "P", 'P', ItemComponent.basicPlating));
+ GameRegistry.addRecipe(ItemComponent.advancedPlating, "II", "CI", "II", 'C', ItemComponent.solenoid, 'I', diamond);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true, "WCI", "RGC", "IRW", 'W', ItemComponent.wiring, 'C',
+ cactusgreen, 'I', ingotGold, 'G', glowstone, 'R', redstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iron, 5), true, "P", 'P', ItemComponent.basicPlating));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true,
- "P", 'P', ItemComponent.advancedPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true, "P", 'P', ItemComponent.advancedPlating));
- GameRegistry.addRecipe(ItemComponent.laserHologram,
- "YTG",
- "TWT",
- "BTR",
- 'W', ItemComponent.wiring,
- 'T', glass,
- 'Y', glowstone,
- 'G', cactusgreen,
- 'B', lapis,
- 'R', rosered);
+ GameRegistry.addRecipe(ItemComponent.laserHologram, "YTG", "TWT", "BTR", 'W', ItemComponent.wiring, 'T', glass, 'Y', glowstone, 'G',
+ cactusgreen, 'B', lapis, 'R', rosered);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.tinkerTable),
- "ILI",
- "LEL",
- "ILI",
- 'I', iron, 'L', lapis, 'E', emerald);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.tinkerTable), "ILI", "LEL", "ILI", 'I', iron, 'L', lapis, 'E', emerald);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorHead),
- "III",
- "C C",
- 'I', iron, 'C', circuit);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorHead), "III", "C C", 'I', iron, 'C', circuit);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorTorso),
- "I I",
- "CIC",
- "III",
- 'I', iron, 'C', circuit);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), "I I", "CIC", "III", 'I', iron, 'C', circuit);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorLegs),
- "III",
- "C C",
- "I I",
- 'I', iron, 'C', circuit);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), "III", "C C", "I I", 'I', iron, 'C', circuit);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorFeet),
- "C C",
- "I I",
- 'I', iron, 'C', circuit);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), "C C", "I I", 'I', iron, 'C', circuit);
- GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerTool),
- " C ",
- "CI ",
- " IC",
- 'I', iron, 'C', circuit);
+ GameRegistry.addRecipe(new ItemStack(ModularPowersuits.powerTool), " C ", "CI ", " IC", 'I', iron, 'C', circuit);
- GameRegistry.addRecipe(copyAndResize(ItemComponent.wiring, 8),
- "GRG", 'G', goldNugget, 'R', redstone);
+ GameRegistry.addRecipe(copyAndResize(ItemComponent.wiring, 8), "GRG", 'G', goldNugget, 'R', redstone);
- GameRegistry.addRecipe(ItemComponent.parachute,
- "WWW", "S S", 'W', wool, 'S', string);
+ GameRegistry.addRecipe(ItemComponent.parachute, "WWW", "S S", 'W', wool, 'S', string);
- GameRegistry.addRecipe(ItemComponent.lvcapacitor,
- "WPI",
- "W W",
- 'W', ItemComponent.wiring,
- 'I', iron,
- 'P', paper,
- 'L', lapis);
+ GameRegistry.addRecipe(ItemComponent.lvcapacitor, "WPI", "W W", 'W', ItemComponent.wiring, 'I', iron, 'P', paper, 'L', lapis);
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor,
- "GPL",
- "W W",
- 'W', ItemComponent.wiring,
- 'G', goldNugget,
- 'P', paper,
- 'L', lapis));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor,
- "EPG",
- "W W",
- 'W', ItemComponent.wiring,
- 'E', enderPearl,
- 'P', glass,
- 'G', glowstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor, "GPL", "W W", 'W', ItemComponent.wiring, 'G', goldNugget, 'P',
+ paper, 'L', lapis));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor, "EPG", "W W", 'W', ItemComponent.wiring, 'E', enderPearl, 'P',
+ glass, 'G', glowstone));
- GameRegistry.addRecipe(ItemComponent.solenoid,
- "WIW",
- "WIW",
- "WIW",
- 'W', ItemComponent.wiring,
- 'I', iron);
+ GameRegistry.addRecipe(ItemComponent.solenoid, "WIW", "WIW", "WIW", 'W', ItemComponent.wiring, 'I', iron);
- GameRegistry.addRecipe(ItemComponent.gliderWing,
- " II",
- "II ",
- "I ",
- 'I', iron);
+ GameRegistry.addRecipe(ItemComponent.gliderWing, " II", "II ", "I ", 'I', iron);
- GameRegistry.addRecipe(ItemComponent.servoMotor,
- " W ",
- "EIE",
- 'I', iron, 'E', ItemComponent.solenoid, 'W', ItemComponent.wiring);
+ GameRegistry.addRecipe(ItemComponent.servoMotor, " W ", "EIE", 'I', iron, 'E', ItemComponent.solenoid, 'W', ItemComponent.wiring);
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
- "SES",
- "ESE",
- "SES",
- 'S', ItemComponent.solenoid,
- 'E', enderPearl));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true, "SES", "ESE", "SES", 'S', ItemComponent.solenoid, 'E',
+ enderPearl));
- GameRegistry.addRecipe(ItemComponent.ionThruster,
- " FE",
- "IG ",
- "IFE",
- 'I', iron,
- 'E', ItemComponent.solenoid,
- 'G', glowstone,
- 'F', ItemComponent.fieldEmitter);
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel,
- "PPP",
- "PLP",
- "PPP",
- 'P', glassPane,
- 'L', lapis));
+ GameRegistry.addRecipe(ItemComponent.ionThruster, " FE", "IG ", "IFE", 'I', iron, 'E', ItemComponent.solenoid, 'G', glowstone, 'F',
+ ItemComponent.fieldEmitter);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, "PPP", "PLP", "PPP", 'P', glassPane, 'L', lapis));
}
if (ModCompatability.UERecipesEnabled() && ModCompatability.isBasicComponentsLoaded()) {
@@ -190,145 +95,63 @@ public class RecipeManager {
try {
ItemStack steelIngot = OreDictionary.getOres("ingotSteel").get(0);
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(steelIngot, 5), true,
- "P", 'P', ItemComponent.basicPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(steelIngot, 5), true, "P", 'P', ItemComponent.basicPlating));
} catch (Exception e) {
MuseLogger.logError("Unable to load steel plate");
}
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
- "WC ",
- "RGC",
- " RW",
- 'W', ItemComponent.wiring,
- 'C', basicCircuit,
- 'G', glowstone,
- 'R', redstone));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
- "YTG",
- "TWT",
- "BTR",
- 'W', ItemComponent.wiring,
- 'T', glass,
- 'Y', glowstone,
- 'G', cactusgreen,
- 'B', lapis,
- 'R', rosered));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
- "II",
- "CI",
- "II",
- 'C', ItemComponent.wiring,
- 'I', "ingotSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true, "WC ", "RGC", " RW", 'W', ItemComponent.wiring, 'C',
+ basicCircuit, 'G', glowstone, 'R', redstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true, "YTG", "TWT", "BTR", 'W', ItemComponent.wiring, 'T', glass,
+ 'Y', glowstone, 'G', cactusgreen, 'B', lapis, 'R', rosered));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true, "II", "CI", "II", 'C', ItemComponent.wiring, 'I',
+ "ingotSteel"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
- "II",
- "CI",
- "II",
- 'C', "basicCircuit",
- 'I', diamond));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true, "II", "CI", "II", 'C', "basicCircuit", 'I', diamond));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true,
- "P", 'P', ItemComponent.advancedPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true, "P", 'P', ItemComponent.advancedPlating));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true,
- "ILI",
- "LEL",
- "ILI",
- 'I', "plateSteel", 'L', lapisBlock, 'E', emerald));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true, "ILI", "LEL", "ILI", 'I', "plateSteel",
+ 'L', lapisBlock, 'E', emerald));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true,
- "III",
- "C C",
- 'I', "plateSteel", 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true, "III", "C C", 'I', "plateSteel", 'C',
+ "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true,
- "I I",
- "CIC",
- "III",
- 'I', "plateSteel", 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true, "I I", "CIC", "III", 'I',
+ "plateSteel", 'C', "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true,
- "III",
- "C C",
- "I I",
- 'I', "plateSteel", 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true, "III", "C C", "I I", 'I', "plateSteel",
+ 'C', "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true,
- "C C",
- "I I",
- 'I', "plateSteel", 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true, "C C", "I I", 'I', "plateSteel", 'C',
+ "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true,
- " C ",
- "CI ",
- " IC",
- 'I', "plateSteel", 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true, " C ", "CI ", " IC", 'I', "plateSteel", 'C',
+ "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 4), true,
- "GWG", 'G', goldNugget, 'W', "copperWire"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 4), true, "GWG", 'G', goldNugget, 'W', "copperWire"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true,
- "WWW",
- "S S", 'W', wool, 'S', string));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true, "WWW", "S S", 'W', wool, 'S', string));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.lvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring,
- 'B', "battery"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring,
- 'B', "advancedBattery"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring,
- 'B', "eliteBattery"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.lvcapacitor, "WBW", 'W', ItemComponent.wiring, 'B', "battery"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor, "WBW", 'W', ItemComponent.wiring, 'B', "advancedBattery"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor, "WBW", 'W', ItemComponent.wiring, 'B', "eliteBattery"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true,
- "WIW",
- "WIW",
- "WIW",
- 'W', ItemComponent.wiring,
- 'I', iron));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true, "WIW", "WIW", "WIW", 'W', ItemComponent.wiring, 'I', iron));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true,
- " SI",
- "SI ",
- "S ",
- 'I', iron, 'S', "plateSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true, " SI", "SI ", "S ", 'I', iron, 'S', "plateSteel"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
- " C ",
- "EIE", 'I', iron, 'E', ItemComponent.solenoid, 'C', "basicCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true, " C ", "EIE", 'I', iron, 'E', ItemComponent.solenoid, 'C',
+ "basicCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
- "SES",
- "ECE",
- "SES",
- 'S', ItemComponent.solenoid,
- 'E', enderPearl,
- 'C', "advancedCircuit"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true, "SES", "ECE", "SES", 'S', ItemComponent.solenoid, 'E',
+ enderPearl, 'C', "advancedCircuit"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
- " FE",
- "CG ",
- "IFE",
- 'I',
- "plateSteel",
- 'E', ItemComponent.solenoid,
- 'G', glowstone,
- 'C', "advancedCircuit",
- 'F', ItemComponent.fieldEmitter));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true, " FE", "CG ", "IFE", 'I', "plateSteel", 'E',
+ ItemComponent.solenoid, 'G', glowstone, 'C', "advancedCircuit", 'F', ItemComponent.fieldEmitter));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
- "GGG",
- "CLC",
- "SSS",
- 'G', glass,
- 'C', basicCircuit,
- 'L', lapisBlock,
- 'S', "plateSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true, "GGG", "CLC", "SSS", 'G', glass, 'C', basicCircuit, 'L',
+ lapisBlock, 'S', "plateSteel"));
}
if (ModCompatability.IC2RecipesEnabled() && ModCompatability.isIndustrialCraftLoaded()) {
circuit = ModCompatability.getIC2Item("electronicCircuit");
@@ -349,154 +172,67 @@ public class RecipeManager {
try {
ItemStack refinedIron = OreDictionary.getOres("ingotRefinedIron").get(0);
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(refinedIron, 5), true,
- "P", 'P', ItemComponent.basicPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(refinedIron, 5), true, "P", 'P', ItemComponent.basicPlating));
} catch (Exception e) {
MuseLogger.logError("Unable to load Refined Iron");
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iron, 5), true,
- "P", 'P', ItemComponent.basicPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iron, 5), true, "P", 'P', ItemComponent.basicPlating));
}
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
- "WC ",
- "RGC",
- " RW",
- 'W', ItemComponent.wiring,
- 'C', circuit,
- 'G', glowstone,
- 'R', redstone));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true,
- "P", 'P', ItemComponent.advancedPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true, "WC ", "RGC", " RW", 'W', ItemComponent.wiring, 'C',
+ circuit, 'G', glowstone, 'R', redstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(diamond, 5), true, "P", 'P', ItemComponent.advancedPlating));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
- "YTG",
- "TWT",
- "BTR",
- 'W', ItemComponent.wiring,
- 'T', glass,
- 'Y', glowstone,
- 'G', cactusgreen,
- 'B', lapis,
- 'R', rosered));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true, "YTG", "TWT", "BTR", 'W', ItemComponent.wiring, 'T', glass,
+ 'Y', glowstone, 'G', cactusgreen, 'B', lapis, 'R', rosered));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
- "II",
- "CI",
- "II",
- 'C', circuit,
- 'I', "ingotRefinedIron"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true, "II", "CI", "II", 'C', circuit, 'I', "ingotRefinedIron"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
- "II",
- "CI",
- "II",
- 'C', advCircuit,
- 'I', diamond));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true, "II", "CI", "II", 'C', advCircuit, 'I', diamond));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true,
- "E",
- "C",
- "M",
- 'E', emerald, 'C', circuit.copy(), 'M', machine));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true, "E", "C", "M", 'E', emerald, 'C', circuit
+ .copy(), 'M', machine));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true,
- "III",
- "C C",
- 'I', refIron, 'C', circuit.copy()));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true, "III", "C C", 'I', refIron, 'C',
+ circuit.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true,
- "I I",
- "CIC",
- "III",
- 'I', refIron, 'C', circuit.copy()));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true, "I I", "CIC", "III", 'I', refIron,
+ 'C', circuit.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true,
- "III",
- "C C",
- "I I",
- 'I', refIron, 'C', circuit.copy()));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true, "III", "C C", "I I", 'I', refIron, 'C',
+ circuit.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true,
- "C C",
- "I I",
- 'I', refIron, 'C', circuit.copy()));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true, "C C", "I I", 'I', refIron, 'C',
+ circuit.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true,
- " C ",
- "CI ",
- " IC",
- 'I', refIron, 'C', circuit.copy()));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true, " C ", "CI ", " IC", 'I', refIron, 'C',
+ circuit.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 2), true,
- "GRG", 'G', goldNugget.copy(), 'R', redstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 2), true, "GRG", 'G', goldNugget.copy(), 'R', redstone));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true,
- "WWW", "S S", 'W', wool, 'S', string));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true, "WWW", "S S", 'W', wool, 'S', string));
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor, "WBW", 'W', ItemComponent.wiring.copy(), 'B', reBattery);
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor, "WBW", 'W', ItemComponent.wiring.copy(), 'B', fullBattery);
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.mvcapacitor, "WBW", 'W', ItemComponent.wiring.copy(), 'B', energyCrystal);
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.hvcapacitor, "WBW", 'W', ItemComponent.wiring.copy(), 'B', lapotronCrystal);
- Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring.copy(),
- 'B', reBattery);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true, " W ", "WIW", " W ", 'W', ItemComponent.wiring, 'I', machine));
- Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring.copy(),
- 'B', fullBattery);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true, " CC", "CCI", "C ", 'C', carbonPlate.copy(), 'I',
+ ItemComponent.solenoid));
- Ic2Recipes.addCraftingRecipe(ItemComponent.mvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring.copy(),
- 'B', energyCrystal);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true, " W ", "EME", 'M', machine.copy(), 'E',
+ ItemComponent.solenoid, 'W', circuit.copy()));
- Ic2Recipes.addCraftingRecipe(ItemComponent.hvcapacitor,
- "WBW",
- 'W', ItemComponent.wiring.copy(),
- 'B', lapotronCrystal);
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true, "SES", "ECE", "SES", 'S', ItemComponent.solenoid, 'E',
+ enderPearl, 'C', advCircuit));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true,
- " W ",
- "WIW",
- " W ",
- 'W', ItemComponent.wiring,
- 'I', machine));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true, " FE", "MG ", "CFE", 'I', iron, 'E', ItemComponent.solenoid,
+ 'F', ItemComponent.fieldEmitter, 'G', glowstone, 'C', advCircuit.copy(), 'M', advMachine.copy()));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true,
- " CC",
- "CCI",
- "C ",
- 'C', carbonPlate.copy(),
- 'I', ItemComponent.solenoid));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
- " W ",
- "EME",
- 'M', machine.copy(), 'E', ItemComponent.solenoid, 'W', circuit.copy()));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
- "SES",
- "ECE",
- "SES",
- 'S', ItemComponent.solenoid,
- 'E', enderPearl,
- 'C', advCircuit));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
- " FE",
- "MG ",
- "CFE",
- 'I', iron,
- 'E', ItemComponent.solenoid,
- 'F', ItemComponent.fieldEmitter,
- 'G', glowstone,
- 'C', advCircuit.copy(),
- 'M', advMachine.copy()));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
- "LGL",
- "GLG",
- "CBC",
- 'L', lapis,
- 'G', glass,
- 'C', circuit,
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true, "LGL", "GLG", "CBC", 'L', lapis, 'G', glass, 'C', circuit,
'B', gen));
}
if (ModCompatability.GregTechRecipesEnabled() && ModCompatability.isIndustrialCraftLoaded() && ModCompatability.isGregTechLoaded()) {
@@ -521,191 +257,93 @@ public class RecipeManager {
try {
ItemStack titanium = OreDictionary.getOres("ingotSteel").get(0);
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(titanium, 5), true,
- "P", 'P', ItemComponent.basicPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(titanium, 5), true, "P", 'P', ItemComponent.basicPlating));
} catch (Exception e) {
MuseLogger.logError("Unable to load ingotSteel");
}
try {
ItemStack iridium = OreDictionary.getOres("ingotTitanium").get(0);
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iridium, 5), true,
- "P", 'P', ItemComponent.advancedPlating));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(iridium, 5), true, "P", 'P', ItemComponent.advancedPlating));
} catch (Exception e) {
MuseLogger.logError("Unable to load ingotTitanium");
}
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
- "WCI",
- "RGC",
- "IRW",
- 'W', ItemComponent.wiring,
- 'C', advancedCircuit,
- 'G', energyFlowCircuit,
- 'R', dataStorageCircuit,
- 'I', "ingotElectrum"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true, "WCI", "RGC", "IRW", 'W', ItemComponent.wiring, 'C',
+ advancedCircuit, 'G', energyFlowCircuit, 'R', dataStorageCircuit, 'I', "ingotElectrum"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
- "LLL",
- "RGB",
- "LLL",
- 'L', luminator,
- 'R', "gemRuby",
- 'G', "gemGreenSapphire",
- 'B', "gemSapphire"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true, "LLL", "RGB", "LLL", 'L', luminator, 'R', "gemRuby", 'G',
+ "gemGreenSapphire", 'B', "gemSapphire"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
- "II",
- "CI",
- "II",
- 'C', "circuitTier02",
- 'I', "ingotSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true, "II", "CI", "II", 'C', "circuitTier02", 'I', "ingotSteel"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
- "II",
- "CI",
- "II",
- 'C', "circuitTier04",
- 'I', "ingotTitanium"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true, "II", "CI", "II", 'C', "circuitTier04", 'I',
+ "ingotTitanium"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true,
- "CVC",
- "IEI",
- "IMI",
- 'C', advancedCircuit,
- 'E', emerald,
- 'V', computerMonitor,
- 'I', refinedIron,
- 'M', advancedMachine));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true, "CVC", "IEI", "IMI", 'C', advancedCircuit,
+ 'E', emerald, 'V', computerMonitor, 'I', refinedIron, 'M', advancedMachine));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true,
- "ACA",
- "MVM",
- 'A', "ingotAluminium",
- 'C', dataStorageCircuit,
- 'M', machineParts,
- 'V', computerMonitor));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true, "ACA", "MVM", 'A', "ingotAluminium",
+ 'C', dataStorageCircuit, 'M', machineParts, 'V', computerMonitor));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true,
- "AMA",
- "ACA",
- "AAA",
- 'A', "ingotAluminium",
- 'C', dataStorageCircuit,
- 'M', machineParts));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true, "AMA", "ACA", "AAA", 'A',
+ "ingotAluminium", 'C', dataStorageCircuit, 'M', machineParts));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true,
- "MCM",
- "A A",
- "A A",
- 'A', "ingotAluminium",
- 'C', dataStorageCircuit,
- 'M', machineParts));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true, "MCM", "A A", "A A", 'A',
+ "ingotAluminium", 'C', dataStorageCircuit, 'M', machineParts));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true,
- "M M",
- "ACA",
- 'A', "ingotAluminium",
- 'C', dataStorageCircuit,
- 'M', machineParts));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true, "M M", "ACA", 'A', "ingotAluminium",
+ 'C', dataStorageCircuit, 'M', machineParts));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true,
- "A A",
- "AMA",
- " C ",
- 'A', "ingotAluminium",
- 'C', dataStorageCircuit,
- 'M', machineParts));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true, "A A", "AMA", " C ", 'A', "ingotAluminium",
+ 'C', dataStorageCircuit, 'M', machineParts));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 2), true,
- "CCC",
- "SSS",
- "CCC",
- 'C', uninsulatedCopper,
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 2), true, "CCC", "SSS", "CCC", 'C', uninsulatedCopper,
'S', "ingotSilver"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true,
- "WWW",
- "S S",
- "CNC",
- 'W', wool,
- 'S', string,
- 'C', carbonPlate,
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true, "WWW", "S S", "CNC", 'W', wool, 'S', string, 'C', carbonPlate,
'N', nitrogen));
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor,
+ // "IWI",
+ // "IBI",
+ // "IBI",
+ // 'W', ItemComponent.wiring,
+ // 'I', refinedIron,
+ // 'B', "100kEUStore"); // Lithium battery
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.mvcapacitor,
+ // "IWI",
+ // "IBI",
+ // "IBI",
+ // 'W', ItemComponent.wiring,
+ // 'I', "ingotTitanium",
+ // 'B', "1kkEUStore"); // Lapotron crystal
+ //
+ // Ic2Recipes.addCraftingRecipe(ItemComponent.hvcapacitor,
+ // "IWI",
+ // "IBI",
+ // "IBI",
+ // 'W', ItemComponent.wiring,
+ // 'I', "ingotChrome",
+ // 'B', "10kkEUStore"); // Lapotronic EnergyOrb
- Ic2Recipes.addCraftingRecipe(ItemComponent.lvcapacitor,
- "IWI",
- "IBI",
- "IBI",
- 'W', ItemComponent.wiring,
- 'I', refinedIron,
- 'B', "100kEUStore"); // Lithium battery
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true, "WSW", "WSW", "WSW", 'W', ItemComponent.wiring, 'S',
+ "ingotSteel"));
- Ic2Recipes.addCraftingRecipe(ItemComponent.mvcapacitor,
- "IWI",
- "IBI",
- "IBI",
- 'W', ItemComponent.wiring,
- 'I', "ingotTitanium",
- 'B', "1kkEUStore"); // Lapotron crystal
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true, " MC", "MPI", "M ", 'P', carbonPlate, 'M', "plateMagnalium",
+ 'I', ItemComponent.solenoid, 'C', advancedCircuit));
- Ic2Recipes.addCraftingRecipe(ItemComponent.hvcapacitor,
- "IWI",
- "IBI",
- "IBI",
- 'W', ItemComponent.wiring,
- 'I', "ingotChrome",
- 'B', "10kkEUStore"); // Lapotronic EnergyOrb
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true, "IBI", "CSC", "IBI", 'I', "ingotSteel", 'B', "ingotBrass",
+ 'C', advancedCircuit, 'S', ItemComponent.solenoid));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true,
- "WSW",
- "WSW",
- "WSW",
- 'W', ItemComponent.wiring,
- 'S', "ingotSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true, "ISI", "CUC", "ISI", 'I', "ingotTungstenSteel", 'S',
+ ItemComponent.solenoid, 'U', energyFlowCircuit, 'C', "itemSuperconductor"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true,
- " MC",
- "MPI",
- "M ",
- 'P', carbonPlate,
- 'M', "plateMagnalium",
- 'I', ItemComponent.solenoid,
- 'C', advancedCircuit));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true, "ISI", "FCF", "N N", 'I', "plateIridium", 'S',
+ "itemSuperconductor", 'N', neutronReflector, 'C', ItemComponent.hvcapacitor, 'F', ItemComponent.fieldEmitter));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
- "IBI",
- "CSC",
- "IBI",
- 'I', "ingotSteel",
- 'B', "ingotBrass",
- 'C', advancedCircuit,
- 'S', ItemComponent.solenoid));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
- "ISI",
- "CUC",
- "ISI",
- 'I', "ingotTungstenSteel",
- 'S', ItemComponent.solenoid,
- 'U', energyFlowCircuit,
- 'C', "itemSuperconductor"));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
- "ISI",
- "FCF",
- "N N",
- 'I', "plateIridium",
- 'S', "itemSuperconductor",
- 'N', neutronReflector,
- 'C', ItemComponent.hvcapacitor,
- 'F', ItemComponent.fieldEmitter));
-
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
- "GGG",
- "PCP",
- 'G', reinforcedGlass,
- 'P', "plateIridium",
- 'C', energyFlowCircuit));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true, "GGG", "PCP", 'G', reinforcedGlass, 'P', "plateIridium", 'C',
+ energyFlowCircuit));
}
if (ModCompatability.ThermalExpansionRecipesEnabled() && ModCompatability.isThermalExpansionLoaded()) {
ItemStack pneumaticServo = ModCompatability.getThermexItem("pneumaticServo", 1);
@@ -743,163 +381,63 @@ public class RecipeManager {
// MuseLogger.logError("Unable to load Iridium Plate");
// }
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true,
- "EGW",
- "RWG",
- "WRE",
- 'E', "ingotElectrum",
- 'W', ItemComponent.wiring,
- 'G', glowstone,
- 'R', redstone));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.controlCircuit, true, "EGW", "RWG", "WRE", 'E', "ingotElectrum", 'W',
+ ItemComponent.wiring, 'G', glowstone, 'R', redstone));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true,
- "RGB",
- " H ",
- "WLW",
- 'W', ItemComponent.wiring,
- 'L', powerCoilGold,
- 'H', glass,
- 'R', rosered,
- 'G', cactusgreen,
- 'B', lapis));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.laserHologram, true, "RGB", " H ", "WLW", 'W', ItemComponent.wiring, 'L',
+ powerCoilGold, 'H', glass, 'R', rosered, 'G', cactusgreen, 'B', lapis));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true,
- "II",
- "CI",
- "II",
- 'C', gearTin,
- 'I', iron));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.basicPlating, true, "II", "CI", "II", 'C', gearTin, 'I', iron));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true,
- "II",
- "CI",
- "II",
- 'C', gearInvar,
- 'I', diamond));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.advancedPlating, true, "II", "CI", "II", 'C', gearInvar, 'I', diamond));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true,
- " E ",
- "IMI",
- " R ",
- 'R', powerCoilSilver,
- 'M', machineFrame,
- 'E', emerald,
- 'I', "ingotElectrum"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.tinkerTable), true, " E ", "IMI", " R ", 'R', powerCoilSilver,
+ 'M', machineFrame, 'E', emerald, 'I', "ingotElectrum"));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true,
- "III",
- "W W",
- 'I', iron,
- 'W', ItemComponent.wiring));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorHead), true, "III", "W W", 'I', iron, 'W',
+ ItemComponent.wiring));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true,
- "I I",
- "WIW",
- "III",
- 'I', iron,
- 'W', ItemComponent.wiring));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorTorso), true, "I I", "WIW", "III", 'I', iron, 'W',
+ ItemComponent.wiring));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true,
- "III",
- "W W",
- "I I",
- 'I', iron,
- 'W', ItemComponent.wiring));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorLegs), true, "III", "W W", "I I", 'I', iron, 'W',
+ ItemComponent.wiring));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true,
- "W W",
- "I I",
- 'I', iron,
- 'W', ItemComponent.wiring));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerArmorFeet), true, "W W", "I I", 'I', iron, 'W',
+ ItemComponent.wiring));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true,
- " I ",
- "IEI",
- " W ",
- 'W', ItemComponent.wiring,
- 'E', "ingotElectrum",
- 'I', iron));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModularPowersuits.powerTool), true, " I ", "IEI", " W ", 'W',
+ ItemComponent.wiring, 'E', "ingotElectrum", 'I', iron));
- GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 8), true,
- "CCC",
- "SSS",
- "CCC",
- 'C', "ingotCopper",
- 'S', "ingotSilver"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(copyAndResize(ItemComponent.wiring, 8), true, "CCC", "SSS", "CCC", 'C', "ingotCopper", 'S',
+ "ingotSilver"));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true,
- "WWW",
- "S S",
- " O ",
- 'W', wool,
- 'S', string,
- 'O', pneumaticServo));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.parachute, true, "WWW", "S S", " O ", 'W', wool, 'S', string, 'O',
+ pneumaticServo));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.lvcapacitor,
- "CPT",
- "W W",
- 'W', ItemComponent.wiring,
- 'C', "ingotSilver",
- 'T', "ingotGold",
- 'P', paper));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.lvcapacitor, "CPT", "W W", 'W', ItemComponent.wiring, 'C', "ingotSilver", 'T',
+ "ingotGold", 'P', paper));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor,
- "WRW",
- 'W', ItemComponent.wiring,
- 'R', conduitEnergy));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.mvcapacitor, "WRW", 'W', ItemComponent.wiring, 'R', conduitEnergy));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor,
- "WRW",
- 'W', ItemComponent.wiring,
- 'R', energyFrameFull));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.hvcapacitor, "WRW", 'W', ItemComponent.wiring, 'R', energyFrameFull));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true,
- "WSW",
- "WSW",
- "WSW",
- 'W', ItemComponent.wiring,
- 'S', iron));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solenoid, true, "WSW", "WSW", "WSW", 'W', ItemComponent.wiring, 'S', iron));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true,
- " GG",
- "GGI",
- "G ",
- 'G', compressedSawdust,
- 'I', ItemComponent.solenoid));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.gliderWing, true, " GG", "GGI", "G ", 'G', compressedSawdust, 'I',
+ ItemComponent.solenoid));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true,
- " O ",
- "WSW",
- " O ",
- 'O', ItemComponent.solenoid,
- 'S', pneumaticServo,
- 'W', ItemComponent.wiring));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.servoMotor, true, " O ", "WSW", " O ", 'O', ItemComponent.solenoid, 'S',
+ pneumaticServo, 'W', ItemComponent.wiring));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true,
- " W ",
- "OUO",
- " W ",
- 'W', ItemComponent.wiring,
- 'O', ItemComponent.solenoid,
- 'U', teleportFrameFull));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.fieldEmitter, true, " W ", "OUO", " W ", 'W', ItemComponent.wiring, 'O',
+ ItemComponent.solenoid, 'U', teleportFrameFull));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true,
- " FI",
- "IG ",
- "WFI",
- 'I', "ingotInvar",
- 'G', glowstone,
- 'W', ItemComponent.wiring,
- 'F', ItemComponent.fieldEmitter));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.ionThruster, true, " FI", "IG ", "WFI", 'I', "ingotInvar", 'G', glowstone, 'W',
+ ItemComponent.wiring, 'F', ItemComponent.fieldEmitter));
- GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true,
- "GGG",
- "CLC",
- " E ",
- 'G', glass,
- 'L', new ItemStack(Block.blockLapis),
- 'C', conduitEnergy,
- 'E', powerCoilSilver));
+ GameRegistry.addRecipe(new ShapedOreRecipe(ItemComponent.solarPanel, true, "GGG", "CLC", " E ", 'G', glass, 'L', new ItemStack(
+ Block.blockLapis), 'C', conduitEnergy, 'E', powerCoilSilver));
}
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemComponent.java b/src/minecraft/net/machinemuse/powersuits/item/ItemComponent.java
index 58bcc33..2a404f3 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemComponent.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemComponent.java
@@ -6,15 +6,19 @@ import java.util.List;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
+import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
public class ItemComponent extends Item {
- public static List icons;
+ public static List icons;
public static List names;
public static List descriptions;
@@ -43,16 +47,15 @@ public class ItemComponent extends Item {
this.setHasSubtypes(true);
this.setMaxDamage(0);
this.setCreativeTab(Config.getCreativeTab());
- icons = new ArrayList();
- names = new ArrayList();
- descriptions = new ArrayList();
+ icons = new ArrayList();
+ names = new ArrayList();
+ descriptions = new ArrayList();
}
public ItemStack addComponent(String oredictName, String englishName, String description, MuseIcon icon) {
names.add(oredictName);
- icons.add(icon.getIconIndex());
+ icons.add(icon);
descriptions.add(description);
- this.setTextureFile(icon.getTexturefile());
ItemStack stack = new ItemStack(this, 1, names.size() - 1);
LanguageRegistry.addName(stack, englishName);
return stack;
@@ -61,10 +64,7 @@ public class ItemComponent extends Item {
public void addInformation(ItemStack stack, EntityPlayer player, List currentTipList, boolean advancedToolTips) {
if (Config.doAdditionalInfo()) {
String message = "For use in Tinker Table.";
- message = MuseStringUtils.wrapMultipleFormatTags(
- message,
- MuseStringUtils.FormatCodes.Grey,
- MuseStringUtils.FormatCodes.Italic);
+ message = MuseStringUtils.wrapMultipleFormatTags(message, MuseStringUtils.FormatCodes.Grey, MuseStringUtils.FormatCodes.Italic);
currentTipList.add(message);
int damage = stack.getItemDamage();
if (damage < descriptions.size()) {
@@ -114,32 +114,35 @@ public class ItemComponent extends Item {
artificialMuscle = addComponent("componentArtificialMuscle", "Artificial Muscle",
"An electrical, artificial muscle, with less range of movement than human muscle but orders of magnitude more strength.",
MuseIcon.ARTIFICIAL_MUSCLE);
- solarPanel = addComponent("componentSolarPanel", "Solar Panel",
- "A light sensitive device that will generate electricity from the sun.", new MuseIcon(MuseIcon.WC_ICON_PATH, 229));
+ solarPanel = addComponent("componentSolarPanel", "Solar Panel", "A light sensitive device that will generate electricity from the sun.",
+ new MuseIcon("blueplate"));
}
/**
* Gets an icon index based on an item's damage value
*/
- public int getIconFromDamage(int index)
- {
- return icons.get(index);
+ public Icon getIconFromDamage(int index) {
+ return icons.get(index).getIconRegistration();
}
- public String getItemNameIS(ItemStack par1ItemStack)
- {
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ for (MuseIcon icon : icons) {
+ icon.register(iconRegister);
+ }
+ }
+
+ public String getItemNameIS(ItemStack par1ItemStack) {
int index = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, names.size() - 1);
return "powerArmorComponent." + names.get(index).replaceAll("\\s", "");
}
/**
- * returns a list of items with the same ID, but different meta (eg: dye
- * returns 16 items). For creative tab.
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items). For creative tab.
*/
- public void getSubItems(int itemID, CreativeTabs tab, List listToAddTo)
- {
- for (int i = 0; i < names.size(); ++i)
- {
+ public void getSubItems(int itemID, CreativeTabs tab, List listToAddTo) {
+ for (int i = 0; i < names.size(); ++i) {
listToAddTo.add(new ItemStack(itemID, 1, i));
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemElectricArmor.java b/src/minecraft/net/machinemuse/powersuits/item/ItemElectricArmor.java
new file mode 100644
index 0000000..68d99e6
--- /dev/null
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemElectricArmor.java
@@ -0,0 +1,176 @@
+package net.machinemuse.powersuits.item;
+
+import net.machinemuse.api.ElectricItemUtils;
+import net.machinemuse.powersuits.common.ModCompatability;
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+
+public class ItemElectricArmor extends ItemArmor
+/**
+ * implements IItemElectric, // Universal Electricity ICustomElectricItem, // Industrial Craft 2 IEMPItem, // for ICBM EMP interfacing
+ * IAntiPoisonArmor, // for atomic science hazmat suits IChargeableItem // for Thermal Expansion
+ **/
+
+{
+ public ItemElectricArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
+ super(par1, par2EnumArmorMaterial, par3, par4);
+ }
+
+ // //////////////////////////////////////////////
+ // --- UNIVERSAL ELECTRICITY COMPATABILITY ---//
+ // //////////////////////////////////////////////
+ public double onReceive(double amps, double voltage, ItemStack itemStack) {
+ double amount = 1;// ElectricInfo.getJoules(amps, voltage, 1);
+ return ElectricItemUtils.charge(amount, itemStack);
+ }
+
+ public double onUse(double joulesNeeded, ItemStack itemStack) {
+ return ElectricItemUtils.discharge(joulesNeeded, itemStack);
+ }
+
+ public double getJoules(Object... data) {
+ return ElectricItemUtils.getJoules(getAsStack(data));
+ }
+
+ public void setJoules(double joules, Object... data) {
+ ElectricItemUtils.setJoules(joules, getAsStack(data));
+ }
+
+ public double getMaxJoules(Object... data) {
+ return ElectricItemUtils.getMaxJoules(getAsStack(data));
+ }
+
+ public double getVoltage(Object... data) {
+ return ElectricItemUtils.getVoltage(getAsStack(data));
+ }
+
+ public boolean canReceiveElectricity() {
+ return true;
+ }
+
+ public boolean canProduceElectricity() {
+ return true;
+ }
+
+ /**
+ * Helper function to deal with UE's use of varargs
+ */
+ private ItemStack getAsStack(Object[] data) {
+ if (data[0] instanceof ItemStack) {
+ return (ItemStack) data[0];
+ } else {
+ throw new IllegalArgumentException("MusePowerSuits: Invalid ItemStack passed via UE interface");
+ }
+ }
+
+ // //////////////////////////////////////// //
+ // --- INDUSTRIAL CRAFT 2 COMPATABILITY --- //
+ // //////////////////////////////////////// //
+ public int charge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
+ double joulesProvided = ModCompatability.joulesFromEU(amount);
+ double maxJoules = ElectricItemUtils.getMaxJoules(stack);
+ if (!ignoreTransferLimit && (joulesProvided > maxJoules / 200.0)) {
+ joulesProvided = maxJoules / 200.0;
+ }
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ double surplus = ElectricItemUtils.charge(joulesProvided, stack);
+ if (simulate) {
+ ElectricItemUtils.setJoules(currentJoules, stack);
+ }
+
+ return ModCompatability.joulesToEU(joulesProvided - surplus);
+ }
+
+ public int discharge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
+ double joulesRequested = ModCompatability.joulesFromEU(amount);
+ double maxJoules = ElectricItemUtils.getMaxJoules(stack);
+ if (!ignoreTransferLimit && (joulesRequested > maxJoules / 200.0)) {
+ joulesRequested = maxJoules / 200.0;
+ }
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ double givenJoules = ElectricItemUtils.discharge(joulesRequested, stack);
+ if (simulate) {
+ ElectricItemUtils.setJoules(currentJoules, stack);
+ }
+ return ModCompatability.joulesToEU(givenJoules);
+ }
+
+ public boolean canUse(ItemStack stack, int amount) {
+ double joulesRequested = ModCompatability.joulesFromEU(amount);
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ if (currentJoules > joulesRequested) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public boolean canShowChargeToolTip(ItemStack itemStack) {
+ return false;
+ }
+
+ public boolean canProvideEnergy() {
+ return true;
+ }
+
+ public int getChargedItemId() {
+ return this.itemID;
+ }
+
+ public int getEmptyItemId() {
+ return this.itemID;
+ }
+
+ public int getMaxCharge() {
+ return 1;
+ }
+
+ public int getTier() {
+ return 1;
+ }
+
+ public int getTransferLimit() {
+ return 0;
+ }
+
+ // //////////// //
+ // --- ICBM --- //
+ // //////////// //
+ // public void onEMP(ItemStack itemStack, Entity entity, IExplosive empExplosive) {
+ // ElectricItemUtils.onEMP(itemStack, entity, empExplosive);
+ // }
+
+ // ////////////////////// //
+ // --- Atomic Science --- //
+ // ////////////////////// //
+ // public boolean isProtectedFromPoison(ItemStack itemStack, EntityLiving entityLiving, Poison type) {
+ // return MuseItemUtils.itemHasModule(itemStack, MuseCommonStrings.MODULE_HAZMAT);
+ // }
+
+ // public void onProtectFromPoison(ItemStack itemStack, EntityLiving entityLiving, Poison type) {
+ // }
+
+ // ///////////////////////// //
+ // --- Thermal Expansion --- //
+ // ///////////////////////// //
+ public float receiveEnergy(ItemStack theItem, float energy, boolean doReceive) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public float transferEnergy(ItemStack theItem, float energy, boolean doTransfer) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public float getEnergyStored(ItemStack theItem) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public float getMaxEnergyStored(ItemStack theItem) {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemElectricTool.java b/src/minecraft/net/machinemuse/powersuits/item/ItemElectricTool.java
new file mode 100644
index 0000000..82d892d
--- /dev/null
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemElectricTool.java
@@ -0,0 +1,232 @@
+package net.machinemuse.powersuits.item;
+
+import net.machinemuse.api.ElectricItemUtils;
+import net.machinemuse.powersuits.common.ModCompatability;
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemTool;
+import universalelectricity.core.electricity.ElectricityPack;
+import universalelectricity.core.item.IItemElectric;
+
+public class ItemElectricTool extends ItemTool
+
+implements IItemElectric // Universal Electricity
+
+// ICustomElectricItem, // Industrial Craft 2
+
+// IEMPItem, // for ICBM EMP interfacing
+
+// IChargeableItem // for Thermal Expansion
+{
+
+ protected ItemElectricTool(int par1, int par2, EnumToolMaterial par3EnumToolMaterial, Block[] par4ArrayOfBlock) {
+ super(par1, par2, par3EnumToolMaterial, par4ArrayOfBlock);
+ }
+
+ // //////////// //
+ // --- ICBM --- //
+ // //////////// //
+ // @Override
+ // public void onEMP(ItemStack itemStack, Entity entity, IExplosive empExplosive) {
+ // ElectricItemUtils.onEMP(itemStack, entity, empExplosive);
+ // }
+
+ // ///////////////////////// //
+ // --- Thermal Expansion --- //
+ // ///////////////////////// //
+
+ /**
+ * Adds energy to an item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged.
+ *
+ * @param theItem
+ * ItemStack to be charged.
+ * @param energy
+ * Maximum amount of energy to be sent into the item.
+ * @param doReceive
+ * If false, the charge will only be simulated.
+ * @return Amount of energy that was accepted by the item.
+ */
+ public float receiveEnergy(ItemStack stack, float energy, boolean doReceive) {
+ double offeredJoules = energy * ModCompatability.getBCRatio();
+ double missingJoules = ElectricItemUtils.getMaxJoules(stack) - ElectricItemUtils.getJoules(stack);
+ double transferredJoules = Math.min(offeredJoules, missingJoules);
+ ElectricItemUtils.charge(transferredJoules, stack);
+ return (float) (transferredJoules / ModCompatability.getBCRatio());
+ }
+
+ /**
+ * Removes energy from an item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally
+ * discharged.
+ *
+ * @param theItem
+ * ItemStack to be discharged.
+ * @param energy
+ * Maximum amount of energy to be removed from the item.
+ * @param doTransfer
+ * If false, the discharge will only be simulated.
+ * @return Amount of energy that was removed from the item.
+ */
+ public float transferEnergy(ItemStack stack, float energy, boolean doTransfer) {
+ double requestedJoules = energy * ModCompatability.getBCRatio();
+ double availableJoules = ElectricItemUtils.getJoules(stack);
+ double transferredJoules = Math.min(requestedJoules, availableJoules);
+ ElectricItemUtils.discharge(transferredJoules, stack);
+ return (float) (transferredJoules / ModCompatability.getBCRatio());
+ }
+
+ /**
+ * Get the amount of energy currently stored in the item.
+ */
+ public float getEnergyStored(ItemStack stack) {
+ return (float) (ModCompatability.getBCRatio() * ElectricItemUtils.getJoules(stack));
+ }
+
+ /**
+ * Get the max amount of energy that can be stored in the item.
+ */
+ public float getMaxEnergyStored(ItemStack stack) {
+ return (float) (ModCompatability.getBCRatio() * ElectricItemUtils.getMaxJoules(stack));
+ }
+
+ // //////////////////////////////////////// //
+ // --- INDUSTRIAL CRAFT 2 COMPATABILITY --- //
+ // //////////////////////////////////////// //
+ public int charge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
+ double joulesProvided = ModCompatability.joulesFromEU(amount);
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ double surplus = ElectricItemUtils.charge(joulesProvided, stack);
+ if (simulate) {
+ ElectricItemUtils.setJoules(currentJoules, stack);
+ }
+ return ModCompatability.joulesToEU(joulesProvided - surplus);
+ }
+
+ public int discharge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
+
+ double joulesRequested = ModCompatability.joulesFromEU(amount);
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ double givenJoules = ElectricItemUtils.discharge(joulesRequested, stack);
+ if (simulate) {
+ ElectricItemUtils.setJoules(currentJoules, stack);
+ }
+ return ModCompatability.joulesToEU(givenJoules);
+ }
+
+ public boolean canUse(ItemStack stack, int amount) {
+ double joulesRequested = ModCompatability.joulesFromEU(amount);
+ double currentJoules = ElectricItemUtils.getJoules(stack);
+ if (currentJoules > joulesRequested) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public boolean canShowChargeToolTip(ItemStack itemStack) {
+ return false;
+ }
+
+ public boolean canProvideEnergy() {
+ return true;
+ }
+
+ public int getChargedItemId() {
+ return this.itemID;
+ }
+
+ public int getEmptyItemId() {
+ return this.itemID;
+ }
+
+ public int getMaxCharge() {
+ return 1;
+ }
+
+ public int getTier() {
+ return 1;
+ }
+
+ public int getTransferLimit() {
+ return 0;
+ }
+
+ // /////////////////////////////////////////// //
+ // --- UNIVERSAL ELECTRICITY COMPATABILITY --- //
+ // /////////////////////////////////////////// //
+ /**
+ * Called when this item receives electricity; being charged.
+ *
+ * @return The amount of electricity that was added to the electric item.
+ */
+ public ElectricityPack onReceive(ElectricityPack electricityPack, ItemStack itemStack) {
+ return null;
+ }
+
+ /**
+ * Called when something requests electricity from this item; being decharged.
+ *
+ * @return - The amount of electricity that was removed from the electric item.
+ */
+ public ElectricityPack onProvide(ElectricityPack ep, ItemStack itemStack) {
+ return null;
+ }
+
+ /**
+ * @return How much electricity does this item want to receive/take? This will affect the speed in which items get charged per tick.
+ */
+ public ElectricityPack getReceiveRequest(ItemStack itemStack) {
+ return new ElectricityPack(Math.sqrt(getMaxJoules(itemStack)), getVoltage(itemStack));
+ }
+
+ /**
+ *
+ * @return How much electricity does this item want to provide/give out? This will affect the speed in which items get decharged per tick.
+ */
+ public ElectricityPack getProvideRequest(ItemStack itemStack) {
+ return new ElectricityPack(Math.sqrt(getMaxJoules(itemStack)), getVoltage(itemStack));
+ }
+
+ @Override
+ public double getJoules(ItemStack itemStack) {
+ return ElectricItemUtils.getJoules(itemStack);
+ }
+
+ @Override
+ public void setJoules(double joules, ItemStack itemStack) {
+ ElectricItemUtils.setJoules(joules, itemStack);
+ }
+
+ @Override
+ public double getMaxJoules(ItemStack itemStack) {
+ return ElectricItemUtils.getMaxJoules(itemStack);
+ }
+
+ @Override
+ public double getVoltage(ItemStack itemStack) {
+ return ElectricItemUtils.getVoltage(itemStack);
+ }
+
+ public void setJoules(double joules, Object... data) {
+ }
+
+ // public boolean canReceiveElectricity() {
+ // return true;
+ // }
+ //
+ // public boolean canProduceElectricity() {
+ // return true;
+ // }
+
+ /**
+ * Helper function to deal with UE's use of varargs
+ */
+ private ItemStack getAsStack(Object[] data) {
+ if (data[0] instanceof ItemStack) {
+ return (ItemStack) data[0];
+ } else {
+ throw new IllegalArgumentException("MusePowerSuits: Invalid ItemStack passed via UE interface");
+ }
+ }
+
+}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmor.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmor.java
index 75c8782..e54525a 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmor.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmor.java
@@ -1,9 +1,5 @@
package net.machinemuse.powersuits.item;
-import ic2.api.ICustomElectricItem;
-import icbm.api.explosion.IEMPItem;
-import icbm.api.explosion.IExplosive;
-
import java.util.ArrayList;
import java.util.List;
@@ -14,25 +10,16 @@ import net.machinemuse.api.MuseCommonStrings;
import net.machinemuse.api.MuseItemUtils;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.general.geometry.Colour;
-import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.common.Config.Items;
-import net.machinemuse.powersuits.common.ModCompatability;
-import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumArmorMaterial;
-import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraftforge.common.IArmorTextureProvider;
import net.minecraftforge.common.ISpecialArmor;
-import thermalexpansion.api.core.IChargeableItem;
-import universalelectricity.core.electricity.ElectricInfo;
-import universalelectricity.core.implement.IItemElectric;
-import atomicscience.api.IAntiPoisonArmor;
-import atomicscience.api.Poison;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -41,17 +28,8 @@ import cpw.mods.fml.relauncher.SideOnly;
*
* @author MachineMuse
*/
-public abstract class ItemPowerArmor extends ItemArmor
- implements
- ISpecialArmor, //
- IModularItem,
- IArmorTextureProvider,
- IItemElectric, // Universal Electricity
- ICustomElectricItem, // Industrial Craft 2
- IEMPItem, // for ICBM EMP interfacing
- IAntiPoisonArmor, // for atomic science hazmat suits
- IChargeableItem // for Thermal Expansion
-{
+public abstract class ItemPowerArmor extends ItemElectricArmor implements ISpecialArmor, //
+ IModularItem, IArmorTextureProvider {
Config.Items itemType;
/**
@@ -61,10 +39,8 @@ public abstract class ItemPowerArmor extends ItemArmor
* @param armorType
* 0 = head; 1 = torso; 2 = legs; 3 = feet
*/
- public ItemPowerArmor(int id,
- int renderIndex, int armorType) {
+ public ItemPowerArmor(int id, int renderIndex, int armorType) {
super(id, EnumArmorMaterial.CLOTH, renderIndex, armorType);
- setTextureFile(MuseIcon.SEBK_ICON_PATH);
setMaxStackSize(1);
setCreativeTab(Config.getCreativeTab());
}
@@ -99,12 +75,10 @@ public abstract class ItemPowerArmor extends ItemArmor
}
/**
- * Inherited from ISpecialArmor, allows significant customization of damage
- * calculations.
+ * Inherited from ISpecialArmor, allows significant customization of damage calculations.
*/
@Override
- public ArmorProperties getProperties(EntityLiving player, ItemStack armor,
- DamageSource source, double damage, int slot) {
+ public ArmorProperties getProperties(EntityLiving player, ItemStack armor, DamageSource source, double damage, int slot) {
// Order in which this armor is assessed for damage. Higher(?) priority
// items take damage first, and if none spills over, the other items
// take no damage.
@@ -140,8 +114,7 @@ public abstract class ItemPowerArmor extends ItemArmor
return value;
}
- public int getItemEnchantability()
- {
+ public int getItemEnchantability() {
return 0;
}
@@ -149,17 +122,13 @@ public abstract class ItemPowerArmor extends ItemArmor
double computedred = ModuleManager.computeModularProperty(stack, MuseCommonStrings.RED_TINT);
double computedgreen = ModuleManager.computeModularProperty(stack, MuseCommonStrings.GREEN_TINT);
double computedblue = ModuleManager.computeModularProperty(stack, MuseCommonStrings.BLUE_TINT);
- Colour colour = new Colour(
- clampDouble(1 + computedred - (computedblue + computedgreen), 0, 1),
- clampDouble(1 + computedgreen - (computedblue + computedred), 0, 1),
- clampDouble(1 + computedblue - (computedred + computedgreen), 0, 1),
- 1.0F);
+ Colour colour = new Colour(clampDouble(1 + computedred - (computedblue + computedgreen), 0, 1), clampDouble(1 + computedgreen
+ - (computedblue + computedred), 0, 1), clampDouble(1 + computedblue - (computedred + computedgreen), 0, 1), 1.0F);
return colour;
}
@SideOnly(Side.CLIENT)
- public int getColorFromItemStack(ItemStack stack, int par2)
- {
+ public int getColorFromItemStack(ItemStack stack, int par2) {
Colour c = getColorFromItemStack(stack);
return c.getInt();
}
@@ -174,19 +143,16 @@ public abstract class ItemPowerArmor extends ItemArmor
}
@SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses()
- {
+ public boolean requiresMultipleRenderPasses() {
return false;
}
/**
* Return whether the specified armor ItemStack has a color.
*/
- public boolean hasColor(ItemStack stack)
- {
+ public boolean hasColor(ItemStack stack) {
NBTTagCompound itemTag = MuseItemUtils.getMuseItemTag(stack);
- if (MuseItemUtils.tagHasModule(itemTag, MuseCommonStrings.RED_TINT)
- || MuseItemUtils.tagHasModule(itemTag, MuseCommonStrings.GREEN_TINT)
+ if (MuseItemUtils.tagHasModule(itemTag, MuseCommonStrings.RED_TINT) || MuseItemUtils.tagHasModule(itemTag, MuseCommonStrings.GREEN_TINT)
|| MuseItemUtils.tagHasModule(itemTag, MuseCommonStrings.BLUE_TINT)) {
return true;
} else {
@@ -195,8 +161,7 @@ public abstract class ItemPowerArmor extends ItemArmor
}
/**
- * Inherited from ISpecialArmor, allows us to customize the calculations for
- * how much armor will display on the player's HUD.
+ * Inherited from ISpecialArmor, allows us to customize the calculations for how much armor will display on the player's HUD.
*/
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
@@ -224,12 +189,10 @@ public abstract class ItemPowerArmor extends ItemArmor
}
/**
- * Inherited from ISpecialArmor, allows us to customize how the armor
- * handles being damaged.
+ * Inherited from ISpecialArmor, allows us to customize how the armor handles being damaged.
*/
@Override
- public void damageArmor(EntityLiving entity, ItemStack stack,
- DamageSource source, int damage, int slot) {
+ public void damageArmor(EntityLiving entity, ItemStack stack, DamageSource source, int damage, int slot) {
NBTTagCompound itemProperties = MuseItemUtils.getMuseItemTag(stack);
double enerConsum = ModuleManager.computeModularProperty(stack, MuseCommonStrings.ARMOR_ENERGY_CONSUMPTION);
double drain = enerConsum * damage;
@@ -253,18 +216,14 @@ public abstract class ItemPowerArmor extends ItemArmor
* @param player
* The player (client) viewing the tooltip
* @param currentTipList
- * A list of strings containing the existing tooltip. When
- * passed, it will just contain the name of the item;
- * enchantments and lore are appended afterwards.
+ * A list of strings containing the existing tooltip. When passed, it will just contain the name of the item; enchantments and lore are
+ * appended afterwards.
* @param advancedToolTips
- * Whether or not the player has 'advanced tooltips' turned on in
- * their settings.
+ * Whether or not the player has 'advanced tooltips' turned on in their settings.
*/
@Override
- public void addInformation(ItemStack stack,
- EntityPlayer player, List currentTipList, boolean advancedToolTips) {
- MuseCommonStrings.addInformation(stack, player, currentTipList,
- advancedToolTips);
+ public void addInformation(ItemStack stack, EntityPlayer player, List currentTipList, boolean advancedToolTips) {
+ MuseCommonStrings.addInformation(stack, player, currentTipList, advancedToolTips);
}
public static String formatInfo(String string, double value) {
@@ -274,8 +233,7 @@ public abstract class ItemPowerArmor extends ItemArmor
@Override
public List getLongInfo(EntityPlayer player, ItemStack stack) {
List info = new ArrayList();
- NBTTagCompound itemProperties = MuseItemUtils
- .getMuseItemTag(stack);
+ NBTTagCompound itemProperties = MuseItemUtils.getMuseItemTag(stack);
info.add("Detailed Summary");
info.add(formatInfo("Armor", getArmorDouble(player, stack)));
info.add(formatInfo("Energy Storage", getMaxJoules(stack)) + "J");
@@ -283,186 +241,4 @@ public abstract class ItemPowerArmor extends ItemArmor
return info;
}
- // //////////////////////////////////////////////
- // --- UNIVERSAL ELECTRICITY COMPATABILITY ---//
- // //////////////////////////////////////////////
- @Override
- public double onReceive(double amps, double voltage, ItemStack itemStack) {
- double amount = ElectricInfo.getJoules(amps, voltage, 1);
- return ElectricItemUtils.charge(amount, itemStack);
- }
-
- @Override
- public double onUse(double joulesNeeded, ItemStack itemStack) {
- return ElectricItemUtils.discharge(joulesNeeded, itemStack);
- }
-
- @Override
- public double getJoules(Object... data) {
- return ElectricItemUtils.getJoules(getAsStack(data));
- }
-
- @Override
- public void setJoules(double joules, Object... data) {
- ElectricItemUtils.setJoules(joules, getAsStack(data));
- }
-
- @Override
- public double getMaxJoules(Object... data) {
- return ElectricItemUtils.getMaxJoules(getAsStack(data));
- }
-
- @Override
- public double getVoltage(Object... data) {
- return ElectricItemUtils.getVoltage(getAsStack(data));
- }
-
- @Override
- public boolean canReceiveElectricity() {
- return true;
- }
-
- @Override
- public boolean canProduceElectricity() {
- return true;
- }
-
- /**
- * Helper function to deal with UE's use of varargs
- */
- private ItemStack getAsStack(Object[] data) {
- if (data[0] instanceof ItemStack) {
- return (ItemStack) data[0];
- } else {
- throw new IllegalArgumentException(
- "MusePowerSuits: Invalid ItemStack passed via UE interface");
- }
- }
-
- // //////////////////////////////////////// //
- // --- INDUSTRIAL CRAFT 2 COMPATABILITY --- //
- // //////////////////////////////////////// //
- @Override
- public int charge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
- double joulesProvided = ModCompatability.joulesFromEU(amount);
- double maxJoules = ElectricItemUtils.getMaxJoules(stack);
- if (!ignoreTransferLimit && (joulesProvided > maxJoules / 200.0)) {
- joulesProvided = maxJoules / 200.0;
- }
- double currentJoules = ElectricItemUtils.getJoules(stack);
- double surplus = ElectricItemUtils.charge(joulesProvided, stack);
- if (simulate) {
- ElectricItemUtils.setJoules(currentJoules, stack);
- }
-
- return ModCompatability.joulesToEU(joulesProvided - surplus);
- }
-
- @Override
- public int discharge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
- double joulesRequested = ModCompatability.joulesFromEU(amount);
- double maxJoules = ElectricItemUtils.getMaxJoules(stack);
- if (!ignoreTransferLimit && (joulesRequested > maxJoules / 200.0)) {
- joulesRequested = maxJoules / 200.0;
- }
- double currentJoules = ElectricItemUtils.getJoules(stack);
- double givenJoules = ElectricItemUtils.discharge(joulesRequested, stack);
- if (simulate) {
- ElectricItemUtils.setJoules(currentJoules, stack);
- }
- return ModCompatability.joulesToEU(givenJoules);
- }
-
- @Override
- public boolean canUse(ItemStack stack, int amount) {
- double joulesRequested = ModCompatability.joulesFromEU(amount);
- double currentJoules = ElectricItemUtils.getJoules(stack);
- if (currentJoules > joulesRequested) {
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- public boolean canShowChargeToolTip(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public boolean canProvideEnergy() {
- return true;
- }
-
- @Override
- public int getChargedItemId() {
- return this.itemID;
- }
-
- @Override
- public int getEmptyItemId() {
- return this.itemID;
- }
-
- @Override
- public int getMaxCharge() {
- return 1;
- }
-
- @Override
- public int getTier() {
- return 1;
- }
-
- @Override
- public int getTransferLimit() {
- return 0;
- }
-
- // //////////// //
- // --- ICBM --- //
- // //////////// //
- @Override
- public void onEMP(ItemStack itemStack, Entity entity, IExplosive empExplosive) {
- ElectricItemUtils.onEMP(itemStack, entity, empExplosive);
- }
-
- // ////////////////////// //
- // --- Atomic Science --- //
- // ////////////////////// //
- @Override
- public boolean isProtectedFromPoison(ItemStack itemStack, EntityLiving entityLiving, Poison type) {
- return MuseItemUtils.itemHasModule(itemStack, MuseCommonStrings.MODULE_HAZMAT);
- }
-
- @Override
- public void onProtectFromPoison(ItemStack itemStack, EntityLiving entityLiving, Poison type) {
- }
-
- // ///////////////////////// //
- // --- Thermal Expansion --- //
- // ///////////////////////// //
- @Override
- public float receiveEnergy(ItemStack theItem, float energy, boolean doReceive) {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public float transferEnergy(ItemStack theItem, float energy, boolean doTransfer) {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public float getEnergyStored(ItemStack theItem) {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public float getMaxEnergyStored(ItemStack theItem) {
- // TODO Auto-generated method stub
- return 0;
- }
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorFeet.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorFeet.java
index 762c271..aad2798 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorFeet.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorFeet.java
@@ -3,9 +3,12 @@
*/
package net.machinemuse.powersuits.item;
+import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
-import atomicscience.api.Poison.ArmorType;
+import net.minecraft.client.renderer.texture.IconRegister;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
/**
* @author MachineMuse
@@ -20,13 +23,14 @@ public class ItemPowerArmorFeet extends ItemPowerArmor {
0, // Texture index for rendering armor on the player
3); // armor type. 0=head, 1=torso, 2=legs, 3=feet
itemType = Config.Items.PowerArmorFeet;
- setItemName(itemType.idName);
- setIconIndex(63);
LanguageRegistry.addName(this, itemType.englishName);
}
@Override
- public ArmorType getArmorType() {
- return ArmorType.BOOTS;
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ MuseIcon.ARMOR_FEET.register(iconRegister);
+ iconIndex = MuseIcon.ARMOR_FEET.getIconRegistration();
}
+
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorHead.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorHead.java
index 38e8669..97b822d 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorHead.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorHead.java
@@ -1,8 +1,11 @@
package net.machinemuse.powersuits.item;
+import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
-import atomicscience.api.Poison.ArmorType;
+import net.minecraft.client.renderer.texture.IconRegister;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
public class ItemPowerArmorHead extends ItemPowerArmor {
public ItemPowerArmorHead() {
@@ -10,13 +13,13 @@ public class ItemPowerArmorHead extends ItemPowerArmor {
0, // Texture index for rendering armor on the player
0); // armor type. 0=head, 1=torso, 2=legs, 3=feet
itemType = Config.Items.PowerArmorHead;
- setItemName(itemType.idName);
- setIconIndex(15);
LanguageRegistry.addName(this, itemType.englishName);
}
@Override
- public ArmorType getArmorType() {
- return ArmorType.HELM;
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ MuseIcon.ARMOR_HEAD.register(iconRegister);
+ iconIndex = MuseIcon.ARMOR_HEAD.getIconRegistration();
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorLegs.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorLegs.java
index a92d7a3..6f96f7b 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorLegs.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorLegs.java
@@ -1,8 +1,11 @@
package net.machinemuse.powersuits.item;
+import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
-import atomicscience.api.Poison.ArmorType;
+import net.minecraft.client.renderer.texture.IconRegister;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
public class ItemPowerArmorLegs extends ItemPowerArmor {
public ItemPowerArmorLegs() {
@@ -10,13 +13,13 @@ public class ItemPowerArmorLegs extends ItemPowerArmor {
0, // Texture index for rendering armor on the player
2); // armor type. 0=head, 1=torso, 2=legs, 3=feet
itemType = Config.Items.PowerArmorLegs;
- setItemName(itemType.idName);
- setIconIndex(47);
LanguageRegistry.addName(this, itemType.englishName);
}
@Override
- public ArmorType getArmorType() {
- return ArmorType.LEGGINGS;
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ MuseIcon.ARMOR_LEGS.register(iconRegister);
+ iconIndex = MuseIcon.ARMOR_LEGS.getIconRegistration();
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorTorso.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorTorso.java
index 2da46e8..821bb63 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorTorso.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerArmorTorso.java
@@ -1,8 +1,11 @@
package net.machinemuse.powersuits.item;
+import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
-import atomicscience.api.Poison.ArmorType;
+import net.minecraft.client.renderer.texture.IconRegister;
import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
public class ItemPowerArmorTorso extends ItemPowerArmor {
public ItemPowerArmorTorso() {
@@ -10,13 +13,13 @@ public class ItemPowerArmorTorso extends ItemPowerArmor {
0, // Texture index for rendering armor on the player
1); // armor type. 0=head, 1=torso, 2=legs, 3=feet
itemType = Config.Items.PowerArmorTorso;
- setItemName(itemType.idName);
- setIconIndex(31);
LanguageRegistry.addName(this, itemType.englishName);
}
@Override
- public ArmorType getArmorType() {
- return ArmorType.BODY;
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ MuseIcon.ARMOR_TORSO.register(iconRegister);
+ iconIndex = MuseIcon.ARMOR_TORSO.getIconRegistration();
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerTool.java b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerTool.java
index 702ad16..7bc4684 100644
--- a/src/minecraft/net/machinemuse/powersuits/item/ItemPowerTool.java
+++ b/src/minecraft/net/machinemuse/powersuits/item/ItemPowerTool.java
@@ -1,9 +1,5 @@
package net.machinemuse.powersuits.item;
-import ic2.api.ICustomElectricItem;
-import icbm.api.explosion.IEMPItem;
-import icbm.api.explosion.IExplosive;
-
import java.util.ArrayList;
import java.util.List;
@@ -18,11 +14,11 @@ import net.machinemuse.general.geometry.Colour;
import net.machinemuse.general.gui.MuseIcon;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.common.Config.Items;
-import net.machinemuse.powersuits.common.ModCompatability;
import net.machinemuse.powersuits.entity.EntityPlasmaBolt;
import net.machinemuse.powersuits.network.packets.MusePacketPlasmaBolt;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
@@ -30,19 +26,11 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
-import thermalexpansion.api.core.IChargeableItem;
-import universalelectricity.core.electricity.ElectricInfo;
-import universalelectricity.core.electricity.ElectricInfo.ElectricUnit;
-import universalelectricity.core.electricity.ElectricityPack;
-import universalelectricity.core.implement.IConductor;
-import universalelectricity.core.implement.IItemElectric;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
@@ -55,14 +43,7 @@ import cpw.mods.fml.relauncher.SideOnly;
*
* @author MachineMuse
*/
-public class ItemPowerTool extends ItemTool
- implements
- IModularItem,
- IItemElectric, // Universal Electricity
- ICustomElectricItem, // Industrial Craft 2
- IEMPItem, // for ICBM EMP interfacing
- IChargeableItem // for Thermal Expansion
-{
+public class ItemPowerTool extends ItemElectricTool implements IModularItem {
public static final ItemStack ironPickaxe = new ItemStack(Item.pickaxeSteel);
public static final ItemStack ironAxe = new ItemStack(Item.axeSteel);
public static final ItemStack ironShovel = new ItemStack(Item.shovelSteel);
@@ -86,20 +67,23 @@ public class ItemPowerTool extends ItemTool
setMaxDamage(0);
this.damageVsEntity = 1;
setCreativeTab(Config.getCreativeTab());
- setIconIndex(59);
- setTextureFile(MuseIcon.WC_ICON_PATH);
- setItemName(Config.Items.PowerTool.idName);
LanguageRegistry.addName(this, Config.Items.PowerTool.englishName);
}
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void updateIcons(IconRegister iconRegister) {
+ MuseIcon.POWERTOOL.register(iconRegister);
+ iconIndex = MuseIcon.POWERTOOL.getIconRegistration();
+ }
+
@Override
public Items getItemType() {
return Config.Items.PowerTool;
}
/**
- * Returns the strength of the stack against a given block. 1.0F base,
- * (Quality+1)*2 if correct blocktype, 1.5F if sword
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if sword
*/
@Override
public float getStrVsBlock(ItemStack stack, Block block) {
@@ -110,11 +94,8 @@ public class ItemPowerTool extends ItemTool
double computedred = ModuleManager.computeModularProperty(stack, MuseCommonStrings.RED_TINT);
double computedgreen = ModuleManager.computeModularProperty(stack, MuseCommonStrings.GREEN_TINT);
double computedblue = ModuleManager.computeModularProperty(stack, MuseCommonStrings.BLUE_TINT);
- Colour colour = new Colour(
- clampDouble(1 + computedred - (computedblue + computedgreen), 0, 1),
- clampDouble(1 + computedgreen - (computedblue + computedred), 0, 1),
- clampDouble(1 + computedblue - (computedred + computedgreen), 0, 1),
- 1.0F);
+ Colour colour = new Colour(clampDouble(1 + computedred - (computedblue + computedgreen), 0, 1), clampDouble(1 + computedgreen
+ - (computedblue + computedred), 0, 1), clampDouble(1 + computedblue - (computedred + computedgreen), 0, 1), 1.0F);
return colour;
}
@@ -155,8 +136,7 @@ public class ItemPowerTool extends ItemTool
}
/**
- * Current implementations of this method in child classes do not use the
- * entry argument beside stack. They just raise the damage on the stack.
+ * Current implementations of this method in child classes do not use the entry argument beside stack. They just raise the damage on the stack.
*/
@Override
public boolean hitEntity(ItemStack stack, EntityLiving entityBeingHit, EntityLiving entityDoingHitting) {
@@ -181,9 +161,7 @@ public class ItemPowerTool extends ItemTool
* Called when a block is destroyed using this tool.
*/
@Override
- public boolean onBlockDestroyed(ItemStack stack, World world,
- int blockID, int x, int y, int z,
- EntityLiving entity) {
+ public boolean onBlockDestroyed(ItemStack stack, World world, int blockID, int x, int y, int z, EntityLiving entity) {
double drain = 1;
Block block = Block.blocksList[blockID];
int meta = 0;
@@ -207,7 +185,7 @@ public class ItemPowerTool extends ItemTool
EntityPlayer player = (EntityPlayer) entity;
ElectricItemUtils.drainPlayerEnergy(player, drain);
} else {
- onUse(drain, stack);
+ // onUse(drain, stack);
}
return true;
}
@@ -216,9 +194,8 @@ public class ItemPowerTool extends ItemTool
if (MuseItemUtils.itemHasActiveModule(stack, MuseCommonStrings.MODULE_PICKAXE)) {
if (ForgeHooks.isToolEffective(ironPickaxe, block, meta)) {
return true;
- } else if ((!ForgeHooks.isToolEffective(diamondPick, block, meta)) && (block.blockMaterial == Material.iron
- || block.blockMaterial == Material.anvil
- || block.blockMaterial == Material.rock)) {
+ } else if ((!ForgeHooks.isToolEffective(diamondPick, block, meta))
+ && (block.blockMaterial == Material.iron || block.blockMaterial == Material.anvil || block.blockMaterial == Material.rock)) {
return true;
}
}
@@ -240,9 +217,7 @@ public class ItemPowerTool extends ItemTool
if (MuseItemUtils.itemHasActiveModule(stack, MuseCommonStrings.MODULE_AXE)) {
if (ForgeHooks.isToolEffective(ironAxe, block, meta)) {
return true;
- } else if (block.blockMaterial == Material.wood
- || block.blockMaterial == Material.plants
- || block.blockMaterial == Material.vine) {
+ } else if (block.blockMaterial == Material.wood || block.blockMaterial == Material.plants || block.blockMaterial == Material.vine) {
return true;
}
}
@@ -253,9 +228,7 @@ public class ItemPowerTool extends ItemTool
if (MuseItemUtils.itemHasActiveModule(stack, MuseCommonStrings.MODULE_DIAMOND_PICK_UPGRADE)) {
if (ForgeHooks.isToolEffective(diamondPick, block, meta)) {
return true;
- } else if (block.blockMaterial == Material.iron
- || block.blockMaterial == Material.anvil
- || block.blockMaterial == Material.rock) {
+ } else if (block.blockMaterial == Material.iron || block.blockMaterial == Material.anvil || block.blockMaterial == Material.rock) {
return true;
}
}
@@ -280,8 +253,7 @@ public class ItemPowerTool extends ItemTool
}
/**
- * Return the enchantability factor of the item. In this case, 0. Might add
- * an enchantability module later :P
+ * Return the enchantability factor of the item. In this case, 0. Might add an enchantability module later :P
*/
@Override
public int getItemEnchantability() {
@@ -300,8 +272,7 @@ public class ItemPowerTool extends ItemTool
* Return whether this item is repairable in an anvil.
*/
@Override
- public boolean getIsRepairable(ItemStack par1ItemStack,
- ItemStack par2ItemStack) {
+ public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
return false;
}
@@ -312,8 +283,7 @@ public class ItemPowerTool extends ItemTool
@Override
public List getLongInfo(EntityPlayer player, ItemStack stack) {
List info = new ArrayList();
- NBTTagCompound itemProperties = MuseItemUtils
- .getMuseItemTag(stack);
+ NBTTagCompound itemProperties = MuseItemUtils.getMuseItemTag(stack);
info.add("Detailed Summary");
info.add(formatInfo("Energy Storage", getMaxJoules(stack)) + "J");
info.add(formatInfo("Weight", MuseCommonStrings.getTotalWeight(stack)) + "g");
@@ -328,41 +298,34 @@ public class ItemPowerTool extends ItemTool
* @param player
* The player (client) viewing the tooltip
* @param currentTipList
- * A list of strings containing the existing tooltip. When
- * passed, it will just contain the name of the item;
- * enchantments and lore are appended afterwards.
+ * A list of strings containing the existing tooltip. When passed, it will just contain the name of the item; enchantments and lore are
+ * appended afterwards.
* @param advancedToolTips
- * Whether or not the player has 'advanced tooltips' turned on in
- * their settings.
+ * Whether or not the player has 'advanced tooltips' turned on in their settings.
*/
@Override
- public void addInformation(ItemStack stack,
- EntityPlayer player, List currentTipList, boolean advancedToolTips) {
- MuseCommonStrings.addInformation(stack, player, currentTipList,
- advancedToolTips);
+ public void addInformation(ItemStack stack, EntityPlayer player, List currentTipList, boolean advancedToolTips) {
+ MuseCommonStrings.addInformation(stack, player, currentTipList, advancedToolTips);
}
/**
* How long it takes to use or consume an item
*/
- public int getMaxItemUseDuration(ItemStack par1ItemStack)
- {
+ public int getMaxItemUseDuration(ItemStack par1ItemStack) {
return 72000;
}
/**
* What happens when the duration runs out
*/
- public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
- {
+ public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
return par1ItemStack;
}
/**
* Called when the right click button is pressed
*/
- public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
- {
+ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
for (IRightClickModule module : ModuleManager.getRightClickModules()) {
if (module.isValidForItem(itemStack, player) && MuseItemUtils.itemHasActiveModule(itemStack, module.getName())) {
((IRightClickModule) module).onRightClick(player, world, itemStack);
@@ -372,23 +335,19 @@ public class ItemPowerTool extends ItemTool
}
/**
- * returns the action that specifies what animation to play when the items
- * is being used
+ * returns the action that specifies what animation to play when the items is being used
*/
- public EnumAction getItemUseAction(ItemStack stack)
- {
+ public EnumAction getItemUseAction(ItemStack stack) {
return EnumAction.bow;
}
/**
* Called when the right click button is released
*/
- public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityPlayer player, int par4)
- {
+ public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityPlayer player, int par4) {
int chargeTicks = Math.max(this.getMaxItemUseDuration(itemStack) - par4, 10);
- if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
- {
+ if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
double energyConsumption = ModuleManager.computeModularProperty(itemStack, MuseCommonStrings.PLASMA_CANNON_ENERGY_PER_TICK) * chargeTicks;
if (ElectricItemUtils.getPlayerEnergy(player) > energyConsumption) {
ElectricItemUtils.drainPlayerEnergy(player, energyConsumption);
@@ -397,231 +356,35 @@ public class ItemPowerTool extends ItemTool
EntityPlasmaBolt plasmaBolt = new EntityPlasmaBolt(world, player, explosiveness, damagingness, chargeTicks);
world.spawnEntityInWorld(plasmaBolt);
- MusePacketPlasmaBolt packet = new MusePacketPlasmaBolt((Player) player, plasmaBolt.entityId,
- plasmaBolt.size);
+ MusePacketPlasmaBolt packet = new MusePacketPlasmaBolt((Player) player, plasmaBolt.entityId, plasmaBolt.size);
PacketDispatcher.sendPacketToAllPlayers(packet.getPacket250());
}
}
}
- // /////////////////////////////////////////// //
- // --- UNIVERSAL ELECTRICITY COMPATABILITY --- //
- // /////////////////////////////////////////// //
- @Override
- public double onReceive(double amps, double voltage, ItemStack itemStack) {
- double amount = ElectricInfo.getJoules(amps, voltage, 1);
- return ElectricItemUtils.charge(amount, itemStack);
- }
-
- @Override
- public double onUse(double joulesNeeded, ItemStack itemStack) {
- return ElectricItemUtils.discharge(joulesNeeded, itemStack);
- }
-
- @Override
- public double getJoules(Object... data) {
- return ElectricItemUtils.getJoules(getAsStack(data));
- }
-
- @Override
- public void setJoules(double joules, Object... data) {
- ElectricItemUtils.setJoules(joules, getAsStack(data));
- }
-
- @Override
- public double getMaxJoules(Object... data) {
- return ElectricItemUtils.getMaxJoules(getAsStack(data));
- }
-
- @Override
- public double getVoltage(Object... data) {
- return ElectricItemUtils.getVoltage(getAsStack(data));
- }
-
- @Override
- public boolean canReceiveElectricity() {
- return true;
- }
-
- @Override
- public boolean canProduceElectricity() {
- return true;
- }
-
- /**
- * Helper function to deal with UE's use of varargs
- */
- private ItemStack getAsStack(Object[] data) {
- if (data[0] instanceof ItemStack) {
- return (ItemStack) data[0];
- } else {
- throw new IllegalArgumentException(
- "MusePowerSuits: Invalid ItemStack passed via UE interface");
- }
- }
-
- // //////////////////////////////////////// //
- // --- INDUSTRIAL CRAFT 2 COMPATABILITY --- //
- // //////////////////////////////////////// //
- @Override
- public int charge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
- double joulesProvided = ModCompatability.joulesFromEU(amount);
- double currentJoules = ElectricItemUtils.getJoules(stack);
- double surplus = ElectricItemUtils.charge(joulesProvided, stack);
- if (simulate) {
- ElectricItemUtils.setJoules(currentJoules, stack);
- }
- return ModCompatability.joulesToEU(joulesProvided - surplus);
- }
-
- @Override
- public int discharge(ItemStack stack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate) {
-
- double joulesRequested = ModCompatability.joulesFromEU(amount);
- double currentJoules = ElectricItemUtils.getJoules(stack);
- double givenJoules = ElectricItemUtils.discharge(joulesRequested, stack);
- if (simulate) {
- ElectricItemUtils.setJoules(currentJoules, stack);
- }
- return ModCompatability.joulesToEU(givenJoules);
- }
-
- @Override
- public boolean canUse(ItemStack stack, int amount) {
- double joulesRequested = ModCompatability.joulesFromEU(amount);
- double currentJoules = ElectricItemUtils.getJoules(stack);
- if (currentJoules > joulesRequested) {
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- public boolean canShowChargeToolTip(ItemStack itemStack) {
- return false;
- }
-
- @Override
- public boolean canProvideEnergy() {
- return true;
- }
-
- @Override
- public int getChargedItemId() {
- return this.itemID;
- }
-
- @Override
- public int getEmptyItemId() {
- return this.itemID;
- }
-
- @Override
- public int getMaxCharge() {
- return 1;
- }
-
- @Override
- public int getTier() {
- return 1;
- }
-
- @Override
- public int getTransferLimit() {
- return 0;
- }
-
public static MuseIcon getCurrentIconFor(ItemStack itemStack) {
return MuseIcon.POWERTOOL;
}
- @Override
- public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY,
- float hitZ) {
-
- if (ModCompatability.isBasicComponentsLoaded() && MuseItemUtils.itemHasActiveModule(itemStack, MuseCommonStrings.MODULE_MULTIMETER)) {
- if (!worldObj.isRemote) {
- TileEntity tileEntity = worldObj.getBlockTileEntity(x, y, z);
- if (tileEntity instanceof IConductor) {
- IConductor wireTile = (IConductor) tileEntity;
- ElectricityPack getProduced = wireTile.getNetwork().getProduced();
- player.addChatMessage("Reading: " + ElectricInfo.getDisplay(getProduced.amperes, ElectricUnit.AMPERE) + ", "
- + ElectricInfo.getDisplay(getProduced.voltage, ElectricUnit.VOLTAGE) + ", "
- + ElectricInfo.getDisplay(getProduced.getWatts() * 20, ElectricUnit.WATT));
- return true;
- }
- }
- }
-
- return false;
- }
-
- // //////////// //
- // --- ICBM --- //
- // //////////// //
- @Override
- public void onEMP(ItemStack itemStack, Entity entity, IExplosive empExplosive) {
- ElectricItemUtils.onEMP(itemStack, entity, empExplosive);
- }
-
- // ///////////////////////// //
- // --- Thermal Expansion --- //
- // ///////////////////////// //
-
- /**
- * Adds energy to an item. Returns the quantity of energy that was accepted.
- * This should always return 0 if the item cannot be externally charged.
- *
- * @param theItem
- * ItemStack to be charged.
- * @param energy
- * Maximum amount of energy to be sent into the item.
- * @param doReceive
- * If false, the charge will only be simulated.
- * @return Amount of energy that was accepted by the item.
- */
- public float receiveEnergy(ItemStack stack, float energy, boolean doReceive) {
- double offeredJoules = energy * ModCompatability.getBCRatio();
- double missingJoules = ElectricItemUtils.getMaxJoules(stack) - ElectricItemUtils.getJoules(stack);
- double transferredJoules = Math.min(offeredJoules, missingJoules);
- ElectricItemUtils.charge(transferredJoules, stack);
- return (float) (transferredJoules / ModCompatability.getBCRatio());
- }
-
- /**
- * Removes energy from an item. Returns the quantity of energy that was
- * removed. This should always return 0 if the item cannot be externally
- * discharged.
- *
- * @param theItem
- * ItemStack to be discharged.
- * @param energy
- * Maximum amount of energy to be removed from the item.
- * @param doTransfer
- * If false, the discharge will only be simulated.
- * @return Amount of energy that was removed from the item.
- */
- public float transferEnergy(ItemStack stack, float energy, boolean doTransfer) {
- double requestedJoules = energy * ModCompatability.getBCRatio();
- double availableJoules = ElectricItemUtils.getJoules(stack);
- double transferredJoules = Math.min(requestedJoules, availableJoules);
- ElectricItemUtils.discharge(transferredJoules, stack);
- return (float) (transferredJoules / ModCompatability.getBCRatio());
- }
-
- /**
- * Get the amount of energy currently stored in the item.
- */
- public float getEnergyStored(ItemStack stack) {
- return (float) (ModCompatability.getBCRatio() * ElectricItemUtils.getJoules(stack));
- }
-
- /**
- * Get the max amount of energy that can be stored in the item.
- */
- public float getMaxEnergyStored(ItemStack stack) {
- return (float) (ModCompatability.getBCRatio() * ElectricItemUtils.getMaxJoules(stack));
- }
+ // @Override
+ // public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY,
+ // float hitZ) {
+ //
+ // if (ModCompatability.isBasicComponentsLoaded() && MuseItemUtils.itemHasActiveModule(itemStack, MuseCommonStrings.MODULE_MULTIMETER)) {
+ // if (!worldObj.isRemote) {
+ // TileEntity tileEntity = worldObj.getBlockTileEntity(x, y, z);
+ // if (tileEntity instanceof IConductor) {
+ // IConductor wireTile = (IConductor) tileEntity;
+ // ElectricityPack getProduced = wireTile.getNetwork().getProduced();
+ // player.addChatMessage("Reading: " + ElectricInfo.getDisplay(getProduced.amperes, ElectricUnit.AMPERE) + ", "
+ // + ElectricInfo.getDisplay(getProduced.voltage, ElectricUnit.VOLTAGE) + ", "
+ // + ElectricInfo.getDisplay(getProduced.getWatts() * 20, ElectricUnit.WATT));
+ // return true;
+ // }
+ // }
+ // }
+ //
+ // return false;
+ // }
}
diff --git a/src/minecraft/net/machinemuse/powersuits/network/packets/MusePacketInstallModuleRequest.java b/src/minecraft/net/machinemuse/powersuits/network/packets/MusePacketInstallModuleRequest.java
index 52ad1b1..ddcbfdd 100644
--- a/src/minecraft/net/machinemuse/powersuits/network/packets/MusePacketInstallModuleRequest.java
+++ b/src/minecraft/net/machinemuse/powersuits/network/packets/MusePacketInstallModuleRequest.java
@@ -11,21 +11,18 @@ import java.util.List;
import net.machinemuse.api.IPowerModule;
import net.machinemuse.api.ModuleManager;
import net.machinemuse.api.MuseItemUtils;
-import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.network.MusePacket;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
-import universalelectricity.core.implement.IItemElectric;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
/**
- * Packet for requesting to purchase an upgrade. Player-to-server. Server
- * decides whether it is a valid upgrade or not and replies with an associated
+ * Packet for requesting to purchase an upgrade. Player-to-server. Server decides whether it is a valid upgrade or not and replies with an associated
* inventoryrefresh packet.
*
* @author MachineMuse
@@ -45,8 +42,7 @@ public class MusePacketInstallModuleRequest extends MusePacket {
* Slot containing the item for which the upgrade is requested
* @param moduleName
*/
- public MusePacketInstallModuleRequest(Player player, int itemSlot,
- String moduleName) {
+ public MusePacketInstallModuleRequest(Player player, int itemSlot, String moduleName) {
super(player);
writeInt(itemSlot);
writeString(moduleName);
@@ -86,32 +82,14 @@ public class MusePacketInstallModuleRequest extends MusePacket {
|| playerEntity.capabilities.isCreativeMode) {
MuseItemUtils.itemAddModule(stack, moduleType);
- for (ItemStack itemCost : cost) {
- if (stack.getItem() instanceof IItemElectric) {
- IItemElectric elecItem = (IItemElectric) stack.getItem();
- double joules = elecItem.getJoules(stack);
- if (MuseItemUtils.isSameItem(itemCost, ItemComponent.lvcapacitor)) {
- elecItem.setJoules(joules + 20000, stack);
- }
- if (MuseItemUtils.isSameItem(itemCost, ItemComponent.mvcapacitor)) {
- elecItem.setJoules(joules + 100000, stack);
- }
- if (MuseItemUtils.isSameItem(itemCost, ItemComponent.hvcapacitor)) {
- elecItem.setJoules(joules + 750000, stack);
- }
- }
- }
List slotsToUpdate = new ArrayList();
if (!playerEntity.capabilities.isCreativeMode) {
slotsToUpdate = MuseItemUtils.deleteFromInventory(cost, inventory);
}
slotsToUpdate.add(itemSlot);
for (Integer slotiter : slotsToUpdate) {
- MusePacket reply = new MusePacketInventoryRefresh(
- player,
- slotiter, inventory.getStackInSlot(slotiter));
- PacketDispatcher.sendPacketToPlayer(reply.getPacket250(),
- player);
+ MusePacket reply = new MusePacketInventoryRefresh(player, slotiter, inventory.getStackInSlot(slotiter));
+ PacketDispatcher.sendPacketToPlayer(reply.getPacket250(), player);
}
}
}
diff --git a/src/minecraft/net/machinemuse/powersuits/powermodule/modules/InPlaceAssemblerModule.java b/src/minecraft/net/machinemuse/powersuits/powermodule/modules/InPlaceAssemblerModule.java
index d9540ea..c2f3fb8 100644
--- a/src/minecraft/net/machinemuse/powersuits/powermodule/modules/InPlaceAssemblerModule.java
+++ b/src/minecraft/net/machinemuse/powersuits/powermodule/modules/InPlaceAssemblerModule.java
@@ -23,7 +23,8 @@ public class InPlaceAssemblerModule extends PowerModuleBase implements IRightCli
@Override
public MuseIcon getIcon(ItemStack item) {
- return new MuseIcon(Block.workbench.getTextureFile(), 60);
+ // return new MuseIcon(Block.workbench., 60);
+ return null;
}
@Override
diff --git a/src/minecraft/net/machinemuse/powersuits/tick/ClientTickHandler.java b/src/minecraft/net/machinemuse/powersuits/tick/ClientTickHandler.java
index e982141..443adac 100644
--- a/src/minecraft/net/machinemuse/powersuits/tick/ClientTickHandler.java
+++ b/src/minecraft/net/machinemuse/powersuits/tick/ClientTickHandler.java
@@ -7,6 +7,7 @@ import net.machinemuse.api.IModularItem;
import net.machinemuse.api.MuseItemUtils;
import net.machinemuse.general.gui.clickable.ClickableKeybinding;
import net.machinemuse.powersuits.client.KeybindManager;
+import net.machinemuse.powersuits.common.MuseLogger;
import net.machinemuse.powersuits.common.PlayerInputMap;
import net.machinemuse.powersuits.network.MusePacket;
import net.machinemuse.powersuits.network.packets.MusePacketModeChangeRequest;
@@ -24,8 +25,7 @@ import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.network.Player;
/**
- * This handler is called before/after the game processes input events and
- * updates the gui state mainly. *independent of rendering, so sometimes there
+ * This handler is called before/after the game processes input events and updates the gui state mainly. *independent of rendering, so sometimes there
* might be visual artifacts* -is also the parent class of KeyBindingHandler
*
* @author MachineMuse
@@ -33,19 +33,19 @@ import cpw.mods.fml.common.network.Player;
public class ClientTickHandler implements ITickHandler {
protected int slotSelected = -1;
protected int dWheel;
+ public static long lastTickTime = System.currentTimeMillis();
@Override
public void tickStart(EnumSet type, Object... tickData) {
+
+ MuseLogger.logDebug("Tick time: " + (System.currentTimeMillis() - lastTickTime));
+ lastTickTime = System.currentTimeMillis();
for (ClickableKeybinding kb : KeybindManager.getKeybindings()) {
kb.doToggleTick();
}
try {
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
- // if (dWheel != 0) {
- // MuseLogger.logDebug("dWheel: " + dWheel);
- // }
- if (player.getCurrentEquippedItem().getItem() instanceof IModularItem
- && player.isSneaking()) {
+ if (player.getCurrentEquippedItem().getItem() instanceof IModularItem && player.isSneaking()) {
slotSelected = player.inventory.currentItem;
dWheel = Mouse.getDWheel() / 120;
} else {
@@ -82,14 +82,11 @@ public class ClientTickHandler implements ITickHandler {
}
if (modes.size() > 0 && dWheel != 0) {
int modeIndex = modes.indexOf(mode);
- String newMode = modes.get(clampMode(modeIndex + dWheel,
- modes.size()));
+ String newMode = modes.get(clampMode(modeIndex + dWheel, modes.size()));
itemTag.setString("Mode", newMode);
RenderTickHandler.lastSwapTime = System.currentTimeMillis();
RenderTickHandler.lastSwapDirection = (int) Math.signum(dWheel);
- MusePacket modeChangePacket = new
- MusePacketModeChangeRequest((Player) player, newMode,
- player.inventory.currentItem);
+ MusePacket modeChangePacket = new MusePacketModeChangeRequest((Player) player, newMode, player.inventory.currentItem);
player.sendQueue.addToSendQueue(modeChangePacket.getPacket250());
dWheel = 0;
}
diff --git a/src/minecraft/net/machinemuse/powersuits/tick/PlayerTickHandler.java b/src/minecraft/net/machinemuse/powersuits/tick/PlayerTickHandler.java
index d43a9c3..87ba059 100644
--- a/src/minecraft/net/machinemuse/powersuits/tick/PlayerTickHandler.java
+++ b/src/minecraft/net/machinemuse/powersuits/tick/PlayerTickHandler.java
@@ -396,7 +396,7 @@ public class PlayerTickHandler implements ITickHandler {
for (; stack.stackSize > 0 && foodNeeded > foodLevel; stack.stackSize--) {
foodLevel += food.getHealAmount() * efficiency / 100.0;
saturationLevel += food.getSaturationModifier() * efficiency / 100.0;
- player.sendChatToPlayer("Feeder module: Ate a " + food.getItemNameIS(stack));
+ player.sendChatToPlayer("Feeder module: Ate a " + food.getItemDisplayName(stack));
}
if (stack.stackSize == 0) {
player.inventory.setInventorySlotContents(i, null);
diff --git a/src/minecraft/net/machinemuse/powersuits/tick/RenderTickHandler.java b/src/minecraft/net/machinemuse/powersuits/tick/RenderTickHandler.java
index 8c22691..1c48df6 100644
--- a/src/minecraft/net/machinemuse/powersuits/tick/RenderTickHandler.java
+++ b/src/minecraft/net/machinemuse/powersuits/tick/RenderTickHandler.java
@@ -25,8 +25,7 @@ import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
/**
- * Called before and after the 3D world is rendered (tickEnd is called BEFORE
- * the 2D gui is drawn... I think?).
+ * Called before and after the 3D world is rendered (tickEnd is called BEFORE the 2D gui is drawn... I think?).
*
* @param float tickData[0] the amount of time (0.0f-1.0f) since the last tick.
*
@@ -56,15 +55,13 @@ public class RenderTickHandler implements ITickHandler {
}
if (Minecraft.getMinecraft().currentScreen == null) {
Minecraft mc = Minecraft.getMinecraft();
- ScaledResolution screen = new ScaledResolution(mc.gameSettings,
- mc.displayWidth, mc.displayHeight);
+ ScaledResolution screen = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
int i = player.inventory.currentItem;
ItemStack stack = player.inventory.mainInventory[i];
if (stack != null && stack.getItem() instanceof IModularItem) {
MuseRenderer.blendingOn();
NBTTagCompound itemTag = MuseItemUtils.getMuseItemTag(stack);
- int swapTime = (int) Math.min(System.currentTimeMillis() -
- lastSwapTime, SWAPTIME);
+ int swapTime = (int) Math.min(System.currentTimeMillis() - lastSwapTime, SWAPTIME);
MuseIcon currentMode = null;
MuseIcon nextMode = null;
MuseIcon prevMode = null;
@@ -72,8 +69,7 @@ public class RenderTickHandler implements ITickHandler {
String mode = itemTag.getString("Mode");
int modeIndex = modes.indexOf(mode);
if (modeIndex > -1) {
- String prevModeName = modes.get((modeIndex + modes.size() - 1) %
- modes.size());
+ String prevModeName = modes.get((modeIndex + modes.size() - 1) % modes.size());
String nextModeName = modes.get((modeIndex + 1) % modes.size());
IPowerModule module = ModuleManager.getModule(mode);
IPowerModule nextModule = ModuleManager.getModule(nextModeName);
@@ -109,15 +105,9 @@ public class RenderTickHandler implements ITickHandler {
prevAlpha = 0.4;
currAlpha = 0.8;
nextAlpha = 0.4;
- MuseRenderer.drawIconPartial(prevX, prevY, prevMode,
- Colour.WHITE.withAlpha(prevAlpha), 0, 0, 16, sh + baroffset - prevY +
- 16);
- MuseRenderer.drawIconPartial(currX, currY, currentMode,
- Colour.WHITE.withAlpha(currAlpha), 0, 0, 16, sh + baroffset - currY +
- 16);
- MuseRenderer.drawIconPartial(nextX, nextY, nextMode,
- Colour.WHITE.withAlpha(nextAlpha), 0, 0, 16, sh + baroffset - nextY +
- 16);
+ MuseRenderer.drawIconPartial(prevX, prevY, prevMode, Colour.WHITE.withAlpha(prevAlpha), 0, 0, 16, sh + baroffset - prevY + 16);
+ MuseRenderer.drawIconPartial(currX, currY, currentMode, Colour.WHITE.withAlpha(currAlpha), 0, 0, 16, sh + baroffset - currY + 16);
+ MuseRenderer.drawIconPartial(nextX, nextY, nextMode, Colour.WHITE.withAlpha(nextAlpha), 0, 0, 16, sh + baroffset - nextY + 16);
} else {
prevAlpha = 0.8;
currAlpha = 0.8;
@@ -129,28 +119,20 @@ public class RenderTickHandler implements ITickHandler {
nextY = (currY * r1 + nextY * r2);
currX = (prevX * r1 + currX * r2);
currY = (prevY * r1 + currY * r2);
- MuseRenderer.drawIconPartial(
- currX, currY, currentMode,
- Colour.WHITE.withAlpha(currAlpha),
- 0, 0, 16, sh + baroffset - currY + 16);
- MuseRenderer.drawIconPartial(
- nextX, nextY, nextMode,
- Colour.WHITE.withAlpha(nextAlpha),
- 0, 0, 16, sh + baroffset - nextY + 16);
+ MuseRenderer.drawIconPartial(currX, currY, currentMode, Colour.WHITE.withAlpha(currAlpha), 0, 0, 16, sh + baroffset - currY
+ + 16);
+ MuseRenderer
+ .drawIconPartial(nextX, nextY, nextMode, Colour.WHITE.withAlpha(nextAlpha), 0, 0, 16, sh + baroffset - nextY + 16);
} else {
prevX = (currX * r1 + prevX * r2);
prevY = (currY * r1 + prevY * r2);
currX = (nextX * r1 + currX * r2);
currY = (nextY * r1 + currY * r2);
- MuseRenderer.drawIconPartial(
- prevX, prevY, prevMode,
- Colour.WHITE.withAlpha(prevAlpha),
- 0, 0, 16, sh + baroffset - prevY + 16);
- MuseRenderer.drawIconPartial(
- currX, currY, currentMode,
- Colour.WHITE.withAlpha(currAlpha),
- 0, 0, 16, sh + baroffset - currY + 16);
+ MuseRenderer
+ .drawIconPartial(prevX, prevY, prevMode, Colour.WHITE.withAlpha(prevAlpha), 0, 0, 16, sh + baroffset - prevY + 16);
+ MuseRenderer.drawIconPartial(currX, currY, currentMode, Colour.WHITE.withAlpha(currAlpha), 0, 0, 16, sh + baroffset - currY
+ + 16);
}
}