gas centrifuge, new centrifuge recipes, new uf6 tank textures

This commit is contained in:
HbmMods 2018-10-27 22:11:35 +02:00
parent cebea22838
commit 7bc0cc426f
31 changed files with 1573 additions and 380 deletions

View File

@ -303,6 +303,8 @@ tile.machine_difurnace_on.name=Legierungshochofen
container.diFurnace=Legierungshochofen container.diFurnace=Legierungshochofen
tile.machine_centrifuge.name=Zentrifuge tile.machine_centrifuge.name=Zentrifuge
container.centrifuge=Zentrifuge container.centrifuge=Zentrifuge
tile.machine_gascent.name=Gaszentrifuge
container.gasCentrifuge=Gaszentrifuge
tile.machine_uf6_tank.name=Uranhexafluorit-Tank tile.machine_uf6_tank.name=Uranhexafluorit-Tank
container.uf6_tank=UF6 Tank container.uf6_tank=UF6 Tank
tile.machine_puf6_tank.name=Plutoniumhexafluorit-Tank tile.machine_puf6_tank.name=Plutoniumhexafluorit-Tank
@ -396,6 +398,8 @@ tile.broadcaster_pc.name=Korrupter Sender
tile.radiobox.name=RTG-Betriebener Hochleistungs-UKW-Sender tile.radiobox.name=RTG-Betriebener Hochleistungs-UKW-Sender
tile.radiorec.name=UKW Radio tile.radiorec.name=UKW Radio
container.radiobox=UKW-Sender
container.radiorec=UKW Radio
tile.red_pylon.name=Strommasten tile.red_pylon.name=Strommasten
item.wiring_red_copper.name=Kabeltrommel item.wiring_red_copper.name=Kabeltrommel

View File

@ -303,6 +303,8 @@ tile.machine_difurnace_on.name=Alloy Furnace
container.diFurnace=Alloy Furnace container.diFurnace=Alloy Furnace
tile.machine_centrifuge.name=Centrifuge tile.machine_centrifuge.name=Centrifuge
container.centrifuge=Centrifuge container.centrifuge=Centrifuge
tile.machine_gascent.name=Gas Centrifuge
container.gasCentrifuge=Gas Centrifuge
tile.machine_uf6_tank.name=Uranium Hexafluoride Tank tile.machine_uf6_tank.name=Uranium Hexafluoride Tank
container.uf6_tank=UF6 Tank container.uf6_tank=UF6 Tank
tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank
@ -396,6 +398,8 @@ tile.broadcaster_pc.name=Corrupted Broadcaster
tile.radiobox.name=RTG-Powered High-Gain FM Transmitter tile.radiobox.name=RTG-Powered High-Gain FM Transmitter
tile.radiorec.name=FM Radio tile.radiorec.name=FM Radio
container.radiobox=FM Transmitter
container.radiorec=FM Radio
tile.red_pylon.name=Electricity Pole tile.red_pylon.name=Electricity Pole
item.wiring_red_copper.name=Cable Drum item.wiring_red_copper.name=Cable Drum

View File

