finished crystallizer, updated textures

This commit is contained in:
HbmMods 2020-06-07 16:14:20 +02:00
parent fe28f0af73
commit 16ed2ed4d2
92 changed files with 3381 additions and 704 deletions

View File

@ -432,6 +432,8 @@ tile.compact_launcher.name=Kompakt-Startrampe
container.compactLauncher=Kompakt-Startrampe
tile.launch_table.name=Große Startrampe
container.launchTable=Große Startrampe
tile.soyuz_launcher.name=Soyuz-Startplatform
container.soyuzLauncher=Soyuz-Startplatform
tile.machine_missile_assembly.name=Raketenmontagestation
container.missileAssembly=Raketenmontagestation
tile.sat_dock.name=Frachtlandeplattform
@ -501,6 +503,8 @@ tile.machine_controller.name=Reaktorfernsteuerung
container.reactorControl=Reaktorfernsteuerung
tile.soyuz_capsule.name=Landekapsel
container.soyuzCapsule=Landekapsel
tile.machine_crystallizer.name=Erzauflöser
container.crystallizer=Erzauflöser
tile.barrel_plastic.name=Sicheres Fass™
tile.barrel_corroded.name=Verrostetes Fass
@ -738,6 +742,28 @@ item.wire_red_copper.name=Roter Kupferdraht
item.neutron_reflector.name=Neutronenreflektor
item.nugget_beryllium.name=Berylliumnugget
item.crystal_iron.name=Eisenkristalle
item.crystal_gold.name=Goldkristalle
item.crystal_redstone.name=Redstonekristalle
item.crystal_uranium.name=Urankristalle
item.crystal_thorium.name=Thoriumkristalle
item.crystal_plutonium.name=Plutoniumkristalle
item.crystal_titanium.name=Titankristalle
item.crystal_sulfur.name=Schwefelkristalle
item.crystal_niter.name=Salpeterkristalle
item.crystal_copper.name=Kupferkristalle
item.crystal_tungsten.name=Wolframkristalle
item.crystal_aluminium.name=Aluminiumkristalle
item.crystal_fluorite.name=Fluoritkristalle
item.crystal_beryllium.name=Berylliumkristalle
item.crystal_lead.name=Bleikristalle
item.crystal_schrabidium.name=Schrabidiumkristalle
item.crystal_rare.name=Seltenerdenkristalle
item.crystal_phosphorus.name=Phosphorkristalle
item.crystal_lithium.name=Lithiumkristalle
item.crystal_starmetal.name=Sternenmetallkristalle
item.crystal_trixite.name=Trixitkristalle
item.wire_aluminium.name=Aluminiumdraht
item.wire_copper.name=Kupferdraht
item.wire_gold.name=Golddraht
@ -2200,6 +2226,7 @@ item.shimmer_axe.name=Shimmer Axe
item.euphemium_stopper.name=Stopper
item.matchstick.name=Streichholz
item.remote.name=Kaputte Fernbedienung
item.pch.name=Horse Nut Hammer
item.shimmer_head.name=Schwerer Hammerkopf
item.shimmer_axe_head.name=Schwerer Axtkopf
@ -2272,6 +2299,7 @@ item.bottle2_korl_special.name=Das erste Korl
item.bottle2_fritz_special.name=Die erste Fritz-Kola
item.bottle2_sunset.name=Sunset Sarsaparilla
item.chocolate_milk.name=Schokomilch
item.cbt_device.name=CBT-Gerät
item.cap_nuka.name=Nuka-Cola Kronkorken
item.cap_quantum.name=Nuka Cola Quantum Kronkorken
item.cap_sparkle.name=S~Cola Kronkorken

View File

@ -432,6 +432,8 @@ tile.compact_launcher.name=Compact Launch Pad
container.compactLauncher=Compact Launch Pad
tile.launch_table.name=Large Launch Pad
container.launchTable=Large Launch Pad
tile.soyuz_launcher.name=Soyuz Launch Platform
container.soyuzLauncher=Soyuz Launch Platform
tile.machine_missile_assembly.name=Missile Assembly Station
container.missileAssembly=Missile Assembly Station
tile.sat_dock.name=Cargo Landing Pad
@ -501,6 +503,8 @@ tile.machine_controller.name=Reactor Remote Control Block
container.reactorControl=Reactor Remote Control Block
tile.soyuz_capsule.name=Cargo Landing Capsule
container.soyuzCapsule=Cargo Landing Capsule
tile.machine_crystallizer.name=Ore Acidizer
container.crystallizer=Ore Acidizer
tile.barrel_plastic.name=Safe Barrel™
tile.barrel_corroded.name=Corroded Barrel
@ -738,6 +742,28 @@ item.wire_red_copper.name=Red Copper Wire
item.neutron_reflector.name=Neutron Reflector
item.nugget_beryllium.name=Beryllium Nugget
item.crystal_iron.name=Iron Crystals
item.crystal_gold.name=Gold Crystals
item.crystal_redstone.name=Redstone Crystals
item.crystal_uranium.name=Uranium Crystals
item.crystal_thorium.name=Thorium Crystals
item.crystal_plutonium.name=Plutonium Crystals
item.crystal_titanium.name=Titanium Crystals
item.crystal_sulfur.name=Sulfur Crystals
item.crystal_niter.name=Niter Crystals
item.crystal_copper.name=Copper Crystals
item.crystal_tungsten.name=Tungsten Crystals
item.crystal_aluminium.name=Aluminium Crystals
item.crystal_fluorite.name=Fluorite Crystals
item.crystal_beryllium.name=Beryllium Crystals
item.crystal_lead.name=Lead Crystals
item.crystal_schrabidium.name=Schrabidium Crystals
item.crystal_rare.name=Rare Earth Crystals
item.crystal_phosphorus.name=Phosphorus Crystals
item.crystal_lithium.name=Lithium Crystals
item.crystal_starmetal.name=Starmetal Crystals
item.crystal_trixite.name=Trixite Crystals
item.wire_aluminium.name=Aluminium Wire
item.wire_copper.name=Copper Wire
item.wire_gold.name=Gold Wire
@ -2200,6 +2226,7 @@ item.shimmer_axe.name=Shimmer Axe
item.euphemium_stopper.name=Stopper
item.matchstick.name=Matchstick
item.remote.name=Broken Remote
item.pch.name=Horse Nut Hammer
item.shimmer_head.name=Heavy Hammer Head
item.shimmer_axe_head.name=Heavy Axe Head
@ -2272,6 +2299,7 @@ item.bottle2_korl_special.name=The First Korl
item.bottle2_fritz_special.name=The First Fritz Cola
item.bottle2_sunset.name=Sunset Sarsaparilla
item.chocolate_milk.name=Chocolate Milk
item.cbt_device.name=CBT Device
item.cap_nuka.name=Nuka Cola Bottle Cap
item.cap_quantum.name=Nuka Cola Quantum Bottle Cap
item.cap_sparkle.name=S~Cola Bottle Cap

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,245 @@
# Blender v2.76 (sub 0) OBJ File: 'pch.blend'
# www.blender.org
o ponycum_Cylinder.003
v 0.000000 -0.457474 -0.076488
v 0.000000 0.498621 -0.076488
v 0.063454 0.498621 -0.038244
v 0.063454 -0.457474 -0.038244
v 0.063454 0.498621 0.038244
v 0.063454 -0.457474 0.038244
v 0.000000 0.498621 0.076488
v 0.000000 -0.457474 0.076488
v -0.063454 0.498621 0.038244
v -0.063454 -0.457474 0.038244
v -0.063454 0.498621 -0.038244
v -0.063454 -0.457474 -0.038244
v 0.244563 0.705111 -0.261231
v -0.244563 0.705111 -0.261231
v -0.244563 0.821944 -0.260374
v 0.244563 0.821944 -0.260374
v 0.244661 0.821816 0.260308
v -0.244661 0.821816 0.260308
v -0.244661 0.704698 0.259606
v 0.244661 0.704698 0.259606
v 0.300312 0.880010 -0.277019
v 0.300312 0.650163 -0.277880
v 0.244563 0.705233 -0.277878
v 0.244563 0.822066 -0.277021
v -0.300312 0.880010 -0.277019
v -0.300312 1.041927 -0.113884
v 0.300312 1.041927 -0.113884
v -0.300312 1.041066 0.115963
v 0.300312 1.041066 0.115963
v -0.300312 0.877932 0.277880
v 0.300312 0.877931 0.277880
v -0.300312 0.648084 0.277019
v 0.300312 0.648084 0.277019
v 0.244662 0.704449 0.277099
v -0.244662 0.704449 0.277099
v -0.300312 0.486167 0.113884
v 0.300312 0.486167 0.113884
v -0.300312 0.650163 -0.277880
v -0.300312 0.487028 -0.115963
v 0.300312 0.487028 -0.115963
v -0.244662 0.821567 0.277801
v -0.244662 0.704698 0.259606
v -0.244662 0.821816 0.260308
v 0.244662 0.821567 0.277801
v 0.244662 0.821816 0.260308
v 0.244662 0.704698 0.259606
v -0.244563 0.705233 -0.277878
v -0.244563 0.705111 -0.261231
v 0.244563 0.705111 -0.261231
v -0.244563 0.822066 -0.277021
v 0.244563 0.821944 -0.260374
v -0.244563 0.821944 -0.260374
vt 0.625000 0.687500
vt 0.625000 0.593750
vt 1.000000 0.593750
vt 0.625000 0.500000
vt 1.000000 0.500000
vt 1.000000 0.687500
vt 0.500000 0.250000
vt 0.437500 0.312500
vt 0.437500 0.250000
vt 0.687500 0.781250
vt 1.000000 0.781250
vt 1.000000 0.906250
vt 0.687500 0.906250
vt 0.468750 1.000000
vt 0.375000 0.781250
vt 0.437500 0.218750
vt 0.500000 0.218750
vt 0.718750 0.218750
vt 0.781250 0.250000
vt 0.781250 0.218750
vt 1.000000 0.218750
vt 0.718750 0.250000
vt 1.000000 0.187500
vt 0.718750 0.187500
vt 0.781250 0.187500
vt 0.500000 0.187500
vt 0.468750 0.250000
vt 0.500000 0.312500
vt 0.468750 0.312500
vt 0.906250 1.000000
vt 0.781250 1.000000
vt 0.781250 0.687500
vt 0.906250 0.687500
vt 0.468750 0.687500
vt 0.593750 0.687500
vt 0.593750 1.000000
vt 0.375000 0.906250
vt 1.000000 0.250000
vt 0.437500 0.187500
vt 0.437500 0.093750
vt 1.000000 0.093750
vt 1.000000 0.125000
vt 1.000000 0.156250
vt 0.437500 0.156250
vt 1.000000 -0.000000
vt 1.000000 0.031250
vt 0.437500 0.031250
vt 1.000000 0.062500
vt 0.437500 0.062500
vt 0.375000 0.875000
vt 0.343750 0.843750
vt 0.343750 0.781250
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 0.375000 0.625000
vt 0.000000 0.500000
vt 0.375000 0.500000
vt 0.000000 0.375000
vt -0.000000 0.250000
vt 0.375000 0.250000
vt 0.343750 0.281250
vt -0.000000 0.125000
vt 0.375000 0.125000
vt 0.000000 0.000000
vt 0.375000 0.000000
vt 0.000203 0.999797
vt 0.000000 0.875000
vt 0.375000 0.375000
vt 0.343750 0.343750
vt 0.031250 0.281250
vt 0.031250 0.343750
vt 0.375000 0.750000
vt 0.031250 0.781250
vt 0.031250 0.843750
vt 0.437500 0.125000
vt 0.437500 0.000000
vt 0.375000 1.000000
vn 0.000000 0.007300 -1.000000
vn 0.000000 -0.006000 1.000000
vn 0.000000 -1.000000 0.000000
vn -1.000000 -0.000000 0.000000
vn 1.000000 -0.000000 0.000000
vn 0.000000 -0.999900 -0.014300
vn 0.000000 0.999900 0.014300
vn 0.000000 1.000000 0.007300
vn -0.000000 -1.000000 -0.007300
vn 0.000000 0.000000 -1.000000
vn 0.870700 0.000000 -0.491800
vn 0.870700 -0.000000 0.491800
vn -0.000000 -0.000000 1.000000
vn -0.870700 -0.000000 0.491800
vn -0.870700 0.000000 -0.491800
vn 0.000800 -0.379600 -0.925200
vn 0.003600 0.003700 -1.000000
vn -0.001200 0.002100 -1.000000
vn 0.001000 0.385300 -0.922800
vn 0.000000 0.925300 -0.379200
vn 0.000000 0.922400 0.386100
vn -0.000500 0.379500 0.925200
vn 0.000600 -0.385600 0.922700
vn -0.000600 -0.385600 0.922700
vn -0.000700 -0.002700 1.000000
vn 0.000000 -0.925300 0.379200
vn 0.000000 -0.922400 -0.386100
vn -0.000800 -0.379600 -0.925200
vn 0.000500 0.379500 0.925200
vn 0.002300 -0.003700 1.000000
vn 0.000700 -0.002700 1.000000
vn -0.002300 -0.003700 1.000000
vn -0.001000 0.385300 -0.922800
vn 0.001200 0.002100 -1.000000
vn -0.003600 0.003700 -1.000000
s off
f 14/1/1 15/2/1 16/3/1
f 18/2/2 19/4/2 20/5/2
f 13/6/1 14/1/1 16/3/1
f 17/3/2 18/2/2 20/5/2
f 4/7/3 10/8/3 12/9/3
f 36/10/4 28/11/4 26/12/4
f 29/13/5 33/14/5 40/15/5
f 41/7/5 35/9/5 42/16/5
f 41/7/6 43/17/6 45/18/6
f 34/19/7 46/20/7 42/21/7
f 44/22/4 45/18/4 46/20/4
f 47/23/8 48/21/8 49/20/8
f 24/24/4 23/25/4 49/20/4
f 24/24/9 51/18/9 52/17/9
f 50/26/5 52/17/5 48/16/5
f 12/9/3 1/27/3 4/7/3
f 4/7/3 6/28/3 10/8/3
f 8/29/3 10/8/3 6/28/3
f 26/12/4 25/30/4 38/31/4
f 38/31/4 39/13/4 26/12/4
f 36/10/4 32/32/4 30/33/4
f 30/33/4 28/11/4 36/10/4
f 26/12/4 39/13/4 36/10/4
f 40/15/5 22/34/5 29/13/5
f 21/35/5 27/10/5 29/13/5
f 29/13/5 31/36/5 33/14/5
f 33/14/5 37/37/5 40/15/5
f 22/34/5 21/35/5 29/13/5
f 43/17/5 41/7/5 42/16/5
f 44/22/6 41/7/6 45/18/6
f 35/38/7 34/19/7 42/21/7
f 34/19/4 44/22/4 46/20/4
f 23/25/8 47/23/8 49/20/8
f 51/18/4 24/24/4 49/20/4
f 50/26/9 24/24/9 52/17/9
f 47/39/5 50/26/5 48/16/5
s 1
f 1/40/10 2/41/10 3/42/11
f 3/42/11 5/43/12 6/44/12
f 5/43/12 7/23/13 8/39/13
f 7/45/13 9/46/14 10/47/14
f 9/46/14 11/48/15 12/49/15
f 11/48/15 2/41/10 1/40/10
f 22/50/16 23/51/17 24/52/18
f 25/53/19 26/54/20 27/55/20
f 26/54/20 28/56/21 29/57/21
f 29/57/21 28/56/21 30/58/22
f 32/59/23 33/60/24 34/61/25
f 32/59/23 36/62/26 37/63/26
f 36/62/26 39/64/27 40/65/27
f 39/66/27 38/67/28 22/50/16
f 31/68/29 44/69/30 34/61/25
f 30/58/22 32/59/23 35/70/31
f 30/58/22 41/71/32 44/69/30
f 21/72/33 24/52/18 50/73/34
f 38/67/28 25/53/19 50/73/34
f 22/50/16 38/67/28 47/74/35
f 4/75/11 1/40/10 3/42/11
f 4/75/11 3/42/11 6/44/12
f 6/44/12 5/43/12 8/39/13
f 8/76/13 7/45/13 10/47/14
f 10/47/14 9/46/14 12/49/15
f 12/49/15 11/48/15 1/40/10
f 21/72/33 22/50/16 24/52/18
f 21/72/33 25/53/19 27/55/20
f 27/55/20 26/54/20 29/57/21
f 31/68/29 29/57/21 30/58/22
f 35/70/31 32/59/23 34/61/25
f 33/60/24 32/59/23 37/63/26
f 37/63/26 36/62/26 40/65/27
f 40/77/27 39/66/27 22/50/16
f 33/60/24 31/68/29 34/61/25
f 41/71/32 30/58/22 35/70/31
f 31/68/29 30/58/22 44/69/30
f 25/53/19 21/72/33 50/73/34
f 47/74/35 38/67/28 50/73/34
f 23/51/17 22/50/16 47/74/35

