sat dock functionality, gunbase for carl gustav, replaced mirv missile

This commit is contained in:
HbmMods 2019-02-02 18:17:50 +01:00
parent 7f0413a522
commit 7e41d22d60
49 changed files with 1499 additions and 86 deletions

View File

@ -357,6 +357,8 @@ tile.machine_turbine.name=Dampfturbine
container.machineTurbine=Dampfturbine
tile.launch_pad.name=Raketenabschussrampe
container.launchPad=Raketenabschussrampe
tile.sat_dock.name=Frachtlandeplattform
container.satDock=Frachtlandeplattform
tile.book_guide.name=Hbm's Nuclear Tech Mod Handbuch [LEGACY]
tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät
container.machine_schrabidium_transmutator=Schrabidium-Transmutationsgerät
@ -1574,7 +1576,7 @@ item.missile_inferno.name=Inferno Missile G.R.N. Mk.II
item.missile_rain.name=Schüttbombenregen
item.missile_drill.name=Der Betonbrecher
item.missile_nuclear.name=Atomrakete
item.missile_nuclear_cluster.name=Atomare MIRV-Rakete
item.missile_nuclear_cluster.name=H-Rakete
item.missile_endo.name=Endothermische Rakete
item.missile_exo.name=Exothermische Rakete
item.missile_doomsday.name=Doomsday Rakete
@ -1591,6 +1593,7 @@ item.sat_radar.name=Radar-Überwachungssatellit
item.sat_laser.name=Orbitaler Todesstrahl
item.sat_foeq.name=PEAF - Mk.I FOEQ Dunasonde mit experimenter nuklearer Schubdüse
item.sat_resonator.name=Xenium-Resonator-Satellit
item.sat_miner.name=Asteroiden-Förderschiff
item.sat_chip.name=Satelliten-ID-Chip
item.sat_interface.name=Satelliten-Kontrollinterface
tile.sat_mapper.name=Oberflächen-Abtastungssatellit (Dekoblock)
@ -1662,7 +1665,7 @@ item.warhead_buster_medium.name=Mittlerer bunkerbrechender Sprengkopf
item.warhead_buster_large.name=Großer bunkerbrechender Sprengkopf
item.warhead_nuclear.name=Atomsprengkopf
item.warhead_mirvlet.name=MIRV
item.warhead_mirv.name=Achtfacher MIRV-Sprengkopf
item.warhead_mirv.name=H-Gefechtskopf
item.warhead_thermo_endo.name=Endothermischer Sprengkopf
item.warhead_thermo_exo.name=Exothermischer Sprengkopf
item.fuel_tank_small.name=Kleiner Treibstofftank
@ -1744,6 +1747,7 @@ item.cape_lpkukin.name=LPkukins Cape
item.cape_vertice.name=Lord Vertices Cape
item.cape_codered_.name=codered_s Cape
item.cape_ayy.name=Ayys Cape
item.cape_nostalgia.name=DrNostalgias Cape
tile.machine_converter_he_rf.name=HE zu RF Konverter
tile.machine_converter_rf_he.name=RF zu HE Konverter

View File

@ -357,6 +357,8 @@ tile.machine_turbine.name=Steam Turbine
container.machineTurbine=Steam Turbine
tile.launch_pad.name=Missile Launch Pad
container.launchPad=Missile Launch Pad
tile.sat_dock.name=Cargo Landing Pad
container.satDock=Cargo Landing Pad
tile.book_guide.name=Hbm's Nuclear Tech Mod Manual [LEGACY]
tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device
container.machine_schrabidium_transmutator=Schrabidium Transmutation Device
@ -1574,7 +1576,7 @@ item.missile_inferno.name=Inferno Missile G.R.N. Mk.II
item.missile_rain.name=Bomblet Rain
item.missile_drill.name=The Concrete Cracker
item.missile_nuclear.name=Nuclear Missile
item.missile_nuclear_cluster.name=Nuclear MIRV Missile
item.missile_nuclear_cluster.name=Thermonuclear Missile
item.missile_endo.name=Endothermic Missile
item.missile_exo.name=Exothermic Missile
item.missile_doomsday.name=Doomsday Missile
@ -1591,6 +1593,7 @@ item.sat_radar.name=Radar Survey Satellite
item.sat_laser.name=Orbital Death Ray
item.sat_foeq.name=PEAF - Mk.I FOEQ Duna Probe with experimental Nuclear Propulsion
item.sat_resonator.name=Xenium Resonator Satellite
item.sat_miner.name=Asteroid Mining Ship
item.sat_chip.name=Satellite ID-Chip
item.sat_interface.name=Satellite Control Interface
tile.sat_mapper.name=Surface Mapping Satellite (Deco Block)
@ -1662,7 +1665,7 @@ item.warhead_buster_medium.name=Medium Bunker Buster Warhead
item.warhead_buster_large.name=Large Bunker Buster Warhead
item.warhead_nuclear.name=Nuclear Warhead
item.warhead_mirvlet.name=MIRV
item.warhead_mirv.name=Eightfold MIRV Warhead
item.warhead_mirv.name=Thermonuclear Warhead
item.warhead_thermo_endo.name=Endothermic Warhead
item.warhead_thermo_exo.name=Exothermic Warhead
item.fuel_tank_small.name=Small Fuel Tank
@ -1744,6 +1747,7 @@ item.cape_lpkukin.name=LPkukin's Cape
item.cape_vertice.name=Lord Vertice's Cape
item.cape_codered_.name=codered_'s Cape
item.cape_ayy.name=Ayy's Cape
item.cape_nostalgia.name=DrNostalgia's Cape
tile.machine_converter_he_rf.name=HE to RF Converter
tile.machine_converter_rf_he.name=RF to HE Converter

View File