@ -1,22 +1,22 @@
# Blender v2.70 (sub 0) OBJ File: 'tank.blend' # Blender v2.76 (sub 0) OBJ File: 'tank.blend'
# www.blender.org # www.blender.org
o Cylinder.001 o Cylinder.001
v -0.300000 0.375000 -0.050000 v -0.300000 0.375000 -0.112500
v -0.300000 0.375000 -0.450000 v -0.300000 0.375000 -0.512500
v 0.300000 0.375000 -0.450000 v 0.300000 0.375000 -0.512500
v 0.300000 0.375000 -0.050000 v 0.300000 0.375000 -0.112500
v -0.300000 0.675000 -0.050000 v -0.300000 0.675000 -0.112500
v -0.300000 0.675000 -0.450000 v -0.300000 0.675000 -0.512500
v 0.300000 0.675000 -0.450000 v 0.300000 0.675000 -0.512500
v 0.300000 0.675000 -0.050000 v 0.300000 0.675000 -0.112500
v -0.300000 1.325000 -0.050000 v -0.300000 1.325000 -0.112500
v -0.300000 1.325000 -0.450000 v -0.300000 1.325000 -0.512500
v 0.300000 1.325000 -0.450000 v 0.300000 1.325000 -0.512500
v 0.300000 1.325000 -0.050000 v 0.300000 1.325000 -0.112500
v -0.300000 1.625000 -0.050000 v -0.300000 1.625000 -0.112500
v -0.300000 1.625000 -0.450000 v -0.300000 1.625000 -0.512500
v 0.300000 1.625000 -0.450000 v 0.300000 1.625000 -0.512500
v 0.300000 1.625000 -0.050000 v 0.300000 1.625000 -0.112500
v 0.000000 0.950000 -0.500000 v 0.000000 0.950000 -0.500000
v 0.000000 1.050000 -0.500000 v 0.000000 1.050000 -0.500000
v 0.353553 0.950000 -0.353553 v 0.353553 0.950000 -0.353553
@ -81,307 +81,275 @@ v -0.450000 -0.000000 -0.000000
v -0.450000 2.000000 -0.000000 v -0.450000 2.000000 -0.000000
v -0.318198 -0.000000 -0.318198 v -0.318198 -0.000000 -0.318198
v -0.318198 2.000000 -0.318198 v -0.318198 2.000000 -0.318198
vt 0.077530 0.935610 vt 0.573389 0.583191
vt 0.000000 0.935610 vt 0.573389 0.526305
vt 0.000000 0.831653 vt 0.649238 0.526305
vt 0.000000 0.519783 vt 0.459616 0.583191
vt 0.077530 0.519783 vt 0.459616 0.526305
vt 0.077530 0.675718 vt 0.383768 0.583191
vt 0.961516 0.935610 vt 0.383768 0.526305
vt 0.883986 0.935610 vt 0.459616 0.450456
vt 0.883986 0.831653 vt 0.573389 0.659040
vt 0.000000 0.675718 vt 0.219889 0.585508
vt 0.077530 0.831653 vt 0.219889 0.528621
vt 0.806456 0.675718 vt 0.295738 0.528621
vt 0.806456 0.519783 vt 0.106116 0.585508
vt 0.909829 0.519783 vt 0.106116 0.528621
vt 0.225559 0.915826 vt 0.030267 0.585508
vt 0.225559 0.759892 vt 0.030267 0.528621
vt 0.328933 0.759892 vt 0.106116 0.452773
vt 0.896627 0.279675 vt 0.219889 0.661356
vt 0.974157 0.279675 vt 0.761905 0.195544
vt 0.974157 0.383631 vt 0.789674 0.128502
vt 0.090171 0.759892 vt 0.807193 0.135759
vt 0.167701 0.759892 vt 0.761905 0.061461
vt 0.167701 0.915826 vt 0.779424 0.054204
vt 0.806456 0.935609 vt 0.694864 0.033691
vt 0.806456 0.831653 vt 0.702120 0.016173
vt 0.567694 0.915827 vt 0.627822 0.061461
vt 0.490164 0.915827 vt 0.620566 0.043942
vt 0.490164 0.759892 vt 0.600053 0.128502
vt 0.328933 0.915826 vt 0.582534 0.121246
vt 0.432306 0.759892 vt 0.627822 0.195544
vt 0.909829 0.675718 vt 0.610303 0.202800
vt 0.909829 0.583832 vt 0.694864 0.223313
vt 0.909829 0.491947 vt 0.769162 0.213062
vt 0.935673 0.491947 vt 0.687607 0.240832
vt 0.193544 0.759892 vt 0.176581 0.909081
vt 0.193544 0.851777 vt 0.042499 0.909081
vt 0.167701 0.851777 vt 0.042499 0.774998
vt 0.193544 0.943663 vt 0.380979 0.898926
vt 0.167701 0.943663 vt 0.448020 0.871156
vt 0.896627 0.187789 vt 0.455277 0.888675
vt 0.922470 0.187789 vt 0.475790 0.804115
vt 0.896627 0.095904 vt 0.493308 0.811372
vt 0.922470 0.095904 vt 0.448020 0.737074
vt 0.219388 0.851777 vt 0.465539 0.729817
vt 0.806456 0.590109 vt 0.380979 0.709304
vt 0.806456 0.689565 vt 0.388235 0.691785
vt 0.736524 0.759892 vt 0.313937 0.737074
vt 0.935673 0.583832 vt 0.306681 0.719555
vt 0.219388 0.759892 vt 0.286168 0.804115
vt 0.736524 1.000000 vt 0.268649 0.796859
vt 0.637626 0.759892 vt 0.313937 0.871156
vt 0.806456 0.929674 vt 0.373722 0.916445
vt 0.961516 0.583832 vt 0.296419 0.878413
vt 0.961516 0.491947 vt 0.957501 0.856722
vt 0.987359 0.491947 vt 0.823418 0.856722
vt 0.961516 0.859489 vt 0.823418 0.722640
vt 0.961516 0.767604 vt 0.799923 0.509953
vt 0.987359 0.767604 vt 0.866965 0.482183
vt 0.961516 0.675718 vt 0.874221 0.499702
vt 0.987359 0.675718 vt 0.894734 0.415142
vt 0.974157 0.095904 vt 0.912253 0.422399
vt 0.974157 0.187789 vt 0.866965 0.348101
vt 0.948313 0.187789 vt 0.884484 0.340844
vt 0.948313 0.279675 vt 0.799923 0.320331
vt 0.974157 0.463446 vt 0.807180 0.302812
vt 0.974157 0.371560 vt 0.732882 0.348101
vt 1.000000 0.371560 vt 0.725626 0.330582
vt 0.896627 0.350001 vt 0.705113 0.415142
vt 0.896627 0.449457 vt 0.687594 0.407885
vt 0.826695 0.519783 vt 0.732882 0.482183
vt 0.987359 0.583832 vt 0.792667 0.527472
vt 1.000000 0.279675 vt 0.715363 0.489440
vt 0.160103 0.759892 vt 0.738421 0.856722
vt 0.259001 0.519783 vt 0.604338 0.856722
vt 0.259001 0.759892 vt 0.604338 0.722640
vt 0.922470 0.279675 vt 0.283181 0.401190
vt 0.458149 0.759892 vt 0.217872 0.401190
vt 0.458149 0.851777 vt 0.217872 0.021946
vt 0.432306 0.851777 vt 0.152563 0.401190
vt 0.458149 0.943663 vt 0.152563 0.021946
vt 0.432306 0.943663 vt 0.087255 0.401190
vt 0.464321 0.943663 vt 0.087255 0.021946
vt 0.464321 0.851777 vt 0.021946 0.401190
vt 0.490164 0.851777 vt 0.021946 0.021946
vt 0.464321 0.759892 vt 0.544415 0.401190
vt 0.826695 0.240108 vt 0.479106 0.401190
vt 0.727797 0.000000 vt 0.479106 0.021946
vt 0.896627 0.169782 vt 0.413798 0.401190
vt 0.948313 0.095904 vt 0.413798 0.021946
vt 0.935673 0.675718 vt 0.348489 0.401190
vt 0.398864 0.759892 vt 0.283181 0.021946
vt 0.497762 0.519783 vt 0.348489 0.021946
vt 0.497763 0.759892 vt 0.649238 0.583191
vt 0.082232 -0.000000 vt 0.573389 0.450456
vt 0.082234 0.519783 vt 0.459616 0.659040
vt 0.000001 0.519783 vt 0.295738 0.585508
vt 0.575632 0.519783 vt 0.219889 0.452773
vt 0.493399 0.519783 vt 0.106116 0.661356
vt 0.493398 0.000000 vt 0.779424 0.202800
vt 0.657865 -0.000000 vt 0.807193 0.121246
vt 0.657865 0.519783 vt 0.769162 0.043942
vt 0.411166 0.519783 vt 0.687607 0.016173
vt 0.411166 0.000000 vt 0.610304 0.054204
vt 0.328933 0.519783 vt 0.582534 0.135759
vt 0.328932 0.000000 vt 0.702120 0.240832
vt 0.246699 0.519783 vt 0.620566 0.213062
vt 0.164466 0.000000 vt 0.109540 0.747229
vt 0.164466 0.519783 vt 0.176582 0.774998
vt 0.082233 0.519783 vt 0.204351 0.842039
vt 0.246699 0.000000 vt 0.109540 0.936850
vt 0.961516 0.831653 vt 0.014729 0.842039
vt 0.896627 0.383631 vt 0.388235 0.916445
vt 0.090171 0.915826 vt 0.465539 0.878413
vt 0.567694 0.759892 vt 0.493308 0.796859
vt 0.432306 0.915826 vt 0.455277 0.719555
vt 0.909829 0.831653 vt 0.373722 0.691785
vt 0.219388 0.943663 vt 0.296419 0.729817
vt 0.567694 0.689565 vt 0.306681 0.888675
vt 0.637626 0.519783 vt 0.268649 0.811372
vt 0.567694 0.590109 vt 0.890460 0.694870
vt 0.736524 0.519783 vt 0.957501 0.722640
vt 0.637626 1.000000 vt 0.985271 0.789681
vt 0.567694 0.929674 vt 0.890460 0.884492
vt 0.567694 0.830218 vt 0.795649 0.789681
vt 0.806456 0.830218 vt 0.807180 0.527472
vt 0.987359 0.859489 vt 0.884484 0.489440
vt 1.000000 0.463446 vt 0.912253 0.407886
vt 0.727797 0.519783 vt 0.874221 0.330582
vt 0.657865 0.449457 vt 0.792667 0.302812
vt 0.657865 0.350001 vt 0.715363 0.340844
vt 0.727797 0.279675 vt 0.725626 0.499702
vt 0.826695 0.279675 vt 0.687594 0.422398
vt 0.090171 0.689565 vt 0.671380 0.694870
vt 0.090171 0.590109 vt 0.738421 0.722640
vt 0.160103 0.519783 vt 0.766190 0.789681
vt 0.328932 0.590109 vt 0.671380 0.884492
vt 0.328933 0.689565 vt 0.576569 0.789681
vt 0.490164 0.943663 vt 0.544415 0.021946
vt 0.727797 0.240108
vt 0.657865 0.169782
vt 0.657865 0.070326
vt 0.826695 0.000000
vt 0.896627 0.070326
vt 0.328933 0.590109
vt 0.398864 0.519783
vt -0.000001 0.000000
vt 0.575632 -0.000000
vt 0.493399 0.000000
vt 0.328933 0.000000
vt 0.082233 0.000000
vn -1.000000 0.000000 0.000000 vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000 vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000 vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000 vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000 vn 0.000000 1.000000 0.000000
vn 0.382684 0.000000 -0.923880 vn 0.382700 0.000000 -0.923900
vn 0.923880 0.000000 -0.382683 vn 0.923900 0.000000 -0.382700
vn 0.923880 0.000000 0.382683 vn 0.923900 0.000000 0.382700
vn 0.382683 0.000000 0.923880 vn 0.382700 0.000000 0.923900
vn -0.382684 0.000000 0.923880 vn -0.382700 0.000000 0.923900
vn -0.923880 0.000000 0.382683 vn -0.923900 0.000000 0.382700
vn -0.382684 0.000000 -0.923880 vn -0.382700 0.000000 -0.923900
vn -0.923880 0.000000 -0.382683 vn -0.923900 0.000000 -0.382700
vn 0.382683 0.000000 -0.923880
vn -0.382683 0.000000 0.923880
vn 0.000000 1.000000 0.000001
vn 0.000000 -1.000000 0.000001
vn -0.382684 0.000000 -0.923879
vn 0.382684 0.000000 0.923880
vn 0.000000 1.000000 -0.000001
vn 0.923879 0.000000 -0.382684
vn 0.923879 0.000000 0.382684
vn -0.923879 0.000000 0.382684
vn -0.382683 0.000000 -0.923880
vn -0.923879 0.000000 -0.382684
vn 0.000000 -1.000000 -0.000001
vn 0.923880 0.000000 0.382684
vn -0.382684 0.000000 0.923879
s off s off
f 6/1/1 2/2/1 1/3/1 f 6/1/1 2/2/1 1/3/1
f 7/4/2 3/5/2 2/6/2 f 7/4/2 3/5/2 2/2/2
f 8/7/3 4/8/3 3/9/3 f 8/6/3 4/7/3 3/5/3
f 5/10/4 1/6/4 4/11/4 f 2/2/4 3/5/4 4/8/4
f 2/12/5 3/13/5 4/14/5 f 7/4/5 6/1/5 5/9/5
f 7/15/6 6/16/6 5/17/6 f 14/10/1 10/11/1 9/12/1
f 14/18/1 10/19/1 9/20/1 f 15/13/2 11/14/2 10/11/2
f 15/21/2 11/22/2 10/23/2 f 16/15/3 12/16/3 11/14/3
f 16/8/3 12/24/3 11/25/3 f 10/11/4 11/14/4 12/17/4
f 13/26/4 9/27/4 12/28/4 f 15/13/5 14/10/5 13/18/5
f 10/29/5 11/17/5 12/30/5 f 18/19/6 20/20/6 19/21/6
f 15/25/6 14/12/6 13/31/6 f 20/20/7 22/22/7 21/23/7
f 18/32/7 20/33/7 19/34/7 f 22/22/8 24/24/8 23/25/8
f 20/35/8 22/36/8 21/37/8 f 24/24/9 26/26/9 25/27/9
f 22/36/9 24/38/9 23/39/9 f 26/26/10 28/28/10 27/29/10
f 24/18/10 26/40/10 25/41/10 f 28/28/11 30/30/11 29/31/11
f 26/40/11 28/42/11 27/43/11 f 30/30/5 24/24/5 22/22/5
f 28/38/12 30/36/12 29/44/12 f 32/32/12 18/19/12 17/33/12
f 26/45/6 24/46/6 22/47/6 f 30/30/13 32/32/13 31/34/13
f 32/31/13 18/32/13 17/48/13 f 23/35/4 27/36/4 31/37/4
f 30/36/14 32/35/14 31/49/14 f 34/38/6 36/39/6 35/40/6
f 31/50/5 23/51/5 29/52/5 f 36/39/7 38/41/7 37/42/7
f 34/53/15 36/54/15 35/55/15 f 38/41/8 40/43/8 39/44/8
f 36/56/8 38/57/8 37/58/8 f 40/43/9 42/45/9 41/46/9
f 38/57/9 40/59/9 39/60/9 f 42/45/10 44/47/10 43/48/10
f 40/61/10 42/62/10 41/63/10 f 44/47/11 46/49/11 45/50/11
f 42/62/16 44/19/16 43/64/16 f 46/49/5 42/45/5 34/38/5
f 44/65/12 46/66/12 45/67/12 f 48/51/12 34/38/12 33/52/12
f 42/68/17 40/69/17 38/70/17 f 46/49/13 48/51/13 47/53/13
f 48/59/13 34/53/13 33/71/13 f 39/54/4 43/55/4 47/56/4
f 46/66/14 48/19/14 47/72/14 f 50/57/6 52/58/6 51/59/6
f 47/73/18 39/74/18 45/75/18 f 52/58/7 54/60/7 53/61/7
f 50/63/15 52/64/15 51/76/15 f 54/60/8 56/62/8 55/63/8
f 52/77/8 54/78/8 53/79/8 f 56/62/9 58/64/9 57/65/9
f 54/78/9 56/80/9 55/81/9 f 58/64/10 60/66/10 59/67/10
f 56/82/10 58/83/10 57/84/10 f 60/66/11 62/68/11 61/69/11
f 58/83/11 60/85/11 59/28/11 f 62/68/5 56/62/5 54/60/5
f 60/54/12 62/53/12 61/48/12 f 64/70/12 50/57/12 49/71/12
f 54/86/6 62/87/6 56/88/6 f 62/68/13 64/70/13 63/72/13
f 64/89/13 50/63/13 49/41/13 f 55/73/4 59/74/4 63/75/4
f 62/53/14 64/59/14 63/90/14 f 66/76/6 68/77/6 67/78/6
f 63/91/5 55/92/5 61/93/5 f 68/77/7 70/79/7 69/80/7
f 65/94/15 66/95/15 68/96/15 f 70/79/8 72/81/8 71/82/8
f 68/97/8 70/98/8 69/99/8 f 72/81/9 74/83/9 73/84/9
f 69/100/9 70/101/9 72/97/9 f 74/85/10 76/86/10 75/87/10
f 72/98/10 74/102/10 73/103/10 f 76/86/11 78/88/11 77/89/11
f 73/103/16 74/102/16 76/104/16 f 80/90/12 66/76/12 65/91/12
f 75/105/12 76/104/12 78/106/12 f 78/88/13 80/90/13 79/92/13
f 79/107/19 80/108/19 66/109/19 f 5/93/1 6/1/1 1/3/1
f 77/110/14 78/106/14 80/108/14 f 6/1/2 7/4/2 2/2/2
f 5/11/1 6/1/1 1/3/1 f 7/4/3 8/6/3 3/5/3
f 6/10/2 7/4/2 2/6/2 f 1/94/4 2/2/4 4/8/4
f 7/111/3 8/7/3 3/9/3 f 8/95/5 7/4/5 5/9/5
f 8/3/4 5/10/4 4/11/4 f 13/96/1 14/10/1 9/12/1
f 1/31/5 2/12/5 4/14/5 f 14/10/2 15/13/2 10/11/2
f 8/29/6 7/15/6 5/17/6 f 15/13/3 16/15/3 11/14/3
f 13/112/1 14/18/1 9/20/1 f 9/97/4 10/11/4 12/17/4
f 14/113/2 15/21/2 10/23/2 f 16/98/5 15/13/5 13/18/5
f 15/9/3 16/8/3 11/25/3 f 17/99/6 18/19/6 19/21/6
f 16/114/4 13/26/4 12/28/4 f 19/100/7 20/20/7 21/23/7
f 9/115/5 10/29/5 12/30/5 f 21/101/8 22/22/8 23/25/8
f 16/116/6 15/25/6 13/31/6 f 23/102/9 24/24/9 25/27/9
f 17/48/15 18/32/15 19/34/15 f 25/103/10 26/26/10 27/29/10
f 19/22/8 20/35/8 21/37/8 f 27/104/11 28/28/11 29/31/11
f 21/37/9 22/36/9 23/39/9 f 22/22/5 20/20/5 18/19/5
f 23/76/20 24/18/20 25/41/20 f 18/19/5 32/32/5 22/22/5
f 25/41/11 26/40/11 27/43/11 f 30/30/5 28/28/5 26/26/5
f 27/117/12 28/38/12 29/44/12 f 26/26/5 24/24/5 30/30/5
f 18/118/6 30/119/6 20/51/6 f 22/22/5 32/32/5 30/30/5
f 18/118/6 32/120/6 30/119/6 f 31/105/12 32/32/12 17/33/12
f 30/119/21 28/121/21 26/45/21 f 29/106/13 30/30/13 31/34/13
f 31/90/13 32/31/13 17/48/13 f 31/37/4 17/107/4 19/108/4
f 29/44/14 30/36/14 31/49/14 f 19/108/4 21/109/4 31/37/4
f 30/119/6 26/45/6 22/47/6 f 23/35/4 25/110/4 27/36/4
f 30/119/6 22/47/6 20/51/6 f 27/36/4 29/111/4 31/37/4
f 31/50/5 17/122/5 19/123/5 f 31/37/4 21/109/4 23/35/4
f 19/123/5 21/124/5 23/51/5 f 33/112/6 34/38/6 35/40/6
f 23/51/5 25/47/5 27/125/5 f 35/113/7 36/39/7 37/42/7
f 33/71/15 34/53/15 35/55/15 f 37/114/8 38/41/8 39/44/8
f 31/50/5 19/123/5 23/51/5 f 39/115/9 40/43/9 41/46/9
f 35/126/22 36/56/22 37/58/22 f 41/116/10 42/45/10 43/48/10
f 23/51/5 27/125/5 29/52/5 f 43/117/11 44/47/11 45/50/11
f 37/58/23 38/57/23 39/60/23 f 38/41/5 36/39/5 34/38/5
f 39/89/10 40/61/10 41/63/10 f 34/38/5 48/51/5 46/49/5
f 41/63/11 42/62/11 43/64/11 f 46/49/5 44/47/5 42/45/5
f 43/127/24 44/65/24 45/67/24 f 42/45/5 40/43/5 38/41/5
f 38/70/6 36/128/6 34/129/6 f 38/41/5 34/38/5 42/45/5
f 34/129/6 48/130/6 46/131/6 f 47/118/12 48/51/12 33/52/12
f 46/131/6 44/132/6 42/68/6 f 45/119/13 46/49/13 47/53/13
f 47/60/25 48/59/25 33/71/25 f 47/56/4 33/120/4 35/121/4
f 38/70/6 34/129/6 46/131/6 f 35/121/4 37/122/4 47/56/4
f 46/131/6 42/68/6 38/70/6 f 39/54/4 41/123/4 43/55/4
f 45/67/26 46/66/26 47/72/26 f 43/55/4 45/124/4 47/56/4
f 47/73/5 33/133/5 35/134/5 f 47/56/4 37/122/4 39/54/4
f 35/134/5 37/135/5 39/74/5 f 49/125/6 50/57/6 51/59/6
f 39/74/5 41/136/5 43/137/5 f 51/126/7 52/58/7 53/61/7
f 49/41/15 50/63/15 51/76/15 f 53/127/8 54/60/8 55/63/8
f 47/73/5 35/134/5 39/74/5 f 55/128/9 56/62/9 57/65/9
f 51/30/8 52/77/8 53/79/8 f 57/129/10 58/64/10 59/67/10
f 39/74/27 43/137/27 45/75/27 f 59/130/11 60/66/11 61/69/11
f 53/79/9 54/78/9 55/81/9 f 54/60/5 52/58/5 50/57/5
f 55/138/10 56/82/10 57/84/10 f 50/57/5 64/70/5 54/60/5
f 57/84/11 58/83/11 59/28/11 f 62/68/5 60/66/5 58/64/5
f 59/34/12 60/54/12 61/48/12 f 58/64/5 56/62/5 62/68/5
f 54/86/6 52/139/6 50/140/6 f 54/60/5 64/70/5 62/68/5
f 50/140/6 64/141/6 62/87/6 f 63/131/12 64/70/12 49/71/12
f 62/87/6 60/142/6 58/143/6 f 61/132/13 62/68/13 63/72/13
f 63/43/13 64/89/13 49/41/13 f 63/75/4 49/133/4 51/134/4
f 54/86/6 50/140/6 62/87/6 f 51/134/4 53/135/4 63/75/4
f 61/48/14 62/53/14 63/90/14 f 55/73/4 57/136/4 59/74/4
f 62/87/6 58/143/6 56/88/6 f 59/74/4 61/137/4 63/75/4
f 63/91/5 49/137/5 51/144/5 f 63/75/4 53/135/4 55/73/4
f 51/144/5 53/145/5 55/92/5 f 65/91/6 66/76/6 67/78/6
f 55/92/5 57/120/5 59/118/5 f 67/78/7 68/77/7 69/80/7
f 67/146/15 65/94/15 68/96/15 f 69/80/8 70/79/8 71/82/8
f 63/91/5 51/144/5 55/92/5 f 71/82/9 72/81/9 73/84/9
f 67/147/8 68/97/8 69/99/8 f 73/138/10 74/85/10 75/87/10
f 55/92/5 59/118/5 61/93/5 f 75/87/11 76/86/11 77/89/11
f 71/147/28 69/100/28 72/97/28 f 79/92/12 80/90/12 65/91/12
f 71/148/10 72/98/10 73/103/10 f 77/89/13 78/88/13 79/92/13
f 75/149/29 73/103/29 76/104/29
f 77/110/12 75/105/12 78/106/12
f 65/150/25 79/107/25 66/109/25
f 79/107/14 77/110/14 80/108/14

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -280,6 +280,9 @@ public class ModBlocks {
public static Block machine_centrifuge; public static Block machine_centrifuge;
public static final int guiID_centrifuge = 5; public static final int guiID_centrifuge = 5;
public static Block machine_gascent;
public static final int guiID_gascent = 71;
public static Block machine_uf6_tank; public static Block machine_uf6_tank;
public static final int guiID_uf6_tank = 7; public static final int guiID_uf6_tank = 7;
@ -571,6 +574,9 @@ public class ModBlocks {
public static Block dummy_port_reactor_small; public static Block dummy_port_reactor_small;
public static Block dummy_block_vault; public static Block dummy_block_vault;
public static Block dummy_block_blast; public static Block dummy_block_blast;
public static Block dummy_block_gascent;
public static Block dummy_block_uf6;
public static Block dummy_block_puf6;
public static Block ntm_dirt; public static Block ntm_dirt;
@ -765,6 +771,7 @@ public class ModBlocks {
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F); machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab); machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
@ -1013,6 +1020,9 @@ public class ModBlocks {
dummy_port_reactor_small = new DummyBlockMachine(Material.iron, guiID_reactor_small, machine_reactor_small).setBlockName("dummy_port_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_port_reactor_small = new DummyBlockMachine(Material.iron, guiID_reactor_small, machine_reactor_small).setBlockName("dummy_port_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
dummy_block_gascent = new DummyBlockMachine(Material.iron, guiID_gascent, machine_gascent).setBlockName("dummy_block_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
dummy_block_uf6 = new DummyBlockMachine(Material.iron, guiID_uf6_tank, machine_uf6_tank).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
dummy_block_puf6 = new DummyBlockMachine(Material.iron, guiID_puf6_tank, machine_puf6_tank).setBlockName("dummy_block_puf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
ntm_dirt = new BlockNTMDirt().setBlockName("ntm_dirt").setHardness(0.5F).setStepSound(Block.soundTypeGravel).setCreativeTab(null).setBlockTextureName("dirt"); ntm_dirt = new BlockNTMDirt().setBlockName("ntm_dirt").setHardness(0.5F).setStepSound(Block.soundTypeGravel).setCreativeTab(null).setBlockTextureName("dirt");
} }
@ -1255,6 +1265,7 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName()); GameRegistry.registerBlock(machine_difurnace_off, machine_difurnace_off.getUnlocalizedName());
GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName()); GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName());
GameRegistry.registerBlock(machine_centrifuge, machine_centrifuge.getUnlocalizedName()); GameRegistry.registerBlock(machine_centrifuge, machine_centrifuge.getUnlocalizedName());
GameRegistry.registerBlock(machine_gascent, machine_gascent.getUnlocalizedName());
GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName()); GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName());
GameRegistry.registerBlock(machine_puf6_tank, machine_puf6_tank.getUnlocalizedName()); GameRegistry.registerBlock(machine_puf6_tank, machine_puf6_tank.getUnlocalizedName());
GameRegistry.registerBlock(machine_reactor, machine_reactor.getUnlocalizedName()); GameRegistry.registerBlock(machine_reactor, machine_reactor.getUnlocalizedName());
@ -1447,6 +1458,9 @@ public class ModBlocks {
GameRegistry.registerBlock(dummy_port_reactor_small, dummy_port_reactor_small.getUnlocalizedName()); GameRegistry.registerBlock(dummy_port_reactor_small, dummy_port_reactor_small.getUnlocalizedName());
GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_vault, dummy_block_vault.getUnlocalizedName());
GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_blast, dummy_block_blast.getUnlocalizedName());
GameRegistry.registerBlock(dummy_block_gascent, dummy_block_gascent.getUnlocalizedName());
GameRegistry.registerBlock(dummy_block_uf6, dummy_block_uf6.getUnlocalizedName());
GameRegistry.registerBlock(dummy_block_puf6, dummy_block_puf6.getUnlocalizedName());
//Other Technical Blocks //Other Technical Blocks
GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName()); GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName());