View File

@ -51,6 +51,7 @@
"item.radaway": {"category": "player", "sounds": [{"name": "tool/radaway", "stream": false}]},
"item.spray": {"category": "player", "sounds": [{"name": "tool/spray", "stream": false}]},
"item.repair": {"category": "player", "sounds": ["tool/repair1", "tool/repair2", "tool/repair3", "tool/repair4", "tool/repair5", "tool/repair6", "tool/repair7"]},
"item.vice": {"category": "player", "sounds": [{"name": "tool/vice", "stream": false}]},
"music.recordLambdaCore": {"category": "record", "sounds": [{"name": "music/recordLambdaCore", "stream": true}]},
"music.recordSectorSweep": {"category": "record", "sounds": [{"name": "music/recordSectorSweep", "stream": true}]},
@ -126,6 +127,7 @@
"weapon.bonk": {"category": "player", "sounds": [{"name": "weapon/bonk", "stream": false}]},
"weapon.hksShoot": {"category": "player", "sounds": ["weapon/hksShoot1", "weapon/hksShoot2", "weapon/hksShoot3"]},
"weapon.glauncher": {"category": "player", "sounds": ["weapon/glauncher1", "weapon/glauncher2"]},
"weapon.bodysplat": {"category": "player", "sounds": [{"name": "weapon/bodysplat", "stream": false}]},
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

View File

@ -1,13 +1,21 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class MachineCrystallizer extends BlockMachineBase {
@SideOnly(Side.CLIENT)
private IIcon iconTop;
public MachineCrystallizer(Material mat) {
super(mat, ModBlocks.guiID_crystallizer);
@ -17,5 +25,19 @@ public class MachineCrystallizer extends BlockMachineBase {
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineCrystallizer();
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_crystallizer_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_crystallizer_side");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon);
}
}

View File

@ -89,23 +89,6 @@ public class SoyuzLauncher extends BlockDummyable {
ForgeDirection dir = ForgeDirection.EAST;
/*if(i == 0)
{
dir = ForgeDirection.getOrientation(2);
}
if(i == 1)
{
dir = ForgeDirection.getOrientation(5);
}
if(i == 2)
{
dir = ForgeDirection.getOrientation(3);
}
if(i == 3)
{
dir = ForgeDirection.getOrientation(4);
}*/
if(!checkRequirement(world, x, y, z, dir, o)) {
world.setBlockToAir(x, y, z);
@ -127,6 +110,8 @@ public class SoyuzLauncher extends BlockDummyable {
return;
}
pl.getHeldItem().stackSize--;
world.setBlock(x + dir.offsetX * o , y + dir.offsetY * o + height, z + dir.offsetZ * o, this, dir.ordinal() + offset, 3);
fillSpace(world, x, y, z, dir, o);
world.scheduleBlockUpdate(x, y, z, this, 1);
@ -165,8 +150,6 @@ public class SoyuzLauncher extends BlockDummyable {
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] { -2, 4, -3, 6, 6, -3 }, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] { 0, 4, 1, 1, -6, 8 }, this, dir);
MultiblockHandlerXR.fillSpace(world, x, y, z, new int[] { 0, 4, 2, 2, 9, -5 }, this, dir);
//for(int a = )
}
@Override

View File

@ -1,7 +1,6 @@
package com.hbm.blocks.network;
import com.hbm.entity.item.EntityMovingItem;
import com.hbm.tileentity.machine.TileEntityMachineEPress;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -82,11 +81,6 @@ public class BlockConveyor extends Block {
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(itemStack.hasDisplayName())
{
((TileEntityMachineEPress)world.getTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
}
}
}

View File

@ -43,6 +43,8 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f);
this.motionY = (double)(-MathHelper.sin((this.rotationPitch + this.func_70183_g()) / 180.0F * (float)Math.PI) * f);
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, this.func_70182_d(), 1.0F);
this.rotationPitch = 0;
this.prevRotationPitch = 0;
}
public EntityGrenadeBouncyBase(World world, double posX, double posY, double posZ)
@ -94,9 +96,7 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
this.motionX = motionX;
this.motionY = motionY;
this.motionZ = motionZ;
float f3 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(motionY, (double)f3) * 180.0D / Math.PI);
}
@SideOnly(Side.CLIENT)
@ -108,18 +108,20 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float f = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(motionY, (double)f) * 180.0D / Math.PI);
}
}
public void onUpdate()
{
super.onUpdate();
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
super.onUpdate();
this.prevRotationPitch = this.rotationPitch;
this.rotationPitch -= Vec3.createVectorHelper(motionX, motionY, motionZ).lengthVector() * 25;
//Bounce here
@ -162,26 +164,15 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
}
//Bounce here [END]
if(!bounce) {
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
}
float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
@ -192,7 +183,6 @@ public abstract class EntityGrenadeBouncyBase extends Entity implements IProject
this.prevRotationYaw += 360.0F;
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
float f2 = 0.99F;
float f3 = this.getGravityVelocity();

View File

@ -94,9 +94,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
moX /= f2;
moY /= f2;
moZ /= f2;
moX += this.rand.nextGaussian() * /*(this.rand.nextBoolean() ? -1 : 1) **/ mult2;
moY += this.rand.nextGaussian() * /*(this.rand.nextBoolean() ? -1 : 1) **/ mult2;
moZ += this.rand.nextGaussian() * /*(this.rand.nextBoolean() ? -1 : 1) **/ mult2;
moX += this.rand.nextGaussian() * mult2;
moY += this.rand.nextGaussian() * mult2;
moZ += this.rand.nextGaussian() * mult2;
moX *= mult1;
moY *= mult1;
moZ *= mult1;
@ -359,7 +359,7 @@ public class EntityBulletBase extends Entity implements IProjectile {
double motion = Vec3.createVectorHelper(motionX, motionY, motionZ).lengthVector();
for (i = 0; i < motion * 2; ++i) {
for (i = 0; i < motion * 3; ++i) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vanillaExt");

View File

@ -6,7 +6,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.CentrifugeRecipes;
import com.hbm.inventory.ShredderRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemToolAbility;
import com.hbm.main.MainRegistry;
@ -200,7 +201,7 @@ public abstract class ToolAbility {
block = Blocks.redstone_ore;
ItemStack stack = new ItemStack(block, 1, meta);
ItemStack result = MachineRecipes.getShredderResult(stack);
ItemStack result = ShredderRecipes.getShredderResult(stack);
if(result != null && result.getItem() != ModItems.scrap) {
world.setBlockToAir(x, y, z);
@ -229,7 +230,7 @@ public abstract class ToolAbility {
block = Blocks.redstone_ore;
ItemStack stack = new ItemStack(block, 1, meta);
ItemStack[] result = MachineRecipes.getCentrifugeProcessingResult(stack);
ItemStack[] result = CentrifugeRecipes.getOutput(stack);
if(result != null) {
world.setBlockToAir(x, y, z);

View File

@ -0,0 +1,50 @@
package com.hbm.handler;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
public class VersionChecker {
public static boolean newVersion = false;
public static String versionNumber = "";
public static void checkVersion() {
try {
URL github = new URL("https://raw.githubusercontent.com/HbmMods/Hbm-s-Nuclear-Tech-GIT/master/com/hbm/lib/RefStrings.java");
BufferedReader in = new BufferedReader(new InputStreamReader(github.openStream()));
MainRegistry.logger.info("Searching for new versions...");
String line;
while ((line = in.readLine()) != null) {
if(line.contains("String VERSION")) {
int begin = line.indexOf('"');
int end = line.lastIndexOf('"');
String sub = line.substring(begin + 1, end);
newVersion = !RefStrings.VERSION.equals(sub);
versionNumber = sub;
MainRegistry.logger.info("Found version " + sub);
break;
}
}
MainRegistry.logger.info("Version checker ended.");
in.close();
} catch (IOException e) {
MainRegistry.logger.warn("Version checker failed!");
}
}
}

View File

@ -69,7 +69,7 @@ public class GunEnergyFactory {
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCLE;
config.firingSound = "hbm:weapon.immolatorShoot";
config.firingSound = "hbm:weapon.flamethrowerShoot";
config.reloadSound = "hbm:weapon.flamerReload";
config.name = "Heavy Duty Flamer";

View File

@ -6,7 +6,9 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.hbm.inventory.CentrifugeRecipes;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.gui.GUIMachineCentrifuge;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
@ -18,7 +20,7 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> fuels;
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result1;
@ -26,18 +28,17 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler {
PositionedStack result3;
PositionedStack result4;
public SmeltingSet(ItemStack input, ItemStack result1, ItemStack result2, ItemStack result3, ItemStack result4) {
input.stackSize = 1;
public RecipeSet(Object input, ItemStack[] results) {
this.input = new PositionedStack(input, 21, 6);
this.result1 = new PositionedStack(result1, 129, 6);
this.result2 = new PositionedStack(result2, 147, 6);
this.result3 = new PositionedStack(result3, 129, 42);
this.result4 = new PositionedStack(result4, 147, 42);
this.result1 = new PositionedStack(results[0], 129, 6);
this.result2 = new PositionedStack(results[1], 147, 6);
this.result3 = new PositionedStack(results[2], 129, 42);
this.result4 = new PositionedStack(results[3], 147, 42);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
return getCycledIngredients(cycleticks / 48, Arrays.asList(input));
}
@Override
@ -94,11 +95,15 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("centrifugeprocessing")) && getClass() == CentrifugeRecipeHandler.class) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getCentrifugeRecipes();
Map<Object, Object[]> recipes = CentrifugeRecipes.getRecipes();
for (Map.Entry<Object, Object[]> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()[0], (ItemStack)recipe.getValue()[1], (ItemStack)recipe.getValue()[2], (ItemStack)recipe.getValue()[3]));
this.arecipes.add(new RecipeSet(recipe.getKey(), RecipesCommon.objectToStackArray(recipe.getValue())));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
@ -106,17 +111,26 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getCentrifugeRecipes();
for (Map.Entry<Object, Object[]> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[0], result) || NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[1], result) || NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[2], result) || NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[3], result))
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()[0], (ItemStack)recipe.getValue()[1], (ItemStack)recipe.getValue()[2], (ItemStack)recipe.getValue()[3]));
Map<Object, Object[]> recipes = CentrifugeRecipes.getRecipes();
for(Map.Entry<Object, Object[]> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[0], result) ||
NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[1], result) ||
NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[2], result) ||
NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue()[3], result))
this.arecipes.add(new RecipeSet(recipe.getKey(), RecipesCommon.objectToStackArray(recipe.getValue())));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("centrifugeprocessing")) && getClass() == CentrifugeRecipeHandler.class) {
loadCraftingRecipes("centrifugeprocessing", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
@ -124,10 +138,25 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getCentrifugeRecipes();
Map<Object, Object[]> recipes = CentrifugeRecipes.getRecipes();
for (Map.Entry<Object, Object[]> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new SmeltingSet((ItemStack)recipe.getKey(), (ItemStack)recipe.getValue()[0], (ItemStack)recipe.getValue()[1], (ItemStack)recipe.getValue()[2], (ItemStack)recipe.getValue()[3]));
if(recipe.getKey() instanceof ItemStack) {
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new RecipeSet(recipe.getKey(), RecipesCommon.objectToStackArray(recipe.getValue())));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
if (NEIServerUtils.areStacksSameType(ingredient, stack))
this.arecipes.add(new RecipeSet(stack, RecipesCommon.objectToStackArray(recipe.getValue())));
}
}
}
}

View File

@ -123,10 +123,10 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
for (Map.Entry<Object[], Object[]> recipe : recipes.entrySet()) {
if (compareFluidStacks(result, (ItemStack)recipe.getValue()[0]) ||
compareFluidStacks(result, (ItemStack)recipe.getValue()[1]) ||
NEIServerUtils.areStacksSameType(result, (ItemStack)recipe.getValue()[2]) ||
NEIServerUtils.areStacksSameType(result, (ItemStack)recipe.getValue()[3]) ||
NEIServerUtils.areStacksSameType(result, (ItemStack)recipe.getValue()[4]) ||
NEIServerUtils.areStacksSameType(result, (ItemStack)recipe.getValue()[5]))
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[2]) ||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[3]) ||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[4]) ||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[5]))
this.arecipes.add(new SmeltingSet(
(ItemStack)recipe.getKey()[0],
(ItemStack)recipe.getKey()[1],
@ -159,11 +159,11 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
for (Map.Entry<Object[], Object[]> recipe : recipes.entrySet()) {
if (compareFluidStacks(ingredient, (ItemStack)recipe.getKey()[0]) ||
compareFluidStacks(ingredient, (ItemStack)recipe.getKey()[1]) ||
NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[2]) ||
NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[3]) ||
NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[4]) ||
NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[5]) ||
NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()[6]))
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[2]) ||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[3]) ||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[4]) ||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[5]) ||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[6]))
this.arecipes.add(new SmeltingSet(
(ItemStack)recipe.getKey()[0],
(ItemStack)recipe.getKey()[1],

View File

@ -0,0 +1,181 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.inventory.CrystallizerRecipes;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.gui.GUICrystallizer;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class CrystallizerRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> batteries;
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack acid;
PositionedStack result;
public RecipeSet(Object input, ItemStack result) {
this.input = new PositionedStack(input, 75, 24);
this.acid = new PositionedStack(ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, FluidType.ACID.ordinal()), TileEntityMachineCrystallizer.acidRequired), 39, 24);
this.result = new PositionedStack(result, 135, 24);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(input, acid));
}
@Override
public PositionedStack getOtherStack() {
return batteries.get((cycleticks / 48) % batteries.size()).stack;
}
@Override
public PositionedStack getResult() {
return result;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 3, 42, false);
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
return "Ore Acidizer";
}
@Override
public String getGuiTexture() {
return GUICrystallizer.texture.toString();
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("hbm_crystallizer")) && getClass() == CrystallizerRecipeHandler.class) {
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameTypeCrafting((ItemStack)recipe.getValue(), result))
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("hbm_crystallizer")) && getClass() == CrystallizerRecipeHandler.class) {
loadCraftingRecipes("hbm_crystallizer", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object> recipes = CrystallizerRecipes.getRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if(NEIServerUtils.areStacksSameTypeCrafting(ingredient, ItemFluidIcon.addQuantity(
new ItemStack(ModItems.fluid_icon, 1, FluidType.ACID.ordinal()), TileEntityMachineCrystallizer.acidRequired))) {
if(recipe.getKey() instanceof ItemStack) {
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
this.arecipes.add(new RecipeSet(stack, (ItemStack) recipe.getValue()));
}
}
} else if(recipe.getKey() instanceof ItemStack) {
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()))
this.arecipes.add(new RecipeSet(recipe.getKey(), (ItemStack)recipe.getValue()));
} else if (recipe.getKey() instanceof ArrayList) {
for(Object o : (ArrayList)recipe.getKey()) {
ItemStack stack = (ItemStack)o;
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack))
this.arecipes.add(new RecipeSet(stack, (ItemStack) recipe.getValue()));
}
}
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUICrystallizer.class;
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(104 - 5, 34 - 11, 24, 18), "hbm_crystallizer"));
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(99, 23, 192, 0, 22, 16, 600, 0);
drawProgressBar(3, 6, 176, 0, 16, 34, 60, 7);
}
@Override
public TemplateRecipeHandler newInstance() {
if (batteries == null)
batteries = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBatteries()) {
batteries.add(new Fuel(i));
}
return super.newInstance();
}
}

