almost finished mining laser and lots of screaming scientists
@ -33,7 +33,7 @@ If you want to do some changes in the code yourself, start here after 6. and con
|
||||
|
||||
# License
|
||||
|
||||
This software is licensed under the GNU Public Livense version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license. You win this round, Stallman.
|
||||
This software is licensed under the GNU Public License version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license. You win this round, Stallman.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
0. Definitions.
|
||||
|
||||
@ -1085,23 +1085,29 @@ item.battery_spark_cell_10000.name=Spark Solider Raumzeit Kristall
|
||||
item.battery_spark_cell_power.name=Spark Lächerliche Physik-missachtende Energiespeichereinheit
|
||||
|
||||
item.upgrade_template.name=Maschinenupgrade-Vorlage
|
||||
item.upgrade_speed_1.name=Rotes Maschinenupgrade Mk.I
|
||||
item.upgrade_speed_2.name=Rotes Maschinenupgrade Mk.II
|
||||
item.upgrade_speed_3.name=Rotes Maschinenupgrade Mk.III
|
||||
item.upgrade_effect_1.name=Grünes Maschinenupgrade Mk.I
|
||||
item.upgrade_effect_2.name=Grünes Maschinenupgrade Mk.II
|
||||
item.upgrade_effect_3.name=Grünes Maschinenupgrade Mk.III
|
||||
item.upgrade_power_1.name=Blaues Maschinenupgrade Mk.I
|
||||
item.upgrade_power_2.name=Blaues Maschinenupgrade Mk.II
|
||||
item.upgrade_power_3.name=Blaues Maschinenupgrade Mk.III
|
||||
item.upgrade_fortune_1.name=Lila Maschinenupgrade Mk.I
|
||||
item.upgrade_fortune_2.name=Lila Maschinenupgrade Mk.II
|
||||
item.upgrade_fortune_3.name=Lila Maschinenupgrade Mk.III
|
||||
item.upgrade_afterburn_1.name=Pinkes Maschinenupgrade Mk.I
|
||||
item.upgrade_afterburn_2.name=Pinkes Maschinenupgrade Mk.II
|
||||
item.upgrade_afterburn_3.name=Pinkes Maschinenupgrade Mk.III
|
||||
item.upgrade_radius.name=Türkises Emitterupgrade
|
||||
item.upgrade_health.name=Pinkes Emitterupgrade
|
||||
item.upgrade_speed_1.name=Geschwindigkeitsupgrade Mk.I
|
||||
item.upgrade_speed_2.name=Geschwindigkeitsupgrade Mk.II
|
||||
item.upgrade_speed_3.name=Geschwindigkeitsupgrade Mk.III
|
||||
item.upgrade_effect_1.name=Effektupgrade Mk.I
|
||||
item.upgrade_effect_2.name=Effektupgrade Mk.II
|
||||
item.upgrade_effect_3.name=Effektupgrade Mk.III
|
||||
item.upgrade_power_1.name=Stromsparupgrade Mk.I
|
||||
item.upgrade_power_2.name=Stromsparupgrade Mk.II
|
||||
item.upgrade_power_3.name=Stromsparupgrade Mk.III
|
||||
item.upgrade_fortune_1.name=Glückupgrade Mk.I
|
||||
item.upgrade_fortune_2.name=Glückupgrade Mk.II
|
||||
item.upgrade_fortune_3.name=Glückupgrade Mk.III
|
||||
item.upgrade_afterburn_1.name=Nachbrennerupgrade Mk.I
|
||||
item.upgrade_afterburn_2.name=Nachbrennerupgrade Mk.II
|
||||
item.upgrade_afterburn_3.name=Nachbrennerupgrade Mk.III
|
||||
item.upgrade_radius.name=Kraftfeld-Radiusupgrade
|
||||
item.upgrade_health.name=Kraftfeld-Resistenzupgrade
|
||||
item.upgrade_smelter.name=Ofenupgrade
|
||||
item.upgrade_shredder.name=Schredderupgrade
|
||||
item.upgrade_centrifuge.name=Zentrifugenupgrade
|
||||
item.upgrade_crystallizer.name=Kristallisiererupgrade
|
||||
item.upgrade_nullifier.name=Müllvernichter-Upgrade
|
||||
item.upgrade_screm.name=Schreiendes Wissenschaftler-Upgrade
|
||||
|
||||
item.fusion_core.name=Fusionskern
|
||||
item.energy_core.name=Selbstgebauter Energiekern
|
||||
|
||||
@ -1084,24 +1084,33 @@ item.battery_spark_cell_2500.name=Spark Arcane Dirac Sea
|
||||
item.battery_spark_cell_10000.name=Spark Solid Space-Time Crystal
|
||||
item.battery_spark_cell_power.name=Spark Ludicrous Physics-Defying Energy Storage Unit
|
||||
|
||||
item.upgrade_template.name=Machine Upgrade Piece Template
|
||||
item.upgrade_speed_1.name=Red Machine Upgrade Mk.I
|
||||
item.upgrade_speed_2.name=Red Machine Upgrade Mk.II
|
||||
item.upgrade_speed_3.name=Red Machine Upgrade Mk.III
|
||||
item.upgrade_effect_1.name=Green Machine Upgrade Mk.I
|
||||
item.upgrade_effect_2.name=Green Machine Upgrade Mk.II
|
||||
item.upgrade_effect_3.name=Green Machine Upgrade Mk.III
|
||||
item.upgrade_power_1.name=Blue Machine Upgrade Mk.I
|
||||
item.upgrade_power_2.name=Blue Machine Upgrade Mk.II
|
||||
item.upgrade_power_3.name=Blue Machine Upgrade Mk.III
|
||||
item.upgrade_fortune_1.name=Purple Machine Upgrade Mk.I
|
||||
item.upgrade_fortune_2.name=Purple Machine Upgrade Mk.II
|
||||
item.upgrade_fortune_3.name=Purple Machine Upgrade Mk.III
|
||||
item.upgrade_afterburn_1.name=Pink Machine Upgrade Mk.I
|
||||
item.upgrade_afterburn_2.name=Pink Machine Upgrade Mk.II
|
||||
item.upgrade_afterburn_3.name=Pink Machine Upgrade Mk.III
|
||||
item.upgrade_radius.name=Teal Emitter Upgrade
|
||||
item.upgrade_health.name=Pink Emitter Upgrade
|
||||
item.upgrade_template.name=Machine Upgrade Template
|
||||
item.upgrade_speed_1.name=Speed Upgrade Mk.I
|
||||
item.upgrade_speed_2.name=Speed Upgrade Mk.II
|
||||
item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
||||
item.upgrade_effect_1.name=Effectiveness Upgrade Mk.I
|
||||
item.upgrade_effect_2.name=Effectiveness Upgrade Mk.II
|
||||
item.upgrade_effect_3.name=Effectiveness Upgrade Mk.III
|
||||
item.upgrade_power_1.name=Power Saving Upgrade Mk.I
|
||||
item.upgrade_power_2.name=Power Saving Upgrade Mk.II
|
||||
item.upgrade_power_3.name=Power Saving Upgrade Mk.III
|
||||
item.upgrade_fortune_1.name=Fortune Upgrade Mk.I
|
||||
item.upgrade_fortune_2.name=Fortune Upgrade Mk.II
|
||||
item.upgrade_fortune_3.name=Fortune Upgrade Mk.III
|
||||
item.upgrade_afterburn_1.name=Afterburner Upgrade Mk.I
|
||||
item.upgrade_afterburn_2.name=Afterburner Upgrade Mk.II
|
||||
item.upgrade_afterburn_3.name=Afterburner Upgrade Mk.III
|
||||
item.upgrade_overdrive_1.name=Overdrive Machine Upgrade Mk.I
|
||||
item.upgrade_overdrive_2.name=Overdrive Machine Upgrade Mk.II
|
||||
item.upgrade_overdrive_3.name=Overdrive Machine Upgrade Mk.III
|
||||
item.upgrade_radius.name=Emitter Radius Upgrade
|
||||
item.upgrade_health.name=Emitter Health Upgrade
|
||||
item.upgrade_smelter.name=Smelter Upgrade
|
||||
item.upgrade_shredder.name=Shredder Upgrade
|
||||
item.upgrade_centrifuge.name=Centrifuge Upgrade
|
||||
item.upgrade_crystallizer.name=Crystallizer Upgrade
|
||||
item.upgrade_nullifier.name=Scrap Destroyer Upgrade
|
||||
item.upgrade_screm.name=Screaming Scientist Upgrade
|
||||
|
||||
item.fusion_core.name=Fusion Core
|
||||
item.energy_core.name=Makeshift Energy Core
|
||||
|
||||
@ -105,6 +105,103 @@ v 0.112500 -2.125000 -0.031250
|
||||
v 0.112500 -2.125000 0.031250
|
||||
v 0.112500 -1.500000 0.031250
|
||||
v 0.112500 -1.500000 -0.031250
|
||||
vt 0.166667 0.904762
|
||||
vt 0.166667 1.000000
|
||||
vt 0.104167 1.000000
|
||||
vt 0.500000 0.809524
|
||||
vt 0.666667 0.809524
|
||||
vt 0.625000 0.904762
|
||||
vt -0.000000 1.000000
|
||||
vt 0.000000 0.904762
|
||||
vt 0.062500 0.904762
|
||||
vt 0.541667 0.904762
|
||||
vt 0.666667 0.523810
|
||||
vt 0.833333 0.523810
|
||||
vt 0.833333 0.714286
|
||||
vt 0.166667 0.809524
|
||||
vt 0.333333 0.809524
|
||||
vt 0.291667 0.904762
|
||||
vt 0.208333 0.904762
|
||||
vt 0.166667 0.619048
|
||||
vt 0.333333 0.619048
|
||||
vt 0.062500 0.619048
|
||||
vt 0.104167 0.619048
|
||||
vt 0.104167 0.809524
|
||||
vt 0.500000 0.619048
|
||||
vt 0.666667 0.619048
|
||||
vt 0.333333 0.523810
|
||||
vt 0.437500 0.904762
|
||||
vt 0.437500 0.809524
|
||||
vt -0.000000 0.809524
|
||||
vt 0.062500 0.809524
|
||||
vt 0.333333 0.904762
|
||||
vt 0.395833 0.809524
|
||||
vt 0.395833 0.619048
|
||||
vt 0.437500 0.619048
|
||||
vt 0.500000 0.523810
|
||||
vt 0.000000 0.523810
|
||||
vt 0.166667 0.523810
|
||||
vt 0.375000 0.404762
|
||||
vt 0.375000 0.428571
|
||||
vt 0.458333 0.428571
|
||||
vt 0.166667 0.500000
|
||||
vt 0.916667 0.380952
|
||||
vt 0.875000 0.380952
|
||||
vt 0.875000 0.000000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.375000 0.023810
|
||||
vt 0.458333 0.023810
|
||||
vt 0.166667 0.000000
|
||||
vt 0.166667 0.023810
|
||||
vt -0.000000 0.023810
|
||||
vt 0.833333 0.380952
|
||||
vt 0.833333 0.000000
|
||||
vt 0.187500 0.500000
|
||||
vt 0.187500 0.023810
|
||||
vt 0.354167 0.500000
|
||||
vt 0.354167 0.023810
|
||||
vt 0.791667 0.380952
|
||||
vt 0.791667 0.000000
|
||||
vt -0.000000 0.500000
|
||||
vt 0.750000 0.380952
|
||||
vt 0.750000 0.000000
|
||||
vt 0.375000 0.500000
|
||||
vt 0.708333 0.380952
|
||||
vt 0.708333 0.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 0.666667 0.380952
|
||||
vt 0.666667 0.000000
|
||||
vt 0.958333 0.380952
|
||||
vt 0.916667 0.000000
|
||||
vt 1.000000 0.380952
|
||||
vt 0.958333 0.000000
|
||||
vt 0.608693 0.378325
|
||||
vt 0.585632 0.314697
|
||||
vt 0.641307 0.288342
|
||||
vt 0.562500 0.404762
|
||||
vt 0.562500 0.023810
|
||||
vt 0.583333 0.023810
|
||||
vt 0.479167 0.404762
|
||||
vt 0.479167 0.023810
|
||||
vt 0.458333 0.404762
|
||||
vt 0.583333 0.404762
|
||||
vt 0.458333 0.000000
|
||||
vt 0.666667 0.261905
|
||||
vt 0.583333 0.261905
|
||||
vt 0.666667 0.285714
|
||||
vt 0.583333 0.285714
|
||||
vt 0.666667 0.023810
|
||||
vt 0.104167 0.904762
|
||||
vt 0.062500 1.000000
|
||||
vt 0.666667 0.714286
|
||||
vt 0.500000 0.904762
|
||||
vt 0.395833 0.904762
|
||||
vt 1.000000 0.000000
|
||||
vt 0.664368 0.314697
|
||||
vt 0.664368 0.351969
|
||||
vt 0.641307 0.378325
|
||||
vt 0.585632 0.351969
|
||||
vt 0.608693 0.288342
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 0.000000 0.000000
|
||||
@ -113,166 +210,161 @@ vn 0.000000 0.447200 -0.894400
|
||||
vn 0.000000 0.447200 0.894400
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
vn 0.549000 -0.630200 -0.549000
|
||||
vn 0.776400 -0.630200 0.000000
|
||||
vn 0.707100 0.000000 0.707100
|
||||
vn 0.549000 -0.630200 0.549000
|
||||
vn 0.000000 -0.630200 0.776400
|
||||
vn -0.707100 0.000000 0.707100
|
||||
vn -0.549000 -0.630200 0.549000
|
||||
vn -0.776400 -0.630200 0.000000
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
vn 0.000000 -0.630200 -0.776400
|
||||
vn -0.549000 -0.630200 -0.549000
|
||||
vn 0.382700 0.000000 -0.923900
|
||||
vn 0.923900 0.000000 -0.382700
|
||||
vn 0.923900 0.000000 0.382700
|
||||
vn 0.382700 0.000000 0.923900
|
||||
vn -0.382700 0.000000 0.923900
|
||||
vn -0.923900 0.000000 0.382700
|
||||
vn -0.382700 0.000000 -0.923900
|
||||
vn -0.923900 0.000000 -0.382700
|
||||
s off
|
||||
f 4//1 2//1 20//1
|
||||
f 10//2 9//2 8//2
|
||||
f 6//1 8//1 17//1
|
||||
f 17//3 13//3 14//3
|
||||
f 3//4 7//4 5//4
|
||||
f 11//3 12//3 2//3
|
||||
f 20//2 16//2 15//2
|
||||
f 16//2 24//2 23//2
|
||||
f 21//1 23//1 24//1
|
||||
f 13//3 21//3 22//3
|
||||
f 7//3 12//3 11//3
|
||||
f 1//2 9//2 10//2
|
||||
f 18//5 14//5 10//5
|
||||
f 9//6 13//6 17//6
|
||||
f 15//6 11//6 4//6
|
||||
f 2//5 12//5 16//5
|
||||
f 12//7 7//7 24//7
|
||||
f 22//7 3//7 10//7
|
||||
f 9//8 1//8 21//8
|
||||
f 23//8 5//8 11//8
|
||||
f 23//8 21//8 1//8
|
||||
f 3//7 22//7 24//7
|
||||
f 64//1 60//1 57//1
|
||||
f 48//1 44//1 25//1
|
||||
f 59//4 63//4 61//4
|
||||
f 43//4 47//4 45//4
|
||||
f 56//7 55//7 51//7
|
||||
f 25//8 26//8 45//8
|
||||
f 54//3 53//3 55//3
|
||||
f 46//3 45//3 47//3
|
||||
f 49//8 50//8 53//8
|
||||
f 48//7 47//7 43//7
|
||||
f 51//4 55//4 53//4
|
||||
f 44//2 43//2 26//2
|
||||
f 52//2 51//2 50//2
|
||||
f 56//1 52//1 49//1
|
||||
f 33//4 37//4 41//4
|
||||
f 72//2 71//2 67//2
|
||||
f 57//3 58//3 61//3
|
||||
f 70//7 69//7 71//7
|
||||
f 62//7 61//7 63//7
|
||||
f 65//3 66//3 69//3
|
||||
f 64//2 63//2 59//2
|
||||
f 67//4 71//4 69//4
|
||||
f 60//8 59//8 58//8
|
||||
f 68//8 67//8 66//8
|
||||
f 72//1 68//1 65//1
|
||||
f 81//7 87//7 86//7
|
||||
f 84//1 88//1 87//1
|
||||
f 73//3 79//3 78//3
|
||||
f 73//1 76//1 80//1
|
||||
f 75//2 77//2 80//2
|
||||
f 74//4 78//4 77//4
|
||||
f 83//8 85//8 88//8
|
||||
f 82//4 86//4 85//4
|
||||
f 89//2 95//2 94//2
|
||||
f 92//1 96//1 95//1
|
||||
f 91//3 93//3 96//3
|
||||
f 91//4 90//4 94//4
|
||||
f 97//8 103//8 102//8
|
||||
f 100//1 104//1 103//1
|
||||
f 99//7 101//7 104//7
|
||||
f 98//4 102//4 101//4
|
||||
f 19//1 4//1 20//1
|
||||
f 6//2 10//2 8//2
|
||||
f 18//1 6//1 17//1
|
||||
f 18//3 17//3 14//3
|
||||
f 1//4 3//4 5//4
|
||||
f 4//3 11//3 2//3
|
||||
f 19//2 20//2 15//2
|
||||
f 15//2 16//2 23//2
|
||||
f 22//1 21//1 24//1
|
||||
f 14//3 13//3 22//3
|
||||
f 5//3 7//3 11//3
|
||||
f 3//2 1//2 10//2
|
||||
f 6//5 18//5 10//5
|
||||
f 8//6 9//6 17//6
|
||||
f 19//6 15//6 4//6
|
||||
f 20//5 2//5 16//5
|
||||
f 16//7 12//7 24//7
|
||||
f 14//7 22//7 10//7
|
||||
f 13//8 9//8 21//8
|
||||
f 15//8 23//8 11//8
|
||||
f 5//8 23//8 1//8
|
||||
f 7//7 3//7 24//7
|
||||
f 62//1 64//1 57//1
|
||||
f 46//1 48//1 25//1
|
||||
f 58//4 59//4 61//4
|
||||
f 26//4 43//4 45//4
|
||||
f 52//7 56//7 51//7
|
||||
f 46//8 25//8 45//8
|
||||
f 56//3 54//3 55//3
|
||||
f 48//3 46//3 47//3
|
||||
f 54//8 49//8 53//8
|
||||
f 44//7 48//7 43//7
|
||||
f 50//4 51//4 53//4
|
||||
f 25//2 44//2 26//2
|
||||
f 49//2 52//2 50//2
|
||||
f 54//1 56//1 49//1
|
||||
f 41//4 27//4 29//4
|
||||
f 29//4 31//4 41//4
|
||||
f 33//4 35//4 37//4
|
||||
f 37//4 39//4 41//4
|
||||
f 41//4 31//4 33//4
|
||||
f 68//2 72//2 67//2
|
||||
f 62//3 57//3 61//3
|
||||
f 72//7 70//7 71//7
|
||||
f 64//7 62//7 63//7
|
||||
f 70//3 65//3 69//3
|
||||
f 60//2 64//2 59//2
|
||||
f 66//4 67//4 69//4
|
||||
f 57//8 60//8 58//8
|
||||
f 65//8 68//8 66//8
|
||||
f 70//1 72//1 65//1
|
||||
f 82//7 81//7 86//7
|
||||
f 81//1 84//1 87//1
|
||||
f 74//3 73//3 78//3
|
||||
f 79//1 73//1 80//1
|
||||
f 76//2 75//2 80//2
|
||||
f 75//4 74//4 77//4
|
||||
f 84//8 83//8 88//8
|
||||
f 83//4 82//4 85//4
|
||||
f 90//2 89//2 94//2
|
||||
f 89//1 92//1 95//1
|
||||
f 92//3 91//3 96//3
|
||||
f 93//4 91//4 94//4
|
||||
f 98//8 97//8 102//8
|
||||
f 97//1 100//1 103//1
|
||||
f 100//7 99//7 104//7
|
||||
f 99//4 98//4 101//4
|
||||
s 1
|
||||
f 28//7 30//9 29//10
|
||||
f 30//9 32//3 31//11
|
||||
f 32//3 34//12 33//13
|
||||
f 34//12 36//8 35//14
|
||||
f 36//8 38//15 37//16
|
||||
f 38//15 40//2 39//17
|
||||
f 42//18 28//7 27//19
|
||||
f 40//2 42//18 41//20
|
||||
f 27//19 28//7 29//10
|
||||
f 29//10 30//9 31//11
|
||||
f 31//11 32//3 33//13
|
||||
f 33//13 34//12 35//14
|
||||
f 35//14 36//8 37//16
|
||||
f 37//16 38//15 39//17
|
||||
f 41//20 42//18 27//19
|
||||
f 39//17 40//2 41//20
|
||||
f 4/1/1 2/2/1 20/3/1
|
||||
f 10/4/2 9/5/2 8/6/2
|
||||
f 6/7/1 8/8/1 17/9/1
|
||||
f 17/10/3 13/4/3 14/5/3
|
||||
f 3/11/4 7/12/4 5/13/4
|
||||
f 11/14/3 12/15/3 2/16/3
|
||||
f 20/17/2 16/14/2 15/15/2
|
||||
f 16/14/2 24/18/2 23/19/2
|
||||
f 21/20/1 23/21/1 24/22/1
|
||||
f 13/4/3 21/23/3 22/24/3
|
||||
f 7/25/3 12/15/3 11/14/3
|
||||
f 1/11/2 9/5/2 10/4/2
|
||||
f 18/26/5 14/27/5 10/4/5
|
||||
f 9/28/6 13/29/6 17/9/6
|
||||
f 15/22/6 11/14/6 4/1/6
|
||||
f 2/30/5 12/15/5 16/31/5
|
||||
f 12/15/7 7/25/7 24/32/7
|
||||
f 22/33/7 3/34/7 10/4/7
|
||||
f 9/28/8 1/35/8 21/20/8
|
||||
f 23/21/8 5/36/8 11/14/8
|
||||
f 23/21/8 21/20/8 1/35/8
|
||||
f 3/34/7 22/33/7 24/32/7
|
||||
f 64/37/1 60/38/1 57/39/1
|
||||
f 48/40/1 44/36/1 25/35/1
|
||||
f 28/41/9 30/42/9 29/43/9
|
||||
f 59/44/4 63/45/4 61/46/4
|
||||
f 43/47/4 47/48/4 45/49/4
|
||||
f 30/42/10 32/50/10 31/51/10
|
||||
f 56/52/7 55/53/7 51/48/7
|
||||
f 25/54/8 26/55/8 45/45/8
|
||||
f 32/50/11 34/56/11 33/57/11
|
||||
f 54/54/3 53/55/3 55/53/3
|
||||
f 46/58/3 45/49/3 47/48/3
|
||||
f 34/56/12 36/59/12 35/60/12
|
||||
f 49/61/8 50/45/8 53/55/8
|
||||
f 48/40/7 47/48/7 43/53/7
|
||||
f 36/59/13 38/62/13 37/63/13
|
||||
f 51/48/4 55/47/4 53/64/4
|
||||
f 44/52/2 43/53/2 26/55/2
|
||||
f 38/62/14 40/65/14 39/66/14
|
||||
f 42/67/15 28/41/15 27/68/15
|
||||
f 40/69/16 42/67/16 41/70/16
|
||||
f 52/40/2 51/48/2 50/49/2
|
||||
f 56/36/1 52/40/1 49/58/1
|
||||
f 33/71/4 37/72/4 41/73/4
|
||||
f 72/74/2 71/75/2 67/76/2
|
||||
f 57/77/3 58/78/3 61/46/3
|
||||
f 70/77/7 69/78/7 71/75/7
|
||||
f 62/79/7 61/46/7 63/45/7
|
||||
f 65/79/3 66/46/3 69/78/3
|
||||
f 64/80/2 63/76/2 59/75/2
|
||||
f 67/45/4 71/44/4 69/81/4
|
||||
f 60/74/8 59/75/8 58/78/8
|
||||
f 68/37/8 67/45/8 66/46/8
|
||||
f 72/38/1 68/37/1 65/79/1
|
||||
f 81/82/7 87/83/7 86/76/7
|
||||
f 84/83/1 88/82/1 87/84/1
|
||||
f 73/82/3 79/83/3 78/76/3
|
||||
f 73/82/1 76/84/1 80/85/1
|
||||
f 75/76/2 77/86/2 80/82/2
|
||||
f 74/84/4 78/85/4 77/83/4
|
||||
f 83/76/8 85/86/8 88/82/8
|
||||
f 82/83/4 86/82/4 85/84/4
|
||||
f 89/82/2 95/83/2 94/76/2
|
||||
f 92/83/1 96/82/1 95/84/1
|
||||
f 91/76/3 93/86/3 96/82/3
|
||||
f 91/85/4 90/83/4 94/82/4
|
||||
f 97/82/8 103/83/8 102/76/8
|
||||
f 100/84/1 104/85/1 103/83/1
|
||||
f 99/76/7 101/86/7 104/82/7
|
||||
f 98/84/4 102/85/4 101/83/4
|
||||
f 19/87/1 4/1/1 20/3/1
|
||||
f 6/10/2 10/4/2 8/6/2
|
||||
f 18/88/1 6/7/1 17/9/1
|
||||
f 18/6/3 17/10/3 14/5/3
|
||||
f 1/89/4 3/11/4 5/13/4
|
||||
f 4/17/3 11/14/3 2/16/3
|
||||
f 19/16/2 20/17/2 15/15/2
|
||||
f 15/15/2 16/14/2 23/19/2
|
||||
f 22/29/1 21/20/1 24/22/1
|
||||
f 14/5/3 13/4/3 22/24/3
|
||||
f 5/36/3 7/25/3 11/14/3
|
||||
f 3/34/2 1/11/2 10/4/2
|
||||
f 6/90/5 18/26/5 10/4/5
|
||||
f 8/8/6 9/28/6 17/9/6
|
||||
f 19/87/6 15/22/6 4/1/6
|
||||
f 20/91/5 2/30/5 16/31/5
|
||||
f 16/31/7 12/15/7 24/32/7
|
||||
f 14/27/7 22/33/7 10/4/7
|
||||
f 13/29/8 9/28/8 21/20/8
|
||||
f 15/22/8 23/21/8 11/14/8
|
||||
f 5/36/8 23/21/8 1/35/8
|
||||
f 7/25/7 3/34/7 24/32/7
|
||||
f 62/79/1 64/37/1 57/39/1
|
||||
f 46/58/1 48/40/1 25/35/1
|
||||
f 27/68/9 28/41/9 29/43/9
|
||||
f 58/81/4 59/44/4 61/46/4
|
||||
f 26/64/4 43/47/4 45/49/4
|
||||
f 29/43/10 30/42/10 31/51/10
|
||||
f 52/40/7 56/52/7 51/48/7
|
||||
f 46/61/8 25/54/8 45/45/8
|
||||
f 31/51/11 32/50/11 33/57/11
|
||||
f 56/52/3 54/54/3 55/53/3
|
||||
f 48/40/3 46/58/3 47/48/3
|
||||
f 33/57/12 34/56/12 35/60/12
|
||||
f 54/54/8 49/61/8 53/55/8
|
||||
f 44/52/7 48/40/7 43/53/7
|
||||
f 35/60/13 36/59/13 37/63/13
|
||||
f 50/49/4 51/48/4 53/64/4
|
||||
f 25/54/2 44/52/2 26/55/2
|
||||
f 37/63/14 38/62/14 39/66/14
|
||||
f 41/70/15 42/67/15 27/68/15
|
||||
f 39/92/16 40/69/16 41/70/16
|
||||
f 49/58/2 52/40/2 50/49/2
|
||||
f 54/35/1 56/36/1 49/58/1
|
||||
f 41/73/4 27/93/4 29/94/4
|
||||
f 29/94/4 31/95/4 41/73/4
|
||||
f 33/71/4 35/96/4 37/72/4
|
||||
f 37/72/4 39/97/4 41/73/4
|
||||
f 41/73/4 31/95/4 33/71/4
|
||||
f 68/80/2 72/74/2 67/76/2
|
||||
f 62/79/3 57/77/3 61/46/3
|
||||
f 72/74/7 70/77/7 71/75/7
|
||||
f 64/37/7 62/79/7 63/45/7
|
||||
f 70/77/3 65/79/3 69/78/3
|
||||
f 60/74/2 64/80/2 59/75/2
|
||||
f 66/46/4 67/45/4 69/81/4
|
||||
f 57/77/8 60/74/8 58/78/8
|
||||
f 65/79/8 68/37/8 66/46/8
|
||||
f 70/39/1 72/38/1 65/79/1
|
||||
f 82/86/7 81/82/7 86/76/7
|
||||
f 81/85/1 84/83/1 87/84/1
|
||||
f 74/86/3 73/82/3 78/76/3
|
||||
f 79/83/1 73/82/1 80/85/1
|
||||
f 76/83/2 75/76/2 80/82/2
|
||||
f 75/82/4 74/84/4 77/83/4
|
||||
f 84/83/8 83/76/8 88/82/8
|
||||
f 83/85/4 82/83/4 85/84/4
|
||||
f 90/86/2 89/82/2 94/76/2
|
||||
f 89/85/1 92/83/1 95/84/1
|
||||
f 92/83/3 91/76/3 96/82/3
|
||||
f 93/84/4 91/85/4 94/82/4
|
||||
f 98/86/8 97/82/8 102/76/8
|
||||
f 97/82/1 100/84/1 103/83/1
|
||||
f 100/83/7 99/76/7 104/82/7
|
||||
f 99/82/4 98/84/4 101/83/4
|
||||
o Pivot
|
||||
v 0.000000 -0.125000 -0.500000
|
||||
v 0.000000 0.000000 -0.500000
|
||||
@ -336,149 +428,214 @@ v 0.000000 -0.500000 0.312500
|
||||
v 0.220971 -0.500000 0.220971
|
||||
v 0.312500 -0.500000 -0.000000
|
||||
v 0.220971 -0.500000 -0.220971
|
||||
vt 0.750000 0.100000
|
||||
vt 0.687500 0.100000
|
||||
vt 0.687500 0.000000
|
||||
vt 0.625000 0.100000
|
||||
vt 0.625000 0.000000
|
||||
vt 0.562500 0.100000
|
||||
vt 0.562500 0.000000
|
||||
vt 0.500000 0.100000
|
||||
vt 0.500000 0.000000
|
||||
vt 0.437500 0.100000
|
||||
vt 0.437500 0.000000
|
||||
vt 0.375000 0.100000
|
||||
vt 0.375000 0.000000
|
||||
vt 0.312500 0.100000
|
||||
vt 0.312500 0.000000
|
||||
vt 0.250000 0.100000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.187500 0.100000
|
||||
vt 0.187500 0.000000
|
||||
vt 0.125000 0.100000
|
||||
vt 0.125000 0.000000
|
||||
vt 0.062500 0.100000
|
||||
vt 0.062500 0.000000
|
||||
vt 0.000000 0.100000
|
||||
vt 0.000000 0.000000
|
||||
vt 1.000000 0.100000
|
||||
vt 0.937500 0.100000
|
||||
vt 0.937500 0.000000
|
||||
vt 0.875000 0.100000
|
||||
vt 0.875000 0.000000
|
||||
vt 0.812500 0.100000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.812500 0.000000
|
||||
vt 0.134245 0.891194
|
||||
vt 0.003669 0.422187
|
||||
vt 0.329664 0.577813
|
||||
vt 0.791667 0.800000
|
||||
vt 0.791667 0.900000
|
||||
vt 0.750000 0.900000
|
||||
vt 0.791667 1.000000
|
||||
vt 0.750000 1.000000
|
||||
vt 0.750000 0.800000
|
||||
vt 0.750000 0.400000
|
||||
vt 0.791667 0.400000
|
||||
vt 0.729167 0.950000
|
||||
vt 0.583333 0.800000
|
||||
vt 0.578862 0.580181
|
||||
vt 0.408409 0.989268
|
||||
vt 0.337805 0.819819
|
||||
vt 0.500000 0.400000
|
||||
vt 0.583333 0.100000
|
||||
vt 0.333333 0.400000
|
||||
vt 0.333333 0.100000
|
||||
vt 0.416667 0.100000
|
||||
vt 0.833333 0.400000
|
||||
vt 0.833333 0.100000
|
||||
vt 0.916667 0.100000
|
||||
vt 0.583333 0.400000
|
||||
vt 0.666667 0.100000
|
||||
vt 0.416667 0.400000
|
||||
vt 0.916667 0.400000
|
||||
vt 0.666667 0.400000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.199089 0.108806
|
||||
vt 0.258997 0.168362
|
||||
vt 0.304849 0.278406
|
||||
vt 0.329664 0.422187
|
||||
vt 0.304849 0.721594
|
||||
vt 0.258997 0.831638
|
||||
vt 0.199089 0.891194
|
||||
vt 0.074336 0.831638
|
||||
vt 0.028484 0.721594
|
||||
vt 0.003669 0.577813
|
||||
vt 0.028484 0.278406
|
||||
vt 0.074336 0.168362
|
||||
vt 0.134244 0.108806
|
||||
vt 0.666667 1.000000
|
||||
vt 0.604167 0.950000
|
||||
vt 0.337805 0.580181
|
||||
vt 0.408409 0.410732
|
||||
vt 0.508258 0.410732
|
||||
vt 0.578862 0.819819
|
||||
vt 0.508258 0.989268
|
||||
vt 1.000000 0.400000
|
||||
vn 0.195100 0.000000 -0.980800
|
||||
vn 0.555600 0.000000 -0.831500
|
||||
vn 0.831500 0.000000 -0.555600
|
||||
vn 0.980800 0.000000 -0.195100
|
||||
vn 0.980800 0.000000 0.195100
|
||||
vn 0.831500 0.000000 0.555600
|
||||
vn 0.555600 0.000000 0.831500
|
||||
vn 0.195100 0.000000 0.980800
|
||||
vn -0.195100 0.000000 0.980800
|
||||
vn -0.555600 0.000000 0.831500
|
||||
vn -0.831500 0.000000 0.555600
|
||||
vn -0.980800 0.000000 0.195100
|
||||
vn -0.980800 0.000000 -0.195100
|
||||
vn -0.831500 0.000000 -0.555600
|
||||
vn -0.195100 0.000000 -0.980800
|
||||
vn -0.555600 0.000000 -0.831500
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 -0.382700 -0.923900
|
||||
vn 0.000000 -0.923900 -0.382700
|
||||
vn 0.000000 -0.923900 0.382700
|
||||
vn 0.000000 -0.382700 0.923900
|
||||
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.382700 0.000000 -0.923900
|
||||
vn 0.285500 -0.665700 -0.689400
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
vn 0.527600 -0.665700 -0.527600
|
||||
vn 0.923900 0.000000 -0.382700
|
||||
vn 0.689400 -0.665700 -0.285500
|
||||
vn 0.746200 -0.665700 0.000000
|
||||
vn 0.923900 0.000000 0.382700
|
||||
vn 0.689400 -0.665700 0.285500
|
||||
vn 0.707100 0.000000 0.707100
|
||||
vn 0.527600 -0.665700 0.527600
|
||||
vn 0.382700 0.000000 0.923900
|
||||
vn 0.285500 -0.665700 0.689400
|
||||
vn 0.000000 0.000000 1.000000
|
||||
vn 0.000000 -0.665700 0.746200
|
||||
vn -0.382700 0.000000 0.923900
|
||||
vn -0.285500 -0.665700 0.689400
|
||||
vn -0.707100 0.000000 0.707100
|
||||
vn -0.527600 -0.665700 0.527600
|
||||
vn 0.382700 -0.000000 0.923900
|
||||
vn -0.923900 0.000000 0.382700
|
||||
vn -0.689400 -0.665700 0.285500
|
||||
vn -0.746200 -0.665700 0.000000
|
||||
vn -0.923900 0.000000 -0.382700
|
||||
vn -0.689400 -0.665700 -0.285500
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
vn -0.527600 -0.665700 -0.527600
|
||||
vn -0.382700 0.000000 -0.923900
|
||||
vn 0.000000 -0.665700 -0.746200
|
||||
vn -0.285500 -0.665700 -0.689400
|
||||
vn 0.665700 -0.145600 -0.731900
|
||||
vn 0.630200 -0.549000 -0.549000
|
||||
vn -0.630200 -0.549000 -0.549000
|
||||
vn 0.630200 -0.776400 0.000000
|
||||
vn -0.630200 -0.776400 0.000000
|
||||
vn 0.630200 -0.549000 0.549000
|
||||
vn -0.630200 -0.549000 0.549000
|
||||
vn 0.665700 -0.145600 0.731900
|
||||
vn -0.665700 -0.145600 0.731900
|
||||
vn -0.665700 -0.145600 -0.731900
|
||||
vn 0.000000 -0.630200 0.776400
|
||||
vn 0.549000 -0.630200 0.549000
|
||||
vn -0.776400 -0.630200 0.000000
|
||||
vn -0.549000 -0.630200 0.549000
|
||||
vn 0.000000 -0.630200 -0.776400
|
||||
vn -0.549000 -0.630200 -0.549000
|
||||
vn 0.549000 -0.630200 -0.549000
|
||||
vn 0.776400 -0.630200 0.000000
|
||||
vn 0.382700 0.000000 -0.923900
|
||||
vn 0.923900 0.000000 0.382700
|
||||
vn -0.382700 0.000000 0.923900
|
||||
vn -0.923900 0.000000 -0.382700
|
||||
vn 0.923900 0.000000 -0.382700
|
||||
s off
|
||||
f 119//21 127//21 111//21
|
||||
f 139//22 145//22 137//22
|
||||
f 138//23 146//23 144//23
|
||||
f 165//21 162//21 161//21
|
||||
f 135//21 105//21 107//21
|
||||
f 107//21 109//21 135//21
|
||||
f 111//21 113//21 115//21
|
||||
f 115//21 117//21 111//21
|
||||
f 119//21 121//21 127//21
|
||||
f 123//21 125//21 127//21
|
||||
f 127//21 129//21 131//21
|
||||
f 131//21 133//21 135//21
|
||||
f 135//21 109//21 111//21
|
||||
f 111//21 117//21 119//21
|
||||
f 121//21 123//21 127//21
|
||||
f 127//21 131//21 135//21
|
||||
f 135//21 111//21 127//21
|
||||
f 150//22 137//22 148//22
|
||||
f 139//22 141//22 143//22
|
||||
f 143//22 145//22 139//22
|
||||
f 148//22 137//22 145//22
|
||||
f 142//23 140//23 138//23
|
||||
f 138//23 149//23 147//23
|
||||
f 147//23 146//23 138//23
|
||||
f 144//23 142//23 138//23
|
||||
f 161//21 159//21 160//21
|
||||
f 160//21 166//21 161//21
|
||||
f 165//21 164//21 163//21
|
||||
f 163//21 162//21 165//21
|
||||
f 161//21 166//21 165//21
|
||||
s 1
|
||||
f 106//24 108//25 107//26
|
||||
f 108//25 110//27 109//28
|
||||
f 110//27 112//29 111//30
|
||||
f 112//29 114//23 113//31
|
||||
f 114//23 116//32 115//33
|
||||
f 116//32 118//34 117//35
|
||||
f 118//34 120//36 119//37
|
||||
f 120//36 122//38 121//39
|
||||
f 122//38 124//40 123//41
|
||||
f 124//40 126//42 125//43
|
||||
f 126//42 128//44 127//45
|
||||
f 128//44 130//22 129//46
|
||||
f 130//22 132//47 131//48
|
||||
f 132//47 134//49 133//50
|
||||
f 136//51 106//24 105//52
|
||||
f 134//49 136//51 135//53
|
||||
f 138//54 140//55 139//56
|
||||
f 140//55 142//57 141//58
|
||||
f 142//57 144//59 143//60
|
||||
f 144//59 146//61 145//62
|
||||
f 137//63 150//49 149//27
|
||||
f 146//61 147//34 148//42
|
||||
f 155//38 163//64 164//65
|
||||
f 153//22 161//66 162//67
|
||||
f 151//24 160//68 159//69
|
||||
f 158//27 166//70 160//68
|
||||
f 156//34 164//65 165//71
|
||||
f 154//42 162//67 163//64
|
||||
f 152//49 159//69 161//66
|
||||
f 157//23 165//71 166//70
|
||||
f 105//52 106//24 107//26
|
||||
f 107//26 108//25 109//28
|
||||
f 109//28 110//27 111//30
|
||||
f 111//30 112//29 113//31
|
||||
f 113//31 114//23 115//33
|
||||
f 115//33 116//32 117//35
|
||||
f 117//35 118//34 119//37
|
||||
f 119//37 120//36 121//39
|
||||
f 121//39 122//38 123//41
|
||||
f 123//41 124//40 125//43
|
||||
f 125//43 126//42 127//45
|
||||
f 127//45 128//44 129//46
|
||||
f 129//46 130//22 131//48
|
||||
f 131//48 132//47 133//50
|
||||
f 135//53 136//51 105//52
|
||||
f 133//50 134//49 135//53
|
||||
f 137//63 138//54 139//56
|
||||
f 139//56 140//55 141//58
|
||||
f 141//58 142//57 143//60
|
||||
f 143//60 144//59 145//62
|
||||
f 138//54 137//63 149//27
|
||||
f 145//62 146//61 148//42
|
||||
f 156//34 155//38 164//65
|
||||
f 154//42 153//22 162//67
|
||||
f 152//49 151//24 159//69
|
||||
f 151//24 158//27 160//68
|
||||
f 157//23 156//34 165//71
|
||||
f 155//38 154//42 163//64
|
||||
f 153//22 152//49 161//66
|
||||
f 158//27 157//23 166//70
|
||||
f 106/98/17 108/99/17 107/100/17
|
||||
f 108/99/18 110/101/18 109/102/18
|
||||
f 110/101/19 112/103/19 111/104/19
|
||||
f 112/103/20 114/105/20 113/106/20
|
||||
f 114/105/21 116/107/21 115/108/21
|
||||
f 116/107/22 118/109/22 117/110/22
|
||||
f 118/109/23 120/111/23 119/112/23
|
||||
f 120/111/24 122/113/24 121/114/24
|
||||
f 122/113/25 124/115/25 123/116/25
|
||||
f 124/115/26 126/117/26 125/118/26
|
||||
f 126/117/27 128/119/27 127/120/27
|
||||
f 128/119/28 130/121/28 129/122/28
|
||||
f 130/123/29 132/124/29 131/125/29
|
||||
f 132/124/30 134/126/30 133/127/30
|
||||
f 136/128/31 106/98/31 105/129/31
|
||||
f 134/126/32 136/128/32 135/130/32
|
||||
f 119/131/33 127/132/33 111/133/33
|
||||
f 138/134/34 140/135/34 139/136/34
|
||||
f 140/135/35 142/137/35 141/138/35
|
||||
f 142/138/36 144/136/36 143/135/36
|
||||
f 144/136/37 146/139/37 145/134/37
|
||||
f 137/139/38 150/140/38 149/141/38
|
||||
f 146/139/39 147/140/39 148/141/39
|
||||
f 139/142/40 145/143/40 137/139/40
|
||||
f 138/143/41 146/139/41 144/142/41
|
||||
f 165/144/33 162/145/33 161/146/33
|
||||
f 155/147/42 163/105/42 164/148/42
|
||||
f 153/149/43 161/150/43 162/151/43
|
||||
f 151/152/44 160/153/44 159/154/44
|
||||
f 158/140/45 166/98/45 160/153/45
|
||||
f 156/155/46 164/148/46 165/156/46
|
||||
f 154/157/47 162/151/47 163/105/47
|
||||
f 152/158/48 159/154/48 161/123/48
|
||||
f 157/159/49 165/156/49 166/98/49
|
||||
f 105/129/17 106/98/17 107/100/17
|
||||
f 107/100/18 108/99/18 109/102/18
|
||||
f 109/102/19 110/101/19 111/104/19
|
||||
f 111/104/20 112/103/20 113/106/20
|
||||
f 113/106/21 114/105/21 115/108/21
|
||||
f 115/108/22 116/107/22 117/110/22
|
||||
f 117/110/23 118/109/23 119/112/23
|
||||
f 119/112/24 120/111/24 121/114/24
|
||||
f 121/114/25 122/113/25 123/116/25
|
||||
f 123/116/26 124/115/26 125/118/26
|
||||
f 125/118/27 126/117/27 127/120/27
|
||||
f 127/120/28 128/119/28 129/122/28
|
||||
f 129/160/29 130/123/29 131/125/29
|
||||
f 131/125/30 132/124/30 133/127/30
|
||||
f 135/130/31 136/128/31 105/129/31
|
||||
f 133/127/32 134/126/32 135/130/32
|
||||
f 135/161/33 105/162/33 107/163/33
|
||||
f 107/163/33 109/164/33 135/161/33
|
||||
f 111/133/33 113/165/33 115/166/33
|
||||
f 115/166/33 117/167/33 111/133/33
|
||||
f 119/131/33 121/168/33 127/132/33
|
||||
f 123/169/33 125/170/33 127/132/33
|
||||
f 127/132/33 129/171/33 131/172/33
|
||||
f 131/172/33 133/173/33 135/161/33
|
||||
f 135/161/33 109/164/33 111/133/33
|
||||
f 111/133/33 117/167/33 119/131/33
|
||||
f 121/168/33 123/169/33 127/132/33
|
||||
f 127/132/33 131/172/33 135/161/33
|
||||
f 135/161/33 111/133/33 127/132/33
|
||||
f 137/139/34 138/134/34 139/136/34
|
||||
f 139/136/35 140/135/35 141/138/35
|
||||
f 141/137/36 142/138/36 143/135/36
|
||||
f 143/135/37 144/136/37 145/134/37
|
||||
f 138/134/38 137/139/38 149/141/38
|
||||
f 145/134/39 146/139/39 148/141/39
|
||||
f 150/140/40 137/139/40 148/155/40
|
||||
f 139/142/40 141/174/40 143/175/40
|
||||
f 143/175/40 145/143/40 139/142/40
|
||||
f 148/155/40 137/139/40 145/143/40
|
||||
f 142/174/41 140/175/41 138/143/41
|
||||
f 138/143/41 149/155/41 147/140/41
|
||||
f 147/140/41 146/139/41 138/143/41
|
||||
f 144/142/41 142/174/41 138/143/41
|
||||
f 161/146/33 159/176/33 160/177/33
|
||||
f 160/177/33 166/178/33 161/146/33
|
||||
f 165/144/33 164/179/33 163/180/33
|
||||
f 163/180/33 162/145/33 165/144/33
|
||||
f 161/146/33 166/178/33 165/144/33
|
||||
f 156/155/42 155/147/42 164/148/42
|
||||
f 154/157/43 153/149/43 162/151/43
|
||||
f 152/158/44 151/152/44 159/154/44
|
||||
f 151/152/45 158/140/45 160/153/45
|
||||
f 157/159/46 156/155/46 165/156/46
|
||||
f 155/147/47 154/157/47 163/105/47
|
||||
f 153/181/48 152/158/48 161/123/48
|
||||
f 158/140/49 157/159/49 166/98/49
|
||||
o Base
|
||||
v -1.500000 3.000000 0.500000
|
||||
v -1.500000 3.000000 -0.500000
|
||||
@ -512,6 +669,44 @@ v -0.500000 3.000000 1.000000
|
||||
v 0.500000 3.000000 1.000000
|
||||
v -0.500000 0.000000 1.000000
|
||||
v 0.500000 0.000000 1.000000
|
||||
vt 0.166667 0.583333
|
||||
vt 0.416667 0.666667
|
||||
vt 0.333333 0.916667
|
||||
vt 0.083333 0.500000
|
||||
vt 0.000000 0.500000
|
||||
vt 0.000000 -0.000000
|
||||
vt 0.166667 0.500000
|
||||
vt 0.166667 -0.000000
|
||||
vt 0.333333 -0.000000
|
||||
vt 0.333333 1.000000
|
||||
vt 0.166667 1.000000
|
||||
vt 0.166667 0.916667
|
||||
vt 0.666667 0.500000
|
||||
vt 0.833333 0.500000
|
||||
vt 0.833333 0.583333
|
||||
vt 0.333333 0.500000
|
||||
vt 0.416667 -0.000000
|
||||
vt 0.500000 0.666667
|
||||
vt 0.500000 0.833333
|
||||
vt 0.416667 0.833333
|
||||
vt 1.000000 0.666667
|
||||
vt 1.000000 0.833333
|
||||
vt 0.916667 0.833333
|
||||
vt 0.333333 0.583333
|
||||
vt 0.833333 1.000000
|
||||
vt 0.666667 1.000000
|
||||
vt 0.666667 0.916667
|
||||
vt -0.000000 0.833333
|
||||
vt -0.000000 0.666667
|
||||
vt 0.083333 0.666667
|
||||
vt 0.583333 0.666667
|
||||
vt 0.083333 -0.000000
|
||||
vt 0.083333 0.833333
|
||||
vt 0.666667 0.583333
|
||||
vt 0.416667 0.500000
|
||||
vt 0.916667 0.666667
|
||||
vt 0.833333 0.916667
|
||||
vt 0.583333 0.833333
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
vn -1.000000 0.000000 0.000000
|
||||
@ -523,63 +718,63 @@ vn 0.707100 0.000000 0.707100
|
||||
vn -0.707100 0.000000 0.707100
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
s off
|
||||
f 191//72 187//72 183//72
|
||||
f 183//73 188//73 190//73
|
||||
f 168//74 169//74 170//74
|
||||
f 168//72 167//72 184//72
|
||||
f 169//75 168//75 183//75
|
||||
f 170//76 169//76 185//76
|
||||
f 167//77 170//77 186//77
|
||||
f 172//75 173//75 174//75
|
||||
f 172//72 171//72 188//72
|
||||
f 173//78 172//78 187//78
|
||||
f 174//76 173//76 189//76
|
||||
f 171//74 174//74 190//74
|
||||
f 176//78 177//78 178//78
|
||||
f 176//72 175//72 192//72
|
||||
f 177//77 176//77 191//77
|
||||
f 178//76 177//76 193//76
|
||||
f 175//75 178//75 194//75
|
||||
f 180//77 181//77 182//77
|
||||
f 180//72 179//72 196//72
|
||||
f 181//74 180//74 195//74
|
||||
f 182//76 181//76 197//76
|
||||
f 179//78 182//78 198//78
|
||||
f 198//79 193//79 191//79
|
||||
f 189//76 193//76 197//76
|
||||
f 186//80 197//80 195//80
|
||||
f 194//81 189//81 187//81
|
||||
f 183//72 184//72 195//72
|
||||
f 195//72 196//72 191//72
|
||||
f 191//72 192//72 187//72
|
||||
f 187//72 188//72 183//72
|
||||
f 183//72 195//72 191//72
|
||||
f 185//73 183//73 190//73
|
||||
f 167//74 168//74 170//74
|
||||
f 183//72 168//72 184//72
|
||||
f 185//75 169//75 183//75
|
||||
f 186//76 170//76 185//76
|
||||
f 184//77 167//77 186//77
|
||||
f 171//75 172//75 174//75
|
||||
f 187//72 172//72 188//72
|
||||
f 189//78 173//78 187//78
|
||||
f 190//76 174//76 189//76
|
||||
f 188//74 171//74 190//74
|
||||
f 175//78 176//78 178//78
|
||||
f 191//72 176//72 192//72
|
||||
f 193//77 177//77 191//77
|
||||
f 194//76 178//76 193//76
|
||||
f 192//75 175//75 194//75
|
||||
f 179//77 180//77 182//77
|
||||
f 195//72 180//72 196//72
|
||||
f 197//74 181//74 195//74
|
||||
f 198//76 182//76 197//76
|
||||
f 196//78 179//78 198//78
|
||||
f 196//79 198//79 191//79
|
||||
f 197//76 186//76 185//76
|
||||
f 185//76 190//76 189//76
|
||||
f 189//76 194//76 193//76
|
||||
f 193//76 198//76 197//76
|
||||
f 197//76 185//76 189//76
|
||||
f 184//80 186//80 195//80
|
||||
f 192//81 194//81 187//81
|
||||
f 191/182/50 187/183/50 183/184/50
|
||||
f 183/185/51 188/186/51 190/187/51
|
||||
f 168/188/52 169/189/52 170/190/52
|
||||
f 168/191/50 167/192/50 184/193/50
|
||||
f 169/189/53 168/188/53 183/185/53
|
||||
f 170/194/54 169/195/54 185/196/54
|
||||
f 167/197/55 170/190/55 186/198/55
|
||||
f 172/188/53 173/189/53 174/190/53
|
||||
f 172/199/50 171/200/50 188/201/50
|
||||
f 173/189/56 172/188/56 187/185/56
|
||||
f 174/202/54 173/203/54 189/204/54
|
||||
f 171/197/52 174/190/52 190/198/52
|
||||
f 176/188/56 177/189/56 178/190/56
|
||||
f 176/188/50 175/197/50 192/205/50
|
||||
f 177/189/55 176/188/55 191/185/55
|
||||
f 178/206/54 177/207/54 193/208/54
|
||||
f 175/197/53 178/190/53 194/198/53
|
||||
f 180/188/55 181/189/55 182/190/55
|
||||
f 180/209/50 179/210/50 196/211/50
|
||||
f 181/189/52 180/188/52 195/185/52
|
||||
f 182/200/54 181/199/54 197/212/54
|
||||
f 179/197/56 182/190/56 198/198/56
|
||||
f 198/187/57 193/213/57 191/185/57
|
||||
f 189/204/54 193/208/54 197/212/54
|
||||
f 186/187/58 197/213/58 195/185/58
|
||||
f 194/187/59 189/213/59 187/185/59
|
||||
f 183/184/50 184/193/50 195/214/50
|
||||
f 195/214/50 196/211/50 191/182/50
|
||||
f 191/182/50 192/205/50 187/183/50
|
||||
f 187/183/50 188/201/50 183/184/50
|
||||
f 183/184/50 195/214/50 191/182/50
|
||||
f 185/213/51 183/185/51 190/187/51
|
||||
f 167/197/52 168/188/52 170/190/52
|
||||
f 183/184/50 168/191/50 184/193/50
|
||||
f 185/213/53 169/189/53 183/185/53
|
||||
f 186/215/54 170/194/54 185/196/54
|
||||
f 184/216/55 167/197/55 186/198/55
|
||||
f 171/197/53 172/188/53 174/190/53
|
||||
f 187/183/50 172/199/50 188/201/50
|
||||
f 189/213/56 173/189/56 187/185/56
|
||||
f 190/217/54 174/202/54 189/204/54
|
||||
f 188/216/52 171/197/52 190/198/52
|
||||
f 175/197/56 176/188/56 178/190/56
|
||||
f 191/182/50 176/188/50 192/205/50
|
||||
f 193/213/55 177/189/55 191/185/55
|
||||
f 194/218/54 178/206/54 193/208/54
|
||||
f 192/216/53 175/197/53 194/198/53
|
||||
f 179/197/55 180/188/55 182/190/55
|
||||
f 195/214/50 180/209/50 196/211/50
|
||||
f 197/213/52 181/189/52 195/185/52
|
||||
f 198/219/54 182/200/54 197/212/54
|
||||
f 196/216/56 179/197/56 198/198/56
|
||||
f 196/186/57 198/187/57 191/185/57
|
||||
f 197/212/54 186/215/54 185/196/54
|
||||
f 185/196/54 190/217/54 189/204/54
|
||||
f 189/204/54 194/218/54 193/208/54
|
||||
f 193/208/54 198/219/54 197/212/54
|
||||
f 197/212/54 185/196/54 189/204/54
|
||||
f 184/186/58 186/187/58 195/185/58
|
||||
f 192/186/59 194/187/59 187/185/59
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
"block.openDoor": {"category": "block", "sounds": ["block/door_open_1", "block/door_open_2"]},
|
||||
"block.closeDoor": {"category": "block", "sounds": ["block/door_close_1", "block/door_close_2"]},
|
||||
"block.soyuzReady": {"category": "block", "sounds": [{"name": "block/soyuzReady", "stream": false}]},
|
||||
"block.screm": {"category": "block", "sounds": ["screm/scream1", "screm/scream01", "screm/scream2", "screm/scream02", "screm/scream3", "screm/scream03", "screm/scream4", "screm/scream04", "screm/scream5", "screm/scream05", "screm/scream6", "screm/scream06", "screm/scream7", "screm/scream07", "screm/scream08", "screm/scream09", "screm/scream10", "screm/scream11", "screm/scream12", "screm/scream13", "screm/scream14", "screm/scream15", "screm/scream16", "screm/scream17", "screm/scream18", "screm/scream19", "screm/scream20", "screm/scream21", "screm/scream22", "screm/scream23", "screm/scream24", "screm/scream25"]},
|
||||
|
||||
"item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]},
|
||||
"item.techBoop": {"category": "player", "sounds": [{"name": "tool/techBoop", "stream": false}]},
|
||||
@ -52,6 +53,7 @@
|
||||
"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}]},
|
||||
"item.upgradePlug": {"category": "player", "sounds": [{"name": "tool/upgradePlug", "stream": false}]},
|
||||
|
||||
"music.recordLambdaCore": {"category": "record", "sounds": [{"name": "music/recordLambdaCore", "stream": true}]},
|
||||
"music.recordSectorSweep": {"category": "record", "sounds": [{"name": "music/recordSectorSweep", "stream": true}]},
|
||||
|
||||
BIN
assets/hbm/sounds/screm/scream01.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream02.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream03.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream04.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream05.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream06.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream07.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream08.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream09.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream1.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream10.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream11.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream12.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream13.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream14.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream15.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream16.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream17.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream18.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream19.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream2.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream20.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream21.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream22.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream23.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream24.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream25.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream3.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream4.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream5.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream6.ogg
Normal file
BIN
assets/hbm/sounds/screm/scream7.ogg
Normal file
BIN
assets/hbm/sounds/tool/upgradePlug.ogg
Normal file
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 304 B |
BIN
assets/hbm/textures/items/upgrade_centrifuge.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
assets/hbm/textures/items/upgrade_crystallizer.png
Normal file
|
After Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 340 B |
BIN
assets/hbm/textures/items/upgrade_nullifier.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
assets/hbm/textures/items/upgrade_overdrive_1.png
Normal file
|
After Width: | Height: | Size: 314 B |
BIN
assets/hbm/textures/items/upgrade_overdrive_2.png
Normal file
|
After Width: | Height: | Size: 310 B |
BIN
assets/hbm/textures/items/upgrade_overdrive_3.png
Normal file
|
After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 327 B |
BIN
assets/hbm/textures/items/upgrade_screm.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
assets/hbm/textures/items/upgrade_shredder.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
assets/hbm/textures/items/upgrade_smelter.png
Normal file
|
After Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 283 B |
BIN
assets/hbm/textures/models/machines/mining_laser_base.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
assets/hbm/textures/models/machines/mining_laser_laser.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/hbm/textures/models/machines/mining_laser_pivot.png
Normal file
|
After Width: | Height: | Size: 572 B |
@ -123,11 +123,14 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
|
||||
if(!(player instanceof EntityPlayer))
|
||||
return;
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
EntityPlayer pl = (EntityPlayer) player;
|
||||
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
int o = -getOffset();
|
||||
y += getHeightOffset();
|
||||
|
||||
ForgeDirection dir = ForgeDirection.NORTH;
|
||||
|
||||
@ -171,6 +174,7 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
|
||||
world.setBlock(x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, this, dir.ordinal() + offset, 3);
|
||||
fillSpace(world, x, y, z, dir, o);
|
||||
y -= getHeightOffset();
|
||||
world.scheduleBlockUpdate(x, y, z, this, 1);
|
||||
world.scheduleBlockUpdate(x, y, z, this, 2);
|
||||
|
||||
@ -252,5 +256,9 @@ public abstract class BlockDummyable extends BlockContainer {
|
||||
|
||||
public abstract int[] getDimensions();
|
||||
public abstract int getOffset();
|
||||
|
||||
public int getHeightOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ public class ModBlocks {
|
||||
public static final int guiID_machine_drill = 45;
|
||||
|
||||
public static Block machine_mining_laser;
|
||||
public static final int guiID_mining_laser = 45;
|
||||
public static final int guiID_mining_laser = 95;
|
||||
|
||||
public static Block machine_assembler;
|
||||
public static final int guiID_machine_assembler = 48;
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyEnergy;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -15,20 +21,66 @@ public class MachineMiningLaser extends BlockDummyable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int meta) {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= ForgeDirection.UNKNOWN.ordinal())
|
||||
if(meta >= 12)
|
||||
return new TileEntityMachineMiningLaser();
|
||||
|
||||
if(meta == 7)
|
||||
return new TileEntityProxyEnergy();
|
||||
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyInventory();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 0, 1, 1, 1, 1};
|
||||
return new int[] {1, 1, 1, 1, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeightOffset() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@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()) {
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_mining_laser, world, pos[0], pos[1], pos[2]);
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
|
||||
this.makeExtra(world, x + 1, y, z);
|
||||
this.makeExtra(world, x - 1, y, z);
|
||||
this.makeExtra(world, x, y, z + 1);
|
||||
this.makeExtra(world, x, y, z - 1);
|
||||
|
||||
this.makeExtra(world, x, y + 1, z);
|
||||
}
|
||||
}
|
||||
|
||||
@ -851,6 +851,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_mining_laser:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineMiningLaser)
|
||||
{
|
||||
return new ContainerMiningLaser(player.inventory, (TileEntityMachineMiningLaser) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//NON-TE CONTAINERS
|
||||
@ -1699,6 +1708,15 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_mining_laser:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineMiningLaser)
|
||||
{
|
||||
return new GUIMiningLaser(player.inventory, (TileEntityMachineMiningLaser) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//CLIENTONLY GUIS
|
||||
|
||||
25
com/hbm/inventory/SlotUpgrade.java
Normal file
@ -0,0 +1,25 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotUpgrade extends Slot {
|
||||
|
||||
public SlotUpgrade(IInventory inventory, int i, int j, int k) {
|
||||
super(inventory, i, j, k);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack != null && stack.getItem() instanceof ItemMachineUpgrade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlotChange(ItemStack sta1, ItemStack sta2) {
|
||||
|
||||
super.onSlotChange(sta1, sta2);
|
||||
}
|
||||
}
|
||||
77
com/hbm/inventory/container/ContainerMiningLaser.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMiningLaser extends Container {
|
||||
|
||||
private TileEntityMachineMiningLaser diFurnace;
|
||||
|
||||
public ContainerMiningLaser(InventoryPlayer invPlayer, TileEntityMachineMiningLaser tedf) {
|
||||
diFurnace = tedf;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 108));
|
||||
//Upgrades
|
||||
for(int i = 0; i < 2; i++)
|
||||
for(int j = 0; j < 4; j++)
|
||||
this.addSlotToContainer(new SlotUpgrade(tedf, 1 + i * 4 + j, 98 + j * 18, 18 + i * 18));
|
||||
//Output
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int j = 0; j < 7; j++)
|
||||
this.addSlotToContainer(new Slot(tedf, 9 + i * 7 + j, 44 + j * 18, 72 + i * 18));
|
||||
|
||||
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 + 56));
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
|
||||
@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 <= diFurnace.getSizeInventory() - 1) {
|
||||
if (!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!this.mergeItemStack(var5, 0, 9, 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);
|
||||
}
|
||||
}
|
||||
87
com/hbm/inventory/gui/GUIMiningLaser.java
Normal file
@ -0,0 +1,87 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMiningLaser;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMiningLaser extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_laser_miner.png");
|
||||
private TileEntityMachineMiningLaser laser;
|
||||
|
||||
public GUIMiningLaser(InventoryPlayer invPlayer, TileEntityMachineMiningLaser laser) {
|
||||
super(new ContainerMiningLaser(invPlayer, laser));
|
||||
this.laser = laser;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 106 - 88, 16, 88, laser.power, laser.maxPower);
|
||||
|
||||
String[] text = new String[] { "Acceptable upgrades:",
|
||||
" -Speed (stacks to level 12)",
|
||||
" -Effectiveness (stacks to level 12)",
|
||||
" -Overdrive (stacks to level 3)",
|
||||
" -Fortune (stacks to level 3)",
|
||||
" -Smelter (exclusive)",
|
||||
" -Shredder (exclusive)",
|
||||
" -Centrifuge (exclusive)",
|
||||
" -Crystallizer (exclusive)",
|
||||
" -Nullifier"};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 87, guiTop + 31, 8, 8, guiLeft + 141, guiTop + 39 + 16, text);
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 61 <= x && guiLeft + 61 + 18 > x && guiTop + 17 < y && guiTop + 17 + 18 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(laser.xCoord, laser.yCoord, laser.zCoord, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.laser.hasCustomInventoryName() ? this.laser.getInventoryName() : I18n.format(this.laser.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);
|
||||
|
||||
String width = "" + laser.getWidth();
|
||||
this.fontRendererObj.drawString(width, 43 - this.fontRendererObj.getStringWidth(width) / 2, 26, 0xffffff);
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
if(laser.isOn)
|
||||
drawTexturedModalRect(guiLeft + 61, guiTop + 17, 200, 0, 18, 18);
|
||||
|
||||
int i = laser.getPowerScaled(88);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 106 - i, 176, 88 - i, 16, i);
|
||||
|
||||
int j = laser.getProgressScaled(34);
|
||||
drawTexturedModalRect(guiLeft + 66, guiTop + 36, 192, 0, 8, j);
|
||||
|
||||
this.drawInfoPanel(guiLeft + 87, guiTop + 31, 8, 8, 8);
|
||||
}
|
||||
}
|
||||
@ -38,6 +38,7 @@ import com.hbm.items.machine.ItemFluidIdentifier;
|
||||
import com.hbm.items.machine.ItemFluidTank;
|
||||
import com.hbm.items.machine.ItemFuelRod;
|
||||
import com.hbm.items.machine.ItemLens;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemReactorSensor;
|
||||
import com.hbm.items.machine.ItemSatChip;
|
||||
import com.hbm.items.machine.ItemTemplateFolder;
|
||||
@ -1485,8 +1486,17 @@ public class ModItems {
|
||||
public static Item upgrade_afterburn_1;
|
||||
public static Item upgrade_afterburn_2;
|
||||
public static Item upgrade_afterburn_3;
|
||||
public static Item upgrade_overdrive_1;
|
||||
public static Item upgrade_overdrive_2;
|
||||
public static Item upgrade_overdrive_3;
|
||||
public static Item upgrade_radius;
|
||||
public static Item upgrade_health;
|
||||
public static Item upgrade_smelter;
|
||||
public static Item upgrade_shredder;
|
||||
public static Item upgrade_centrifuge;
|
||||
public static Item upgrade_crystallizer;
|
||||
public static Item upgrade_nullifier;
|
||||
public static Item upgrade_screm;
|
||||
|
||||
public static Item ingot_euphemium;
|
||||
public static Item nugget_euphemium;
|
||||
@ -3266,23 +3276,32 @@ public class ModItems {
|
||||
ams_core_thingy = new ItemAMSCore(5000000000L, 250, 5).setUnlocalizedName("ams_core_thingy").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":ams_core_thingy");
|
||||
|
||||
upgrade_template = new ItemCustomLore().setUnlocalizedName("upgrade_template").setMaxStackSize(1).setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":upgrade_template");
|
||||
upgrade_speed_1 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_1");
|
||||
upgrade_speed_2 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_2");
|
||||
upgrade_speed_3 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_3");
|
||||
upgrade_effect_1 = new ItemCustomLore().setUnlocalizedName("upgrade_effect_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_1");
|
||||
upgrade_effect_2 = new ItemCustomLore().setUnlocalizedName("upgrade_effect_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_2");
|
||||
upgrade_effect_3 = new ItemCustomLore().setUnlocalizedName("upgrade_effect_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_3");
|
||||
upgrade_power_1 = new ItemCustomLore().setUnlocalizedName("upgrade_power_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_1");
|
||||
upgrade_power_2 = new ItemCustomLore().setUnlocalizedName("upgrade_power_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_2");
|
||||
upgrade_power_3 = new ItemCustomLore().setUnlocalizedName("upgrade_power_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_3");
|
||||
upgrade_fortune_1 = new ItemCustomLore().setUnlocalizedName("upgrade_fortune_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_1");
|
||||
upgrade_fortune_2 = new ItemCustomLore().setUnlocalizedName("upgrade_fortune_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_2");
|
||||
upgrade_fortune_3 = new ItemCustomLore().setUnlocalizedName("upgrade_fortune_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_3");
|
||||
upgrade_afterburn_1 = new ItemCustomLore().setUnlocalizedName("upgrade_afterburn_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_1");
|
||||
upgrade_afterburn_2 = new ItemCustomLore().setUnlocalizedName("upgrade_afterburn_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_2");
|
||||
upgrade_afterburn_3 = new ItemCustomLore().setUnlocalizedName("upgrade_afterburn_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_3");
|
||||
upgrade_radius = new ItemCustomLore().setUnlocalizedName("upgrade_radius").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_radius");
|
||||
upgrade_health = new ItemCustomLore().setUnlocalizedName("upgrade_health").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_health");
|
||||
upgrade_speed_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_speed_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_1");
|
||||
upgrade_speed_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_speed_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_2");
|
||||
upgrade_speed_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_speed_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_3");
|
||||
upgrade_effect_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_effect_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_1");
|
||||
upgrade_effect_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_effect_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_2");
|
||||
upgrade_effect_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_effect_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_effect_3");
|
||||
upgrade_power_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_power_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_1");
|
||||
upgrade_power_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_power_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_2");
|
||||
upgrade_power_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_power_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_power_3");
|
||||
upgrade_fortune_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_fortune_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_1");
|
||||
upgrade_fortune_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_fortune_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_2");
|
||||
upgrade_fortune_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_fortune_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_fortune_3");
|
||||
upgrade_afterburn_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_afterburn_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_1");
|
||||
upgrade_afterburn_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_afterburn_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_2");
|
||||
upgrade_afterburn_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_afterburn_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_afterburn_3");
|
||||
upgrade_overdrive_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_overdrive_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_overdrive_1");
|
||||
upgrade_overdrive_2 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_overdrive_2").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_overdrive_2");
|
||||
upgrade_overdrive_3 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_overdrive_3").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_overdrive_3");
|
||||
upgrade_radius = new ItemMachineUpgrade().setUnlocalizedName("upgrade_radius").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_radius");
|
||||
upgrade_health = new ItemMachineUpgrade().setUnlocalizedName("upgrade_health").setMaxStackSize(16).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_health");
|
||||
upgrade_smelter = new ItemMachineUpgrade().setUnlocalizedName("upgrade_smelter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_smelter");
|
||||
upgrade_shredder = new ItemMachineUpgrade().setUnlocalizedName("upgrade_shredder").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_shredder");
|
||||
upgrade_centrifuge = new ItemMachineUpgrade().setUnlocalizedName("upgrade_centrifuge").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_centrifuge");
|
||||
upgrade_crystallizer = new ItemMachineUpgrade().setUnlocalizedName("upgrade_crystallizer").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_crystallizer");
|
||||
upgrade_nullifier = new ItemMachineUpgrade().setUnlocalizedName("upgrade_nullifier").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_nullifier");
|
||||
upgrade_screm = new ItemMachineUpgrade().setUnlocalizedName("upgrade_screm").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_screm");
|
||||
|
||||
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
||||
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
||||
@ -4477,8 +4496,17 @@ public class ModItems {
|
||||
GameRegistry.registerItem(upgrade_afterburn_1, upgrade_afterburn_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_afterburn_2, upgrade_afterburn_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_afterburn_3, upgrade_afterburn_3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_overdrive_1, upgrade_overdrive_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_overdrive_2, upgrade_overdrive_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_overdrive_3, upgrade_overdrive_3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_radius, upgrade_radius.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_health, upgrade_health.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_smelter, upgrade_smelter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_shredder, upgrade_shredder.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_centrifuge, upgrade_centrifuge.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_crystallizer, upgrade_crystallizer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_nullifier, upgrade_nullifier.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_screm, upgrade_screm.getUnlocalizedName());
|
||||
|
||||
//Machine Templates
|
||||
GameRegistry.registerItem(siren_track, siren_track.getUnlocalizedName());
|
||||
|
||||
181
com/hbm/items/machine/ItemMachineUpgrade.java
Normal file
@ -0,0 +1,181 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemMachineUpgrade extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(this == ModItems.upgrade_speed_1)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -15 / Consumption +300");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -25 / Consumption +300");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -25 / Consumption +300");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_speed_2)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -30 / Consumption +600");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -50 / Consumption +600");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -50 / Consumption +600");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_speed_3)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -45 / Consumption +900");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -75 / Consumption +900");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -75 / Consumption +900");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_1)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +1 / Consumption +80");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_2)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +2 / Consumption +160");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_3)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +3 / Consumption +240");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_1)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_2)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_3)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_1)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +1 / Delay +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_2)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +2 / Delay +30");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_3)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +3 / Delay +45");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_1)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x2 / Consumption x2.5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_2)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x3 / Consumption x5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_3)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x4 / Consumption x7.5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_radius)
|
||||
{
|
||||
list.add("Forcefield Range Upgrade");
|
||||
list.add("Radius +16 / Consumption +500");
|
||||
list.add("");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_health)
|
||||
{
|
||||
list.add("Forcefield Health Upgrade");
|
||||
list.add("Max. Health +50 / Consumption +250");
|
||||
list.add("");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_screm)
|
||||
{
|
||||
list.add("It's like in Super Mario where all blocks are");
|
||||
list.add("actually Toads, but here it's Half-Life scientists");
|
||||
list.add("and they scream. A lot.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -438,163 +438,6 @@ public class ItemCustomLore extends Item {
|
||||
list.add("Do NOT operate cyclotron without it!");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_speed_1)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -15 / Consumption +300");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -25 / Consumption +300");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -25 / Consumption +300");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_speed_2)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -30 / Consumption +600");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -50 / Consumption +600");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -50 / Consumption +600");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_speed_3)
|
||||
{
|
||||
list.add("Speed Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Delay -45 / Consumption +900");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Delay -75 / Consumption +900");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Delay -75 / Consumption +900");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_1)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +1 / Consumption +80");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_2)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +2 / Consumption +160");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_effect_3)
|
||||
{
|
||||
list.add("Effectiveness Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Radius +3 / Consumption +240");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_1)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -30 / Delay +5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_2)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -60 / Delay +10");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_power_3)
|
||||
{
|
||||
list.add("Power Saving Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
list.add("");
|
||||
list.add("Assembly Machine:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
list.add("");
|
||||
list.add("Chemical Plant:");
|
||||
list.add("Consumption -90 / Delay +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_1)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +1 / Delay +15");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_2)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +2 / Delay +30");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_fortune_3)
|
||||
{
|
||||
list.add("Fortune Upgrade");
|
||||
list.add("Mining Drill:");
|
||||
list.add("Fortune +3 / Delay +45");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_1)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x2 / Consumption x2.5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_2)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x3 / Consumption x5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_afterburn_3)
|
||||
{
|
||||
list.add("Afterburner Upgrade");
|
||||
list.add("Turbofan:");
|
||||
list.add("Production x4 / Consumption x7.5");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_radius)
|
||||
{
|
||||
list.add("Forcefield Range Upgrade");
|
||||
list.add("Radius +16 / Consumption +500");
|
||||
list.add("");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_health)
|
||||
{
|
||||
list.add("Forcefield Health Upgrade");
|
||||
list.add("Max. Health +50 / Consumption +250");
|
||||
list.add("");
|
||||
list.add("Stacks to 16");
|
||||
}
|
||||
|
||||
if(this == ModItems.entanglement_kit)
|
||||
{
|
||||
list.add("Teleporter crafting item.");
|
||||
|
||||
@ -1525,6 +1525,8 @@ public class CraftingManager {
|
||||
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" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.upgrade_nullifier, 1), new Object[] { "SPS", "PUP", "SPS", 'S', "plateSteel", 'P', ModItems.powder_fire, 'U', ModItems.upgrade_template }));
|
||||
|
||||
}
|
||||
|
||||
public static void AddSmeltingRec()
|
||||
|
||||
@ -56,6 +56,8 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.satellites.Satellite;
|
||||
import com.hbm.tileentity.TileEntityProxyEnergy;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.conductor.*;
|
||||
import com.hbm.tileentity.deco.*;
|
||||
@ -563,6 +565,8 @@ public class MainRegistry
|
||||
GameRegistry.registerTileEntity(TileEntitySoyuzStruct.class, "tileentity_soyuz_struct");
|
||||
GameRegistry.registerTileEntity(TileEntityITERStruct.class, "tileentity_iter_struct");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineMiningLaser.class, "tileentity_mining_laser");
|
||||
GameRegistry.registerTileEntity(TileEntityProxyInventory.class, "tileentity_proxy_inventory");
|
||||
GameRegistry.registerTileEntity(TileEntityProxyEnergy.class, "tileentity_proxy_power");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
|
||||
@ -69,7 +69,7 @@ public class ResourceManager {
|
||||
//Centrifuge
|
||||
public static final IModelCustom centrifuge_new = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/centrifuge_new.obj"));
|
||||
|
||||
//Lase Miner
|
||||
//Laser Miner
|
||||
public static final IModelCustom mining_laser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mining_laser.obj"));
|
||||
|
||||
//Anti Mass Spectrometer
|
||||
@ -219,6 +219,11 @@ public class ResourceManager {
|
||||
//Centrifuge
|
||||
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");
|
||||
|
||||
//Laser Miner
|
||||
public static final ResourceLocation mining_laser_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/mining_laser_base.png");
|
||||
public static final ResourceLocation mining_laser_pivot_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/mining_laser_pivot.png");
|
||||
public static final ResourceLocation mining_laser_laser_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/mining_laser_laser.png");
|
||||
|
||||
//Anti Mass Spectrometer
|
||||
public static final ResourceLocation ams_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_base.png");
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.tileentity.machine.TileEntityCoreEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityCoreStabilizer;
|
||||
import com.hbm.tileentity.machine.TileEntityForceField;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMissileAssembly;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorSmall;
|
||||
@ -259,6 +260,12 @@ public class AuxButtonPacket implements IMessage {
|
||||
launcher.startCountdown();
|
||||
}
|
||||
|
||||
if (te instanceof TileEntityMachineMiningLaser) {
|
||||
TileEntityMachineMiningLaser laser = (TileEntityMachineMiningLaser)te;
|
||||
|
||||
laser.isOn = !laser.isOn;
|
||||
}
|
||||
|
||||
//} catch (Exception x) { }
|
||||
|
||||
return null;
|
||||
|
||||
@ -19,7 +19,7 @@ public class RenderLaserMiner extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interpolation) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glTranslated(x + 0.5, y - 1, z + 0.5);
|
||||
|
||||
TileEntityMachineMiningLaser laser = (TileEntityMachineMiningLaser)te;
|
||||
|
||||
@ -46,13 +46,14 @@ public class RenderLaserMiner extends TileEntitySpecialRenderer {
|
||||
double pitch = Math.toDegrees(Math.atan2(vec.yCoord, sqrt));
|
||||
//turns out using tan(vec.yCoord, length) was inaccurate,
|
||||
//the emitter wouldn't match the laser perfectly when pointing down
|
||||
|
||||
bindTexture(ResourceManager.universal);
|
||||
|
||||
bindTexture(ResourceManager.mining_laser_base_tex);
|
||||
ResourceManager.mining_laser.renderPart("Base");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
//GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(yaw, 0, 1, 0);
|
||||
bindTexture(ResourceManager.mining_laser_pivot_tex);
|
||||
ResourceManager.mining_laser.renderPart("Pivot");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -61,18 +62,18 @@ public class RenderLaserMiner extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glRotated(pitch + 90, -1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
bindTexture(ResourceManager.mining_laser_laser_tex);
|
||||
ResourceManager.mining_laser.renderPart("Laser");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
//GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(laser.beam) {
|
||||
length = vec.lengthVector();
|
||||
GL11.glTranslated(nVec.xCoord, nVec.yCoord - 1, nVec.zCoord);
|
||||
int range = (int)Math.ceil(length * 0.5);
|
||||
//BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, 0, 1, 0F, 8, 0.0625F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360, range * 2, 0.125F, 4, 0.0625F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360 + 120, range * 2, 0.125F, 4, 0.0625F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360 + 240, range * 2, 0.125F, 4, 0.0625F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360, range * 2, 0.075F, 3, 0.025F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360 + 120, range * 2, 0.075F, 3, 0.025F);
|
||||
BeamPronter.prontBeam(vec, EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0xa00000, 0xa00000, (int)te.getWorldObj().getTotalWorldTime() * -25 % 360 + 240, range * 2, 0.075F, 3, 0.025F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
33
com/hbm/tileentity/TileEntityProxyBase.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityProxyBase extends TileEntity {
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public TileEntity getTE() {
|
||||
|
||||
if(this.getBlockType() instanceof BlockDummyable) {
|
||||
|
||||
BlockDummyable dummy = (BlockDummyable)this.getBlockType();
|
||||
|
||||
int[] pos = dummy.findCore(worldObj, xCoord, yCoord, zCoord);
|
||||
|
||||
if(pos != null) {
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(te != null)
|
||||
return te;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
48
com/hbm/tileentity/TileEntityProxyEnergy.java
Normal file
@ -0,0 +1,48 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
//can be used as a soruce too since the core TE handles that anyway
|
||||
public class TileEntityProxyEnergy extends TileEntityProxyBase implements IConsumer {
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
|
||||
TileEntity te = getTE();
|
||||
|
||||
if(te instanceof IConsumer) {
|
||||
((IConsumer)te).setPower(i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
|
||||
TileEntity te = getTE();
|
||||
|
||||
if(te instanceof IConsumer) {
|
||||
return ((IConsumer)te).getPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
|
||||
TileEntity te = getTE();
|
||||
|
||||
if(te instanceof IConsumer) {
|
||||
return ((IConsumer)te).getMaxPower();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
161
com/hbm/tileentity/TileEntityProxyInventory.java
Normal file
@ -0,0 +1,161 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityProxyInventory extends TileEntityProxyBase implements ISidedInventory {
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getSizeInventory();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slot) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getStackInSlot(slot);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, int count) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.decrStackSize(slot, count);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int slot) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getStackInSlotOnClosing(slot);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
inv.setInventorySlotContents(slot, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getInventoryName();
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.hasCustomInventoryName();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getInventoryStackLimit();
|
||||
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return false; //never usable, it's just a proxy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() { }
|
||||
|
||||
@Override
|
||||
public void closeInventory() { }
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.isItemValidForSlot(slot, stack);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.getAccessibleSlotsFromSide(side);
|
||||
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack stack, int side) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.canInsertItem(slot, stack, side);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
||||
|
||||
ISidedInventory inv = this.getBase();
|
||||
|
||||
if(inv != null)
|
||||
return inv.canExtractItem(slot, stack, side);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private ISidedInventory getBase() {
|
||||
|
||||
TileEntity te = this.getTE();
|
||||
|
||||
if(te instanceof ISidedInventory)
|
||||
return (ISidedInventory)te;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,22 +1,42 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.inventory.CentrifugeRecipes;
|
||||
import com.hbm.inventory.CrystallizerRecipes;
|
||||
import com.hbm.inventory.ShredderRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IConsumer {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1000000;
|
||||
public static final long maxPower = 10000000;
|
||||
public static final int consumption = 10000;
|
||||
|
||||
public boolean isOn;
|
||||
public int targetX;
|
||||
public int targetY;
|
||||
public int targetZ;
|
||||
@ -28,6 +48,10 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
double breakProgress;
|
||||
|
||||
public TileEntityMachineMiningLaser() {
|
||||
|
||||
//slot 0: battery
|
||||
//slots 1 - 8: upgrades
|
||||
//slots 9 - 29: output
|
||||
super(30);
|
||||
}
|
||||
|
||||
@ -54,26 +78,54 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
lastTargetY = targetY;
|
||||
lastTargetZ = targetZ;
|
||||
|
||||
for(int i = 0; i < 1; i++) {
|
||||
if(targetY <= 0)
|
||||
targetY = yCoord -1;
|
||||
double clientBreakProgress = 0;
|
||||
|
||||
if(isOn) {
|
||||
|
||||
scan();
|
||||
int cycles = getOverdrive();
|
||||
int speed = getSpeed();
|
||||
int range = getRange();
|
||||
int fortune = getFortune();
|
||||
int consumption = getConsumption() * speed;
|
||||
|
||||
if(beam && canBreak(worldObj.getBlock(targetX, targetY, targetZ))) {
|
||||
for(int i = 0; i < cycles; i++) {
|
||||
|
||||
breakProgress += getSpeed();
|
||||
if(power < consumption) {
|
||||
beam = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(breakProgress < 1) {
|
||||
worldObj.destroyBlockInWorldPartially(-1, targetX, targetY, targetZ, (int) Math.floor(breakProgress * 10));
|
||||
} else {
|
||||
worldObj.func_147480_a(targetX, targetY, targetZ, false);
|
||||
breakProgress = 0;
|
||||
power -= consumption;
|
||||
|
||||
if(targetY <= 0)
|
||||
targetY = yCoord - 2;
|
||||
|
||||
scan(range);
|
||||
|
||||
if(beam && canBreak(worldObj.getBlock(targetX, targetY, targetZ))) {
|
||||
|
||||
breakProgress += getBreakSpeed(speed);
|
||||
clientBreakProgress = Math.min(breakProgress, 1);
|
||||
|
||||
if(breakProgress < 1) {
|
||||
worldObj.destroyBlockInWorldPartially(-1, targetX, targetY, targetZ, (int) Math.floor(breakProgress * 10));
|
||||
} else {
|
||||
breakBlock(fortune);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
targetY = yCoord - 2;
|
||||
beam = false;
|
||||
}
|
||||
|
||||
this.tryFillContainer(xCoord + 2, yCoord, zCoord);
|
||||
this.tryFillContainer(xCoord - 2, yCoord, zCoord);
|
||||
this.tryFillContainer(xCoord, yCoord, zCoord + 2);
|
||||
this.tryFillContainer(xCoord, yCoord, zCoord - 2);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
data.setInteger("lastX", lastTargetX);
|
||||
data.setInteger("lastY", lastTargetY);
|
||||
data.setInteger("lastZ", lastTargetZ);
|
||||
@ -81,6 +133,8 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
data.setInteger("y", targetY);
|
||||
data.setInteger("z", targetZ);
|
||||
data.setBoolean("beam", beam);
|
||||
data.setBoolean("isOn", isOn);
|
||||
data.setDouble("progress", clientBreakProgress);
|
||||
|
||||
this.networkPack(data, 250);
|
||||
}
|
||||
@ -88,6 +142,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
|
||||
this.power = data.getLong("power");
|
||||
this.lastTargetX = data.getInteger("lastX");
|
||||
this.lastTargetY = data.getInteger("lastY");
|
||||
this.lastTargetZ = data.getInteger("lastZ");
|
||||
@ -95,11 +150,156 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
this.targetY = data.getInteger("y");
|
||||
this.targetZ = data.getInteger("z");
|
||||
this.beam = data.getBoolean("beam");
|
||||
this.isOn = data.getBoolean("isOn");
|
||||
this.breakProgress = data.getDouble("progress");
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
private void tryFillContainer(int x, int y, int z) {
|
||||
|
||||
float hardness = worldObj.getBlock(targetX, targetY, targetZ).getBlockHardness(worldObj, targetX, targetY, targetZ) * 10;
|
||||
Block b = worldObj.getBlock(x, y, z);
|
||||
if(b != Blocks.chest && b != Blocks.trapped_chest && b != ModBlocks.crate_iron &&
|
||||
b != ModBlocks.crate_steel && b != ModBlocks.safe && b != Blocks.hopper)
|
||||
return;
|
||||
|
||||
IInventory inventory = (IInventory)worldObj.getTileEntity(x, y, z);
|
||||
if(inventory == null)
|
||||
return;
|
||||
|
||||
for(int i = 9; i <= 29; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
int prev = slots[i].stackSize;
|
||||
slots[i] = InventoryUtil.tryAddItemToInventory(inventory, 0, inventory.getSizeInventory() - 1, slots[i]);
|
||||
|
||||
if(slots[i] == null || slots[i].stackSize < prev)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void breakBlock(int fortune) {
|
||||
|
||||
Block b = worldObj.getBlock(targetX, targetY, targetZ);
|
||||
int meta = worldObj.getBlockMetadata(targetX, targetY, targetZ);
|
||||
boolean normal = true;
|
||||
|
||||
if(b == Blocks.lit_redstone_ore)
|
||||
b = Blocks.redstone_ore;
|
||||
|
||||
ItemStack stack = new ItemStack(b, 1, meta);
|
||||
|
||||
if(stack != null && stack.getItem() != null) {
|
||||
if(hasCrystallizer()) {
|
||||
|
||||
ItemStack result = CrystallizerRecipes.getOutput(stack);
|
||||
if(result != null && result.getItem() != ModItems.scrap) {
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, targetX + 0.5, targetY + 0.5, targetZ + 0.5, result.copy()));
|
||||
normal = false;
|
||||
}
|
||||
|
||||
} else if(hasCentrifuge()) {
|
||||
|
||||
ItemStack[] result = CentrifugeRecipes.getOutput(stack);
|
||||
if(result != null) {
|
||||
for(ItemStack sta : result) {
|
||||
|
||||
if(sta != null) {
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, targetX + 0.5, targetY + 0.5, targetZ + 0.5, sta.copy()));
|
||||
normal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if(hasShredder()) {
|
||||
|
||||
ItemStack result = ShredderRecipes.getShredderResult(stack);
|
||||
if(result != null && result.getItem() != ModItems.scrap) {
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, targetX + 0.5, targetY + 0.5, targetZ + 0.5, result.copy()));
|
||||
normal = false;
|
||||
}
|
||||
|
||||
} else if(hasSmelter()) {
|
||||
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
|
||||
if(result != null) {
|
||||
worldObj.spawnEntityInWorld(new EntityItem(worldObj, targetX + 0.5, targetY + 0.5, targetZ + 0.5, result.copy()));
|
||||
normal = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(normal)
|
||||
b.dropBlockAsItem(worldObj, targetX, targetY, targetZ, meta, fortune);
|
||||
worldObj.func_147480_a(targetX, targetY, targetZ, false);
|
||||
suckDrops();
|
||||
|
||||
if(doesScream()) {
|
||||
worldObj.playSoundEffect(targetX + 0.5, targetY + 0.5, targetZ + 0.5, "hbm:block.screm", 2000.0F, 1.0F);
|
||||
}
|
||||
|
||||
breakProgress = 0;
|
||||
}
|
||||
|
||||
private static final Set<Item> bad = Sets.newHashSet(new Item[] {
|
||||
Item.getItemFromBlock(Blocks.dirt),
|
||||
Item.getItemFromBlock(Blocks.stone),
|
||||
Item.getItemFromBlock(Blocks.cobblestone),
|
||||
Item.getItemFromBlock(Blocks.sand),
|
||||
Item.getItemFromBlock(Blocks.sandstone),
|
||||
Item.getItemFromBlock(Blocks.gravel),
|
||||
Items.flint,
|
||||
Items.snowball,
|
||||
Items.wheat_seeds
|
||||
});
|
||||
|
||||
//hahahahahahahaha he said "suck"
|
||||
private void suckDrops() {
|
||||
|
||||
int rangeHor = 3;
|
||||
int rangeVer = 1;
|
||||
boolean nullifier = hasNullifier();
|
||||
|
||||
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(
|
||||
targetX + 0.5 - rangeHor,
|
||||
targetY + 0.5 - rangeVer,
|
||||
targetZ + 0.5 - rangeHor,
|
||||
targetX + 0.5 + rangeHor,
|
||||
targetY + 0.5 + rangeVer,
|
||||
targetZ + 0.5 + rangeHor
|
||||
));
|
||||
|
||||
for(EntityItem item : items) {
|
||||
|
||||
if(nullifier && bad.contains(item.getEntityItem().getItem())) {
|
||||
item.setDead();
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemStack stack = InventoryUtil.tryAddItemToInventory(slots, 9, 29, item.getEntityItem().copy());
|
||||
|
||||
if(stack == null)
|
||||
item.setDead();
|
||||
else
|
||||
item.setEntityItemStack(stack.copy()); //copy is not necessary but i'm paranoid due to the kerfuffle of the old drill
|
||||
}
|
||||
|
||||
List<EntityLivingBase> mobs = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(
|
||||
targetX + 0.5 - 1,
|
||||
targetY + 0.5 - 1,
|
||||
targetZ + 0.5 - 1,
|
||||
targetX + 0.5 + 1,
|
||||
targetY + 0.5 + 1,
|
||||
targetZ + 0.5 + 1
|
||||
));
|
||||
|
||||
for(EntityLivingBase mob : mobs) {
|
||||
mob.setFire(5);
|
||||
}
|
||||
}
|
||||
|
||||
public double getBreakSpeed(int speed) {
|
||||
|
||||
float hardness = worldObj.getBlock(targetX, targetY, targetZ).getBlockHardness(worldObj, targetX, targetY, targetZ) * 15 / speed;
|
||||
|
||||
if(hardness == 0)
|
||||
return 1;
|
||||
@ -107,9 +307,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
return 1 / hardness;
|
||||
}
|
||||
|
||||
public void scan() {
|
||||
|
||||
int range = getRange();
|
||||
public void scan(int range) {
|
||||
|
||||
for(int x = -range; x <= range; x++) {
|
||||
for(int z = -range; z <= range; z++) {
|
||||
@ -131,22 +329,49 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
return block != Blocks.air && block != Blocks.water && block != Blocks.flowing_water;
|
||||
}
|
||||
|
||||
/*public int targetHeight(int x, int z) {
|
||||
public int getOverdrive() {
|
||||
|
||||
for(int y = yCoord - 1; y > 0; y--) {
|
||||
int speed = 1;
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(worldObj.getBlock(x, y, z) != Blocks.air)
|
||||
return y;
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_overdrive_1)
|
||||
speed += 1;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_overdrive_2)
|
||||
speed += 2;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_overdrive_3)
|
||||
speed += 3;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}*/
|
||||
return Math.min(speed, 4);
|
||||
}
|
||||
|
||||
public int getSpeed() {
|
||||
|
||||
int speed = 1;
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_speed_1)
|
||||
speed += 2;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_speed_2)
|
||||
speed += 4;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_speed_3)
|
||||
speed += 6;
|
||||
}
|
||||
}
|
||||
|
||||
return Math.min(speed, 13);
|
||||
}
|
||||
|
||||
public int getRange() {
|
||||
|
||||
return 20;
|
||||
|
||||
/*int range = 1;
|
||||
int range = 1;
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
@ -161,13 +386,132 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
}
|
||||
}
|
||||
|
||||
return Math.min(range, 26);*/
|
||||
return Math.min(range, 26);
|
||||
}
|
||||
|
||||
public int getFortune() {
|
||||
|
||||
int fortune = 0;
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_fortune_1)
|
||||
fortune += 1;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_fortune_2)
|
||||
fortune += 2;
|
||||
else if(slots[i].getItem() == ModItems.upgrade_fortune_3)
|
||||
fortune += 3;
|
||||
}
|
||||
}
|
||||
|
||||
return Math.min(fortune, 3);
|
||||
}
|
||||
|
||||
public boolean hasNullifier() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_nullifier)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasSmelter() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_smelter)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasShredder() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_shredder)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasCentrifuge() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_centrifuge)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasCrystallizer() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_crystallizer)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean doesScream() {
|
||||
|
||||
for(int i = 1; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.upgrade_screm)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getConsumption() {
|
||||
|
||||
int consumption = this.consumption;
|
||||
|
||||
return consumption;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
|
||||
return 1 + getRange() * 2;
|
||||
}
|
||||
|
||||
public int getPowerScaled(int i) {
|
||||
return (int)((power * i) / maxPower);
|
||||
}
|
||||
|
||||
public int getProgressScaled(int i) {
|
||||
return (int) (breakProgress * i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
@ -181,4 +525,48 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@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 i >= 9 && i <= 29;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int slot) {
|
||||
|
||||
int[] slots = new int[21];
|
||||
|
||||
for(int i = 0; i < 21; i++) {
|
||||
slots[i] = i + 9;
|
||||
}
|
||||
|
||||
return slots;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack stack) {
|
||||
super.setInventorySlotContents(i, stack);
|
||||
|
||||
if(stack != null && i >= 1 && i <= 8 && stack.getItem() instanceof ItemMachineUpgrade)
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
}
|
||||
|
||||
186
com/hbm/util/InventoryUtil.java
Normal file
@ -0,0 +1,186 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
//'t was about time
|
||||
public class InventoryUtil {
|
||||
|
||||
/**
|
||||
* Will attempt to cram a much of the given itemstack into the stack array as possible
|
||||
* The rest will be returned
|
||||
* @param inv the stack array, usually a TE's inventory
|
||||
* @param start the starting index (inclusive)
|
||||
* @param end the end index (inclusive)
|
||||
* @param stack the stack to be added to the inventory
|
||||
* @return the remainder of the stack that could not have been added, can return null
|
||||
*/
|
||||
public static ItemStack tryAddItemToInventory(ItemStack[] inv, int start, int end, ItemStack stack) {
|
||||
|
||||
ItemStack rem = tryAddItemToExistingStack(inv, start, end, stack);
|
||||
|
||||
if(rem == null)
|
||||
return null;
|
||||
|
||||
boolean didAdd = tryAddItemToNewSlot(inv, start, end, rem);
|
||||
|
||||
if(didAdd)
|
||||
return null;
|
||||
else
|
||||
return rem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Functionally equal to tryAddItemToInventory, but will not try to create new stacks in empty slots
|
||||
* @param inv
|
||||
* @param start
|
||||
* @param end
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
public static ItemStack tryAddItemToExistingStack(ItemStack[] inv, int start, int end, ItemStack stack) {
|
||||
|
||||
if(stack == null || stack.stackSize == 0)
|
||||
return null;
|
||||
|
||||
for(int i = start; i <= end; i++) {
|
||||
|
||||
if(doesStackDataMatch(inv[i], stack)) {
|
||||
|
||||
int transfer = Math.min(stack.stackSize, inv[i].getMaxStackSize() - inv[i].stackSize);
|
||||
|
||||
if(transfer > 0) {
|
||||
inv[i].stackSize += transfer;
|
||||
stack.stackSize -= transfer;
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will place the stack in the first empty slot
|
||||
* @param inv
|
||||
* @param start
|
||||
* @param end
|
||||
* @param stack
|
||||
* @return whether the stack could be added or not
|
||||
*/
|
||||
public static boolean tryAddItemToNewSlot(ItemStack[] inv, int start, int end, ItemStack stack) {
|
||||
|
||||
if(stack == null || stack.stackSize == 0)
|
||||
return true;
|
||||
|
||||
for(int i = start; i <= end; i++) {
|
||||
|
||||
if(inv[i] == null) {
|
||||
inv[i] = stack;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Much of the same but with an ISidedInventory instance instead of a slot array
|
||||
* @param inv
|
||||
* @param start
|
||||
* @param end
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
public static ItemStack tryAddItemToInventory(IInventory inv, int start, int end, ItemStack stack) {
|
||||
|
||||
ItemStack rem = tryAddItemToExistingStack(inv, start, end, stack);
|
||||
|
||||
if(rem == null)
|
||||
return null;
|
||||
|
||||
boolean didAdd = tryAddItemToNewSlot(inv, start, end, rem);
|
||||
|
||||
if(didAdd)
|
||||
return null;
|
||||
else
|
||||
return rem;
|
||||
}
|
||||
|
||||
public static ItemStack tryAddItemToExistingStack(IInventory inv, int start, int end, ItemStack stack) {
|
||||
|
||||
if(stack == null || stack.stackSize == 0)
|
||||
return null;
|
||||
|
||||
for(int i = start; i <= end; i++) {
|
||||
|
||||
if(doesStackDataMatch(inv.getStackInSlot(i), stack)) {
|
||||
|
||||
int transfer = Math.min(stack.stackSize, inv.getStackInSlot(i).getMaxStackSize() - inv.getStackInSlot(i).stackSize);
|
||||
|
||||
if(transfer > 0) {
|
||||
inv.getStackInSlot(i).stackSize += transfer;
|
||||
stack.stackSize -= transfer;
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static boolean tryAddItemToNewSlot(IInventory inv, int start, int end, ItemStack stack) {
|
||||
|
||||
if(stack == null || stack.stackSize == 0)
|
||||
return true;
|
||||
|
||||
for(int i = start; i <= end; i++) {
|
||||
|
||||
if(inv.getStackInSlot(i) == null) {
|
||||
inv.setInventorySlotContents(i, stack);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares item, metadata and NBT data of two stacks. Also handles null values!
|
||||
* @param stack1
|
||||
* @param stack2
|
||||
* @return
|
||||
*/
|
||||
public static boolean doesStackDataMatch(ItemStack stack1, ItemStack stack2) {
|
||||
|
||||
if(stack1 == null && stack2 == null)
|
||||
return true;
|
||||
|
||||
if(stack1 == null && stack2 != null)
|
||||
return false;
|
||||
|
||||
if(stack1 != null && stack2 == null)
|
||||
return false;
|
||||
|
||||
if(stack1.getItem() != stack2.getItem())
|
||||
return false;
|
||||
|
||||
if(stack1.getItemDamage() != stack2.getItemDamage())
|
||||
return false;
|
||||
|
||||
if(!stack1.hasTagCompound() && !stack2.hasTagCompound())
|
||||
return true;
|
||||
|
||||
if(stack1.hasTagCompound() && !stack2.hasTagCompound())
|
||||
return false;
|
||||
|
||||
if(!stack1.hasTagCompound() && stack2.hasTagCompound())
|
||||
return false;
|
||||
|
||||
return stack1.getTagCompound().equals(stack2.getTagCompound());
|
||||
}
|
||||
}
|
||||