View File

@ -0,0 +1,167 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandler;
import com.hbm.interfaces.IMultiblock;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class MachineGasCent extends BlockContainer implements IMultiblock {
private final Random field_149933_a = new Random();
private static boolean keepInventory;
public MachineGasCent(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public int getRenderType(){
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.blockIcon = iconregister.registerIcon(RefStrings.MODID + ":machine_gascent");
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineGasCent();
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(ModBlocks.machine_gascent);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0)
{
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if(i == 1)
{
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if(i == 2)
{
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if(i == 3)
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.centDimension)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.centDimension, ModBlocks.dummy_block_gascent);
} else
world.func_147480_a(x, y, z, true);
}
@Override
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
if (!keepInventory)
{
TileEntityMachineGasCent tileentityfurnace = (TileEntityMachineGasCent)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tileentityfurnace != null)
{
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
{
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null)
{
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = this.field_149933_a.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
p_149749_1_.spawnEntityInWorld(entityitem);
}
}
}
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
}
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote)
{
return true;
} else if(!player.isSneaking())
{
TileEntityMachineGasCent entity = (TileEntityMachineGasCent) world.getTileEntity(x, y, z);
if(entity != null)
{
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_gascent, world, x, y, z);
}
return true;
} else {
return false;
}
}
}