View File

@ -8,7 +8,8 @@ import java.util.List;
import java.util.Map;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.MachineRecipes.StackWrapper;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.ShredderRecipes;
import com.hbm.inventory.gui.GUIMachineShredder;
import com.hbm.lib.RefStrings;
@ -82,9 +83,9 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("shredding")) && getClass() == ShredderRecipeHandler.class) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet(((StackWrapper)recipe.getKey()).getStack(), (ItemStack)recipe.getValue()));
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
}
} else {
super.loadCraftingRecipes(outputId, results);
@ -93,10 +94,10 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType((ItemStack)recipe.getValue(), result))
this.arecipes.add(new SmeltingSet(((StackWrapper)recipe.getKey()).getStack(), (ItemStack)recipe.getValue()));
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
}
}
@ -111,10 +112,10 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler {
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object> recipes = MachineRecipes.instance().getShredderRecipes();
Map<Object, Object> recipes = ShredderRecipes.getShredderRecipes();
for (Map.Entry<Object, Object> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameType(ingredient, ((StackWrapper)recipe.getKey()).getStack()))
this.arecipes.add(new SmeltingSet(((StackWrapper)recipe.getKey()).getStack(), (ItemStack)recipe.getValue()));
if (NEIServerUtils.areStacksSameType(ingredient, ((ComparableStack)recipe.getKey()).toStack()))
this.arecipes.add(new SmeltingSet(((ComparableStack)recipe.getKey()).toStack(), (ItemStack)recipe.getValue()));
}
}

View File