@ -0,0 +1,406 @@
# Blender v2.76 (sub 0) OBJ File: 'miner_rocket.blend'
# www.blender.org
o Cylinder
v 0.000000 0.375000 -0.500000
v 0.000000 2.000000 -0.500000
v 0.353553 0.375000 -0.353553
v 0.353553 2.000000 -0.353553
v 0.500000 0.375000 0.000000
v 0.500000 2.000000 0.000000
v 0.353553 0.375000 0.353553
v 0.353553 2.000000 0.353553
v -0.000000 0.375000 0.500000
v -0.000000 2.000000 0.500000
v -0.353553 0.375000 0.353553
v -0.353553 2.000000 0.353553
v -0.500000 0.375000 -0.000000
v -0.500000 2.000000 -0.000000
v -0.353553 0.375000 -0.353553
v -0.353553 2.000000 -0.353553
v -0.000000 0.375000 -0.250000
v 0.176777 0.375000 -0.176777
v 0.250000 0.375000 0.000000
v 0.176777 0.375000 0.176777
v -0.000000 0.375000 0.250000
v -0.176777 0.375000 0.176777
v -0.250000 0.375000 -0.000000
v -0.176777 0.375000 -0.176777
v 0.000000 0.250000 -0.375000
v 0.265165 0.250000 -0.265165
v 0.375000 0.250000 0.000000
v 0.265165 0.250000 0.265165
v 0.000000 0.250000 0.375000
v -0.265165 0.250000 0.265165
v -0.375000 0.250000 -0.000000
v -0.265165 0.250000 -0.265165
v 0.265165 2.500000 -0.265165
v -0.000000 2.500000 -0.375000
v 0.375000 2.500000 0.000000
v 0.265165 2.500000 0.265165
v -0.000000 2.500000 0.375000
v -0.265165 2.500000 0.265165
v -0.375000 2.500000 -0.000000
v -0.265165 2.500000 -0.265165
v -0.000000 2.750000 0.000000
v 0.000000 0.000000 -0.468750
v 0.331456 0.000000 -0.331456
v 0.468750 0.000000 0.000000
v 0.331456 0.000000 0.331456
v 0.000000 0.000000 0.468750
v -0.331456 0.000000 0.331456
v -0.468750 0.000000 -0.000000
v -0.331456 0.000000 -0.331456
v 0.000000 0.000000 -0.304688
v 0.215447 0.000000 -0.215447
v 0.304688 0.000000 0.000000
v 0.215447 0.000000 0.215447
v 0.000000 0.000000 0.304688
v -0.215447 0.000000 0.215447
v -0.304687 0.000000 -0.000000
v -0.215447 0.000000 -0.215447
v 0.000000 0.250000 -0.152344
v 0.107723 0.250000 -0.107723
v 0.152344 0.250000 0.000000
v 0.107723 0.250000 0.107723
v 0.000000 0.250000 0.152344
v -0.107723 0.250000 0.107723
v -0.152344 0.250000 -0.000000
v -0.107723 0.250000 -0.107723
v 0.353553 0.500000 -0.353553
v 0.353553 0.500000 0.353553
v -0.353553 0.500000 0.353553
v -0.353553 0.500000 -0.353553
v 0.353553 1.000000 -0.353553
v 0.353553 1.000000 0.353553
v -0.353553 1.000000 0.353553
v -0.353553 1.000000 -0.353553
v 0.662913 0.750000 -0.662913
v 0.662913 0.750000 0.662913
v -0.662913 0.750000 0.662912
v -0.662913 0.750000 -0.662912
v 0.662913 0.500000 -0.662913
v 0.662913 0.500000 0.662913
v -0.662913 0.500000 0.662912
v -0.662913 0.500000 -0.662912
vt 0.490000 0.400000
vt 0.410000 0.400000
vt 0.410000 0.060000
vt 0.330000 0.400000
vt 0.330000 0.060000
vt 0.250000 0.400000
vt 0.250000 0.060000
vt 0.170000 0.400000
vt 0.170000 0.060000
vt 0.090000 0.400000
vt 0.090000 0.060000
vt 0.010000 0.400000
vt 0.010000 0.060000
vt 0.650000 0.400000
vt 0.640000 0.500000
vt 0.580000 0.500000
vt 0.570000 0.400000
vt 0.490000 0.060000
vt 0.570000 0.060000
vt 0.270000 0.020000
vt 0.310000 0.020000
vt 0.343594 0.631484
vt 0.365646 0.659507
vt 0.312157 0.681663
vt 0.030000 0.020000
vt 0.070000 0.020000
vt 0.190000 0.020000
vt 0.230000 0.020000
vt 0.650000 0.060000
vt 0.590000 0.020000
vt 0.350000 0.020000
vt 0.390000 0.020000
vt 0.110000 0.020000
vt 0.150000 0.020000
vt 0.510000 0.020000
vt 0.550000 0.020000
vt 0.430000 0.020000
vt 0.470000 0.020000
vt 0.223638 0.849765
vt 0.251662 0.827713
vt 0.273817 0.881202
vt 0.477578 0.954950
vt 0.441919 0.969721
vt 0.419867 0.941698
vt 0.561875 0.751440
vt 0.533852 0.773492
vt 0.511696 0.720003
vt 0.238409 0.715781
vt 0.273817 0.720003
vt 0.251662 0.773492
vt 0.343594 0.969721
vt 0.307935 0.954950
vt 0.312157 0.919542
vt 0.547105 0.885424
vt 0.511696 0.881202
vt 0.533852 0.827713
vt 0.477579 0.646255
vt 0.473356 0.681663
vt 0.419867 0.659507
vt 0.240000 0.500000
vt 0.210000 0.600000
vt 0.180000 0.500000
vt 0.400000 0.500000
vt 0.340000 0.500000
vt 0.160000 0.500000
vt 0.560000 0.500000
vt 0.500000 0.500000
vt 0.480000 0.500000
vt 0.320000 0.500000
vt 0.260000 0.500000
vt 0.080000 0.500000
vt 0.020000 0.500000
vt 0.530000 0.600000
vt 0.370000 0.600000
vt 0.610000 0.600000
vt 0.130000 0.600000
vt 0.100000 0.500000
vt 0.290000 0.600000
vt 0.450000 0.600000
vt 0.420000 0.500000
vt 0.050000 0.600000
vt 0.459618 0.867464
vt 0.487313 0.800603
vt 0.325895 0.733741
vt 0.349297 0.757143
vt 0.331295 0.800603
vt 0.459618 0.733741
vt 0.392757 0.706046
vt 0.298200 0.800603
vt 0.325895 0.867464
vt 0.473356 0.919542
vt 0.392757 0.895159
vt 0.890000 0.750000
vt 0.820000 0.790000
vt 0.800000 0.770000
vt 0.349297 0.844063
vt 0.392757 0.862064
vt 0.436217 0.844063
vt 0.454218 0.800603
vt 0.436217 0.757143
vt 0.392757 0.739141
vt 0.820000 0.810000
vt 0.780000 0.830000
vt 0.760000 0.790000
vt 0.690000 0.780000
vt 0.760000 0.810000
vt 0.770000 0.900000
vt 0.800000 0.830000
vt 0.890000 0.820000
vt 0.810000 0.700000
vt 0.780000 0.770000
vt 0.740000 0.700000
vt 0.740000 0.900000
vt 0.690000 0.850000
vt 0.890000 0.850000
vt 0.840000 0.900000
vt 0.770000 0.480000
vt 0.880000 0.480000
vt 0.880000 0.540000
vt 0.770000 0.600000
vt 0.307935 0.646255
vt 0.630000 0.020000
vt 0.238409 0.885424
vt 0.547105 0.715781
vt 0.223638 0.751440
vt 0.365646 0.941698
vt 0.561875 0.849765
vt 0.441919 0.631484
vt 0.840000 0.700000
vt 0.690000 0.820000
vt 0.810000 0.900000
vt 0.890000 0.780000
vt 0.770000 0.700000
vt 0.690000 0.750000
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.900200 0.225000 -0.372900
vn -0.382700 0.000000 -0.923900
vn -0.923900 0.000000 -0.382700
vn 0.000000 -1.000000 -0.000000
vn -0.281100 0.678600 -0.678600
vn -0.678600 0.678600 0.281100
vn 0.281100 0.678600 0.678600
vn 0.678600 0.678600 -0.281100
vn -0.678600 0.678600 -0.281100
vn -0.281100 0.678600 0.678600
vn 0.678600 0.678600 0.281100
vn 0.281100 0.678600 -0.678600
vn 0.223900 0.810900 0.540600
vn 0.900200 0.225000 -0.372900
vn -0.372900 0.225000 0.900200
vn -0.372900 0.225000 -0.900200
vn 0.372900 0.225000 -0.900200
vn 0.900200 0.225000 0.372900
vn -0.900200 0.225000 0.372900
vn 0.372900 0.225000 0.900200
vn -0.223900 0.810900 -0.540600
vn 0.540600 0.810900 -0.223900
vn -0.540600 0.810900 -0.223900
vn -0.223900 0.810900 0.540600
vn 0.540600 0.810900 0.223900
vn 0.223900 0.810900 -0.540600
vn -0.540600 0.810900 0.223900
vn 0.873000 0.327400 0.361600
vn 0.361600 0.327400 -0.873000
vn -0.361600 0.327400 -0.873000
vn -0.873000 0.327400 0.361600
vn 0.361600 0.327400 0.873000
vn 0.873000 0.327400 -0.361600
vn -0.873000 0.327400 -0.361600
vn -0.361600 0.327400 0.873000
vn -0.805100 -0.490600 0.333500
vn 0.805100 -0.490600 0.333500
vn 0.333500 -0.490600 -0.805100
vn -0.805100 -0.490600 -0.333500
vn -0.333500 -0.490600 0.805100
vn 0.333500 -0.490600 0.805100
vn 0.805100 -0.490600 -0.333500
vn -0.333500 -0.490600 -0.805100
vn 0.707100 0.000000 -0.707100
vn 0.707100 0.000000 0.707100
vn -0.707100 0.000000 0.707100
vn -0.707100 0.000000 -0.707100
s off
f 2/1/1 4/2/1 3/3/1
f 4/2/2 6/4/2 5/5/2
f 6/4/3 8/6/3 7/7/3
f 8/6/4 10/8/4 9/9/4
f 10/8/5 12/10/5 11/11/5
f 12/10/6 14/12/6 13/13/6
f 14/14/7 39/15/7 40/16/7
f 16/17/8 2/1/8 1/18/8
f 14/14/9 16/17/9 15/19/9
f 7/7/10 20/20/10 19/21/10
f 17/22/11 25/23/11 32/24/11
f 13/13/10 23/25/10 22/26/10
f 9/9/10 21/27/10 20/28/10
f 13/29/10 15/19/10 24/30/10
f 5/5/10 19/31/10 18/32/10
f 11/11/10 22/33/10 21/34/10
f 1/18/10 17/35/10 24/36/10
f 3/3/10 18/37/10 17/38/10
f 23/39/12 31/40/12 30/41/12
f 20/42/13 21/43/13 29/44/13
f 19/45/14 27/46/14 26/47/14
f 24/48/15 32/49/15 31/50/15
f 21/51/16 22/52/16 30/53/16
f 20/54/17 28/55/17 27/56/17
f 18/57/18 26/58/18 25/59/18
f 36/60/19 41/61/19 37/62/19
f 4/2/20 33/63/20 35/64/20
f 12/10/21 10/8/21 37/65/21
f 16/17/22 40/66/22 34/67/22
f 4/2/23 2/1/23 34/68/23
f 6/4/24 35/69/24 36/70/24
f 12/10/25 38/71/25 39/72/25
f 8/6/26 36/60/26 37/62/26
f 40/66/27 41/73/27 34/67/27
f 33/63/28 41/74/28 35/64/28
f 39/15/29 41/75/29 40/16/29
f 37/65/30 41/76/30 38/77/30
f 35/69/31 41/78/31 36/70/31
f 34/68/32 41/79/32 33/80/32
f 39/72/33 38/71/33 41/81/33
f 28/55/34 45/82/34 44/83/34
f 49/84/10 57/85/10 56/86/10
f 26/58/35 43/87/35 42/88/35
f 25/23/36 42/88/36 49/84/36
f 31/40/37 48/89/37 47/90/37
f 28/91/38 29/44/38 46/92/38
f 27/46/39 44/83/39 43/87/39
f 31/50/40 32/49/40 49/84/40
f 30/53/41 47/90/41 46/92/41
f 52/93/42 60/94/42 59/95/42
f 47/90/10 55/96/10 54/97/10
f 45/82/10 53/98/10 52/99/10
f 43/87/10 51/100/10 50/101/10
f 49/84/10 42/88/10 50/101/10
f 48/89/10 56/86/10 55/96/10
f 46/92/10 54/97/10 53/98/10
f 44/83/10 52/99/10 51/100/10
f 61/102/10 63/103/10 65/104/10
f 57/105/43 65/104/43 64/106/43
f 55/107/44 63/103/44 62/108/44
f 53/109/45 61/102/45 60/94/45
f 51/110/46 59/95/46 58/111/46
f 50/112/47 58/111/47 65/104/47
f 55/113/48 56/114/48 64/106/48
f 53/115/49 54/116/49 62/108/49
f 69/117/50 81/118/50 77/119/50
f 74/119/51 70/120/51 66/117/51
f 75/119/52 71/120/52 67/117/52
f 68/117/53 80/118/53 76/119/53
f 1/18/1 2/1/1 3/3/1
f 3/3/2 4/2/2 5/5/2
f 5/5/3 6/4/3 7/7/3
f 7/7/4 8/6/4 9/9/4
f 9/9/5 10/8/5 11/11/5
f 11/11/6 12/10/6 13/13/6
f 16/17/7 14/14/7 40/16/7
f 15/19/8 16/17/8 1/18/8
f 13/29/9 14/14/9 15/19/9
f 5/5/10 7/7/10 19/21/10
f 24/121/11 17/22/11 32/24/11
f 11/11/10 13/13/10 22/26/10
f 7/7/10 9/9/10 20/28/10
f 23/122/10 13/29/10 24/30/10
f 3/3/10 5/5/10 18/32/10
f 9/9/10 11/11/10 21/34/10
f 15/19/10 1/18/10 24/36/10
f 1/18/10 3/3/10 17/38/10
f 22/123/12 23/39/12 30/41/12
f 28/91/13 20/42/13 29/44/13
f 18/124/14 19/45/14 26/47/14
f 23/125/15 24/48/15 31/50/15
f 29/126/16 21/51/16 30/53/16
f 19/127/17 20/54/17 27/56/17
f 17/128/18 18/57/18 25/59/18
f 6/4/20 4/2/20 35/64/20
f 38/77/21 12/10/21 37/65/21
f 2/1/22 16/17/22 34/67/22
f 33/80/23 4/2/23 34/68/23
f 8/6/24 6/4/24 36/70/24
f 14/12/25 12/10/25 39/72/25
f 10/8/26 8/6/26 37/62/26
f 27/56/34 28/55/34 44/83/34
f 48/89/10 49/84/10 56/86/10
f 25/59/35 26/58/35 42/88/35
f 32/24/36 25/23/36 49/84/36
f 30/41/37 31/40/37 47/90/37
f 45/82/38 28/91/38 46/92/38
f 26/47/39 27/46/39 43/87/39
f 48/89/40 31/50/40 49/84/40
f 29/126/41 30/53/41 46/92/41
f 51/129/42 52/93/42 59/95/42
f 46/92/10 47/90/10 54/97/10
f 44/83/10 45/82/10 52/99/10
f 42/88/10 43/87/10 50/101/10
f 57/85/10 49/84/10 50/101/10
f 47/90/10 48/89/10 55/96/10
f 45/82/10 46/92/10 53/98/10
f 43/87/10 44/83/10 51/100/10
f 65/104/10 58/111/10 59/95/10
f 59/95/10 60/94/10 65/104/10
f 61/102/10 62/108/10 63/103/10
f 63/103/10 64/106/10 65/104/10
f 65/104/10 60/94/10 61/102/10
f 56/130/43 57/105/43 64/106/43
f 54/131/44 55/107/44 62/108/44
f 52/132/45 53/109/45 60/94/45
f 50/133/46 51/110/46 58/111/46
f 57/134/47 50/112/47 65/104/47
f 63/103/48 55/113/48 64/106/48
f 61/102/49 53/115/49 62/108/49
f 73/120/50 69/117/50 77/119/50
f 78/118/51 74/119/51 66/117/51
f 79/118/52 75/119/52 67/117/52
f 72/120/53 68/117/53 76/119/53

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -232,7 +232,7 @@ public class ModBlocks {
public static Block sat_resonator;
public static Block sat_dock;
public static final int guiID_dock = 46;
public static final int guiID_dock = 80;
public static Block crate_iron;
public static final int guiID_crate_iron = 46;
@ -969,7 +969,7 @@ public class ModBlocks {
sat_foeq = new DecoBlock(Material.iron).setBlockName("sat_foeq").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_foeq");
sat_resonator = new DecoBlock(Material.iron).setBlockName("sat_resonator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_resonator");
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
turret_light = new TurretLight(Material.iron).setBlockName("turret_light").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_light");
turret_heavy = new TurretHeavy(Material.iron).setBlockName("turret_heavy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_heavy");
@ -1436,7 +1436,6 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
GameRegistry.registerBlock(machine_satlinker, machine_satlinker.getUnlocalizedName());
GameRegistry.registerBlock(sat_dock, sat_dock.getUnlocalizedName());
GameRegistry.registerBlock(machine_telelinker, machine_telelinker.getUnlocalizedName());
GameRegistry.registerBlock(machine_keyforge, machine_keyforge.getUnlocalizedName());
GameRegistry.registerBlock(machine_forcefield, machine_forcefield.getUnlocalizedName());
@ -1510,6 +1509,7 @@ public class ModBlocks {
//Missile Blocks
GameRegistry.registerBlock(launch_pad, launch_pad.getUnlocalizedName());
GameRegistry.registerBlock(sat_dock, sat_dock.getUnlocalizedName());
GameRegistry.registerBlock(machine_radar, machine_radar.getUnlocalizedName());
//Guide

View File

@ -190,8 +190,6 @@ public class BlockTaint extends Block/*Container*/ {
if(entity instanceof EntityCreeper) {
EntityTaintedCreeper creep = new EntityTaintedCreeper(world);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
System.out.println(entity.getClass().toString());
if(!world.isRemote) {
entity.setDead();

View File

@ -453,7 +453,7 @@ public class LaunchPad extends BlockContainer implements IBomb {
{
EntityCarrier missile = new EntityCarrier(p_149695_1_);
missile.posX = x + 0.5F;
missile.posY = y + 0.5F;
missile.posY = y + 1F;
missile.posZ = z + 0.5F;
if(entity.slots[1] != null)

View File

@ -1,9 +1,21 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineBattery;
import com.hbm.tileentity.machine.TileEntityMachineSatDock;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
@ -11,6 +23,9 @@ import net.minecraft.world.World;
public class MachineSatDock extends BlockContainer {
private final Random field_149933_a = new Random();
private Random rand;
public MachineSatDock(Material p_i45386_1_) {
super(p_i45386_1_);
}
@ -48,5 +63,68 @@ public class MachineSatDock extends BlockContainer {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 12*f, 1.0F);
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@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())
{
TileEntityMachineSatDock entity = (TileEntityMachineSatDock) world.getTileEntity(x, y, z);
if(entity != null)
{
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_dock, world, x, y, z);
}
return true;
} else {
return false;
}
}
@Override
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
IInventory tileentityfurnace = (IInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tileentityfurnace != null) {
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null) {
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0) {
int j1 = this.field_149933_a.nextInt(21) + 10;
if (j1 > itemstack.stackSize) {
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1,
p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound()) {
entityitem.getEntityItem()
.setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
p_149749_1_.spawnEntityInWorld(entityitem);
}
}
}
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
}

View File

@ -11,6 +11,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.entity.effect.EntityBlackHole;
import com.hbm.entity.effect.EntityCloudFleija;
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
import com.hbm.entity.missile.EntityMinerRocket;
import com.hbm.entity.projectile.EntityBurningFOEQ;
import com.hbm.entity.projectile.EntityMeteor;
import com.hbm.explosion.ExplosionLarge;
@ -358,10 +359,19 @@ public class TestEventTester extends Block {
if(!worldObj.isRemote)
worldObj.spawnEntityInWorld(foeq);*/
if(!worldObj.isRemote) {
/*if(!worldObj.isRemote) {
worldObj.setBlockToAir(par2, par3, par4);
ExplosionLarge.jolt(worldObj, par2 - 0.5, par3 - 0.5, par4 - 0.5, 5, 200, 0.25);
ExplosionLarge.explode(worldObj, par2 + 0.5, par3 + 0.5, par4 + 0.5, 5, false, false, false);
}*/
if(!worldObj.isRemote) {
EntityMinerRocket rocket = new EntityMinerRocket(worldObj);
rocket.posX = par2 + 0.5;
rocket.posY = 100;
rocket.posZ = par4 + 0.5;
worldObj.spawnEntityInWorld(rocket);
}
/*if(!worldObj.isRemote) {

View File

@ -149,6 +149,8 @@ public class EntityCarrier extends EntityThrowable {
data.satellites.add(new SatelliteSaveStructure(freq, SatelliteType.RELAY, this.dimension));
if(payload.getItem() == ModItems.sat_resonator)
data.satellites.add(new SatelliteSaveStructure(freq, SatelliteType.RESONATOR, this.dimension));
if(payload.getItem() == ModItems.sat_miner)
data.satellites.add(new SatelliteSaveStructure(freq, SatelliteType.MINER, this.dimension));
data.markDirty();
}

View File

@ -0,0 +1,96 @@
package com.hbm.entity.missile;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.explosion.ExplosionLarge;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class EntityMinerRocket extends Entity {
//0 landing, 1 unloading, 2 lifting
public int timer = 0;
public EntityMinerRocket(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
this.setSize(1F, 3F);
}
@Override
protected void entityInit() {
this.dataWatcher.addObject(16, Integer.valueOf(0));
}
@Override
public void onUpdate() {
if(dataWatcher.getWatchableObjectInt(16) == 0)
motionY = -0.75;
if(dataWatcher.getWatchableObjectInt(16) == 1)
motionY = 0;
if(dataWatcher.getWatchableObjectInt(16) == 2)
motionY = 1;
motionX = 0;
motionZ = 0;
this.setPositionAndRotation(posX + motionX, posY + motionY, posZ + motionZ, 0.0F, 0.0F);
if(dataWatcher.getWatchableObjectInt(16) == 0 && worldObj.getBlock((int)(posX - 0.5), (int)(posY - 0.5), (int)(posZ - 0.5)) == ModBlocks.sat_dock) {
dataWatcher.updateObject(16, 1);
motionY = 0;
posY = (int)posY;
} else if(worldObj.getBlock((int)(posX - 0.5), (int)(posY + 1), (int)(posZ - 0.5)).getMaterial() != Material.air && !worldObj.isRemote && dataWatcher.getWatchableObjectInt(16) != 1) {
this.setDead();
ExplosionLarge.explodeFire(worldObj, posX - 0.5, posY, posZ - 0.5, 10F, true, false, true);
//worldObj.setBlock((int)(posX - 0.5), (int)(posY + 0.5), (int)(posZ - 0.5), Blocks.dirt);
}
if(dataWatcher.getWatchableObjectInt(16) == 1) {
if(ticksExisted % 2 == 0)
ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 1 + rand.nextInt(3), 1 + rand.nextGaussian());
timer++;
if(timer > 100) {
dataWatcher.updateObject(16, 2);
}
}
if(dataWatcher.getWatchableObjectInt(16) != 1) {
if(ticksExisted % 2 == 0) {
EntityGasFlameFX fx = new EntityGasFlameFX(worldObj);
fx.posY = posY - 0.5D;
fx.posX = posX;
fx.posZ = posZ;
fx.motionY = -1D;
worldObj.spawnEntityInWorld(fx);
}
}
if(dataWatcher.getWatchableObjectInt(16) == 2 && posY > 300)
this.setDead();
}
@Override
protected void readEntityFromNBT(NBTTagCompound nbt) {
dataWatcher.updateObject(16, nbt.getInteger("mode"));
timer = nbt.getInteger("timer");
}
@Override
protected void writeEntityToNBT(NBTTagCompound nbt) {
nbt.setInteger("mode", dataWatcher.getWatchableObjectInt(16));
nbt.setInteger("timer", timer);
}
}

View File

@ -24,26 +24,19 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced {
public EntityMissileMirv(World world, float x, float y, float z, int a, int b) {
super(world, x, y, z, a, b);
this.isCluster = true;
}
@Override
public void onImpact() {
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.missileRadius, posX, posY, posZ));
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, MainRegistry.missileRadius * 2, posX, posY, posZ));
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, MainRegistry.missileRadius * 0.005F);
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(this.worldObj, 1000, MainRegistry.missileRadius * 2 * 0.005F);
entity2.posX = this.posX;
entity2.posY = this.posY - 9;
entity2.posZ = this.posZ;
this.worldObj.spawnEntityInWorld(entity2);
}
@Override
public void cluster() {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15.0F, true);
ExplosionChaos.mirv(this.worldObj,this.posX, this.posY, this.posZ);
}
@Override
public List<ItemStack> getDebris() {
@ -53,7 +46,6 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced {
list.add(new ItemStack(ModItems.plate_steel, 20));
list.add(new ItemStack(ModItems.plate_aluminium, 12));
list.add(new ItemStack(ModItems.thruster_large, 1));
list.add(new ItemStack(ModItems.warhead_mirvlet, 8));
list.add(new ItemStack(ModItems.circuit_targeting_tier5, 1));
return list;
@ -61,7 +53,7 @@ public class EntityMissileMirv extends EntityMissileBaseAdvanced {
@Override
public ItemStack getDebrisRareDrop() {
return new ItemStack(ModItems.warhead_generic_large);
return new ItemStack(ModItems.warhead_mirv);
}
@Override

View File

@ -9,7 +9,9 @@ import com.hbm.entity.effect.EntityEMPBlast;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.logic.EntityNukeExplosionMK4;
import com.hbm.entity.particle.EntityBSmokeFX;
import com.hbm.entity.particle.EntityTSmokeFX;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
@ -220,9 +222,11 @@ public class EntityBulletBase extends Entity implements IProjectile {
}
if(!config.doesPenetrate)
onEntityImpact(victim);
if(!worldObj.isRemote)
onEntityImpact(victim);
else
onEntityHurt(victim);
if(!worldObj.isRemote)
onEntityHurt(victim);
//handle block collision
} else if(worldObj.getBlock(movement.blockX, movement.blockY, movement.blockZ).getMaterial() != Material.air) {
@ -279,7 +283,8 @@ public class EntityBulletBase extends Entity implements IProjectile {
worldObj.playSoundAtEntity(this, "hbm:weapon.gBounce", 1.0F, 1.0F);
} else {
onBlockImpact(movement.blockX, movement.blockY, movement.blockZ);
if(!worldObj.isRemote)
onBlockImpact(movement.blockX, movement.blockY, movement.blockZ);
}
this.posX += (movement.hitVec.xCoord - this.posX) * 0.6;
@ -306,6 +311,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
this.posZ += this.motionZ * this.config.velocity;
this.setPosition(this.posX, this.posY, this.posZ);
}
if(this.config.style == BulletConfiguration.STYLE_ROCKET && !worldObj.isRemote)
this.worldObj.spawnEntityInWorld(new EntityTSmokeFX(worldObj, this.posX, this.posY, this.posZ, 0, 0, 0));
float f2;
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
@ -368,6 +376,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
if(config.explosive > 0 && !worldObj.isRemote)
worldObj.newExplosion(this, posX, posY, posZ, config.explosive, config.incendiary > 0, true);
if(config.shrapnel > 0 && !worldObj.isRemote)
ExplosionLarge.spawnShrapnels(worldObj, posX, posY, posZ, config.shrapnel);
if(config.rainbow > 0 && !worldObj.isRemote) {
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);

View File

@ -31,13 +31,6 @@ public class BulletConfigFactory {
bullet.bounceMod = 0.8;
bullet.doesPenetrate = true;
bullet.doesBreakGlass = true;
bullet.incendiary = 0;
bullet.emp = 0;
bullet.rainbow = 0;
bullet.nuke = 0;
bullet.boxcar = false;
bullet.boat = false;
bullet.destroysBlocks = false;
bullet.style = 0;
bullet.plink = 1;
@ -64,16 +57,9 @@ public class BulletConfigFactory {
bullet.bounceMod = 0.8;
bullet.doesPenetrate = true;
bullet.doesBreakGlass = true;
bullet.incendiary = 0;
bullet.emp = 0;
bullet.rainbow = 0;
bullet.nuke = 0;
bullet.boxcar = false;
bullet.boat = false;
bullet.destroysBlocks = false;
bullet.style = BulletConfiguration.STYLE_NORMAL;
bullet.plink = BulletConfiguration.PLINK_BULLET;
bullet.instakill = false;
return bullet;
}
@ -95,16 +81,32 @@ public class BulletConfigFactory {
bullet.bounceMod = 0.8;
bullet.doesPenetrate = false;
bullet.doesBreakGlass = true;
bullet.incendiary = 0;
bullet.emp = 0;
bullet.rainbow = 0;
bullet.nuke = 0;
bullet.boxcar = false;
bullet.boat = false;
bullet.destroysBlocks = false;
bullet.style = BulletConfiguration.STYLE_PELLET;
bullet.plink = BulletConfiguration.PLINK_BULLET;
bullet.instakill = false;
return bullet;
}
protected static BulletConfiguration standardRocketConfig() {
BulletConfiguration bullet = new BulletConfiguration();
bullet.velocity = 2.0F;
bullet.spread = 0.005F;
bullet.bulletsMin = 1;
bullet.bulletsMax = 1;
bullet.gravity = 0.005D;
bullet.maxAge = 300;
bullet.doesRicochet = true;
bullet.ricochetAngle = 3;
bullet.HBRC = 0;
bullet.LBRC = 95;
bullet.bounceMod = 0.8;
bullet.doesPenetrate = false;
bullet.doesBreakGlass = false;
bullet.explosive = 5.0F;
bullet.style = BulletConfiguration.STYLE_ROCKET;
bullet.plink = BulletConfiguration.PLINK_GRENADE;
return bullet;
}
@ -278,5 +280,102 @@ public class BulletConfigFactory {
return bullet;
}
/// 84mm Rockets ///
protected static BulletConfiguration getRocketConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 3.5F;
bullet.trail = 0;
return bullet;
}
protected static BulletConfiguration getRocketHEConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_he;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 6.5F;
bullet.trail = 1;
return bullet;
}
protected static BulletConfiguration getRocketIncendiaryConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_incendiary;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 6.5F;
bullet.incendiary = 5;
bullet.trail = 2;
return bullet;
}
protected static BulletConfiguration getRocketEMPConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_emp;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 2.5F;
bullet.emp = 10;
bullet.trail = 4;
return bullet;
}
protected static BulletConfiguration getRocketSleekConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_sleek;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 10F;
bullet.trail = 6;
return bullet;
}
protected static BulletConfiguration getRocketShrapnelConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_shrapnel;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 6.5F;
bullet.shrapnel = 25;
bullet.trail = 3;
return bullet;
}
protected static BulletConfiguration getRocketGlareConfig() {
BulletConfiguration bullet = standardRocketConfig();
bullet.ammo = ModItems.ammo_rocket_glare;
bullet.velocity = 5.0F;
bullet.dmgMin = 10;
bullet.dmgMax = 15;
bullet.explosive = 6.5F;
bullet.incendiary = 5;
bullet.trail = 5;
return bullet;
}
}

View File

@ -28,11 +28,19 @@ public class BulletConfigSyncingUtil {
public static final int IRON_REVOLVER = 0x01;
public static final int STEEL_REVOLVER = 0x02;
public static final int G20_NORMAL = 0x03;
public static final int G20_SLUG = 0x04;
public static final int G20_FLECHETTE = 0x05;
public static final int G20_FIRE = 0x06;
public static final int G20_EXPLOSIVE = 0x07;
public static final int G20_NORMAL = 0x10;
public static final int G20_SLUG = 0x11;
public static final int G20_FLECHETTE = 0x12;
public static final int G20_FIRE = 0x13;
public static final int G20_EXPLOSIVE = 0x14;
public static final int ROCKET_NORMAL = 0x20;
public static final int ROCKET_HE = 0x21;
public static final int ROCKET_INCENDIARY = 0x22;
public static final int ROCKET_SHRAPNEL = 0x23;
public static final int ROCKET_EMP = 0x24;
public static final int ROCKET_GLARE = 0x25;
public static final int ROCKET_SLEEK = 0x26;
public static void loadConfigsForSync() {
@ -45,6 +53,14 @@ public class BulletConfigSyncingUtil {
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeFlechetteConfig(), G20_FLECHETTE));
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeFireConfig(), G20_FIRE));
configSet.add(new ConfigKeyPair(BulletConfigFactory.get20GaugeExplosiveConfig(), G20_EXPLOSIVE));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketConfig(), ROCKET_NORMAL));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketHEConfig(), ROCKET_HE));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketIncendiaryConfig(), ROCKET_INCENDIARY));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketShrapnelConfig(), ROCKET_SHRAPNEL));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketEMPConfig(), ROCKET_EMP));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketGlareConfig(), ROCKET_GLARE));
configSet.add(new ConfigKeyPair(BulletConfigFactory.getRocketSleekConfig(), ROCKET_SLEEK));
}
public static BulletConfiguration pullConfig(int key) {

View File

@ -54,6 +54,7 @@ public class BulletConfiguration {
public float explosive;
public int rainbow;
public int nuke;
public int shrapnel;
public boolean boxcar;
public boolean boat;
public boolean destroysBlocks;

View File

@ -713,6 +713,15 @@ public class GUIHandler implements IGuiHandler {
}
return null;
}
case ModBlocks.guiID_dock:
{
if(entity instanceof TileEntityMachineSatDock)
{
return new ContainerSatDock(player.inventory, (TileEntityMachineSatDock) entity);
}
return null;
}
}
} else {
//CLIENTONLY CONTAINERS
@ -1426,6 +1435,15 @@ public class GUIHandler implements IGuiHandler {
}
return null;
}
case ModBlocks.guiID_dock:
{
if(entity instanceof TileEntityMachineSatDock)
{
return new GUISatDock(player.inventory, (TileEntityMachineSatDock) entity);
}
return null;
}
}
} else {
//CLIENTONLY GUIS

View File

@ -3,6 +3,7 @@ package com.hbm.handler;
import java.util.ArrayList;
import com.hbm.items.ModItems;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
public class GunConfigFactory {
@ -22,11 +23,11 @@ public class GunConfigFactory {
config.ammoCap = 6;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CLASSIC;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.STEEL_REVOLVER);
config.config.add(BulletConfigSyncingUtil.IRON_REVOLVER);
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
return config;
}
@ -47,6 +48,7 @@ public class GunConfigFactory {
config.ammoCap = 6;
config.reloadType = GunConfiguration.RELOAD_SINGLE;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCLE;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_NORMAL);
@ -57,5 +59,35 @@ public class GunConfigFactory {
return config;
}
public static GunConfiguration getGustavConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 30;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_MANUAL;
config.hasReloadAnim = false;
config.hasFiringAnim = false;
config.hasSpinup = false;
config.hasSpindown = false;
config.reloadDuration = 60;
config.firingDuration = 0;
config.ammoCap = 1;
config.reloadType = GunConfiguration.RELOAD_SINGLE;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCUMFLEX;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.ROCKET_NORMAL);
config.config.add(BulletConfigSyncingUtil.ROCKET_HE);
config.config.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.ROCKET_EMP);
config.config.add(BulletConfigSyncingUtil.ROCKET_GLARE);
config.config.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
return config;
}
}

View File

@ -2,6 +2,8 @@ package com.hbm.handler;
import java.util.List;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
public class GunConfiguration {
/**
@ -44,6 +46,9 @@ public class GunConfiguration {
//bullet configs for main and alt fire
public List<Integer> config;
//crosshair
public Crosshair crosshair;
public static final int MODE_NORMAL = 0;
public static final int MODE_RELEASE = 1;
public static final int MODE_BOTH = 1;

View File

@ -2411,10 +2411,13 @@ public class MachineRecipes {
list.add(new ItemStack(Blocks.tnt, 2));
break;
case W_MIRV:
list.add(new ItemStack(ModItems.warhead_generic_large, 1));
list.add(new ItemStack(ModItems.plate_steel, 16));
list.add(new ItemStack(ModBlocks.det_cord, 8));
list.add(new ItemStack(ModItems.warhead_mirvlet, 8));
list.add(new ItemStack(ModItems.plate_titanium, 20));
list.add(new ItemStack(ModItems.plate_steel, 12));
list.add(new ItemStack(ModItems.ingot_pu239, 1));
list.add(new ItemStack(Blocks.tnt, 8));
list.add(new ItemStack(ModItems.neutron_reflector, 6));
list.add(new ItemStack(ModItems.lithium, 4));
list.add(new ItemStack(ModItems.cell_deuterium, 6));
break;
case W_ENDOTHERMIC:
list.add(new ItemStack(ModBlocks.therm_endo, 2));
@ -2543,6 +2546,20 @@ public class MachineRecipes {
list.add(new ItemStack(ModItems.magnetron, 3));
list.add(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_6));
break;
case SAT_MINER:
list.add(new ItemStack(ModItems.plate_saturnite, 24));
list.add(new ItemStack(ModItems.plate_desh, 8));
list.add(new ItemStack(ModItems.motor, 2));
list.add(new ItemStack(ModItems.drill_titanium, 2));
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 2));
list.add(new ItemStack(ModItems.fluid_barrel_full, 1, FluidType.KEROSENE.getID()));
list.add(new ItemStack(ModItems.thruster_small, 1));
list.add(new ItemStack(ModItems.photo_panel, 12));
list.add(new ItemStack(ModItems.centrifuge_element, 4));
list.add(new ItemStack(ModItems.magnet_circular, 3));
list.add(new ItemStack(ModItems.plate_polymer, 12));
list.add(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_6));
break;
case CHOPPER_HEAD:
list.add(new ItemStack(ModBlocks.reinforced_glass, 2));
list.add(new ItemStack(ModBlocks.fwatz_computer, 1));
@ -4103,6 +4120,9 @@ public class MachineRecipes {
case SAT_FOEQ:
output = new ItemStack(ModItems.sat_foeq, 1);
break;
case SAT_MINER:
output = new ItemStack(ModItems.sat_miner, 1);
break;
case CHOPPER_HEAD:
output = new ItemStack(ModItems.chopper_head, 1);
break;

View File

@ -0,0 +1,98 @@
package com.hbm.inventory.container;
import com.hbm.tileentity.bomb.TileEntityNukeN45;
import com.hbm.tileentity.machine.TileEntityMachineSatDock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerSatDock extends Container {
private TileEntityMachineSatDock diFurnace;
public ContainerSatDock(InventoryPlayer invPlayer, TileEntityMachineSatDock tedf) {
diFurnace = tedf;
//Storage
this.addSlotToContainer(new Slot(tedf, 0, 62, 17));
this.addSlotToContainer(new Slot(tedf, 1, 80, 17));
this.addSlotToContainer(new Slot(tedf, 2, 98, 17));
this.addSlotToContainer(new Slot(tedf, 3, 116, 17));
this.addSlotToContainer(new Slot(tedf, 4, 134, 17));
this.addSlotToContainer(new Slot(tedf, 5, 62, 35));
this.addSlotToContainer(new Slot(tedf, 6, 80, 35));
this.addSlotToContainer(new Slot(tedf, 7, 98, 35));
this.addSlotToContainer(new Slot(tedf, 8, 116, 35));
this.addSlotToContainer(new Slot(tedf, 9, 134, 35));
this.addSlotToContainer(new Slot(tedf, 10, 62, 53));
this.addSlotToContainer(new Slot(tedf, 11, 80, 53));
this.addSlotToContainer(new Slot(tedf, 12, 98, 53));
this.addSlotToContainer(new Slot(tedf, 13, 116, 53));
this.addSlotToContainer(new Slot(tedf, 14, 134, 53));
//Chip
this.addSlotToContainer(new Slot(tedf, 15, 26, 35));
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 9; j++)
{
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for(int i = 0; i < 9; i++)
{
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
}
}
@Override
public void addCraftingToCrafters(ICrafting crafting) {
super.addCraftingToCrafters(crafting);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
{
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if (var4 != null && var4.getHasStack())
{
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if (par2 <= 15) {
if (!this.mergeItemStack(var5, 16, this.inventorySlots.size(), true))
{
return null;
}
}
else if (!this.mergeItemStack(var5, 0, 15, false))
{
return null;
}
if (var5.stackSize == 0)
{
var4.putStack((ItemStack) null);
}
else
{
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return diFurnace.isUseableByPlayer(player);
}
}

View File

@ -0,0 +1,55 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerNukeN45;
import com.hbm.inventory.container.ContainerSatDock;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.bomb.TileEntityNukeN45;
import com.hbm.tileentity.machine.TileEntityMachineSatDock;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUISatDock extends GuiInfoContainer {
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_dock.png");
private TileEntityMachineSatDock diFurnace;
public GUISatDock(InventoryPlayer invPlayer, TileEntityMachineSatDock tedf) {
super(new ContainerSatDock(invPlayer, tedf));
diFurnace = tedf;
this.xSize = 176;
this.ySize = 168;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
String[] text = new String[] { "Requires linked miner sat chip.",
"Cargo ship will land periodically to",
"deliver resources." };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
}
}

View File

@ -132,10 +132,8 @@ public class GUIScreenSatInterface extends GuiScreen {
drawNoService();
} else {
switch(connectedSat.satelliteType) {
case LASER:
drawMap(); break;
case MAPPER:
drawMap(); break;
@ -147,6 +145,7 @@ public class GUIScreenSatInterface extends GuiScreen {
case RELAY:
case RESONATOR:
case MINER:
drawNoService(); break;
}
}

View File

@ -803,6 +803,7 @@ public class ModItems {
public static Item sat_laser;
public static Item sat_foeq;
public static Item sat_resonator;
public static Item sat_miner;
public static Item sat_chip;
public static Item sat_interface;
@ -1303,6 +1304,7 @@ public class ModItems {
public static Item cape_vertice;
public static Item cape_codered_;
public static Item cape_ayy;
public static Item cape_nostalgia;
public static Item nuke_starter_kit;
public static Item nuke_advanced_kit;
@ -1811,7 +1813,7 @@ public class ModItems {
warhead_buster_medium = new Item().setUnlocalizedName("warhead_buster_medium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_buster_medium");
warhead_buster_large = new Item().setUnlocalizedName("warhead_buster_large").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_buster_large");
warhead_nuclear = new Item().setUnlocalizedName("warhead_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_nuclear");
warhead_mirvlet = new Item().setUnlocalizedName("warhead_mirvlet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_mirvlet");
warhead_mirvlet = new Item().setUnlocalizedName("warhead_mirvlet").setCreativeTab(null).setTextureName(RefStrings.MODID + ":warhead_mirvlet");
warhead_mirv = new Item().setUnlocalizedName("warhead_mirv").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_mirv");
warhead_thermo_endo = new Item().setUnlocalizedName("warhead_thermo_endo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_thermo_endo");
warhead_thermo_exo = new Item().setUnlocalizedName("warhead_thermo_exo").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":warhead_thermo_exo");
@ -2247,6 +2249,7 @@ public class ModItems {
sat_laser = new ItemSatChip().setUnlocalizedName("sat_laser").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_laser");
sat_foeq = new ItemSatChip().setUnlocalizedName("sat_foeq").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_foeq");
sat_resonator = new ItemSatChip().setUnlocalizedName("sat_resonator").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_resonator");
sat_miner = new ItemSatChip().setUnlocalizedName("sat_miner").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_miner");
sat_chip = new ItemSatChip().setUnlocalizedName("sat_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_chip");
sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface");
@ -2293,7 +2296,7 @@ public class ModItems {
ammo_grenade_toxic = new Item().setUnlocalizedName("ammo_grenade_toxic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_toxic");
ammo_grenade_sleek = new Item().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek");
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
gun_rpg = new ItemGunBase(GunConfigFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
gun_stinger = new GunStinger().setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
gun_skystinger = new GunStinger().setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
@ -2826,6 +2829,7 @@ public class ModItems {
cape_vertice = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_vertice").setCreativeTab(MainRegistry.consumableTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_unknown");
cape_codered_ = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_codered_").setCreativeTab(MainRegistry.consumableTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_unknown");
cape_ayy = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_ayy").setCreativeTab(MainRegistry.consumableTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_unknown");
cape_nostalgia = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_nostalgia").setCreativeTab(MainRegistry.consumableTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_unknown");
schrabidium_hammer = new WeaponSpecial(MainRegistry.enumToolMaterialHammer).setUnlocalizedName("schrabidium_hammer").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_hammer");
shimmer_sledge = new WeaponSpecial(MainRegistry.enumToolMaterialSledge).setUnlocalizedName("shimmer_sledge").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":shimmer_sledge_original");
@ -3883,6 +3887,7 @@ public class ModItems {
GameRegistry.registerItem(sat_laser, sat_laser.getUnlocalizedName());
GameRegistry.registerItem(sat_foeq, sat_foeq.getUnlocalizedName());
GameRegistry.registerItem(sat_resonator, sat_resonator.getUnlocalizedName());
GameRegistry.registerItem(sat_miner, sat_miner.getUnlocalizedName());
GameRegistry.registerItem(sat_chip, sat_chip.getUnlocalizedName());
GameRegistry.registerItem(sat_interface, sat_interface.getUnlocalizedName());
@ -4129,6 +4134,7 @@ public class ModItems {
GameRegistry.registerItem(cape_vertice, cape_vertice.getUnlocalizedName());
GameRegistry.registerItem(cape_codered_, cape_codered_.getUnlocalizedName());
GameRegistry.registerItem(cape_ayy, cape_ayy.getUnlocalizedName());
GameRegistry.registerItem(cape_nostalgia, cape_nostalgia.getUnlocalizedName());
//Tools
GameRegistry.registerItem(schrabidium_sword, schrabidium_sword.getUnlocalizedName());

View File

@ -102,6 +102,9 @@ public class ArmorModel extends ItemArmor {
if (this == ModItems.cape_ayy) {
return armorType == 1;
}
if (this == ModItems.cape_nostalgia) {
return armorType == 1;
}
return armorType == 0;
}
@ -148,7 +151,7 @@ public class ArmorModel extends ItemArmor {
return this.modelCloak;
}
}
if (this == ModItems.cape_hbm || this == ModItems.cape_dafnik || this == ModItems.cape_lpkukin || this == ModItems.cape_vertice || this == ModItems.cape_codered_ || this == ModItems.cape_ayy) {
if (this == ModItems.cape_hbm || this == ModItems.cape_dafnik || this == ModItems.cape_lpkukin || this == ModItems.cape_vertice || this == ModItems.cape_codered_ || this == ModItems.cape_ayy || this == ModItems.cape_nostalgia) {
if (armorSlot == 1) {
if (this.modelCloak == null) {
this.modelCloak = new ModelCloak();
@ -212,6 +215,9 @@ public class ArmorModel extends ItemArmor {
if (stack.getItem() == ModItems.cape_ayy && entity instanceof EntityPlayer && ((EntityPlayer)entity).getUniqueID().toString().equals(Library.dxmaster769)) {
return "hbm:textures/models/CapeAyy.png";
}
if (stack.getItem() == ModItems.cape_nostalgia && entity instanceof EntityPlayer && ((EntityPlayer)entity).getUniqueID().toString().equals(Library.nostalgia)) {
return "hbm:textures/models/CapeNostalgia.png";
}
return "hbm:textures/models/CapeUnknown.png";
}
@ -308,5 +314,8 @@ public class ArmorModel extends ItemArmor {
if (itemstack.getItem() == ModItems.cape_ayy) {
list.add("Only works for dxmaster769");
}
if (itemstack.getItem() == ModItems.cape_nostalgia) {
list.add("Only works for Dr_Nostalgia");
}
}
}

View File

@ -94,6 +94,7 @@ public class ItemAssemblyTemplate extends Item {
SAT_LASER,
SAT_RESONATOR,
SAT_FOEQ,
SAT_MINER,
CHOPPER_HEAD,
CHOPPER_GUN,
CHOPPER_BODY,
@ -491,6 +492,8 @@ public class ItemAssemblyTemplate extends Item {
return 1000;
case SAT_FOEQ:
return 1200;
case SAT_MINER:
return 600;
case CHOPPER_HEAD:
return 300;
case CHOPPER_GUN:

View File

@ -389,7 +389,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
@Override
public Crosshair getCrosshair() {
return Crosshair.L_CLASSIC;
return mainConfig.crosshair;
}
}

View File

@ -63,6 +63,16 @@ public class HbmWorldGen implements IWorldGenerator {
(new WorldGenMinable(ModBlocks.ore_uranium, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for (int k = 0; k < MainRegistry.thoriumSpawn; k++) {
int randPosX = i + rand.nextInt(16);
// Max height of generation
int randPosY = rand.nextInt(30);
int randPosZ = j + rand.nextInt(16);
// Ore, amount of ore in one stain
(new WorldGenMinable(ModBlocks.ore_thorium, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for (int k = 0; k < MainRegistry.titaniumSpawn; k++) {
int randPosX = i + rand.nextInt(16);
int randPosY = rand.nextInt(35);

View File

@ -69,6 +69,7 @@ public class Library {
public static String LordVertice = "a41df45e-13d8-4677-9398-090d3882b74f";
public static String CodeRed_ = "912ec334-e920-4dd7-8338-4d9b2d42e0a1";
public static String dxmaster769 = "62c168b2-d11d-4dbf-9168-c6cea3dcb20e";
public static String nostalgia = "e82684a7-30f1-44d2-ab37-41b342be1bbd";
public static List<String> superuser = new ArrayList<String>();

View File

@ -345,6 +345,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityBomber.class, new RenderBomber());
RenderingRegistry.registerEntityRenderingHandler(EntityBurningFOEQ.class, new RenderFOEQ());
RenderingRegistry.registerEntityRenderingHandler(EntityFallingNuke.class, new RenderFallingNuke());
RenderingRegistry.registerEntityRenderingHandler(EntityMinerRocket.class, new RenderMinerRocket());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileTaint.class, new RenderMissileTaint());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileMicro.class, new RenderMissileTaint());

View File

@ -1051,6 +1051,7 @@ public class CraftingManager {
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.nuke_custom), 1), new Object[] { "ADD", "HHF", "CDD", 'A', ModItems.wire_gold, 'H', ModItems.hull_small_steel, 'C', ModItems.circuit_gold, 'F', ModItems.fins_small_steel, 'D', new ItemStack(Items.dye, 1, 8) });
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.launch_pad), 1), new Object[] { "PPP", "ICI", "CBC", 'P', "plateSteel", 'I', "ingotSteel", 'C', ModItems.circuit_gold, 'B', Item.getItemFromBlock(ModBlocks.machine_battery) }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.sat_dock, 1), new Object[] { "SSS", "PCP", 'S', "ingotSteel", 'P', "ingotPolymer", 'C', ModBlocks.crate_iron }));
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.book_guide), 1), new Object[] { "IBI", "LBL", "IBI", 'B', Items.book, 'I', new ItemStack(Items.dye, 1, 0), 'L', new ItemStack(Items.dye, 1, 4) });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.rail_highspeed), 16), new Object[] { "S S", "SIS", "S S", 'S', "ingotSteel", 'I', "plateIron" }));
@ -1271,6 +1272,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cape_codered_, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 6), 'D', new ItemStack(Items.dye, 1, 5), 'I', "ingotAustralium" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cape_vertice, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 13), 'D', new ItemStack(Items.dye, 1, 8), 'I', "ingotVerticium" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cape_ayy, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 15), 'D', new ItemStack(Items.dye, 1, 8), 'I', "ingotReiium" }));
GameRegistry.addRecipe(new ItemStack(ModItems.cape_nostalgia, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 15), 'D', new ItemStack(Items.dye, 1, 6), 'I', ModItems.flame_pony });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.igniter, 1), new Object[] { " W", "SC", "CE", 'S', "plateSteel", 'W', ModItems.wire_schrabidium, 'C', ModItems.circuit_schrabidium, 'E', ModItems.ingot_euphemium }));
GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.plate_euphemium });

View File

@ -121,6 +121,7 @@ import com.hbm.entity.missile.EntityBombletTheta;
import com.hbm.entity.missile.EntityBooster;
import com.hbm.entity.missile.EntityCarrier;
import com.hbm.entity.missile.EntityMIRV;
import com.hbm.entity.missile.EntityMinerRocket;
import com.hbm.entity.missile.EntityMissileAntiBallistic;
import com.hbm.entity.missile.EntityMissileBHole;
import com.hbm.entity.missile.EntityMissileBunkerBuster;
@ -497,8 +498,11 @@ public class MainRegistry
public static boolean enableSpecialMeteors = true;
public static boolean enableBomberShortMode = false;
public static boolean enableVaults = true;
public static int uraniumSpawn = 7;
public static boolean enableRads = true;
public static boolean enableCataclysm = true;
public static int uraniumSpawn = 6;
public static int thoriumSpawn = 7;
public static int titaniumSpawn = 8;
public static int sulfurSpawn = 5;
public static int aluminiumSpawn = 7;
@ -892,6 +896,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityGrenadeIFNull.class, "entity_grenade_ironshod", 129, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityFallingNuke.class, "entity_falling_bomb", 130, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityBulletBase.class, "entity_bullet_mk2", 131, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityMinerRocket.class, "entity_miner_lander", 132, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
@ -1609,6 +1614,16 @@ public class MainRegistry
HazmatRegistry.instance.registerHazmat(ModItems.steel_legs, 0.06F);
HazmatRegistry.instance.registerHazmat(ModItems.steel_boots, 0.02F);
HazmatRegistry.instance.registerHazmat(Items.iron_helmet, 0.04F);
HazmatRegistry.instance.registerHazmat(Items.iron_chestplate, 0.08F);
HazmatRegistry.instance.registerHazmat(Items.iron_leggings, 0.06F);
HazmatRegistry.instance.registerHazmat(Items.iron_boots, 0.02F);
HazmatRegistry.instance.registerHazmat(Items.golden_helmet, 0.04F);
HazmatRegistry.instance.registerHazmat(Items.golden_chestplate, 0.08F);
HazmatRegistry.instance.registerHazmat(Items.golden_leggings, 0.06F);
HazmatRegistry.instance.registerHazmat(Items.golden_boots, 0.02F);
HazmatRegistry.instance.registerHazmat(ModItems.alloy_helmet, 0.08F);
HazmatRegistry.instance.registerHazmat(ModItems.alloy_plate, 0.16F);
HazmatRegistry.instance.registerHazmat(ModItems.alloy_legs, 0.12F);
@ -1700,8 +1715,10 @@ public class MainRegistry
enableSpecialMeteors = config.get(Configuration.CATEGORY_GENERAL, "1.13_enableSpecialMeteors", false).getBoolean(false);
enableBomberShortMode = config.get(Configuration.CATEGORY_GENERAL, "1.14_enableBomberShortMode", false).getBoolean(false);
enableVaults = config.get(Configuration.CATEGORY_GENERAL, "1.15_enableVaultSpawn", true).getBoolean(true);
enableRads = config.get(Configuration.CATEGORY_GENERAL, "1.16_enableNewRadiation", true).getBoolean(true);
enableCataclysm = config.get(Configuration.CATEGORY_GENERAL, "1.17_enableCataclysm", false).getBoolean(false);
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 7);
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 6);
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
uraniumSpawn = PuraniumSpawn.getInt();
Property PtitaniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.01_titaniumSpawnrate", 8);
@ -1731,6 +1748,9 @@ public class MainRegistry
Property PberylliumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.09_berylliumSpawnrate", 6);
PberylliumSpawn.comment = "Ammount of beryllium ore veins per chunk";
berylliumSpawn = PberylliumSpawn.getInt();
Property PthoriumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.10_thoriumSpawnrate", 7);
PthoriumSpawn.comment = "Ammount of thorium ore veins per chunk";
thoriumSpawn = PthoriumSpawn.getInt();
Property propGadget = config.get(Configuration.CATEGORY_GENERAL, "3.00_gadgetRadius", 150);
propGadget.comment = "Radius of the Gadget";

View File

@ -66,11 +66,15 @@ public class ModEventHandler
RadEntitySavedData eData = RadEntitySavedData.getData(event.entityLiving.worldObj);
eData.setRadForEntity(event.entityLiving, 0);
if(event.entity.getUniqueID().toString().equals(Library.HbMinecraft)) {
if(MainRegistry.enableCataclysm) {
EntityBurningFOEQ foeq = new EntityBurningFOEQ(event.entity.worldObj);
foeq.setPositionAndRotation(event.entity.posX, 500, event.entity.posZ, 0.0F, 0.0F);
event.entity.worldObj.spawnEntityInWorld(foeq);
}
if(event.entity.getUniqueID().toString().equals(Library.HbMinecraft)) {
}
}
@SubscribeEvent
@ -137,7 +141,7 @@ public class ModEventHandler
if(meteorShower > 0) {
meteorShower--;
if(meteorShower == 0)
if(meteorShower == 0 && MainRegistry.enableDebugMode)
MainRegistry.logger.info("Ended meteor shower.");
}
@ -145,11 +149,13 @@ public class ModEventHandler
meteorShower =
(int)(MainRegistry.meteorShowerDuration * 0.75 +
MainRegistry.meteorShowerDuration * 0.25 * event.world.rand.nextFloat());
MainRegistry.logger.info("Started meteor shower! Duration: " + meteorShower);
if(MainRegistry.enableDebugMode)
MainRegistry.logger.info("Started meteor shower! Duration: " + meteorShower);
}
}
if(event.world != null && !event.world.isRemote) {
if(event.world != null && !event.world.isRemote && MainRegistry.enableRads) {
if(!event.world.loadedEntityList.isEmpty()) {
RadiationSavedData data = RadiationSavedData.getData(event.world);

View File

@ -297,6 +297,7 @@ public class ResourceManager {
public static final IModelCustom missileTaint = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileTaint.obj"));
public static final IModelCustom missileCarrier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileCarrier.obj"));
public static final IModelCustom missileBooster = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileBooster.obj"));
public static final IModelCustom minerRocket = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/minerRocket.obj"));
////Texture Entities
@ -329,7 +330,7 @@ public class ResourceManager {
public static final ResourceLocation missileHuge_CL_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileHuge_CL.png");
public static final ResourceLocation missileHuge_BU_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileHuge_BU.png");
public static final ResourceLocation missileNuclear_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileNeon.png");
public static final ResourceLocation missileMIRV_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMIRV.png");
public static final ResourceLocation missileMIRV_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileNeonH.png");
public static final ResourceLocation missileEndo_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileEndo.png");
public static final ResourceLocation missileExo_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileExo.png");
public static final ResourceLocation missileDoomsday_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileDoomsday.png");
@ -337,6 +338,7 @@ public class ResourceManager {
public static final ResourceLocation missileMicro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicro.png");
public static final ResourceLocation missileCarrier_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileCarrier.png");
public static final ResourceLocation missileBooster_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileBooster.png");
public static final ResourceLocation minerRocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/minerRocket.png");
public static final ResourceLocation missileMicroBHole_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroBHole.png");
public static final ResourceLocation missileMicroSchrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroSchrab.png");
public static final ResourceLocation missileMicroEMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroEMP.png");

View File

@ -107,12 +107,10 @@ public class AuxButtonPacket implements IMessage {
if(m.id == 0) {
radio.isOn = (m.value == 1);
System.out.println("Radio is now " + radio.isOn);
}
if(m.id == 1) {
radio.freq = ((double)m.value) / 10D;
System.out.println("Radio is now " + radio.freq);
}
}
@ -133,8 +131,6 @@ public class AuxButtonPacket implements IMessage {
if (reac instanceof TileEntityMachineReactorSmall) {
TileEntityMachineReactorSmall reactor = (TileEntityMachineReactorSmall)reac;
System.out.println(m.id + "/" + m.value);
if(m.id == 0)
reactor.retracting = m.value == 0;

View File

@ -0,0 +1,33 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderMinerRocket extends Render {
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
//GL11.glRotated(180, 0, 0, 1);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.minerRocket_tex);
ResourceManager.minerRocket.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.minerRocket_tex;
}
}

View File

@ -22,10 +22,10 @@ public class RenderMissileMirv extends Render {
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glScalef(2F, 2F, 2F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
bindTexture(ResourceManager.missileMIRV_tex);
ResourceManager.missileMIRV.renderAll();
ResourceManager.missileNuclear.renderAll();
GL11.glPopMatrix();
}

View File

@ -148,9 +148,9 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
}
if(state == 16)
{
GL11.glScalef(2F, 2F, 2F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
bindTexture(ResourceManager.missileMIRV_tex);
ResourceManager.missileMIRV.renderAll();
ResourceManager.missileNuclear.renderAll();
}
if(state == 17)
{

View File

@ -204,8 +204,6 @@ public class RadiationSavedData extends WorldSavedData {
} else {
data.setRadForCoord(chunk.xPosition, chunk.zPosition, 0);
}
System.out.println(r);
}
}

View File

@ -34,7 +34,9 @@ public class SatelliteSaveStructure {
//Death ray
LASER,
//Allows use of AMS
RESONATOR;
RESONATOR,
//Farms ores for free
MINER;
public static SatelliteType getEnum(int i) {
if(i < SatelliteType.values().length)

View File

@ -243,7 +243,7 @@ public class TileEntityNukeN45 extends TileEntity implements ISidedInventory {
if(!world.isRemote) {
world.setBlockToAir(x, y, z);
System.out.println(type);
//System.out.println(type);
switch(type) {
case 1:

View File

@ -640,7 +640,7 @@ public class TileEntityMachineReactorSmall extends TileEntity
// itemstack in slots[id] has to contain ItemFuelRod item
private void onRunOut(int id) {
System.out.println("aaa");
//System.out.println("aaa");
Item item = slots[id].getItem();

View File

@ -1,11 +1,391 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import com.hbm.entity.missile.EntityMinerRocket;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.interfaces.IFluidContainer;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.MachineRecipes;
import com.hbm.inventory.MachineRecipes.GasCentOutput;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemSatChip;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.LoopedSoundPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.saveddata.SatelliteSaveStructure;
import com.hbm.saveddata.SatelliteSaveStructure.SatelliteType;
import com.hbm.saveddata.SatelliteSavedData;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityMachineSatDock extends TileEntity {
public class TileEntityMachineSatDock extends TileEntity implements ISidedInventory {
private ItemStack slots[];
private static final int[] access = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
private String customName;
public TileEntityMachineSatDock() {
slots = new ItemStack[16];
}
@Override
public int getSizeInventory() {
return slots.length;
}
@Override
public ItemStack getStackInSlot(int i) {
return slots[i];
}
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if(slots[i] != null)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
} else {
return null;
}
}
@Override
public void setInventorySlotContents(int i, ItemStack itemStack) {
slots[i] = itemStack;
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
{
itemStack.stackSize = getInventoryStackLimit();
}
}
@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.customName : "container.satDock";
}
@Override
public boolean hasCustomInventoryName() {
return this.customName != null && this.customName.length() > 0;
}
public void setCustomName(String name) {
this.customName = name;
}
@Override
public int getInventoryStackLimit() {
return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
{
return false;
}else{
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
}
}
//You scrubs aren't needed for anything (right now)
@Override
public void openInventory() {}
@Override
public void closeInventory() {}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(i == 2 || i == 3 || i == 4 || i == 5)
{
return false;
}
return true;
}
@Override
public ItemStack decrStackSize(int i, int j) {
if(slots[i] != null)
{
if(slots[i].stackSize <= j)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
}
ItemStack itemStack1 = slots[i].splitStack(j);
if (slots[i].stackSize == 0)
{
slots[i] = null;
}
return itemStack1;
} else {
return null;
}
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
NBTTagList list = nbt.getTagList("items", 10);
slots = new ItemStack[getSizeInventory()];
for(int i = 0; i < list.tagCount(); i++)
{
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
byte b0 = nbt1.getByte("slot");
if(b0 >= 0 && b0 < slots.length)
{
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
}
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
NBTTagList list = new NBTTagList();
for(int i = 0; i < slots.length; i++)
{
if(slots[i] != null)
{
NBTTagCompound nbt1 = new NBTTagCompound();
nbt1.setByte("slot", (byte)i);
slots[i].writeToNBT(nbt1);
list.appendTag(nbt1);
}
}
nbt.setTag("items", list);
}
@Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
{
return access;
}
@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 true;
}
SatelliteSavedData data = null;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(data == null)
data = (SatelliteSavedData)worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
if(data == null) {
worldObj.perWorldStorage.setData("satellites", new SatelliteSavedData(worldObj));
data = (SatelliteSavedData)worldObj.perWorldStorage.loadData(SatelliteSavedData.class, "satellites");
}
data.markDirty();
if(data != null && slots[15] != null) {
int freq = ItemSatChip.getFreq(slots[15]);
SatelliteSaveStructure sat = data.getSatFromFreq(freq);
int delay = 10 * 60 * 1000;
if(sat != null && sat.satelliteID == freq && sat.satelliteType.name().equals(SatelliteType.MINER.name())) {
if(sat.lastOp + delay < System.currentTimeMillis()) {
EntityMinerRocket rocket = new EntityMinerRocket(worldObj);
rocket.posX = xCoord + 0.5;
rocket.posY = 300;
rocket.posZ = zCoord + 0.5;
worldObj.spawnEntityInWorld(rocket);
sat.lastOp = System.currentTimeMillis();
data.markDirty();
}
}
}
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord - 0.25 + 0.5, yCoord + 0.75, zCoord - 0.25 + 0.5, xCoord + 0.25 + 0.5, yCoord + 2, zCoord + 0.25 + 0.5));
for(Entity e : list) {
if(e instanceof EntityMinerRocket) {
EntityMinerRocket rocket = (EntityMinerRocket)e;
if(rocket.getDataWatcher().getWatchableObjectInt(16) == 1 && rocket.timer == 50) {
unloadCargo();
}
}
}
ejectInto(xCoord + 2, yCoord, zCoord);
ejectInto(xCoord - 2, yCoord, zCoord);
ejectInto(xCoord, yCoord, zCoord + 2);
ejectInto(xCoord, yCoord, zCoord - 2);
}
}
static Random rand = new Random();
private void unloadCargo() {
int items = rand.nextInt(6) + 10;
int randy = 0;
rand = new Random();
for(int i = 0; i < items; i++) {
randy = (int) (rand.nextFloat() * 100);
if(randy < 10)
addToInv(new ItemStack(ModItems.powder_aluminium, 3));
else if(randy < 20)
addToInv(new ItemStack(ModItems.powder_iron, 3));
else if(randy < 30)
addToInv(new ItemStack(ModItems.powder_titanium, 2));
else if(randy < 45)
addToInv(new ItemStack(ModItems.powder_coal, 4));
else if(randy < 50)
addToInv(new ItemStack(ModItems.powder_uranium, 2));
else if(randy < 53)
addToInv(new ItemStack(ModItems.powder_plutonium, 1));
else if(randy < 58)
addToInv(new ItemStack(ModItems.powder_thorium, 2));
else if(randy < 60)
addToInv(new ItemStack(ModItems.powder_desh_mix, 3));
else if(randy < 65)
addToInv(new ItemStack(ModItems.powder_diamond, 2));
else if(randy < 75)
addToInv(new ItemStack(Items.redstone, 5));
else if(randy < 77)
addToInv(new ItemStack(ModItems.powder_nitan_mix, 2));
else if(randy < 80)
addToInv(new ItemStack(ModItems.powder_power, 2));
else if(randy < 85)
addToInv(new ItemStack(ModItems.powder_copper, 5));
else if(randy < 90)
addToInv(new ItemStack(ModItems.powder_lead, 3));
else if(randy < 95)
addToInv(new ItemStack(ModItems.fluorite, 4));
else if(randy < 99)
addToInv(new ItemStack(ModItems.powder_lapis, 4));
else
addToInv(new ItemStack(ModItems.powder_combine_steel, 1));
}
}
private void addToInv(ItemStack stack) {
for(int i = 0; i < 15; i++) {
if(slots[i] != null && slots[i].getItem() == stack.getItem() && slots[i].getItemDamage() == stack.getItemDamage() &&
slots[i].stackSize < slots[i].getMaxStackSize()) {
slots[i].stackSize++;
return;
}
}
for(int i = 0; i < 15; i++) {
if(slots[i] == null) {
slots[i] = new ItemStack(stack.getItem(), 1, stack.getItemDamage());
return;
}
}
}
private void ejectInto(int x, int y, int z) {
TileEntity te = worldObj.getTileEntity(x, y, z);
if(te instanceof IInventory) {
IInventory chest = (IInventory)te;
for(int i = 0; i < 15; i++) {
if(slots[i] != null) {
for(int j = 0; j < chest.getSizeInventory(); j++) {
ItemStack sta = slots[i].copy();
sta.stackSize = 1;
if(chest.getStackInSlot(j) != null && chest.getStackInSlot(j).getItem() == slots[i].getItem() &&
chest.getStackInSlot(j).getItemDamage() == slots[i].getItemDamage() &&
chest.getStackInSlot(j).stackSize < chest.getStackInSlot(j).getMaxStackSize()) {
slots[i].stackSize--;
if(slots[i].stackSize <= 0)
slots[i] = null;
chest.setInventorySlotContents(j, new ItemStack(chest.getStackInSlot(j).getItem(), chest.getStackInSlot(j).stackSize + 1, chest.getStackInSlot(j).getItemDamage()));
return;
}
}
}
}
for(int i = 0; i < 15; i++) {
if(slots[i] != null) {
for(int j = 0; j < chest.getSizeInventory(); j++) {
ItemStack sta = slots[i].copy();
sta.stackSize = 1;
if(chest.getStackInSlot(j) == null && chest.isItemValidForSlot(j, sta)) {
slots[i].stackSize--;
if(slots[i].stackSize <= 0)
slots[i] = null;
chest.setInventorySlotContents(j, new ItemStack(sta.getItem(), 1, sta.getItemDamage()));
return;
}
}
}
}
}
}
@Override
public AxisAlignedBB getRenderBoundingBox() {