View File

@ -3,6 +3,8 @@ package com.hbm.blocks.machine;
import java.util.Random; import java.util.Random;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandler;
import com.hbm.interfaces.IMultiblock;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachinePuF6Tank; import com.hbm.tileentity.machine.TileEntityMachinePuF6Tank;
@ -24,7 +26,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
public class MachinePuF6Tank extends BlockContainer { public class MachinePuF6Tank extends BlockContainer implements IMultiblock {
private final Random field_149933_a = new Random(); private final Random field_149933_a = new Random();
private static boolean keepInventory; private static boolean keepInventory;
@ -85,6 +87,12 @@ public class MachinePuF6Tank extends BlockContainer {
{ {
world.setBlockMetadataWithNotify(x, y, z, 4, 2); world.setBlockMetadataWithNotify(x, y, z, 4, 2);
} }
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_puf6);
} else
world.func_147480_a(x, y, z, true);
} }
@Override @Override

View File

@ -3,6 +3,8 @@ package com.hbm.blocks.machine;
import java.util.Random; import java.util.Random;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandler;
import com.hbm.interfaces.IMultiblock;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineUF6Tank; import com.hbm.tileentity.machine.TileEntityMachineUF6Tank;
@ -24,7 +26,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
public class MachineUF6Tank extends BlockContainer { public class MachineUF6Tank extends BlockContainer implements IMultiblock {
private final Random field_149933_a = new Random(); private final Random field_149933_a = new Random();
private static boolean keepInventory; private static boolean keepInventory;
@ -85,6 +87,12 @@ public class MachineUF6Tank extends BlockContainer {
{ {
world.setBlockMetadataWithNotify(x, y, z, 4, 2); world.setBlockMetadataWithNotify(x, y, z, 4, 2);
} }
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.uf6Dimension)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.uf6Dimension, ModBlocks.dummy_block_uf6);
} else
world.func_147480_a(x, y, z, true);
} }
@Override @Override

View File