@ -0,0 +1,267 @@
package com.hbm.inventory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class CentrifugeRecipes {
private static HashMap<Object, ItemStack[]> recipes = new HashMap();
public static void register() {
recipes.put(new ComparableStack(ModItems.waste_uranium), new ItemStack[] {
new ItemStack(ModItems.nugget_u235, 1),
new ItemStack(ModItems.nugget_u238, 2),
new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 2) });
recipes.put(new ComparableStack(ModItems.waste_plutonium), new ItemStack[] {
new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nugget_pu240, 1), new ItemStack(ModItems.nugget_lead, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
recipes.put(new ComparableStack(ModItems.waste_mox), new ItemStack[] {
new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nugget_neptunium, 1), new ItemStack(ModItems.nugget_u238, 2),
new ItemStack(ModItems.nuclear_waste_tiny, 2) });
recipes.put(new ComparableStack(ModItems.waste_schrabidium), new ItemStack[] {
new ItemStack(ModItems.nugget_beryllium, 1),
new ItemStack(ModItems.nugget_lead, 1),
new ItemStack(ModItems.nugget_solinium, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
recipes.put(new ComparableStack(ModItems.waste_thorium), new ItemStack[] {
new ItemStack(ModItems.nugget_u238, 1),
new ItemStack(ModItems.nugget_th232, 1),
new ItemStack(ModItems.nugget_u233, 3),
new ItemStack(ModItems.nuclear_waste_tiny, 1) });
recipes.put(new ComparableStack(ModItems.powder_cloud), new ItemStack[] {
new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.sulfur, 1),
new ItemStack(ModItems.dust, 1),
new ItemStack(ModItems.dust, 1) });
recipes.put("oreCoal", new ItemStack[] {
new ItemStack(ModItems.powder_coal, 2),
new ItemStack(ModItems.powder_coal, 2),
new ItemStack(ModItems.powder_coal, 2),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreLignite", new ItemStack[] {
new ItemStack(ModItems.powder_lignite, 2),
new ItemStack(ModItems.powder_lignite, 2),
new ItemStack(ModItems.powder_lignite, 2),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreIron", new ItemStack[] {
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreGold", new ItemStack[] {
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreDiamond", new ItemStack[] {
new ItemStack(ModItems.powder_diamond, 1),
new ItemStack(ModItems.powder_diamond, 1),
new ItemStack(ModItems.powder_diamond, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreEmerald", new ItemStack[] {
new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreTitanium", new ItemStack[] {
new ItemStack(ModItems.powder_titanium, 1),
new ItemStack(ModItems.powder_titanium, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreQuartz", new ItemStack[] {
new ItemStack(ModItems.powder_quartz, 1),
new ItemStack(ModItems.powder_quartz, 1),
new ItemStack(ModItems.powder_lithium_tiny, 1),
new ItemStack(Blocks.netherrack, 1) });
recipes.put("oreTungsten", new ItemStack[] {
new ItemStack(ModItems.powder_tungsten, 1),
new ItemStack(ModItems.powder_tungsten, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreCopper", new ItemStack[] {
new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreAluminum", new ItemStack[] {
new ItemStack(ModItems.powder_aluminium, 1),
new ItemStack(ModItems.powder_aluminium, 1),
new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreLead", new ItemStack[] {
new ItemStack(ModItems.powder_lead, 1),
new ItemStack(ModItems.powder_lead, 1),
new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreSchrabidium", new ItemStack[] {
new ItemStack(ModItems.powder_schrabidium, 1),
new ItemStack(ModItems.powder_schrabidium, 1),
new ItemStack(ModItems.nugget_solinium, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put(new ComparableStack(ModBlocks.ore_rare), new ItemStack[] {
new ItemStack(ModItems.powder_desh_mix, 1),
new ItemStack(ModItems.powder_actinium_tiny, 1),
new ItemStack(ModItems.powder_lanthanium_tiny, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("orePlutonium", new ItemStack[] {
new ItemStack(ModItems.powder_plutonium, 1),
new ItemStack(ModItems.powder_plutonium, 1),
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreUranium", new ItemStack[] {
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(ModItems.powder_thorium, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreThorium", new ItemStack[] {
new ItemStack(ModItems.powder_thorium, 1),
new ItemStack(ModItems.powder_thorium, 1),
new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreBeryllium", new ItemStack[] {
new ItemStack(ModItems.powder_beryllium, 1),
new ItemStack(ModItems.powder_beryllium, 1),
new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put("oreRedstone", new ItemStack[] {
new ItemStack(Items.redstone, 3),
new ItemStack(Items.redstone, 3),
new ItemStack(ModItems.nugget_mercury, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack[] {
new ItemStack(ModItems.powder_plutonium, 2),
new ItemStack(ModItems.powder_cobalt, 2),
new ItemStack(ModItems.powder_nitan_mix, 1),
new ItemStack(Blocks.end_stone, 1) });
recipes.put("oreLapis", new ItemStack[] {
new ItemStack(ModItems.powder_lapis, 3),
new ItemStack(ModItems.powder_lapis, 3),
new ItemStack(ModItems.powder_cobalt_tiny, 1),
new ItemStack(Blocks.gravel, 1) });
recipes.put(new ComparableStack(ModBlocks.ore_meteor_starmetal), new ItemStack[] {
new ItemStack(ModItems.powder_dura_steel, 3),
new ItemStack(ModItems.powder_astatine, 1),
new ItemStack(ModItems.powder_cobalt, 2),
new ItemStack(Blocks.gravel, 1) });
recipes.put(new ComparableStack(ModBlocks.block_euphemium_cluster), new ItemStack[] {
new ItemStack(ModItems.nugget_euphemium, 7),
new ItemStack(ModItems.powder_schrabidium, 4),
new ItemStack(ModItems.ingot_starmetal, 2),
new ItemStack(ModItems.nugget_solinium, 2) });
recipes.put(new ComparableStack(ModBlocks.ore_nether_fire), new ItemStack[] {
new ItemStack(Items.blaze_powder, 2),
new ItemStack(ModItems.powder_fire, 2),
new ItemStack(ModItems.ingot_phosphorus),
new ItemStack(Blocks.netherrack) });
recipes.put(new ComparableStack(Items.blaze_rod), new ItemStack[] {
new ItemStack(Items.blaze_powder, 1),
new ItemStack(Items.blaze_powder, 1),
new ItemStack(ModItems.powder_fire, 1),
new ItemStack(ModItems.powder_fire, 1) });
recipes.put(new ComparableStack(ModItems.crystal_iron), new ItemStack[] { new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_titanium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_gold), new ItemStack[] { new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.nugget_mercury, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_redstone), new ItemStack[] { new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(ModItems.nugget_mercury, 3) });
recipes.put(new ComparableStack(ModItems.crystal_uranium), new ItemStack[] { new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.powder_thorium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_thorium), new ItemStack[] { new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_plutonium), new ItemStack[] { new ItemStack(ModItems.powder_plutonium, 2), new ItemStack(ModItems.powder_plutonium, 2), new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_titanium), new ItemStack[] { new ItemStack(ModItems.powder_titanium, 2), new ItemStack(ModItems.powder_titanium, 2), new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_sulfur), new ItemStack[] { new ItemStack(ModItems.sulfur, 4), new ItemStack(ModItems.sulfur, 4), new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.nugget_mercury, 1) });
recipes.put(new ComparableStack(ModItems.crystal_niter), new ItemStack[] { new ItemStack(ModItems.niter, 3), new ItemStack(ModItems.niter, 3), new ItemStack(ModItems.niter, 3), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_copper), new ItemStack[] { new ItemStack(ModItems.powder_copper, 2), new ItemStack(ModItems.powder_copper, 2), new ItemStack(ModItems.sulfur, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_tungsten), new ItemStack[] { new ItemStack(ModItems.powder_tungsten, 2), new ItemStack(ModItems.powder_tungsten, 2), new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_aluminium), new ItemStack[] { new ItemStack(ModItems.powder_aluminium, 2), new ItemStack(ModItems.powder_aluminium, 2), new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_fluorite), new ItemStack[] { new ItemStack(ModItems.fluorite, 3), new ItemStack(ModItems.fluorite, 3), new ItemStack(ModItems.fluorite, 3), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_beryllium), new ItemStack[] { new ItemStack(ModItems.powder_beryllium, 2), new ItemStack(ModItems.powder_beryllium, 2), new ItemStack(ModItems.powder_quartz, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_lead), new ItemStack[] { new ItemStack(ModItems.powder_lead, 2), new ItemStack(ModItems.powder_lead, 2), new ItemStack(ModItems.powder_gold, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_schrabidium), new ItemStack[] { new ItemStack(ModItems.powder_schrabidium, 2), new ItemStack(ModItems.powder_schrabidium, 2), new ItemStack(ModItems.powder_plutonium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) });
recipes.put(new ComparableStack(ModItems.crystal_rare), new ItemStack[] { new ItemStack(ModItems.powder_desh_mix, 1), new ItemStack(ModItems.powder_desh_mix, 1), new ItemStack(ModItems.powder_lanthanium_tiny, 3), new ItemStack(ModItems.powder_actinium_tiny, 3) });
recipes.put(new ComparableStack(ModItems.crystal_phosphorus), new ItemStack[] { new ItemStack(ModItems.powder_fire, 3), new ItemStack(ModItems.powder_fire, 3), new ItemStack(ModItems.ingot_phosphorus, 2), new ItemStack(Items.blaze_powder, 2) });
recipes.put(new ComparableStack(ModItems.crystal_trixite), new ItemStack[] { new ItemStack(ModItems.powder_plutonium, 3), new ItemStack(ModItems.powder_cobalt, 3), new ItemStack(ModItems.powder_spark_mix, 1), new ItemStack(ModItems.powder_nitan_mix, 2) });
recipes.put(new ComparableStack(ModItems.crystal_lithium), new ItemStack[] { new ItemStack(ModItems.powder_lithium, 2), new ItemStack(ModItems.powder_lithium, 2), new ItemStack(ModItems.powder_quartz, 1), new ItemStack(ModItems.fluorite, 1) });
recipes.put(new ComparableStack(ModItems.crystal_starmetal), new ItemStack[] { new ItemStack(ModItems.powder_dura_steel, 3), new ItemStack(ModItems.powder_cobalt, 3), new ItemStack(ModItems.powder_astatine, 2), new ItemStack(ModItems.nugget_mercury, 5) });
}
public static ItemStack[] getOutput(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return null;
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
if(recipes.containsKey(comp))
return RecipesCommon.copyStackArray(recipes.get(comp));
String[] dictKeys = comp.getDictKeys();
for(String key : dictKeys) {
if(recipes.containsKey(key))
return RecipesCommon.copyStackArray(recipes.get(key));
}
return null;
}
public static Map<Object, Object[]> getRecipes() {
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
for(Entry<Object, ItemStack[]> entry : CentrifugeRecipes.recipes.entrySet()) {
if(entry.getKey() instanceof String) {
List<ItemStack> ingredients = OreDictionary.getOres((String)entry.getKey());
recipes.put(ingredients, entry.getValue());
} else {
recipes.put(((ComparableStack)entry.getKey()).toStack(), entry.getValue());
}
}
return recipes;
}
}

View File

@ -5,9 +5,10 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@ -15,12 +16,34 @@ import net.minecraftforge.oredict.OreDictionary;
//...right?
public class CrystallizerRecipes {
//'Object' is either a ComparableStack or the key for th ore dict
//'Object' is either a ComparableStack or the key for the ore dict
private static HashMap<Object, ItemStack> recipes = new HashMap();
public static void register() {
recipes.put("oreIron", new ItemStack(Items.iron_ingot));
recipes.put("oreIron", new ItemStack(ModItems.crystal_iron));
recipes.put("oreGold", new ItemStack(ModItems.crystal_gold));
recipes.put("oreRedstone", new ItemStack(ModItems.crystal_redstone));
recipes.put("oreUranium", new ItemStack(ModItems.crystal_uranium));
recipes.put("oreThorium", new ItemStack(ModItems.crystal_thorium));
recipes.put("orePlutonium", new ItemStack(ModItems.crystal_plutonium));
recipes.put("oreTitanium", new ItemStack(ModItems.crystal_titanium));
recipes.put("oreSulfur", new ItemStack(ModItems.crystal_sulfur));
recipes.put("oreNiter", new ItemStack(ModItems.crystal_niter));
recipes.put("oreSalpeter", new ItemStack(ModItems.crystal_niter));
recipes.put("oreCopper", new ItemStack(ModItems.crystal_copper));
recipes.put("oreTungsten", new ItemStack(ModItems.crystal_tungsten));
recipes.put("oreAluminum", new ItemStack(ModItems.crystal_aluminium));
recipes.put("oreFluorite", new ItemStack(ModItems.crystal_fluorite));
recipes.put("oreBeryllium", new ItemStack(ModItems.crystal_beryllium));
recipes.put("oreLead", new ItemStack(ModItems.crystal_lead));
recipes.put("oreSchrabidium", new ItemStack(ModItems.crystal_schrabidium));
recipes.put(new ComparableStack(ModBlocks.ore_rare), new ItemStack(ModItems.crystal_rare));
recipes.put(new ComparableStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.crystal_phosphorus));
recipes.put(new ComparableStack(ModBlocks.ore_tikite), new ItemStack(ModItems.crystal_trixite));
recipes.put("oreLithium", new ItemStack(ModItems.crystal_lithium));
recipes.put("oreStarmetal", new ItemStack(ModItems.crystal_starmetal));
recipes.put("sand", new ItemStack(ModItems.ingot_fiberglass));
}
public static ItemStack getOutput(ItemStack stack) {
@ -31,20 +54,20 @@ public class CrystallizerRecipes {
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
if(recipes.containsKey(comp))
return recipes.get(comp);
return recipes.get(comp).copy();
String[] dictKeys = comp.getDictKeys();
for(String key : dictKeys) {
if(recipes.containsKey(key))
return recipes.get(key);
return recipes.get(key).copy();
}
return null;
}
public Map<Object, Object> getRecipes() {
public static Map<Object, Object> getRecipes() {
Map<Object, Object> recipes = new HashMap<Object, Object>();

View File

@ -115,262 +115,6 @@ public class MachineRecipes {
return null;
}
// Arrays!
public static ItemStack[] getCentrifugeProcessingResult(ItemStack item) {
return getCentrifugeOutput(item);
}
public static ItemStack[] getCentrifugeOutput(ItemStack item) {
if(item == null || item.getItem() == null)
return null;
ItemStack[] test = new ItemStack[] { new ItemStack(Items.apple, 3), new ItemStack(Items.leather, 1),
new ItemStack(Items.sugar, 3), new ItemStack(Items.blaze_powder, 2) };
ItemStack[] uranF = new ItemStack[] { new ItemStack(ModItems.nugget_u235, 1),
new ItemStack(ModItems.nugget_u238, 2), new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 2) };
ItemStack[] plutoniumF = new ItemStack[] { new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nugget_pu240, 1), new ItemStack(ModItems.nugget_lead, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 3) };
ItemStack[] moxF = new ItemStack[] { new ItemStack(ModItems.nugget_pu239, 1),
new ItemStack(ModItems.nugget_neptunium, 1), new ItemStack(ModItems.nugget_u238, 2),
new ItemStack(ModItems.nuclear_waste_tiny, 2) };
ItemStack[] schrabidiumF = new ItemStack[] { new ItemStack(ModItems.nugget_beryllium, 1),
new ItemStack(ModItems.nugget_lead, 1), new ItemStack(ModItems.nugget_solinium, 1),
new ItemStack(ModItems.nuclear_waste_tiny, 3) };
ItemStack[] thoriumF = new ItemStack[] { new ItemStack(ModItems.nugget_u238, 1),
new ItemStack(ModItems.nugget_th232, 1), new ItemStack(ModItems.nugget_u233, 3),
new ItemStack(ModItems.nuclear_waste_tiny, 1) };
ItemStack[] cloud = new ItemStack[] { new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.sulfur, 1), new ItemStack(ModItems.dust, 1),
new ItemStack(ModItems.dust, 1) };
ItemStack[] coal = new ItemStack[] { new ItemStack(ModItems.powder_coal, 2),
new ItemStack(ModItems.powder_coal, 2), new ItemStack(ModItems.powder_coal, 2),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] lignite = new ItemStack[] { new ItemStack(ModItems.powder_lignite, 2),
new ItemStack(ModItems.powder_lignite, 2), new ItemStack(ModItems.powder_lignite, 2),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] iron = new ItemStack[] { new ItemStack(ModItems.powder_iron, 1),
new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] gold = new ItemStack[] { new ItemStack(ModItems.powder_gold, 1),
new ItemStack(ModItems.powder_gold, 1), new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] diamond = new ItemStack[] { new ItemStack(ModItems.powder_diamond, 1),
new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] emerald = new ItemStack[] { new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(ModItems.powder_emerald, 1), new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] titanium = new ItemStack[] { new ItemStack(ModItems.powder_titanium, 1),
new ItemStack(ModItems.powder_titanium, 1), new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] quartz = new ItemStack[] { new ItemStack(ModItems.powder_quartz, 1),
new ItemStack(ModItems.powder_quartz, 1), new ItemStack(ModItems.powder_lithium_tiny, 1),
new ItemStack(Blocks.netherrack, 1) };
ItemStack[] tungsten = new ItemStack[] { new ItemStack(ModItems.powder_tungsten, 1),
new ItemStack(ModItems.powder_tungsten, 1), new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] copper = new ItemStack[] { new ItemStack(ModItems.powder_copper, 1),
new ItemStack(ModItems.powder_copper, 1), new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] aluminium = new ItemStack[] { new ItemStack(ModItems.powder_aluminium, 1),
new ItemStack(ModItems.powder_aluminium, 1), new ItemStack(ModItems.powder_iron, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] lead = new ItemStack[] { new ItemStack(ModItems.powder_lead, 1),
new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.powder_gold, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] schrabidium = new ItemStack[] { new ItemStack(ModItems.powder_schrabidium, 1),
new ItemStack(ModItems.powder_schrabidium, 1), new ItemStack(ModItems.nugget_solinium, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] rare = new ItemStack[] { new ItemStack(ModItems.powder_desh_mix, 1),
new ItemStack(ModItems.powder_actinium_tiny, 1), new ItemStack(ModItems.powder_lanthanium_tiny, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] plutonium = new ItemStack[] { new ItemStack(ModItems.powder_plutonium, 1),
new ItemStack(ModItems.powder_plutonium, 1), new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] uranium = new ItemStack[] { new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.powder_thorium, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] thorium = new ItemStack[] { new ItemStack(ModItems.powder_thorium, 1),
new ItemStack(ModItems.powder_thorium, 1), new ItemStack(ModItems.powder_uranium, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] beryllium = new ItemStack[] { new ItemStack(ModItems.powder_beryllium, 1),
new ItemStack(ModItems.powder_beryllium, 1), new ItemStack(ModItems.powder_emerald, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] redstone = new ItemStack[] { new ItemStack(Items.redstone, 3),
new ItemStack(Items.redstone, 3), new ItemStack(ModItems.nugget_mercury, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] tikite = new ItemStack[] { new ItemStack(ModItems.powder_plutonium, 2),
new ItemStack(ModItems.powder_cobalt, 2), new ItemStack(ModItems.powder_nitan_mix, 1),
new ItemStack(Blocks.end_stone, 1) };
ItemStack[] lapis = new ItemStack[] { new ItemStack(ModItems.powder_lapis, 3),
new ItemStack(ModItems.powder_lapis, 3), new ItemStack(ModItems.powder_cobalt_tiny, 1),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] starmetal = new ItemStack[] { new ItemStack(ModItems.powder_dura_steel, 3),
new ItemStack(ModItems.powder_astatine, 1), new ItemStack(ModItems.powder_cobalt, 2),
new ItemStack(Blocks.gravel, 1) };
ItemStack[] euphCluster = new ItemStack[] { new ItemStack(ModItems.nugget_euphemium, 7),
new ItemStack(ModItems.powder_schrabidium, 4), new ItemStack(ModItems.ingot_starmetal, 2),
new ItemStack(ModItems.nugget_solinium, 2) };
if (MainRegistry.enableDebugMode) {
if (item.getItem() == Item.getItemFromBlock(ModBlocks.test_render)) {
return test;
}
}
if (item.getItem() == ModItems.waste_uranium) {
return uranF;
}
if (item.getItem() == ModItems.waste_thorium) {
return thoriumF;
}
/*if (item.getItem() == ModItems.rod_dual_uranium_fuel_depleted) {
return uran2;
}
if (item.getItem() == ModItems.rod_quad_uranium_fuel_depleted) {
return uran3;
}*/
if (item.getItem() == ModItems.waste_plutonium) {
return plutoniumF;
}
if (item.getItem() == ModItems.waste_mox) {
return moxF;
}
if (item.getItem() == ModItems.waste_schrabidium) {
return schrabidiumF;
}
if (item.getItem() == ModItems.powder_cloud) {
return cloud;
}
if (mODE(item, "oreCoal")) {
return coal;
}
if (mODE(item, "oreLignite")) {
return lignite;
}
if (mODE(item, "oreIron")) {
return iron;
}
if (mODE(item, "oreGold")) {
return gold;
}
if (mODE(item, "oreDiamond")) {
return diamond;
}
if (mODE(item, "oreEmerald")) {
return emerald;
}
if (mODE(item, "oreUranium")) {
return uranium;
}
if (mODE(item, "oreThorium")) {
return thorium;
}
if (mODE(item, "orePlutonium")) {
return plutonium;
}
if (mODE(item, "oreTitanium")) {
return titanium;
}
if (mODE(item, "oreTungsten")) {
return tungsten;
}
if (mODE(item, "oreLead")) {
return lead;
}
if (mODE(item, "oreBeryllium")) {
return beryllium;
}
if (mODE(item, "oreAluminum")) {
return aluminium;
}
if (mODE(item, "oreSchrabidium")) {
return schrabidium;
}
if (mODE(item, "oreQuartz") || mODE(item, "oreNetherQuartz")) {
return quartz;
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.ore_rare)) {
return rare;
}
if (mODE(item, "oreCopper")) {
return copper;
}
if (mODE(item, "oreRedstone") || item.getItem() == Item.getItemFromBlock(Blocks.lit_redstone_ore)) {
return redstone;
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.ore_tikite)) {
return tikite;
}
if (mODE(item, "oreLapis")) {
return lapis;
}
if (mODE(item, "oreStarmetal")) {
return starmetal;
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.block_euphemium_cluster)) {
return euphCluster;
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.ore_nether_fire)) {
return new ItemStack[] {
new ItemStack(Items.blaze_powder, 2),
new ItemStack(ModItems.powder_fire, 2),
new ItemStack(ModItems.ingot_phosphorus),
new ItemStack(Blocks.netherrack)
};
}
if (item.getItem() == Items.blaze_rod) {
return new ItemStack[] {
new ItemStack(Items.blaze_powder, 1),
new ItemStack(Items.blaze_powder, 1),
new ItemStack(ModItems.powder_fire, 1),
new ItemStack(ModItems.powder_fire, 1)
};
}
return null;
}
//bro, i don't care
@SuppressWarnings("incomplete-switch")
public static List<GasCentOutput> getGasCentOutput(FluidType fluid) {
@ -1227,75 +971,6 @@ public class MachineRecipes {
return fuels;
}
public Map<Object, Object[]> getCentrifugeRecipes() {
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
if (MainRegistry.enableDebugMode) {
recipes.put(new ItemStack(Item.getItemFromBlock(ModBlocks.test_render)),
getCentrifugeOutput(new ItemStack(ModBlocks.test_render)));
}
recipes.put(new ItemStack(ModItems.powder_cloud),
getCentrifugeOutput(new ItemStack(ModItems.powder_cloud)));
recipes.put(new ItemStack(Blocks.coal_ore),
getCentrifugeOutput(new ItemStack(Blocks.coal_ore)));
recipes.put(new ItemStack(Blocks.iron_ore),
getCentrifugeOutput(new ItemStack(Blocks.iron_ore)));
recipes.put(new ItemStack(Blocks.gold_ore),
getCentrifugeOutput(new ItemStack(Blocks.gold_ore)));
recipes.put(new ItemStack(Blocks.diamond_ore),
getCentrifugeOutput(new ItemStack(Blocks.diamond_ore)));
recipes.put(new ItemStack(Blocks.emerald_ore),
getCentrifugeOutput(new ItemStack(Blocks.emerald_ore)));
recipes.put(new ItemStack(ModBlocks.ore_uranium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_uranium)));
recipes.put(new ItemStack(ModBlocks.ore_thorium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_thorium)));
recipes.put(new ItemStack(ModBlocks.ore_titanium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_titanium)));
recipes.put(new ItemStack(ModBlocks.ore_tungsten),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_tungsten)));
recipes.put(new ItemStack(ModBlocks.ore_aluminium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_aluminium)));
recipes.put(new ItemStack(ModBlocks.ore_beryllium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_beryllium)));
recipes.put(new ItemStack(ModBlocks.ore_copper),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_copper)));
recipes.put(new ItemStack(ModBlocks.ore_lead),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_lead)));
recipes.put(new ItemStack(ModBlocks.ore_rare),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_rare)));
recipes.put(new ItemStack(ModBlocks.ore_schrabidium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_schrabidium)));
recipes.put(new ItemStack(ModBlocks.ore_tikite),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_tikite)));
recipes.put(new ItemStack(Blocks.redstone_ore),
getCentrifugeOutput(new ItemStack(Blocks.redstone_ore)));
recipes.put(new ItemStack(Blocks.lapis_ore),
getCentrifugeOutput(new ItemStack(Blocks.lapis_ore)));
recipes.put(new ItemStack(ModBlocks.ore_nether_plutonium),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_nether_plutonium)));
recipes.put(new ItemStack(ModItems.waste_uranium),
getCentrifugeOutput(new ItemStack(ModItems.waste_uranium)));
recipes.put(new ItemStack(ModItems.waste_thorium),
getCentrifugeOutput(new ItemStack(ModItems.waste_thorium)));
recipes.put(new ItemStack(ModItems.waste_plutonium),
getCentrifugeOutput(new ItemStack(ModItems.waste_plutonium)));
recipes.put(new ItemStack(ModItems.waste_mox),
getCentrifugeOutput(new ItemStack(ModItems.waste_mox)));
recipes.put(new ItemStack(ModItems.waste_schrabidium),
getCentrifugeOutput(new ItemStack(ModItems.waste_schrabidium)));
recipes.put(new ItemStack(ModBlocks.ore_lignite),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_lignite)));
recipes.put(new ItemStack(ModBlocks.ore_meteor_starmetal),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_meteor_starmetal)));
recipes.put(new ItemStack(ModBlocks.block_euphemium_cluster),
getCentrifugeOutput(new ItemStack(ModBlocks.block_euphemium_cluster)));
recipes.put(new ItemStack(ModBlocks.ore_nether_fire),
getCentrifugeOutput(new ItemStack(ModBlocks.ore_nether_fire)));
recipes.put(new ItemStack(Items.blaze_rod),
getCentrifugeOutput(new ItemStack(Items.blaze_rod)));
return recipes;
}
public Map<Object, Object[]> getGasCentrifugeRecipes() {
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
@ -1976,116 +1651,6 @@ public class MachineRecipes {
return recipes;
}*/
//new and improved
public static HashMap<StackWrapper, ItemStack> shredderRecipes = new HashMap();
public static HashMap<Object, Object> neiShredderRecipes;
public static void registerShredder() {
String[] names = OreDictionary.getOreNames();
for(int i = 0; i < names.length; i++) {
String name = names[i];
//if the dict contains invalid names, skip
if(name == null || name.isEmpty())
continue;
List<ItemStack> matches = OreDictionary.getOres(name);
//if the name isn't assigned to an ore, also skip
if(matches == null || matches.isEmpty())
continue;
if(name.length() > 5 && name.substring(0, 5).equals("ingot")) {
ItemStack dust = getDustByName(name.substring(5));
if(dust != null && dust.getItem() != ModItems.scrap) {
for(ItemStack stack : matches) {
shredderRecipes.put(new StackWrapper(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 3).equals("ore")) {
ItemStack dust = getDustByName(name.substring(3));
if(dust != null && dust.getItem() != ModItems.scrap) {
dust.stackSize = 2;
for(ItemStack stack : matches) {
shredderRecipes.put(new StackWrapper(stack), dust);
}
}
} else if(name.length() > 5 && name.substring(0, 5).equals("block")) {
ItemStack dust = getDustByName(name.substring(5));
if(dust != null && dust.getItem() != ModItems.scrap) {
dust.stackSize = 9;
for(ItemStack stack : matches) {
shredderRecipes.put(new StackWrapper(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 3).equals("gem")) {
ItemStack dust = getDustByName(name.substring(3));
if(dust != null && dust.getItem() != ModItems.scrap) {
for(ItemStack stack : matches) {
shredderRecipes.put(new StackWrapper(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 4).equals("dust")) {
for(ItemStack stack : matches) {
shredderRecipes.put(new StackWrapper(stack), new ItemStack(ModItems.dust));
}
}
}
}
public static ItemStack getDustByName(String name) {
List<ItemStack> matches = OreDictionary.getOres("dust" + name);
if(matches != null && !matches.isEmpty())
return matches.get(0).copy();
return new ItemStack(ModItems.scrap);
}
public static void overridePreSetRecipe(ItemStack in, ItemStack out) {
shredderRecipes.put(new StackWrapper(in), out);
}
public Map<Object, Object> getShredderRecipes() {
//convert the map only once to save on processing power (might be more ram intensive but that can't be THAT bad, right?)
if(neiShredderRecipes == null)
neiShredderRecipes = new HashMap(shredderRecipes);
return neiShredderRecipes;
}
public static ItemStack getShredderResult(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return new ItemStack(ModItems.scrap);
ItemStack sta = shredderRecipes.get(new StackWrapper(stack));
/*if(sta != null)
System.out.println(stack.getDisplayName() + " resulted " + sta.getDisplayName());
else
System.out.println(stack.getDisplayName() + " resulted null");*/
return sta == null ? new ItemStack(ModItems.scrap) : sta;
}
public Map<Object[], Object> getCMBRecipes() {
Map<Object[], Object> recipes = new HashMap<Object[], Object>();
@ -5128,7 +4693,7 @@ public class MachineRecipes {
input[0] = new FluidStack(1800, FluidType.COOLANT);
break;
case DESH:
input[0] = new FluidStack(800, FluidType.ACID);
input[0] = new FluidStack(200, FluidType.MERCURY);
input[1] = new FluidStack(200, FluidType.LIGHTOIL);
break;
case PEROXIDE:
@ -5136,10 +4701,11 @@ public class MachineRecipes {
break;
case CIRCUIT_4:
input[0] = new FluidStack(400, FluidType.ACID);
input[1] = new FluidStack(200, FluidType.PETROLEUM);
break;
case CIRCUIT_5:
input[0] = new FluidStack(800, FluidType.ACID);
input[1] = new FluidStack(400, FluidType.PETROLEUM);
input[1] = new FluidStack(200, FluidType.MERCURY);
break;
case SF_OIL:
input[0] = new FluidStack(350, FluidType.OIL);
@ -5212,6 +4778,7 @@ public class MachineRecipes {
break;
case NITAN:
input[0] = new FluidStack(600, FluidType.KEROSENE);
input[1] = new FluidStack(200, FluidType.MERCURY);
break;
case OIL_SAND:
input[0] = new FluidStack(400, FluidType.BITUMEN);
@ -5506,7 +5073,7 @@ public class MachineRecipes {
return map;
}
public static class StackWrapper {
/*public static class StackWrapper {
public Item item;
public int damage;
@ -5557,5 +5124,5 @@ public class MachineRecipes {
return false;
return true;
}
}
}*/
}

View File

@ -1,23 +1,73 @@
package com.hbm.inventory;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class RecipesCommon {
public static ItemStack[] copyStackArray(ItemStack[] array) {
if(array == null)
return null;
ItemStack[] clone = new ItemStack[array.length];
for(int i = 0; i < array.length; i++) {
if(array[i] != null)
clone[i] = array[i].copy();
}
return clone;
}
public static ItemStack[] objectToStackArray(Object[] array) {
if(array == null)
return null;
ItemStack[] clone = new ItemStack[array.length];
for(int i = 0; i < array.length; i++) {
if(array[i] instanceof ItemStack)
clone[i] = (ItemStack)array[i];
}
return clone;
}
public static class ComparableStack {
Item item;
int stacksize;
int meta;
public ComparableStack(ItemStack stack) {
this.item = stack.getItem();
this.stacksize = stack.stackSize;
this.meta = stack.getItemDamage();
}
public ComparableStack makeSingular() {
stacksize = 1;
return this;
}
public ComparableStack(Item item) {
this.item = item;
this.stacksize = 1;
this.meta = 0;
}
public ComparableStack(Block item) {
this.item = Item.getItemFromBlock(item);
this.stacksize = 1;
this.meta = 0;
}
public ComparableStack(Item item, int stacksize) {
this(item);
this.stacksize = stacksize;

View File

@ -0,0 +1,224 @@
package com.hbm.inventory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
public class ShredderRecipes {
public static HashMap<ComparableStack, ItemStack> shredderRecipes = new HashMap();
public static HashMap<Object, Object> neiShredderRecipes;
public static void registerShredder() {
String[] names = OreDictionary.getOreNames();
for(int i = 0; i < names.length; i++) {
String name = names[i];
//if the dict contains invalid names, skip
if(name == null || name.isEmpty())
continue;
List<ItemStack> matches = OreDictionary.getOres(name);
//if the name isn't assigned to an ore, also skip
if(matches == null || matches.isEmpty())
continue;
if(name.length() > 5 && name.substring(0, 5).equals("ingot")) {
ItemStack dust = getDustByName(name.substring(5));
if(dust != null && dust.getItem() != ModItems.scrap) {
for(ItemStack stack : matches) {
shredderRecipes.put(new ComparableStack(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 3).equals("ore")) {
ItemStack dust = getDustByName(name.substring(3));
if(dust != null && dust.getItem() != ModItems.scrap) {
dust.stackSize = 2;
for(ItemStack stack : matches) {
shredderRecipes.put(new ComparableStack(stack), dust);
}
}
} else if(name.length() > 5 && name.substring(0, 5).equals("block")) {
ItemStack dust = getDustByName(name.substring(5));
if(dust != null && dust.getItem() != ModItems.scrap) {
dust.stackSize = 9;
for(ItemStack stack : matches) {
shredderRecipes.put(new ComparableStack(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 3).equals("gem")) {
ItemStack dust = getDustByName(name.substring(3));
if(dust != null && dust.getItem() != ModItems.scrap) {
for(ItemStack stack : matches) {
shredderRecipes.put(new ComparableStack(stack), dust);
}
}
} else if(name.length() > 3 && name.substring(0, 4).equals("dust")) {
for(ItemStack stack : matches) {
shredderRecipes.put(new ComparableStack(stack), new ItemStack(ModItems.dust));
}
}
}
}
public static void registerOverrides() {
ShredderRecipes.setRecipe(ModItems.scrap, new ItemStack(ModItems.dust));
ShredderRecipes.setRecipe(ModItems.dust, new ItemStack(ModItems.dust));
ShredderRecipes.setRecipe(Blocks.glowstone, new ItemStack(Items.glowstone_dust, 4));
ShredderRecipes.setRecipe(new ItemStack(Blocks.quartz_block, 1, 0), new ItemStack(ModItems.powder_quartz, 4));
ShredderRecipes.setRecipe(new ItemStack(Blocks.quartz_block, 1, 1), new ItemStack(ModItems.powder_quartz, 4));
ShredderRecipes.setRecipe(new ItemStack(Blocks.quartz_block, 1, 2), new ItemStack(ModItems.powder_quartz, 4));
ShredderRecipes.setRecipe(Blocks.quartz_stairs, new ItemStack(ModItems.powder_quartz, 3));
ShredderRecipes.setRecipe(new ItemStack(Blocks.stone_slab, 1, 7), new ItemStack(ModItems.powder_quartz, 2));
ShredderRecipes.setRecipe(Items.quartz, new ItemStack(ModItems.powder_quartz));
ShredderRecipes.setRecipe(Blocks.quartz_ore, new ItemStack(ModItems.powder_quartz, 2));
ShredderRecipes.setRecipe(ModBlocks.ore_nether_fire, new ItemStack(ModItems.powder_fire, 6));
ShredderRecipes.setRecipe(Blocks.packed_ice, new ItemStack(ModItems.powder_ice, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_light, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(ModBlocks.concrete, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.concrete_smooth, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_concrete, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_concrete_mossy, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_concrete_cracked, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_concrete_broken, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(ModBlocks.brick_obsidian, new ItemStack(ModBlocks.gravel_obsidian, 1));
ShredderRecipes.setRecipe(Blocks.obsidian, new ItemStack(ModBlocks.gravel_obsidian, 1));
ShredderRecipes.setRecipe(Blocks.stone, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(Blocks.cobblestone, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(Blocks.stonebrick, new ItemStack(Blocks.gravel, 1));
ShredderRecipes.setRecipe(Blocks.gravel, new ItemStack(Blocks.sand, 1));
ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2));
ShredderRecipes.setRecipe(Blocks.brick_block, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(Blocks.brick_stairs, new ItemStack(Items.clay_ball, 3));
ShredderRecipes.setRecipe(Items.flower_pot, new ItemStack(Items.clay_ball, 3));
ShredderRecipes.setRecipe(Items.brick, new ItemStack(Items.clay_ball, 1));
ShredderRecipes.setRecipe(Blocks.sandstone, new ItemStack(Blocks.sand, 4));
ShredderRecipes.setRecipe(Blocks.sandstone_stairs, new ItemStack(Blocks.sand, 6));
ShredderRecipes.setRecipe(Blocks.clay, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(Blocks.hardened_clay, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(Blocks.tnt, new ItemStack(Items.gunpowder, 5));
ShredderRecipes.setRecipe(ModItems.powder_quartz, new ItemStack(ModItems.powder_lithium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.powder_lapis, new ItemStack(ModItems.powder_cobalt_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_neodymium, new ItemStack(ModItems.powder_neodymium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_cobalt, new ItemStack(ModItems.powder_cobalt_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_niobium, new ItemStack(ModItems.powder_niobium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_cerium, new ItemStack(ModItems.powder_cerium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_lanthanium, new ItemStack(ModItems.powder_lanthanium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_actinium, new ItemStack(ModItems.powder_actinium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_meteorite, new ItemStack(ModItems.powder_meteorite_tiny, 1));
ShredderRecipes.setRecipe(ModBlocks.block_meteor, new ItemStack(ModItems.powder_meteorite, 10));
ShredderRecipes.setRecipe(Items.enchanted_book, new ItemStack(ModItems.powder_magic, 1));
ShredderRecipes.setRecipe(ModItems.arc_electrode_burnt, new ItemStack(ModItems.powder_coal, 1));
ShredderRecipes.setRecipe(ModItems.arc_electrode_desh, new ItemStack(ModItems.powder_desh, 2));
ShredderRecipes.setRecipe(ModBlocks.meteor_polished, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.meteor_brick, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.meteor_brick_mossy, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.meteor_brick_cracked, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.meteor_brick_chiseled, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.meteor_pillar, new ItemStack(ModItems.powder_meteorite, 1));
ShredderRecipes.setRecipe(ModBlocks.ore_rare, new ItemStack(ModItems.powder_desh_mix, 1));
ShredderRecipes.setRecipe(ModItems.crystal_iron, new ItemStack(ModItems.powder_iron, 3));
ShredderRecipes.setRecipe(ModItems.crystal_gold, new ItemStack(ModItems.powder_iron, 3));
ShredderRecipes.setRecipe(ModItems.crystal_redstone, new ItemStack(Items.redstone, 8));
ShredderRecipes.setRecipe(ModItems.crystal_uranium, new ItemStack(ModItems.powder_uranium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_plutonium, new ItemStack(ModItems.powder_plutonium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_thorium, new ItemStack(ModItems.powder_thorium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_titanium, new ItemStack(ModItems.powder_titanium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_sulfur, new ItemStack(ModItems.sulfur, 8));
ShredderRecipes.setRecipe(ModItems.crystal_niter, new ItemStack(ModItems.niter, 8));
ShredderRecipes.setRecipe(ModItems.crystal_copper, new ItemStack(ModItems.powder_copper, 3));
ShredderRecipes.setRecipe(ModItems.crystal_tungsten, new ItemStack(ModItems.powder_tungsten, 3));
ShredderRecipes.setRecipe(ModItems.crystal_aluminium, new ItemStack(ModItems.powder_aluminium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_fluorite, new ItemStack(ModItems.fluorite, 8));
ShredderRecipes.setRecipe(ModItems.crystal_beryllium, new ItemStack(ModItems.powder_beryllium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_lead, new ItemStack(ModItems.powder_lead, 3));
ShredderRecipes.setRecipe(ModItems.crystal_schrabidium, new ItemStack(ModItems.powder_schrabidium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_rare, new ItemStack(ModItems.powder_desh_mix, 2));
ShredderRecipes.setRecipe(ModItems.crystal_phosphorus, new ItemStack(ModItems.powder_fire, 8));
ShredderRecipes.setRecipe(ModItems.crystal_trixite, new ItemStack(ModItems.powder_plutonium, 6));
ShredderRecipes.setRecipe(ModItems.crystal_lithium, new ItemStack(ModItems.powder_lithium, 3));
ShredderRecipes.setRecipe(ModItems.crystal_starmetal, new ItemStack(ModItems.powder_dura_steel, 6));
for(int i = 0; i < 16; i++) {
ShredderRecipes.setRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Items.string, 4));
}
}
public static ItemStack getDustByName(String name) {
List<ItemStack> matches = OreDictionary.getOres("dust" + name);
if(matches != null && !matches.isEmpty())
return matches.get(0).copy();
return new ItemStack(ModItems.scrap);
}
public static void setRecipe(Item in, ItemStack out) {
shredderRecipes.put(new ComparableStack(in), out);
}
public static void setRecipe(Block in, ItemStack out) {
shredderRecipes.put(new ComparableStack(in), out);
}
public static void setRecipe(ItemStack in, ItemStack out) {
shredderRecipes.put(new ComparableStack(in), out);
}
public static Map<Object, Object> getShredderRecipes() {
//convert the map only once to save on processing power (might be more ram intensive but that can't be THAT bad, right?)
if(neiShredderRecipes == null)
neiShredderRecipes = new HashMap(shredderRecipes);
return neiShredderRecipes;
}
public static ItemStack getShredderResult(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return new ItemStack(ModItems.scrap);
ItemStack sta = shredderRecipes.get(new ComparableStack(stack).makeSingular());
/*if(sta != null)
System.out.println(stack.getDisplayName() + " resulted " + sta.getDisplayName());
else
System.out.println(stack.getDisplayName() + " resulted null");*/
return sta == null ? new ItemStack(ModItems.scrap) : sta;
}
}

View File

@ -20,6 +20,8 @@ public class ContainerCrystallizer extends Container {
this.addSlotToContainer(new Slot(tedf, 0, 80, 35));
this.addSlotToContainer(new Slot(tedf, 1, 8, 53));
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 140, 35));
this.addSlotToContainer(new Slot(tedf, 3, 26, 17));
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 25, 53));
for(int i = 0; i < 3; i++)
{
@ -51,10 +53,11 @@ public class ContainerCrystallizer extends Container {
{
return null;
}
}
else if (!this.mergeItemStack(var5, 0, diFurnace.getSizeInventory(), false))
{
return null;
} else {
if (!this.mergeItemStack(var5, 0, 2, false))
if (!this.mergeItemStack(var5, 3, 4, false))
return null;
}
if (var5.stackSize == 0)

View File

@ -2,6 +2,7 @@ package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.container.ContainerCrystallizer;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineCrystallizer;
@ -13,7 +14,7 @@ import net.minecraft.util.ResourceLocation;
public class GUICrystallizer extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_crystallizer.png");
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_crystallizer.png");
private TileEntityMachineCrystallizer acidomatic;
public GUICrystallizer(InventoryPlayer invPlayer, TileEntityMachineCrystallizer acidomatic) {
@ -24,6 +25,14 @@ public class GUICrystallizer extends GuiInfoContainer {
this.ySize = 168;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 51 - 34, 16, 34, acidomatic.power, acidomatic.maxPower);
acidomatic.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 17, 16, 52);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.acidomatic.hasCustomInventoryName() ? this.acidomatic.getInventoryName() : I18n.format(this.acidomatic.getInventoryName());
@ -37,5 +46,14 @@ public class GUICrystallizer extends GuiInfoContainer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int i = (int)acidomatic.getPowerScaled(34);
drawTexturedModalRect(guiLeft + 8, guiTop + 51 - i, 176, 34 - i, 16, i);
int j = acidomatic.getProgressScaled(23);
drawTexturedModalRect(guiLeft + 104, guiTop + 34, 192, 0, j, 16);
Minecraft.getMinecraft().getTextureManager().bindTexture(acidomatic.tank.getSheet());
acidomatic.tank.renderTank(this, guiLeft + 44, guiTop + 69, acidomatic.tank.getTankType().textureX() * FluidTank.x, acidomatic.tank.getTankType().textureY() * FluidTank.y, 16, 52);
}
}

View File

@ -226,6 +226,28 @@ public class ModItems {
public static Item solid_fuel;
public static Item rocket_fuel;
public static Item crystal_iron;
public static Item crystal_gold;
public static Item crystal_redstone;
public static Item crystal_uranium;
public static Item crystal_thorium;
public static Item crystal_plutonium;
public static Item crystal_titanium;
public static Item crystal_sulfur;
public static Item crystal_niter;
public static Item crystal_copper;
public static Item crystal_tungsten;
public static Item crystal_aluminium;
public static Item crystal_fluorite;
public static Item crystal_beryllium;
public static Item crystal_lead;
public static Item crystal_schrabidium;
public static Item crystal_rare;
public static Item crystal_phosphorus;
public static Item crystal_lithium;
public static Item crystal_starmetal;
public static Item crystal_trixite;
public static Item powder_lead;
public static Item powder_neptunium;
public static Item powder_schrabidium;
@ -645,6 +667,7 @@ public class ModItems {
public static Item jetpack_tank;
public static Item gun_kit_1;
public static Item gun_kit_2;
public static Item cbt_device;
public static Item can_empty;
public static Item can_smart;
@ -1587,6 +1610,7 @@ public class ModItems {
public static Item shimmer_sledge;
public static Item shimmer_axe;
public static Item bottle_opener;
public static Item pch;
public static Item crowbar;
@ -2051,6 +2075,28 @@ public class ModItems {
nugget_les = new ItemRadioactive(0.5F, false, true).setUnlocalizedName("nugget_les").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_les");
plate_combine_steel = new Item().setUnlocalizedName("plate_combine_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_combine_steel");
crystal_iron = new Item().setUnlocalizedName("crystal_iron").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_iron");
crystal_gold = new Item().setUnlocalizedName("crystal_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_gold");
crystal_redstone = new Item().setUnlocalizedName("crystal_redstone").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_redstone");
crystal_uranium = new ItemRadioactive(0.75F).setUnlocalizedName("crystal_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_uranium");
crystal_thorium = new Item().setUnlocalizedName("crystal_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_thorium");
crystal_plutonium = new ItemRadioactive(3.0F).setUnlocalizedName("crystal_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_plutonium");
crystal_titanium = new Item().setUnlocalizedName("crystal_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_titanium");
crystal_sulfur = new Item().setUnlocalizedName("crystal_sulfur").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_sulfur");
crystal_niter = new Item().setUnlocalizedName("crystal_niter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_niter");
crystal_copper = new Item().setUnlocalizedName("crystal_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_copper");
crystal_tungsten = new Item().setUnlocalizedName("crystal_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_tungsten");
crystal_aluminium = new Item().setUnlocalizedName("crystal_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_aluminium");
crystal_fluorite = new Item().setUnlocalizedName("crystal_fluorite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_fluorite");
crystal_beryllium = new Item().setUnlocalizedName("crystal_beryllium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_beryllium");
crystal_lead = new Item().setUnlocalizedName("crystal_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_lead");
crystal_schrabidium = new ItemRadioactive(10F, false, true).setUnlocalizedName("crystal_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_schrabidium");
crystal_rare = new Item().setUnlocalizedName("crystal_rare").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_rare");
crystal_phosphorus = new ItemRadioactive(0.0F, true).setUnlocalizedName("crystal_phosphorus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_phosphorus");
crystal_lithium = new Item().setUnlocalizedName("crystal_lithium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_lithium");
crystal_starmetal = new Item().setUnlocalizedName("crystal_starmetal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_starmetal");
crystal_trixite = new ItemRadioactive(10.0F).setUnlocalizedName("crystal_trixite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":crystal_trixite");
powder_lead = new Item().setUnlocalizedName("powder_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lead");
powder_neptunium = new ItemRadioactive(2.5F, true).setUnlocalizedName("powder_neptunium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_neptunium");
powder_schrabidium = new ItemRadioactive(7.5F, true, true).setUnlocalizedName("powder_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_schrabidium");
@ -2430,6 +2476,7 @@ public class ModItems {
cladding_rubber = new ItemCladding(0.075F).setUnlocalizedName("cladding_rubber").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_rubber");
cladding_lead = new ItemCladding(0.2F).setUnlocalizedName("cladding_lead").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_lead");
cladding_desh = new ItemCladding(0.4F).setUnlocalizedName("cladding_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cladding_desh");
cbt_device = new ItemSyringe().setUnlocalizedName("cbt_device").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":cbt_device");
can_empty = new Item().setUnlocalizedName("can_empty").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_empty");
can_smart = new ItemEnergy().setUnlocalizedName("can_smart").setContainerItem(ModItems.can_empty).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_smart");
@ -3596,6 +3643,7 @@ public class ModItems {
wrench = new WeaponSpecial(MainRegistry.tMatSteel).setUnlocalizedName("wrench").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":wrench");
wrench_flipped = new WeaponSpecial(MainRegistry.tMatElec).setUnlocalizedName("wrench_flipped").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":wrench_flipped");
memespoon = new WeaponSpecial(MainRegistry.tMatSteel).setUnlocalizedName("memespoon").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":memespoon");
pch = new WeaponSpecial(MainRegistry.tMatHammmer).setUnlocalizedName("pch").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pch");
multitool_hit = new ItemMultitoolPassive().setUnlocalizedName("multitool_hit").setCreativeTab(null).setTextureName(RefStrings.MODID + ":multitool_fist");
multitool_dig = new ItemMultitoolTool(4.0F, MainRegistry.enumToolMaterialMultitool, ItemMultitoolTool.getAllBlocks()).setFull3D().setUnlocalizedName("multitool_dig").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":multitool_claw");
@ -3927,6 +3975,29 @@ public class ModItems {
GameRegistry.registerItem(cordite, cordite.getUnlocalizedName());
GameRegistry.registerItem(ballistite, ballistite.getUnlocalizedName());
//Crystals
GameRegistry.registerItem(crystal_iron, crystal_iron.getUnlocalizedName());
GameRegistry.registerItem(crystal_gold, crystal_gold.getUnlocalizedName());
GameRegistry.registerItem(crystal_redstone, crystal_redstone.getUnlocalizedName());
GameRegistry.registerItem(crystal_uranium, crystal_uranium.getUnlocalizedName());
GameRegistry.registerItem(crystal_thorium, crystal_thorium.getUnlocalizedName());
GameRegistry.registerItem(crystal_plutonium, crystal_plutonium.getUnlocalizedName());
GameRegistry.registerItem(crystal_titanium, crystal_titanium.getUnlocalizedName());
GameRegistry.registerItem(crystal_sulfur, crystal_sulfur.getUnlocalizedName());
GameRegistry.registerItem(crystal_niter, crystal_niter.getUnlocalizedName());
GameRegistry.registerItem(crystal_copper, crystal_copper.getUnlocalizedName());
GameRegistry.registerItem(crystal_tungsten, crystal_tungsten.getUnlocalizedName());
GameRegistry.registerItem(crystal_aluminium, crystal_aluminium.getUnlocalizedName());
GameRegistry.registerItem(crystal_fluorite, crystal_fluorite.getUnlocalizedName());
GameRegistry.registerItem(crystal_beryllium, crystal_beryllium.getUnlocalizedName());
GameRegistry.registerItem(crystal_lead, crystal_lead.getUnlocalizedName());
GameRegistry.registerItem(crystal_schrabidium, crystal_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(crystal_rare, crystal_rare.getUnlocalizedName());
GameRegistry.registerItem(crystal_phosphorus, crystal_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(crystal_lithium, crystal_lithium.getUnlocalizedName());
GameRegistry.registerItem(crystal_starmetal, crystal_starmetal.getUnlocalizedName());
GameRegistry.registerItem(crystal_trixite, crystal_trixite.getUnlocalizedName());
//Fragments
GameRegistry.registerItem(fragment_neodymium, fragment_neodymium.getUnlocalizedName());
GameRegistry.registerItem(fragment_cobalt, fragment_cobalt.getUnlocalizedName());
@ -5135,6 +5206,7 @@ public class ModItems {
GameRegistry.registerItem(schrabidium_hammer, schrabidium_hammer.getUnlocalizedName());
GameRegistry.registerItem(shimmer_sledge, shimmer_sledge.getUnlocalizedName());
GameRegistry.registerItem(shimmer_axe, shimmer_axe.getUnlocalizedName());
GameRegistry.registerItem(pch, pch.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_pickaxe, schrabidium_pickaxe.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_axe, schrabidium_axe.getUnlocalizedName());
GameRegistry.registerItem(schrabidium_shovel, schrabidium_shovel.getUnlocalizedName());
@ -5316,6 +5388,7 @@ public class ModItems {
//Chaos
GameRegistry.registerItem(chocolate_milk, chocolate_milk.getUnlocalizedName());
GameRegistry.registerItem(cbt_device, cbt_device.getUnlocalizedName());
//Cladding
GameRegistry.registerItem(cladding_paint, cladding_paint.getUnlocalizedName());

View File

@ -356,6 +356,17 @@ public class ItemSyringe extends Item {
}
}
if(this == ModItems.cbt_device)
{
if (!world.isRemote)
{
player.addPotionEffect(new PotionEffect(HbmPotion.bang.id, 30, 0));
stack.stackSize--;
world.playSoundAtEntity(player, "hbm:item.vice", 1.0F, 1.0F);
}
}
return stack;
}

View File

@ -10,11 +10,13 @@ import com.hbm.entity.projectile.EntityRubble;
import com.hbm.handler.ArmorUtil;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
@ -63,6 +65,37 @@ public class WeaponSpecial extends ItemSword {
world.playSoundAtEntity(entity, "hbm:weapon.bonk", 3.0F, 1.0F);
}
if(this == ModItems.pch) {
world.playSoundAtEntity(entity, "hbm:weapon.bodysplat", 10.0F, 1.0F);
if(entity instanceof EntityHorse) {
for(int i = 0; i < 10; i++) {
EntityHorse horse = (EntityHorse) ((EntityHorse) entity).createChild((EntityHorse)entity);
horse.setPositionAndRotation(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
horse.setGrowingAge(-24000);
world.spawnEntityInWorld(horse);
}
return false;
}
if (!world.isRemote)
{
entity.addPotionEffect(new PotionEffect(HbmPotion.bang.id, 20, 0));
}
Vec3 vec = entityPlayer.getLookVec();
double dX = vec.xCoord * 10;
double dY = vec.yCoord * 10;
double dZ = vec.zCoord * 10;
entity.motionX += dX;
entity.motionY += dY;
entity.motionZ += dZ;
}
if(this == ModItems.bottle_opener) {
if (!world.isRemote)
{
@ -239,6 +272,9 @@ public class WeaponSpecial extends ItemSword {
list.add("Even though it says \"+1000000000");
list.add("damage\", it's actually \"onehit anything\"");
}
if(this == ModItems.pch) {
list.add("How am I not locked up yet?");
}
if(this == ModItems.ullapool_caber) {
list.add("High-yield Scottish face removal.");
list.add("A sober person would throw it...");

View File

@ -52,12 +52,8 @@ public class Library {
static Random rand = new Random();
public static List<String> book1 = new ArrayList<String>();
public static List<String> book2 = new ArrayList<String>();
public static List<String> book3 = new ArrayList<String>();
public static List<String> book4 = new ArrayList<String>();
public static List<String> book5 = new ArrayList<String>();
//this is a list of UUIDs used for various things, primarily for accessories.
//for a comprehensive list, check RenderAccessoryUtility.java
public static String HbMinecraft = "192af5d7-ed0f-48d8-bd89-9d41af8524f8";
public static String LPkukin = "937c9804-e11f-4ad2-a5b1-42e62ac73077";
public static String Dafnik = "3af1c262-61c0-4b12-a4cb-424cc3a9c8c0";
@ -74,12 +70,10 @@ public class Library {
public static String ZippySqrl = "03c20435-a229-489a-a1a1-671b803f7017";
public static String Schrabby = "3a4a1944-5154-4e67-b80a-b6561e8630b7";
//the old list that allowed superuser mode for the ZOMG
//currently unused
public static List<String> superuser = new ArrayList<String>();
public static void initBooks() {
}
public static void applyRadData(Entity e, float f) {
if(!(e instanceof EntityLivingBase))

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3522)";
public static final String VERSION = "1.0.27 BETA (3528)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -31,83 +31,14 @@ import com.hbm.entity.mob.*;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;
import com.hbm.items.ModItems;
import com.hbm.particle.ParticleContrail;
import com.hbm.particle.ParticleExSmoke;
import com.hbm.particle.ParticleRadiationFog;
import com.hbm.particle.ParticleRocketFlame;
import com.hbm.particle.ParticleSmokePlume;
import com.hbm.particle.*;
import com.hbm.render.block.*;
import com.hbm.render.entity.*;
import com.hbm.render.entity.effect.ElectricityRenderer;
import com.hbm.render.entity.effect.FogRenderer;
import com.hbm.render.entity.effect.GasFlameRenderer;
import com.hbm.render.entity.effect.GasRenderer;
import com.hbm.render.entity.effect.MultiCloudRenderer;
import com.hbm.render.entity.effect.RenderBigNuke;
import com.hbm.render.entity.effect.RenderBlackHole;
import com.hbm.render.entity.effect.RenderCloudFleija;
import com.hbm.render.entity.effect.RenderCloudRainbow;
import com.hbm.render.entity.effect.RenderCloudSolinium;
import com.hbm.render.entity.effect.RenderDeathBlast;
import com.hbm.render.entity.effect.RenderEMPBlast;
import com.hbm.render.entity.effect.RenderFallout;
import com.hbm.render.entity.effect.RenderFireball;
import com.hbm.render.entity.effect.RenderFlare;
import com.hbm.render.entity.effect.RenderNoCloud;
import com.hbm.render.entity.effect.RenderSmallNukeMK3;
import com.hbm.render.entity.effect.SSmokeRenderer;
import com.hbm.render.entity.effect.SpillRenderer;
import com.hbm.render.entity.effect.TSmokeRenderer;
import com.hbm.render.entity.item.RenderBomber;
import com.hbm.render.entity.item.RenderMinecartTest;
import com.hbm.render.entity.item.RenderMovingItem;
import com.hbm.render.entity.mob.RenderCyberCrab;
import com.hbm.render.entity.mob.RenderHunterChopper;
import com.hbm.render.entity.mob.RenderNuclearCreeper;
import com.hbm.render.entity.mob.RenderTaintCrab;
import com.hbm.render.entity.mob.RenderTaintedCreeper;
import com.hbm.render.entity.mob.RenderTeslaCrab;
import com.hbm.render.entity.projectile.RenderBaleflare;
import com.hbm.render.entity.projectile.RenderBeam;
import com.hbm.render.entity.projectile.RenderBeam2;
import com.hbm.render.entity.projectile.RenderBeam3;
import com.hbm.render.entity.projectile.RenderBeam4;
import com.hbm.render.entity.projectile.RenderBeam5;
import com.hbm.render.entity.projectile.RenderBeam6;
import com.hbm.render.entity.projectile.RenderBombletSelena;
import com.hbm.render.entity.projectile.RenderBombletTheta;
import com.hbm.render.entity.projectile.RenderBoxcar;
import com.hbm.render.entity.projectile.RenderBullet;
import com.hbm.render.entity.projectile.RenderChopperMine;
import com.hbm.render.entity.projectile.RenderFOEQ;
import com.hbm.render.entity.projectile.RenderFallingNuke;
import com.hbm.render.entity.projectile.RenderLN2;
import com.hbm.render.entity.projectile.RenderLaser;
import com.hbm.render.entity.projectile.RenderMeteor;
import com.hbm.render.entity.projectile.RenderMiniMIRV;
import com.hbm.render.entity.projectile.RenderMiniNuke;
import com.hbm.render.entity.projectile.RenderMirv;
import com.hbm.render.entity.projectile.RenderOminousBullet;
import com.hbm.render.entity.projectile.RenderRainbow;
import com.hbm.render.entity.projectile.RenderRocket;
import com.hbm.render.entity.projectile.RenderRubble;
import com.hbm.render.entity.projectile.RenderSRocket;
import com.hbm.render.entity.projectile.RenderShrapnel;
import com.hbm.render.entity.projectile.RenderTom;
import com.hbm.render.entity.rocket.RenderBoosterMissile;
import com.hbm.render.entity.rocket.RenderCarrierMissile;
import com.hbm.render.entity.rocket.RenderMinerRocket;
import com.hbm.render.entity.rocket.RenderMissileCustom;
import com.hbm.render.entity.rocket.RenderMissileDoomsday;
import com.hbm.render.entity.rocket.RenderMissileGeneric;
import com.hbm.render.entity.rocket.RenderMissileHuge;
import com.hbm.render.entity.rocket.RenderMissileMirv;
import com.hbm.render.entity.rocket.RenderMissileNuclear;
import com.hbm.render.entity.rocket.RenderMissileStrong;
import com.hbm.render.entity.rocket.RenderMissileTaint;
import com.hbm.render.entity.rocket.RenderMissileThermo;
import com.hbm.render.entity.rocket.RenderSoyuz;
import com.hbm.render.entity.rocket.RenderSoyuzCapsule;
import com.hbm.render.entity.effect.*;
import com.hbm.render.entity.item.*;
import com.hbm.render.entity.mob.*;
import com.hbm.render.entity.projectile.*;
import com.hbm.render.entity.rocket.*;
import com.hbm.render.item.*;
import com.hbm.render.loader.HmfModelLoader;
import com.hbm.render.tileentity.*;
@ -216,7 +147,6 @@ public class ClientProxy extends ServerProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
//RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new RenderRocket());
RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new RenderSnowball(ModItems.man_core));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg, new ItemRenderRpg());
@ -252,7 +182,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadePlasma.class, new RenderSnowball(ModItems.grenade_plasma));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeTau.class, new RenderSnowball(ModItems.grenade_tau));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeLemon.class, new RenderSnowball(ModItems.grenade_lemon));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeMk2.class, new RenderSnowball(ModItems.grenade_mk2));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeMk2.class, new RenderGrenade());
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeZOMG.class, new RenderSnowball(ModItems.grenade_zomg));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeASchrab.class, new RenderSnowball(ModItems.grenade_aschrab));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadePulse.class, new RenderSnowball(ModItems.grenade_pulse));
@ -381,6 +311,7 @@ public class ClientProxy extends ServerProxy
MinecraftForgeClient.registerItemRenderer(ModItems.shimmer_axe, new ItemRenderShim());
MinecraftForgeClient.registerItemRenderer(ModItems.stopsign, new ItemRenderShim());
MinecraftForgeClient.registerItemRenderer(ModItems.sopsign, new ItemRenderShim());
MinecraftForgeClient.registerItemRenderer(ModItems.pch, new ItemRenderShim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_brimstone, new ItemRenderObj());

View File

@ -38,6 +38,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bolt_compound, 1), new Object[] { "PDP", "PTP", "PDP", 'D', ModItems.bolt_dura_steel, 'T', ModItems.bolt_tungsten, 'P', "plateTitanium" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_coal, 1), new Object[] { "PFP", "FOF", "PFP", 'P', "dustCoal", 'F', Items.flint, 'O', ModBlocks.gravel_obsidian }));
GameRegistry.addRecipe(new ItemStack(ModItems.plate_polymer, 8), new Object[] { "DD", 'D', ModItems.ingot_polymer});
GameRegistry.addRecipe(new ItemStack(ModItems.plate_polymer, 16), new Object[] { "DD", 'D', ModItems.ingot_fiberglass});
GameRegistry.addRecipe(new ItemStack(ModItems.plate_polymer, 16), new Object[] { "DD", 'D', ModItems.ingot_asbestos});
GameRegistry.addRecipe(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "SWS", 'S', Items.string, 'W', Blocks.wool });
GameRegistry.addRecipe(new ItemStack(ModItems.plate_polymer, 4), new Object[] { "BB", 'B', Items.brick });
@ -516,6 +518,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.shimmer_handle, 1), new Object[] { "GP", "GP", "GP", 'G', "plateGold", 'P', "ingotPolymer" }));
GameRegistry.addRecipe(new ItemStack(ModItems.shimmer_sledge, 1), new Object[] { "H", "G", "G", 'G', ModItems.shimmer_handle, 'H', ModItems.shimmer_head });
GameRegistry.addRecipe(new ItemStack(ModItems.shimmer_axe, 1), new Object[] { "H", "G", "G", 'G', ModItems.shimmer_handle, 'H', ModItems.shimmer_axe_head });
GameRegistry.addRecipe(new ItemStack(ModItems.pch, 1), new Object[] { "CDC", "CBC", "CHC", 'C', ModItems.canned_jizz, 'D', ModItems.ducttape, 'B', ModItems.fluid_barrel_empty, 'H', ModItems.schrabidium_hammer });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.definitelyfood, 1), new Object[] { "DDD", "SDS", "DDD", 'D', Blocks.dirt, 'S', "plateSteel" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blade_tungsten, 2), new Object[] { "IP", "TP", "TI", 'P', "plateTitanium", 'T', "ingotTitanium", 'I', "ingotTungsten" }));
GameRegistry.addRecipe(new ItemStack(ModItems.turbine_tungsten, 1), new Object[] { "BBB", "BSB", "BBB", 'B', ModItems.blade_tungsten, 'S', ModItems.ingot_dura_steel });
@ -523,6 +526,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wrench, 1), new Object[] { " S ", " IS", "I ", 'S', "ingotSteel", 'I', "ingotIron" }));
GameRegistry.addRecipe(new ItemStack(ModItems.wrench_flipped, 1), new Object[] { "S", "D", "W", 'S', Items.iron_sword, 'D', ModItems.ducttape, 'W', ModItems.wrench });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.memespoon, 1), new Object[] { "CGC", "PSP", "IAI", 'C', ModItems.powder_cloud, 'G', ModBlocks.block_thorium, 'P', ModItems.photo_panel, 'S', ModItems.steel_shovel, 'I', ModItems.plate_polymer, 'A', "ingotAustralium" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.cbt_device, 1), new Object[] { ModItems.bolt_tungsten, ModItems.wrench });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.toothpicks, 3), new Object[] { Items.stick, Items.stick, Items.stick });
GameRegistry.addShapedRecipe(new ItemStack(ModItems.ducttape, 6), new Object[] { "FSF", "SPS", "FSF", 'F', Items.string, 'S', Items.slime_ball, 'P', Items.paper });
@ -1519,6 +1523,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cladding_rubber, 1), new Object[] { "RCR", "CDC", "RCR", 'R', ModItems.plate_polymer, 'C', "dustCoal", 'D', ModItems.ducttape }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cladding_lead, 1), new Object[] { "DPD", "PRP", "DPD", 'R', ModItems.cladding_rubber, 'P', "plateLead", 'D', ModItems.ducttape }));
GameRegistry.addRecipe(new ItemStack(ModItems.cladding_desh, 1), new Object[] { "DPD", "PRP", "DPD", 'R', ModItems.cladding_lead, 'P', ModItems.plate_desh, 'D', ModItems.ducttape });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_crystallizer, 1), new Object[] { "PMP", "STS", "DMD", 'P', "ingotPolymer", 'M', ModItems.motor, 'S', ModItems.blades_advanced_alloy, 'T', ModItems.tank_steel, 'D', "ingotDesh" }));
}
@ -1598,5 +1603,27 @@ public class CraftingManager {
GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 15), new ItemStack(Items.slime_ball, 1), 0.0F);
GameRegistry.addSmelting(new ItemStack(Blocks.gravel, 1), new ItemStack(Blocks.cobblestone, 1), 0.0F);
GameRegistry.addSmelting(new ItemStack(ModBlocks.gravel_obsidian), new ItemStack(Blocks.obsidian), 0.0F);
GameRegistry.addSmelting(ModItems.crystal_iron, new ItemStack(Items.iron_ingot, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_gold, new ItemStack(Items.gold_ingot, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_redstone, new ItemStack(Items.redstone, 6), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_uranium, new ItemStack(ModItems.ingot_uranium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_thorium, new ItemStack(ModItems.ingot_th232, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_plutonium, new ItemStack(ModItems.ingot_plutonium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_titanium, new ItemStack(ModItems.ingot_titanium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_sulfur, new ItemStack(ModItems.sulfur, 6), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_niter, new ItemStack(ModItems.niter, 6), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_copper, new ItemStack(ModItems.ingot_copper, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_tungsten, new ItemStack(ModItems.ingot_tungsten, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_aluminium, new ItemStack(ModItems.ingot_aluminium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_fluorite, new ItemStack(ModItems.fluorite, 6), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_beryllium, new ItemStack(ModItems.ingot_beryllium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_lead, new ItemStack(ModItems.ingot_lead, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_schrabidium, new ItemStack(ModItems.ingot_schrabidium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_rare, new ItemStack(ModItems.powder_desh_mix, 1), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_phosphorus, new ItemStack(ModItems.powder_fire, 6), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_lithium, new ItemStack(ModItems.lithium, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_starmetal, new ItemStack(ModItems.ingot_starmetal, 2), 2.0F);
GameRegistry.addSmelting(ModItems.crystal_trixite, new ItemStack(ModItems.ingot_plutonium, 4), 2.0F);
}
}

View File

@ -5,7 +5,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.dispenser.BehaviorProjectileDispense;
import net.minecraft.dispenser.IPosition;
import net.minecraft.entity.IProjectile;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
@ -374,6 +373,7 @@ public class MainRegistry
BulletConfigSyncingUtil.loadConfigsForSync();
CellularDungeonFactory.init();
Satellite.register();
VersionChecker.checkVersion();
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
@ -381,10 +381,6 @@ public class MainRegistry
Library.superuser.add("3af1c262-61c0-4b12-a4cb-424cc3a9c8c0");
Library.superuser.add("4729b498-a81c-42fd-8acd-20d6d9f759e0");
Library.superuser.add("c3f5e449-6d8c-4fe3-acc9-47ef50e7e7ae");
//until he manages to do the most basic thing and INSTALL NEI
//Library.superuser.add("122fe98f-be19-49ca-a96b-d4dee4f0b22e");
Library.initBooks();
aMatSchrab.customCraftingMaterial = ModItems.ingot_schrabidium;
aMatHaz.customCraftingMaterial = ModItems.hazmat_cloth;
@ -1252,7 +1248,7 @@ public class MainRegistry
OreDictionary.registerOre("oreSchrabidium", ModBlocks.ore_schrabidium);
OreDictionary.registerOre("oreSulfur", ModBlocks.ore_sulfur);
OreDictionary.registerOre("oreNiter", ModBlocks.ore_niter);
OreDictionary.registerOre("oreSapeter", ModBlocks.ore_niter);
OreDictionary.registerOre("oreSalpeter", ModBlocks.ore_niter);
OreDictionary.registerOre("oreCopper", ModBlocks.ore_copper);
OreDictionary.registerOre("oreTungsten", ModBlocks.ore_tungsten);
OreDictionary.registerOre("oreAluminum", ModBlocks.ore_aluminium);
@ -1321,68 +1317,10 @@ public class MainRegistry
@EventHandler
public static void PostLoad(FMLPostInitializationEvent PostEvent)
{
MachineRecipes.registerShredder();
ShredderRecipes.registerShredder();
ShredderRecipes.registerOverrides();
CrystallizerRecipes.register();
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.scrap), new ItemStack(ModItems.dust));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.dust), new ItemStack(ModItems.dust));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.glowstone), new ItemStack(Items.glowstone_dust, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 0), new ItemStack(ModItems.powder_quartz, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 1), new ItemStack(ModItems.powder_quartz, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 2), new ItemStack(ModItems.powder_quartz, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_stairs), new ItemStack(ModItems.powder_quartz, 3));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stone_slab, 1, 7), new ItemStack(ModItems.powder_quartz, 2));
MachineRecipes.overridePreSetRecipe(new ItemStack(Items.quartz), new ItemStack(ModItems.powder_quartz));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_ore), new ItemStack(ModItems.powder_quartz, 2));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.powder_fire, 6));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.packed_ice), new ItemStack(ModItems.powder_ice, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_light), new ItemStack(Items.clay_ball, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.concrete), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.concrete_smooth), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_mossy), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_cracked), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_broken), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.gravel, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.gravel), new ItemStack(Blocks.sand, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.sand), new ItemStack(ModItems.dust, 2));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.brick_block), new ItemStack(Items.clay_ball, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.brick_stairs), new ItemStack(Items.clay_ball, 3));
MachineRecipes.overridePreSetRecipe(new ItemStack(Items.flower_pot), new ItemStack(Items.clay_ball, 3));
MachineRecipes.overridePreSetRecipe(new ItemStack(Items.brick), new ItemStack(Items.clay_ball, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.sandstone), new ItemStack(Blocks.sand, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.sandstone_stairs), new ItemStack(Blocks.sand, 6));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.clay), new ItemStack(Items.clay_ball, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.hardened_clay), new ItemStack(Items.clay_ball, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.tnt), new ItemStack(Items.gunpowder, 5));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.powder_quartz), new ItemStack(ModItems.powder_lithium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.powder_lapis), new ItemStack(ModItems.powder_cobalt_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_neodymium), new ItemStack(ModItems.powder_neodymium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_cobalt), new ItemStack(ModItems.powder_cobalt_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_niobium), new ItemStack(ModItems.powder_niobium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_cerium), new ItemStack(ModItems.powder_cerium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_lanthanium), new ItemStack(ModItems.powder_lanthanium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_actinium), new ItemStack(ModItems.powder_actinium_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.fragment_meteorite), new ItemStack(ModItems.powder_meteorite_tiny, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.block_meteor), new ItemStack(ModItems.powder_meteorite, 10));
MachineRecipes.overridePreSetRecipe(new ItemStack(Items.enchanted_book), new ItemStack(ModItems.powder_magic, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.arc_electrode_burnt), new ItemStack(ModItems.powder_coal, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.arc_electrode_desh), new ItemStack(ModItems.powder_desh, 2));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_polished), new ItemStack(ModItems.powder_meteorite, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick), new ItemStack(ModItems.powder_meteorite, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_mossy), new ItemStack(ModItems.powder_meteorite, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_cracked), new ItemStack(ModItems.powder_meteorite, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_chiseled), new ItemStack(ModItems.powder_meteorite, 1));
MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_pillar), new ItemStack(ModItems.powder_meteorite, 1));
for(int i = 0; i < 16; i++) {
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Items.clay_ball, 4));
MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Items.string, 4));
}
CentrifugeRecipes.register();
FluidContainerRegistry.instance.registerContainer(new FluidContainer(new ItemStack(Items.water_bucket), new ItemStack(Items.bucket), FluidType.WATER, 1000));
FluidContainerRegistry.instance.registerContainer(new FluidContainer(new ItemStack(Items.lava_bucket), new ItemStack(Items.bucket), FluidType.LAVA, 1000));
@ -1863,8 +1801,8 @@ public class MainRegistry
final String CATEGORY_TOOLS = "11_tools";
recursionDepth = createConfigInt(config, CATEGORY_TOOLS, "11.00_recursionDepth", "Limits veinminer's recursive function. Usually not an issue, unless you're using bukkit which is especially sensitive for some reason.", 1000);
recursiveStone = createConfigBool(config, CATEGORY_TOOLS, "11.01_recursionDepth", "Determines whether veinminer can break stone", true);
recursiveNetherrack = createConfigBool(config, CATEGORY_TOOLS, "11.02_recursionDepth", "Determines whether veinminer can break netherrack", true);
recursiveStone = createConfigBool(config, CATEGORY_TOOLS, "11.01_recursionDepth", "Determines whether veinminer can break stone", false);
recursiveNetherrack = createConfigBool(config, CATEGORY_TOOLS, "11.02_recursionDepth", "Determines whether veinminer can break netherrack", false);
config.save();