@ -42,6 +42,7 @@ import com.hbm.tileentity.machine.TileEntityMachineDeuterium;
import com.hbm.tileentity.machine.TileEntityMachineDiesel; import com.hbm.tileentity.machine.TileEntityMachineDiesel;
import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace; import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace;
import com.hbm.tileentity.machine.TileEntityMachineFluidTank; import com.hbm.tileentity.machine.TileEntityMachineFluidTank;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import com.hbm.tileentity.machine.TileEntityMachineGasFlare; import com.hbm.tileentity.machine.TileEntityMachineGasFlare;
import com.hbm.tileentity.machine.TileEntityMachineGenerator; import com.hbm.tileentity.machine.TileEntityMachineGenerator;
import com.hbm.tileentity.machine.TileEntityMachineIGenerator; import com.hbm.tileentity.machine.TileEntityMachineIGenerator;
@ -708,6 +709,15 @@ public class GUIHandler implements IGuiHandler {
} }
return null; return null;
} }
case ModBlocks.guiID_gascent:
{
if(entity instanceof TileEntityMachineGasCent)
{
return new ContainerMachineGasCent(player.inventory, (TileEntityMachineGasCent) entity);
}
return null;
}
} }
return null; return null;
} }
@ -1339,6 +1349,15 @@ public class GUIHandler implements IGuiHandler {
} }
return null; return null;
} }
case ModBlocks.guiID_gascent:
{
if(entity instanceof TileEntityMachineGasCent)
{
return new GUIMachineGasCent(player.inventory, (TileEntityMachineGasCent) entity);
}
return null;
}
} }
} else { } else {
//CLIENTONLY GUIS //CLIENTONLY GUIS

View File

@ -78,6 +78,7 @@ public class MultiblockHandler {
public static final int[] radGenDimensionSouth = new int[] { 1, 4, 2, 0, 1, 1 }; public static final int[] radGenDimensionSouth = new int[] { 1, 4, 2, 0, 1, 1 };
public static final int[] radGenDimensionWest = new int[] { 1, 1, 2, 0, 1, 4 }; public static final int[] radGenDimensionWest = new int[] { 1, 1, 2, 0, 1, 4 };
public static final int[] reactorSmallDimension = new int[] { 0, 0, 2, 0, 0, 0 }; public static final int[] reactorSmallDimension = new int[] { 0, 0, 2, 0, 0, 0 };
public static final int[] uf6Dimension = new int[] { 0, 0, 1, 0, 0, 0 };
//Approved! //Approved!
public static boolean checkSpace(World world, int x, int y, int z, int[] i) { public static boolean checkSpace(World world, int x, int y, int z, int[] i) {

View File

@ -0,0 +1,158 @@
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.nei.CentrifugeRecipeHandler.Fuel;
import com.hbm.handler.nei.CentrifugeRecipeHandler.SmeltingSet;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.gui.GUIMachineCentrifuge;
import com.hbm.inventory.gui.GUIMachineGasCent;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.api.IOverlayHandler;
import codechicken.nei.api.IRecipeOverlayRenderer;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IUsageHandler;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
public class GasCentrifugeRecipeHandler extends TemplateRecipeHandler {
public static ArrayList<Fuel> fuels;
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
{
PositionedStack input;
PositionedStack result1;
PositionedStack result2;
PositionedStack result3;
PositionedStack result4;
public SmeltingSet(ItemStack input, ItemStack result1, ItemStack result2, ItemStack result3, ItemStack result4) {
input.stackSize = 1;
this.input = new PositionedStack(input, 48, 24);
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);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input}));
}
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
stacks.add(fuels.get((cycleticks / 48) % fuels.size()).stack);
stacks.add(result2);
stacks.add(result3);
stacks.add(result4);
return stacks;
}
@Override
public PositionedStack getResult() {
return result1;
}
}
public static class Fuel
{
public Fuel(ItemStack ingred) {
this.stack = new PositionedStack(ingred, 3, 42, false);
}
public PositionedStack stack;
}
@Override
public String getRecipeName() {
return "Gas Centrifuge";
}
@Override
public String getGuiTexture() {
return GUIMachineGasCent.texture.toString();
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return GUIMachineGasCent.class;
}
@Override
public TemplateRecipeHandler newInstance() {
if (fuels == null || fuels.isEmpty())
fuels = new ArrayList<Fuel>();
for(ItemStack i : MachineRecipes.instance().getBatteries())
{
fuels.add(new Fuel(i));
}
return super.newInstance();
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("gascentprocessing")) && getClass() == GasCentrifugeRecipeHandler.class) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getGasCentrifugeRecipes();
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]));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getGasCentrifugeRecipes();
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]));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("gascentprocessing")) && getClass() == GasCentrifugeRecipeHandler.class) {
loadCraftingRecipes("gascentprocessing", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<Object, Object[]> recipes = MachineRecipes.instance().getGasCentrifugeRecipes();
for (Map.Entry<Object, Object[]> recipe : recipes.entrySet()) {
if (compareFluidStacks(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]));
}
}
private boolean compareFluidStacks(ItemStack sta1, ItemStack sta2) {
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(3, 51 - 45, 176, 0, 16, 34, 480, 7);
drawProgressBar(93, 19, 192, -1, 6, 33, 200, 3);
}
@Override
public void loadTransferRects() {
transferRects.add(new RecipeTransferRect(new Rectangle(56 * 2, 5 + 18, 54, 18), "gascentprocessing"));
}
}

View File

@ -120,23 +120,14 @@ public class MachineRecipes {
// Arrays! // Arrays!
public static ItemStack[] getCentrifugeProcessingResult(Item item) { public static ItemStack[] getCentrifugeProcessingResult(ItemStack item) {
return getCentrifugeOutput(item); return getCentrifugeOutput(item);
} }
public static ItemStack[] getCentrifugeOutput(Item item) { public static ItemStack[] getCentrifugeOutput(ItemStack item) {
ItemStack[] uranium = new ItemStack[] { new ItemStack(ModItems.nugget_u238, 4),
new ItemStack(ModItems.nugget_u238, 4), new ItemStack(ModItems.nugget_u235, 1),
new ItemStack(ModItems.cell_empty, 1) };
ItemStack[] plutonium = new ItemStack[] { new ItemStack(ModItems.nugget_pu238, 3),
new ItemStack(ModItems.nugget_pu239, 1), new ItemStack(ModItems.nugget_pu240, 5),
new ItemStack(ModItems.cell_empty, 1) };
ItemStack[] test = new ItemStack[] { new ItemStack(Items.apple, 3), new ItemStack(Items.leather, 1), 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) }; new ItemStack(Items.sugar, 3), new ItemStack(Items.blaze_powder, 2) };
ItemStack[] schrabidium = new ItemStack[] { new ItemStack(ModItems.ingot_schrabidium, 1),
new ItemStack(ModItems.sulfur, 1), new ItemStack(ModItems.sulfur, 1),
new ItemStack(ModItems.cell_empty, 1) };
ItemStack[] uran1 = new ItemStack[] { new ItemStack(ModItems.nugget_u235, 1), ItemStack[] uran1 = new ItemStack[] { new ItemStack(ModItems.nugget_u235, 1),
new ItemStack(ModItems.nugget_u238, 3), new ItemStack(ModItems.nugget_pu239, 2), new ItemStack(ModItems.nugget_u238, 3), new ItemStack(ModItems.nugget_pu239, 2),
@ -178,79 +169,308 @@ public class MachineRecipes {
new ItemStack(ModItems.sulfur, 1), new ItemStack(ModItems.dust, 1), new ItemStack(ModItems.sulfur, 1), new ItemStack(ModItems.dust, 1),
new ItemStack(ModItems.dust, 1) }; new ItemStack(ModItems.dust, 1) };
if (item == ModItems.cell_uf6) { ItemStack[] coal = new ItemStack[] { new ItemStack(ModItems.powder_coal, 2),
return uranium; new ItemStack(ModItems.powder_coal, 2), new ItemStack(ModItems.powder_coal, 2),
} new ItemStack(Blocks.gravel, 1) };
ItemStack[] iron = new ItemStack[] { new ItemStack(ModItems.powder_iron, 1),
if (item == ModItems.cell_puf6) { new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_iron, 1),
return plutonium; 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_lead, 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.powder_lithium_tiny, 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, 1),
new ItemStack(Blocks.gravel, 1) };
if (MainRegistry.enableDebugMode) { if (MainRegistry.enableDebugMode) {
if (item == Item.getItemFromBlock(ModBlocks.test_render)) { if (item.getItem() == Item.getItemFromBlock(ModBlocks.test_render)) {
return test; return test;
} }
} }
if (item == ModItems.cell_sas3) { if (item.getItem() == ModItems.rod_uranium_fuel_depleted) {
return schrabidium;
}
if (item == ModItems.rod_uranium_fuel_depleted) {
return uran1; return uran1;
} }
if (item == ModItems.rod_dual_uranium_fuel_depleted) { if (item.getItem() == ModItems.rod_dual_uranium_fuel_depleted) {
return uran2; return uran2;
} }
if (item == ModItems.rod_quad_uranium_fuel_depleted) { if (item.getItem() == ModItems.rod_quad_uranium_fuel_depleted) {
return uran3; return uran3;
} }
if (item == ModItems.rod_plutonium_fuel_depleted) { if (item.getItem() == ModItems.rod_plutonium_fuel_depleted) {
return plutonium1; return plutonium1;
} }
if (item == ModItems.rod_dual_plutonium_fuel_depleted) { if (item.getItem() == ModItems.rod_dual_plutonium_fuel_depleted) {
return plutonium2; return plutonium2;
} }
if (item == ModItems.rod_quad_plutonium_fuel_depleted) { if (item.getItem() == ModItems.rod_quad_plutonium_fuel_depleted) {
return plutonium3; return plutonium3;
} }
if (item == ModItems.rod_mox_fuel_depleted) { if (item.getItem() == ModItems.rod_mox_fuel_depleted) {
return mox1; return mox1;
} }
if (item == ModItems.rod_dual_mox_fuel_depleted) { if (item.getItem() == ModItems.rod_dual_mox_fuel_depleted) {
return mox2; return mox2;
} }
if (item == ModItems.rod_quad_mox_fuel_depleted) { if (item.getItem() == ModItems.rod_quad_mox_fuel_depleted) {
return mox3; return mox3;
} }
if (item == ModItems.rod_schrabidium_fuel_depleted) { if (item.getItem() == ModItems.rod_schrabidium_fuel_depleted) {
return schrabidium1; return schrabidium1;
} }
if (item == ModItems.rod_dual_schrabidium_fuel_depleted) { if (item.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted) {
return schrabidium2; return schrabidium2;
} }
if (item == ModItems.rod_quad_schrabidium_fuel_depleted) { if (item.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted) {
return schrabidium3; return schrabidium3;
} }
if (item == ModItems.powder_cloud) { if (item.getItem() == ModItems.powder_cloud) {
return cloud; return cloud;
} }
if (mODE(item, "oreCoal")) {
return coal;
}
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, "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")) {
return redstone;
}
if (item.getItem() == Item.getItemFromBlock(ModBlocks.ore_tikite)) {
return tikite;
}
if (mODE(item, "oreLapis")) {
return lapis;
}
return null; return null;
} }
//bro, i don't care
@SuppressWarnings("incomplete-switch")
public static List<GasCentOutput> getGasCentOutput(FluidType fluid) {
List<GasCentOutput> list = new ArrayList();
switch(fluid) {
case LAVA:
list.add(new GasCentOutput(1, new ItemStack(ModBlocks.gravel_obsidian), 1));
list.add(new GasCentOutput(2, new ItemStack(Blocks.gravel), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_lithium), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_iron, 2), 4));
return list;
case UF6:
list.add(new GasCentOutput(4, new ItemStack(ModItems.nugget_u238), 1));
list.add(new GasCentOutput(4, new ItemStack(ModItems.nugget_u238), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.nugget_u235), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.fluorite), 4));
return list;
case PUF6:
list.add(new GasCentOutput(3, new ItemStack(ModItems.nugget_pu238), 1));
list.add(new GasCentOutput(2, new ItemStack(ModItems.nugget_pu239), 2));
list.add(new GasCentOutput(4, new ItemStack(ModItems.nugget_pu240), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.fluorite), 4));
return list;
case WATZ:
list.add(new GasCentOutput(1, new ItemStack(ModItems.nugget_schrabidium), 1));
list.add(new GasCentOutput(3, new ItemStack(ModItems.nugget_uranium), 2));
list.add(new GasCentOutput(3, new ItemStack(ModItems.powder_iron), 3));
list.add(new GasCentOutput(3, new ItemStack(ModItems.powder_copper), 4));
return list;
case SAS3:
list.add(new GasCentOutput(4, new ItemStack(ModItems.nugget_schrabidium), 1));
list.add(new GasCentOutput(4, new ItemStack(ModItems.nugget_schrabidium), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.sulfur), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.sulfur), 4));
return list;
case COOLANT:
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 1));
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 4));
return list;
case CRYOGEL:
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_ice), 1));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_ice), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.niter), 4));
return list;
case NITAN:
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_nitan_mix), 1));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_nitan_mix), 2));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_nitan_mix), 3));
list.add(new GasCentOutput(1, new ItemStack(ModItems.powder_nitan_mix), 4));
return list;
}
return null;
}
public static class GasCentOutput {
public int weight;
public ItemStack output;
public int slot;
public GasCentOutput(int w, ItemStack s, int i) {
weight = w;
output = s;
slot = i;
}
}
@SuppressWarnings("incomplete-switch")
public static int getFluidConsumedGasCent(FluidType fluid) {
List<GasCentOutput> list = new ArrayList();
switch(fluid) {
case LAVA:
return 1000;
case UF6:
return 100;
case PUF6:
return 100;
case WATZ:
return 100;
case SAS3:
return 100;
case COOLANT:
return 2000;
case CRYOGEL:
return 1000;
case NITAN:
return 500;
}
return 100;
}
private static List<ItemStack> addToListWithWeight(List<ItemStack> list, ItemStack stack, int weight) {
for(int i = 0; i < weight; i++)
list.add(stack);
return list;
}
public static List<Item> stamps_flat = new ArrayList<Item>() {{ public static List<Item> stamps_flat = new ArrayList<Item>() {{
add(ModItems.stamp_stone_flat); add(ModItems.stamp_stone_flat);
add(ModItems.stamp_iron_flat); add(ModItems.stamp_iron_flat);
@ -869,38 +1089,109 @@ public class MachineRecipes {
public Map<Object, Object[]> getCentrifugeRecipes() { public Map<Object, Object[]> getCentrifugeRecipes() {
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>(); Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
recipes.put(new ItemStack(ModItems.cell_uf6), getCentrifugeOutput(ModItems.cell_uf6));
recipes.put(new ItemStack(ModItems.cell_puf6), getCentrifugeOutput(ModItems.cell_puf6));
if (MainRegistry.enableDebugMode) { if (MainRegistry.enableDebugMode) {
recipes.put(new ItemStack(Item.getItemFromBlock(ModBlocks.test_render)), recipes.put(new ItemStack(Item.getItemFromBlock(ModBlocks.test_render)),
getCentrifugeOutput(Item.getItemFromBlock(ModBlocks.test_render))); getCentrifugeOutput(new ItemStack(ModBlocks.test_render)));
} }
recipes.put(new ItemStack(ModItems.cell_sas3), getCentrifugeOutput(ModItems.cell_sas3));
recipes.put(new ItemStack(ModItems.rod_uranium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_uranium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_uranium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_uranium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_dual_uranium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_dual_uranium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_dual_uranium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_dual_uranium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_quad_uranium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_quad_uranium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_quad_uranium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_quad_uranium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_plutonium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_plutonium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_plutonium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_plutonium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_dual_plutonium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_quad_plutonium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_mox_fuel_depleted), getCentrifugeOutput(ModItems.rod_mox_fuel_depleted)); recipes.put(new ItemStack(ModItems.rod_mox_fuel_depleted),
getCentrifugeOutput(new ItemStack(ModItems.rod_mox_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_dual_mox_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_dual_mox_fuel_depleted),
getCentrifugeOutput(ModItems.rod_dual_mox_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_dual_mox_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_quad_mox_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_quad_mox_fuel_depleted),
getCentrifugeOutput(ModItems.rod_quad_mox_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_quad_mox_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_schrabidium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_schrabidium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_schrabidium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_schrabidium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_dual_schrabidium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted), recipes.put(new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted),
getCentrifugeOutput(ModItems.rod_quad_schrabidium_fuel_depleted)); getCentrifugeOutput(new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted)));
recipes.put(new ItemStack(ModItems.powder_cloud), recipes.put(new ItemStack(ModItems.powder_cloud),
getCentrifugeOutput(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_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)));
return recipes;
}
public Map<Object, Object[]> getGasCentrifugeRecipes() {
Map<Object, Object[]> recipes = new HashMap<Object, Object[]>();
for(int i = 0; i < FluidType.values().length; i++) {
if(getGasCentOutput(FluidType.getEnum(i)) != null) {
List<GasCentOutput> outputs = getGasCentOutput(FluidType.getEnum(i));
int totalWeight = 0;
for(GasCentOutput o : outputs) {
totalWeight += o.weight;
}
ItemStack input = new ItemStack(ModItems.fluid_icon, 1, i);
ItemFluidIcon.addQuantity(input, getFluidConsumedGasCent(FluidType.getEnum(i)) * totalWeight);
ItemStack[] out = new ItemStack[4];
for(int j = 0; j < outputs.size(); j++) {
out[j] = outputs.get(j).output.copy();
out[j].stackSize *= outputs.get(j).weight;
}
for(int j = 0; j < 4; j++)
if(out[j] == null)
out[j] = new ItemStack(ModItems.nothing);
recipes.put(input, out);
}
}
return recipes; return recipes;
} }
@ -2457,11 +2748,21 @@ public class MachineRecipes {
case CENTRIFUGE: case CENTRIFUGE:
list.add(new ItemStack(ModItems.centrifuge_tower, 1)); list.add(new ItemStack(ModItems.centrifuge_tower, 1));
list.add(new ItemStack(ModItems.ingot_steel, 4)); list.add(new ItemStack(ModItems.ingot_steel, 4));
list.add(new ItemStack(ModItems.ingot_polymer, 2)); list.add(new ItemStack(Items.iron_ingot, 4));
list.add(new ItemStack(ModItems.plate_steel, 6)); list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.plate_copper, 2)); list.add(new ItemStack(ModItems.plate_copper, 2));
list.add(new ItemStack(ModItems.wire_red_copper, 8)); list.add(new ItemStack(ModItems.wire_red_copper, 8));
break; break;
case CENTRIFUGE_GAS:
list.add(new ItemStack(ModItems.centrifuge_tower, 1));
list.add(new ItemStack(ModItems.ingot_steel, 4));
list.add(new ItemStack(ModItems.ingot_polymer, 4));
list.add(new ItemStack(ModItems.ingot_desh, 2));
list.add(new ItemStack(ModItems.plate_steel, 6));
list.add(new ItemStack(ModItems.plate_advanced_alloy, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 8));
list.add(new ItemStack(ModItems.wire_gold, 4));
break;
case BREEDING_REACTOR: case BREEDING_REACTOR:
list.add(new ItemStack(ModItems.reactor_core, 1)); list.add(new ItemStack(ModItems.reactor_core, 1));
list.add(new ItemStack(ModItems.ingot_lead, 4)); list.add(new ItemStack(ModItems.ingot_lead, 4));
@ -3834,6 +4135,9 @@ public class MachineRecipes {
case CENTRIFUGE: case CENTRIFUGE:
output = new ItemStack(ModBlocks.machine_centrifuge, 1); output = new ItemStack(ModBlocks.machine_centrifuge, 1);
break; break;
case CENTRIFUGE_GAS:
output = new ItemStack(ModBlocks.machine_gascent, 1);
break;
case BREEDING_REACTOR: case BREEDING_REACTOR:
output = new ItemStack(ModBlocks.machine_reactor, 1); output = new ItemStack(ModBlocks.machine_reactor, 1);
break; break;

View File

@ -0,0 +1,94 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotMachineOutput;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerMachineGasCent extends Container {
private TileEntityMachineGasCent diFurnace;
public ContainerMachineGasCent(InventoryPlayer invPlayer, TileEntityMachineGasCent tedf) {
diFurnace = tedf;
//Battery
this.addSlotToContainer(new Slot(tedf, 0, 8, 53));
//Fluid ID IO
this.addSlotToContainer(new Slot(tedf, 1, 35, 17));
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 2, 35, 53));
//Fluid IO
this.addSlotToContainer(new Slot(tedf, 3, 71, 17));
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 4, 71, 53));
//Output
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 5, 134, 17));
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 6, 152, 17));
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 7, 134, 53));
this.addSlotToContainer(new SlotMachineOutput(invPlayer.player, tedf, 8, 152, 53));
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for(int i = 0; i < 9; i++)
{
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
}
}
@Override
public void addCraftingToCrafters(ICrafting crafting) {
super.addCraftingToCrafters(crafting);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if (var4 != null && var4.getHasStack())
{
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if (par2 <= 8) {
if (!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true))
{
return null;
}
}
else if (!this.mergeItemStack(var5, 0, 2, false))
{
if (!this.mergeItemStack(var5, 3, 4, false))
return null;
}
if (var5.stackSize == 0)
{
var4.putStack((ItemStack) null);
}
else
{
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return diFurnace.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,63 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.container.ContainerMachineGasCent;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIMachineGasCent extends GuiInfoContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/centrifuge_gas.png");
private TileEntityMachineGasCent diFurnace;
public GUIMachineGasCent(InventoryPlayer invPlayer, TileEntityMachineGasCent tedf) {
super(new ContainerMachineGasCent(invPlayer, tedf));
diFurnace = tedf;
this.xSize = 176;
this.ySize = 168;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 53, guiTop + 69 - 52, 16, 52);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 98, guiTop + 30, 6, 32, mouseX, mouseY, new String[] {String.valueOf((int)((double)diFurnace.progress / (double)diFurnace.processingSpeed * 100D)) + "%"});
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 51 - 34, 16, 34, diFurnace.power, diFurnace.maxPower);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
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)diFurnace.getPowerRemainingScaled(34);
drawTexturedModalRect(guiLeft + 8, guiTop + 51 - i, 176, 34 - i, 16, i);
int j = (int)diFurnace.getCentrifugeProgressScaled(33);
drawTexturedModalRect(guiLeft + 98, guiTop + 63 - j, 192, 32 - j, 6, j);
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tank.getSheet());
diFurnace.tank.renderTank(this, guiLeft + 53, guiTop + 69, diFurnace.tank.getTankType().textureX() * FluidTank.x, diFurnace.tank.getTankType().textureY() * FluidTank.y, 16, 52);
}
}