View File

@ -14,6 +14,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper;
import com.hbm.entity.projectile.EntityBurningFOEQ;
import com.hbm.entity.projectile.EntityMeteor;
import com.hbm.handler.ArmorUtil;
import com.hbm.handler.VersionChecker;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.lib.Library;
@ -47,6 +48,7 @@ import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
@ -67,8 +69,15 @@ public class ModEventHandler
@SubscribeEvent
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
if(event.player.worldObj.isRemote)
System.out.println("eeeeee");
if(!event.player.worldObj.isRemote) {
event.player.addChatMessage(new ChatComponentText("Loaded world with Hbm's Nuclear Tech Mod " + RefStrings.VERSION + " for Minecraft 1.7.10!"));
if(VersionChecker.newVersion) {
event.player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "New version " + VersionChecker.versionNumber + " is available!"));
}
}
}
@SubscribeEvent
@ -619,7 +628,39 @@ public class ModEventHandler
EntityPlayerMP player = event.player;
String message = event.message;
//only if debug mode is enabled, which it is not by default
//boolean conditions for the illiterate, edition 1
//bellow you can see the header of an if-block. inside the brackets, there is a boolean statement.
//that means nothing other than its value totaling either 'true' or 'false'
//examples: 'true' would just mean true
//'1 > 3' would equal false
//'i < 10' would equal true if 'i' is smaller than 10, if equal or greater, it will result in false
//let's start from the back:
//this part means that the message's first character has to equal a '!': -------------------------+
// |
//this is a logical AND operator: -------------------------------------------------------------+ |
// | |
//this is a reference to a field in | |
//Library.java containing a reference UUID: --------------------------------------+ | |
// | | |
//this will compare said UUID with | | |
//the string representation of the | | |
//current player's UUID: ----------+ | | |
// | | | |
//another AND operator: --------+ | | | |
// | | | | |
//this is a reference to a | | | | |
//boolean called | | | | |
//'enableDebugMode' which is | | | | |
//only set once by the mod's | | | | |
//config and is disabled by | | | | |
//default. "debug" is not a | | | | |
//substring of the message, nor | | | | |
//something that can be toggled | | | | |
//in any other way except for | | | | |
//the config file: | | | | | |
// V V V V V V
if(MainRegistry.enableDebugMode && player.getUniqueID().toString().equals(Library.HbMinecraft) && message.startsWith("!")) {
String[] msg = message.split(" ");

View File

@ -41,6 +41,8 @@ public class NEIConfig implements IConfigureNEI {
API.registerUsageHandler(new FluidRecipeHandler());
API.registerRecipeHandler(new PressRecipeHandler());
API.registerUsageHandler(new PressRecipeHandler());
API.registerRecipeHandler(new CrystallizerRecipeHandler());
API.registerUsageHandler(new CrystallizerRecipeHandler());
//Some things are even beyond my control...or are they?
API.hideItem(new ItemStack(ModItems.memory));

View File

@ -295,6 +295,7 @@ public class ResourceManager {
public static final IModelCustom shimmer_sledge = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/shimmer_sledge.obj"));
public static final IModelCustom shimmer_axe = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/shimmer_axe.obj"));
public static final IModelCustom stopsign = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/stopsign.obj"));
public static final IModelCustom pch = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/pch.obj"));
public static final IModelCustom brimstone = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/brimstone.obj"));
public static final IModelCustom hk69 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/hk69.obj"));
@ -303,6 +304,8 @@ public class ResourceManager {
public static final IModelCustom ks23 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/ks23.obj"));
public static final IModelCustom flamer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flamer.obj"));
public static final IModelCustom flechette = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flechette.obj"));
public static final IModelCustom grenade_frag = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/grenade_frag.obj"));
////Texture Items
@ -311,6 +314,7 @@ public class ResourceManager {
public static final ResourceLocation shimmer_axe_tex = new ResourceLocation(RefStrings.MODID, "textures/models/shimmer_axe.png");
public static final ResourceLocation stopsign_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/stopsign.png");
public static final ResourceLocation sopsign_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sopsign.png");
public static final ResourceLocation pch_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/pch.png");
public static final ResourceLocation brimstone_tex = new ResourceLocation(RefStrings.MODID, "textures/models/brimstone.png");
public static final ResourceLocation hk69_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hk69.png");
@ -329,6 +333,8 @@ public class ResourceManager {
public static final ResourceLocation flechette_trigger = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_trigger.png");
public static final ResourceLocation flechette_stock = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_stock.png");
public static final ResourceLocation grenade_mk2 = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/grenade_mk2.png");
////Obj Entities

View File

@ -0,0 +1,35 @@
package com.hbm.render.entity.projectile;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderGrenade extends Render {
@Override
public void doRender(Entity p_76986_1_, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)x, (float)y + 0.125F, (float)z);
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(90, 0F, 1F, 0F);
GL11.glScaled(0.125, 0.125, 0.125);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.grenade_mk2);
ResourceManager.grenade_frag.renderAll();
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.grenade_mk2;
}
}

View File

@ -25,7 +25,7 @@ public class ItemRenderShim implements IItemRenderer {
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return false;
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION);
}
@Override
@ -48,6 +48,8 @@ public class ItemRenderShim implements IItemRenderer {
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.stopsign_tex);
if(item.getItem() == ModItems.sopsign)
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.sopsign_tex);
if(item.getItem() == ModItems.pch)
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.pch_tex);
if(item.getItem() == ModItems.shimmer_sledge || item.getItem() == ModItems.shimmer_axe) {
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
@ -63,6 +65,11 @@ public class ItemRenderShim implements IItemRenderer {
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
}
if(item.getItem() == ModItems.pch) {
GL11.glRotatef(45.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.7F, 0.0F, 0.0F);
}
if(item.getItem() == ModItems.shimmer_sledge)
ResourceManager.shimmer_sledge.renderAll();
if(item.getItem() == ModItems.shimmer_axe)
@ -70,6 +77,12 @@ public class ItemRenderShim implements IItemRenderer {
if(item.getItem() == ModItems.stopsign || item.getItem() == ModItems.sopsign)
ResourceManager.stopsign.renderAll();
if(item.getItem() == ModItems.pch) {
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.pch.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
}
default: break;
}
GL11.glPopMatrix();

View File

@ -10,6 +10,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
public class SatelliteHorizons extends Satellite {
@ -43,6 +44,10 @@ public class SatelliteHorizons extends Satellite {
EntityTom tom = new EntityTom(world);
tom.setPosition(x + 0.5, 600, z + 0.5);
IChunkProvider provider = world.getChunkProvider();
provider.loadChunk(x >> 4, z >> 4);
world.spawnEntityInWorld(tom);
for(Object p : world.playerEntities)

View File

@ -122,8 +122,12 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
@Override
public void fillFluidInit(FluidType type) {
fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type);
fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type);
fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type);
fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type);
fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type);
fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type);
}
@Override