View File

@ -80,7 +80,7 @@ public class GUIRadioRec extends GuiInfoContainer {
@Override @Override
protected void drawGuiContainerForegroundLayer(int i, int j) { protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = I18n.format("container.radiobox"); String name = I18n.format("container.radiorec");
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
} }

View File

@ -153,6 +153,7 @@ public class ItemAssemblyTemplate extends Item {
BLAST_DOOR, BLAST_DOOR,
SLIDING_DOOR, SLIDING_DOOR,
CENTRIFUGE, CENTRIFUGE,
CENTRIFUGE_GAS,
BREEDING_REACTOR, BREEDING_REACTOR,
RTG_FURNACE, RTG_FURNACE,
RAD_GEN, RAD_GEN,
@ -605,6 +606,8 @@ public class ItemAssemblyTemplate extends Item {
return 200; return 200;
case CENTRIFUGE: case CENTRIFUGE:
return 250; return 250;
case CENTRIFUGE_GAS:
return 300;
case BREEDING_REACTOR: case BREEDING_REACTOR:
return 150; return 150;
case RTG_FURNACE: case RTG_FURNACE:

View File

@ -65,7 +65,7 @@ public class GunCalamity extends Item {
if (flag) { if (flag) {
entityarrow.canBePickedUp = 2; entityarrow.canBePickedUp = 2;
} else { } else {
player.inventory.consumeInventoryItem(ModItems.gun_mp40_ammo); player.inventory.consumeInventoryItem(ModItems.gun_calamity_ammo);
} }
if (!world.isRemote) { if (!world.isRemote) {
@ -82,7 +82,7 @@ public class GunCalamity extends Item {
if (flag) { if (flag) {
entityarrow.canBePickedUp = 2; entityarrow.canBePickedUp = 2;
} else { } else {
player.inventory.consumeInventoryItem(ModItems.gun_mp40_ammo); player.inventory.consumeInventoryItem(ModItems.gun_calamity_ammo);
} }
if (!world.isRemote) { if (!world.isRemote) {

View File

@ -83,6 +83,7 @@ public class ClientProxy extends ServerProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCelPrimeTanks.class, new RenderCelPrimePart()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCelPrimeTanks.class, new RenderCelPrimePart());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCentrifuge.class, new RenderCentrifuge()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCentrifuge.class, new RenderCentrifuge());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasCent.class, new RenderCentrifuge());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineUF6Tank.class, new RenderUF6Tank()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineUF6Tank.class, new RenderUF6Tank());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePuF6Tank.class, new RenderPuF6Tank()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePuF6Tank.class, new RenderPuF6Tank());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineIGenerator.class, new RenderIGenerator()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineIGenerator.class, new RenderIGenerator());

View File

@ -283,6 +283,7 @@ import com.hbm.tileentity.machine.TileEntityMachineDeuterium;
import com.hbm.tileentity.machine.TileEntityMachineDiesel; import com.hbm.tileentity.machine.TileEntityMachineDiesel;
import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace; import com.hbm.tileentity.machine.TileEntityMachineElectricFurnace;
import com.hbm.tileentity.machine.TileEntityMachineFluidTank; import com.hbm.tileentity.machine.TileEntityMachineFluidTank;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import com.hbm.tileentity.machine.TileEntityMachineGasFlare; import com.hbm.tileentity.machine.TileEntityMachineGasFlare;
import com.hbm.tileentity.machine.TileEntityMachineGenerator; import com.hbm.tileentity.machine.TileEntityMachineGenerator;
import com.hbm.tileentity.machine.TileEntityMachineIGenerator; import com.hbm.tileentity.machine.TileEntityMachineIGenerator;
@ -718,6 +719,7 @@ public class MainRegistry
GameRegistry.registerTileEntity(TileEntityNukeN45.class, "tileentity_n45"); GameRegistry.registerTileEntity(TileEntityNukeN45.class, "tileentity_n45");
GameRegistry.registerTileEntity(TileEntityBlastDoor.class, "tileentity_blast_door"); GameRegistry.registerTileEntity(TileEntityBlastDoor.class, "tileentity_blast_door");
GameRegistry.registerTileEntity(TileEntitySafe.class, "tileentity_safe"); GameRegistry.registerTileEntity(TileEntitySafe.class, "tileentity_safe");
GameRegistry.registerTileEntity(TileEntityMachineGasCent.class, "tileentity_gas_centrifuge");
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);

View File

@ -17,6 +17,8 @@ public class NEIConfig implements IConfigureNEI {
API.registerRecipeHandler(new AlloyFurnaceRecipeHandler()); API.registerRecipeHandler(new AlloyFurnaceRecipeHandler());
API.registerUsageHandler(new AlloyFurnaceRecipeHandler()); API.registerUsageHandler(new AlloyFurnaceRecipeHandler());
API.registerRecipeHandler(new CentrifugeRecipeHandler()); API.registerRecipeHandler(new CentrifugeRecipeHandler());
API.registerUsageHandler(new GasCentrifugeRecipeHandler());
API.registerRecipeHandler(new GasCentrifugeRecipeHandler());
API.registerUsageHandler(new CentrifugeRecipeHandler()); API.registerUsageHandler(new CentrifugeRecipeHandler());
API.registerRecipeHandler(new ReactorRecipeHandler()); API.registerRecipeHandler(new ReactorRecipeHandler());
API.registerUsageHandler(new ReactorRecipeHandler()); API.registerUsageHandler(new ReactorRecipeHandler());

View File

@ -181,6 +181,7 @@ public class ResourceManager {
//Centrifuge //Centrifuge
public static final ResourceLocation centrifuge_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_new.png"); public static final ResourceLocation centrifuge_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_new.png");
public static final ResourceLocation centrifuge_gas_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_gas.png");
//Anti Mass Spectrometer //Anti Mass Spectrometer
public static final ResourceLocation ams_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_base.png"); public static final ResourceLocation ams_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_base.png");

View File

@ -9,6 +9,7 @@ import com.hbm.tileentity.machine.TileEntityAMSBase;
import com.hbm.tileentity.machine.TileEntityAMSEmitter; import com.hbm.tileentity.machine.TileEntityAMSEmitter;
import com.hbm.tileentity.machine.TileEntityAMSLimiter; import com.hbm.tileentity.machine.TileEntityAMSLimiter;
import com.hbm.tileentity.machine.TileEntityMachineDiesel; import com.hbm.tileentity.machine.TileEntityMachineDiesel;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import com.hbm.tileentity.machine.TileEntityMachineReactorSmall; import com.hbm.tileentity.machine.TileEntityMachineReactorSmall;
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine; import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
import com.hbm.tileentity.machine.TileEntityRadioRec; import com.hbm.tileentity.machine.TileEntityRadioRec;
@ -149,6 +150,12 @@ public class AuxGaugePacket implements IMessage {
if(m.id == 1) if(m.id == 1)
radio.freq = ((double)m.value) / 10D; radio.freq = ((double)m.value) / 10D;
} }
if (te instanceof TileEntityMachineGasCent) {
TileEntityMachineGasCent cent = (TileEntityMachineGasCent)te;
if(m.id == 0)
cent.progress = m.value;
}
} catch (Exception x) { } } catch (Exception x) { }
return null; return null;