View File

@ -1,7 +1,7 @@
package com.hbm.tileentity.machine;
import com.hbm.interfaces.IConsumer;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.CentrifugeRecipes;
import com.hbm.items.machine.ItemBattery;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
@ -214,7 +214,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
{
return false;
}
ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0]);
ItemStack[] itemStack = CentrifugeRecipes.getOutput(slots[0]);
if(itemStack == null)
{
return false;
@ -238,7 +238,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
private void processItem() {
if(canProcess()) {
ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0]);
ItemStack[] itemStack = CentrifugeRecipes.getOutput(slots[0]);
if(slots[2] == null && itemStack[0] != null)
{

View File

@ -1,11 +1,34 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.inventory.CrystallizerRecipes;
import com.hbm.inventory.FluidTank;
import com.hbm.items.machine.ItemBattery;
import com.hbm.lib.Library;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityMachineCrystallizer extends TileEntityMachineBase {
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class TileEntityMachineCrystallizer extends TileEntityMachineBase implements IConsumer, IFluidAcceptor {
public long power;
public static final long maxPower = 100000;
public static final int demand = 1000;
public static final int acidRequired = 500;
public short progress;
public static final short duration = 600;
public FluidTank tank;
public TileEntityMachineCrystallizer() {
super(3);
super(5);
tank = new FluidTank(FluidType.ACID, 8000, 0);
}
@Override
@ -18,7 +41,174 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase {
if(!worldObj.isRemote) {
power = Library.chargeTEFromItems(slots, 1, power, maxPower);
tank.loadTank(3, 4, slots);
if(canProcess()) {
progress++;
power -= demand;
if(progress > duration) {
progress = 0;
tank.setFill(tank.getFill() - acidRequired);
processItem();
this.markDirty();
}
} else {
progress = 0;
}
tank.updateTank(xCoord, yCoord, zCoord, this.worldObj.provider.dimensionId);
NBTTagCompound data = new NBTTagCompound();
data.setShort("progress", progress);
data.setLong("power", power);
this.networkPack(data, 25);
}
}
public void networkUnpack(NBTTagCompound data) {
this.power = data.getLong("power");
this.progress = data.getShort("progress");
}
private void processItem() {
ItemStack result = CrystallizerRecipes.getOutput(slots[0]);
if(result == null) //never happens but you can't be sure enough
return;
if(slots[2] == null)
slots[2] = result;
else if(slots[2].stackSize < slots[2].getMaxStackSize())
slots[2].stackSize++;
this.decrStackSize(0, 1);
}
private boolean canProcess() {
//Is there no input?
if(slots[0] == null)
return false;
if(power < demand)
return false;
if(tank.getFill() < acidRequired)
return false;
ItemStack result = CrystallizerRecipes.getOutput(slots[0]);
//Or output?
if(result == null)
return false;
//Does the output not match?
if(slots[2] != null && (slots[2].getItem() != result.getItem() || slots[2].getItemDamage() != result.getItemDamage()))
return false;
//Or is the output slot already full?
if(slots[2] != null && slots[2].stackSize >= slots[2].getMaxStackSize())
return false;
return true;
}
public long getPowerScaled(int i) {
return (power * i) / maxPower;
}
public int getProgressScaled(int i) {
return (progress * i) / duration;
}
@Override
public void setFillstate(int fill, int index) {
tank.setFill(fill);
}
@Override
public void setFluidFill(int fill, FluidType type) {
tank.setFill(fill);
}
@Override
public void setType(FluidType type, int index) {
tank.setTankType(type);
}
@Override
public List<FluidTank> getTanks() {
return new ArrayList() {{ add(tank); }};
}
@Override
public int getFluidFill(FluidType type) {
return tank.getFill();
}
@Override
public int getMaxFluidFill(FluidType type) {
return tank.getMaxFill();
}
@Override
public void setPower(long i) {
this.power = i;
}
@Override
public long getPower() {
return power;
}
@Override
public long getMaxPower() {
return maxPower;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
power = nbt.getLong("power");
tank.readFromNBT(nbt, "tank");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("power", power);
tank.writeToNBT(nbt, "tank");
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(i == 0 && CrystallizerRecipes.getOutput(itemStack) != null)
return true;
if(i == 1 && itemStack.getItem() instanceof ItemBattery)
return true;
return false;
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return i == 2;
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return side == 0 ? new int[] { 2 } : (side == 1 ? new int[] { 0 } : new int[] { 1 });
}
}

View File

@ -1,7 +1,7 @@
package com.hbm.tileentity.machine;
import com.hbm.interfaces.IConsumer;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.ShredderRecipes;
import com.hbm.items.machine.ItemBattery;
import com.hbm.items.machine.ItemBlades;
import com.hbm.lib.Library;
@ -321,7 +321,7 @@ public class TileEntityMachineShredder extends TileEntity implements ISidedInven
if(slots[i] != null && hasSpace(slots[i]))
{
ItemStack inp = slots[i].copy();
ItemStack outp = MachineRecipes.getShredderResult(inp);
ItemStack outp = ShredderRecipes.getShredderResult(inp);
boolean flag = false;
for (int j = 9; j < 27; j++)
@ -367,7 +367,7 @@ public class TileEntityMachineShredder extends TileEntity implements ISidedInven
public boolean hasSpace(ItemStack stack) {
ItemStack result = MachineRecipes.getShredderResult(stack);
ItemStack result = ShredderRecipes.getShredderResult(stack);
if (result != null)
for (int i = 9; i < 27; i++) {

View File

@ -226,6 +226,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
tanks[0].setType(0, 1, slots);
tanks[0].loadTank(2, 3, slots);
Library.chargeItemsFromTE(slots, 7, power, maxPower);
Object[] outs = MachineRecipes.getTurbineOutput(tanks[0].getTankType());