View File

@ -4,6 +4,8 @@ import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.TileEntityMachineCentrifuge;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
@ -33,7 +35,10 @@ public class RenderCentrifuge extends TileEntitySpecialRenderer {
GL11.glRotatef(0, 0F, 1F, 0F); break; GL11.glRotatef(0, 0F, 1F, 0F); break;
} }
bindTexture(ResourceManager.centrifuge_new_tex); if(tileEntity instanceof TileEntityMachineCentrifuge)
bindTexture(ResourceManager.centrifuge_new_tex);
if(tileEntity instanceof TileEntityMachineGasCent)
bindTexture(ResourceManager.centrifuge_gas_tex);
ResourceManager.centrifuge_new.renderAll(); ResourceManager.centrifuge_new.renderAll();
GL11.glPopMatrix(); GL11.glPopMatrix();

View File

@ -28,7 +28,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
public long power; public long power;
public int soundCycle = 0; public int soundCycle = 0;
public static final int maxPower = 100000; public static final int maxPower = 100000;
public static final int processingSpeed = 500; public static final int processingSpeed = 200;
private static final int[] slots_top = new int[] {0}; private static final int[] slots_top = new int[] {0};
private static final int[] slots_bottom = new int[] {2, 3, 4, 5}; private static final int[] slots_bottom = new int[] {2, 3, 4, 5};
@ -209,7 +209,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
{ {
return false; return false;
} }
ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0].getItem()); ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0]);
if(itemStack == null) if(itemStack == null)
{ {
return false; return false;
@ -233,7 +233,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
private void processItem() { private void processItem() {
if(canProcess()) { if(canProcess()) {
ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0].getItem()); ItemStack[] itemStack = MachineRecipes.getCentrifugeProcessingResult(slots[0]);
if(slots[2] == null && itemStack[0] != null) if(slots[2] == null && itemStack[0] != null)
{ {
@ -302,7 +302,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
if(hasPower() && isProcessing()) if(hasPower() && isProcessing())
{ {
this.power -= 500; this.power -= 200;
if(this.power < 0) if(this.power < 0)
{ {

View File

@ -0,0 +1,360 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.interfaces.IFluidContainer;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.MachineRecipes.GasCentOutput;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineGasCent extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor {
private ItemStack slots[];
public long power;
public int progress;
public static final int maxPower = 100000;
public static final int processingSpeed = 200;
public FluidTank tank;
private static final int[] slots_top = new int[] {3};
private static final int[] slots_bottom = new int[] {5, 6, 7, 8};
private static final int[] slots_side = new int[] {0, 3};
private String customName;
public TileEntityMachineGasCent() {
slots = new ItemStack[9];
tank = new FluidTank(FluidType.UF6, 8000, 0);
}
@Override
public int getSizeInventory() {
return slots.length;
}
@Override
public ItemStack getStackInSlot(int i) {
return slots[i];
}
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if(slots[i] != null)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
} else {
return null;
}
}
@Override
public void setInventorySlotContents(int i, ItemStack itemStack) {
slots[i] = itemStack;
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
{
itemStack.stackSize = getInventoryStackLimit();
}
}
@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.customName : "container.gasCentrifuge";
}
@Override
public boolean hasCustomInventoryName() {
return this.customName != null && this.customName.length() > 0;
}
public void setCustomName(String name) {
this.customName = name;
}
@Override
public int getInventoryStackLimit() {
return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
{
return false;
}else{
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
}
}
//You scrubs aren't needed for anything (right now)
@Override
public void openInventory() {}
@Override
public void closeInventory() {}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(i == 2 || i == 3 || i == 4 || i == 5)
{
return false;
}
return true;
}
@Override
public ItemStack decrStackSize(int i, int j) {
if(slots[i] != null)
{
if(slots[i].stackSize <= j)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
}
ItemStack itemStack1 = slots[i].splitStack(j);
if (slots[i].stackSize == 0)
{
slots[i] = null;
}
return itemStack1;
} else {
return null;
}
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
NBTTagList list = nbt.getTagList("items", 10);
power = nbt.getLong("powerTime");
progress = nbt.getShort("CookTime");
slots = new ItemStack[getSizeInventory()];
for(int i = 0; i < list.tagCount(); i++)
{
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
byte b0 = nbt1.getByte("slot");
if(b0 >= 0 && b0 < slots.length)
{
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
}
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("powerTime", power);
nbt.setShort("cookTime", (short) progress);
NBTTagList list = new NBTTagList();
for(int i = 0; i < slots.length; i++)
{
if(slots[i] != null)
{
NBTTagCompound nbt1 = new NBTTagCompound();
nbt1.setByte("slot", (byte)i);
slots[i].writeToNBT(nbt1);
list.appendTag(nbt1);
}
}
nbt.setTag("items", list);
}
@Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
{
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
}
@Override
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
return this.isItemValidForSlot(i, itemStack);
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return j != 0 || i != 1 || itemStack.getItem() == Items.bucket;
}
public int getCentrifugeProgressScaled(int i) {
return (progress * i) / processingSpeed;
}
public long getPowerRemainingScaled(int i) {
return (power * i) / maxPower;
}
private boolean canProcess() {
if(power > 0 && this.tank.getFill() >= MachineRecipes.getFluidConsumedGasCent(tank.getTankType())) {
List<GasCentOutput> list = MachineRecipes.getGasCentOutput(tank.getTankType());
if(list == null)
return false;
if(list.size() < 1 || list.size() > 4)
return false;
for(int i = 0; i < list.size(); i++) {
int slot = i + 5;
if(slots[slot] == null)
continue;
if(slots[slot].getItem() == list.get(i).output.getItem() &&
slots[slot].getItemDamage() == list.get(i).output.getItemDamage() &&
slots[slot].stackSize + list.get(i).output.stackSize <= slots[slot].getMaxStackSize())
continue;
return false;
}
return true;
}
return false;
}
private void process() {
List<GasCentOutput> out = MachineRecipes.getGasCentOutput(tank.getTankType());
this.progress = 0;
tank.setFill(tank.getFill() - MachineRecipes.getFluidConsumedGasCent(tank.getTankType()));
List<GasCentOutput> random = new ArrayList();
for(int i = 0; i < out.size(); i++) {
for(int j = 0; j < out.get(i).weight; j++) {
random.add(out.get(i));
}
}
Collections.shuffle(random);
GasCentOutput result = random.get(worldObj.rand.nextInt(random.size()));
int slot = result.slot + 4;
if(slots[slot] == null) {
slots[slot] = result.output.copy();
} else {
slots[slot].stackSize += result.output.stackSize;
}
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
tank.setType(1, 2, slots);
tank.loadTank(3, 4, slots);
tank.updateTank(xCoord, yCoord, zCoord);
if(canProcess()) {
this.progress++;
this.power -= 200;
if(this.power < 0)
power = 0;
if(progress >= processingSpeed) {
process();
}
} else {
this.progress = 0;
}
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, progress, 0));
}
}
@Override
public AxisAlignedBB getRenderBoundingBox() {
return TileEntity.INFINITE_EXTENT_AABB;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared()
{
return 65536.0D;
}
@Override
public void setPower(long i) {
power = i;
}
@Override
public long getPower() {
return power;
}
@Override
public long getMaxPower() {
return maxPower;
}
@Override
public void setFillstate(int fill, int index) {
tank.setFill(fill);
}
@Override
public void setType(FluidType type, int index) {
tank.setTankType(type);
}
@Override
public int getMaxAFluidFill(FluidType type) {
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
}
@Override
public int getAFluidFill(FluidType type) {
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
}
@Override
public void setAFluidFill(int i, FluidType type) {
if(type.name().equals(tank.getTankType().name()))
tank.setFill(i);
}
}