diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index b2cf17131..1de7b74f6 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -677,6 +677,16 @@ item.fusion_core.name=Fusionskern item.energy_core.name=Selbstgebauter Energiekern item.fusion_core_infinite.name=Unendlicher Fusionskern +item.dynosphere_base.name=Blanke Dynosphere +item.dynosphere_desh.name=Desh-Dynosphere +item.dynosphere_desh_charged.name=Desh-Dynosphere (Geladen) +item.dynosphere_schrabidium.name=Schrabidium-Dynosphere +item.dynosphere_schrabidium_charged.name=Schrabidium-Dynosphere (Geladen) +item.dynosphere_euphemium.name=Euphemium-Dynosphere +item.dynosphere_euphemium_charged.name=Euphemium-Dynosphere (Geladen) +item.dynosphere_dineutronium.name=Dineutronium-Dynosphere +item.dynosphere_dineutronium_charged.name=Dineutronium-Dynosphere (Geladen) + item.plate_iron.name=Eisenplatte item.plate_lead.name=Bleiplatte item.coil_copper.name=Kupferspule diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 3f85f4a44..a1f9f98fd 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -680,6 +680,16 @@ item.fusion_core.name=Fusion Core item.energy_core.name=Makeshift Energy Core item.fusion_core_infinite.name=Infinite Fusion Core +item.dynosphere_base.name=Blank Dynosphere +item.dynosphere_desh.name=Desh Dynosphere +item.dynosphere_desh_charged.name=Desh Dynosphere (Charged) +item.dynosphere_schrabidium.name=Schrabidium Dynosphere +item.dynosphere_schrabidium_charged.name=Schrabidium Dynosphere (Charged) +item.dynosphere_euphemium.name=Euphemium Dynosphere +item.dynosphere_euphemium_charged.name=Euphemium Dynosphere (Charged) +item.dynosphere_dineutronium.name=Dineutronium Dynosphere +item.dynosphere_dineutronium_charged.name=Dineutronium Dynosphere (Charged) + item.plate_iron.name=Iron Plate item.plate_lead.name=Lead Plate item.coil_copper.name=Copper Coil diff --git a/assets/hbm/models/cwis_base.obj b/assets/hbm/models/cwis_base.obj new file mode 100644 index 000000000..58dd640e2 --- /dev/null +++ b/assets/hbm/models/cwis_base.obj @@ -0,0 +1,30 @@ +# Blender v2.76 (sub 0) OBJ File: 'cwis_base.blend' +# www.blender.org +o Cube_Cube.001 +v -1.000000 0.000000 1.000000 +v -1.000000 0.250000 1.000000 +v -1.000000 0.000000 -1.000000 +v -1.000000 0.250000 -1.000000 +v 1.000000 0.000000 1.000000 +v 1.000000 0.250000 1.000000 +v 1.000000 0.000000 -1.000000 +v 1.000000 0.250000 -1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +s off +f 4//1 3//1 1//1 +f 8//2 7//2 3//2 +f 6//3 5//3 7//3 +f 2//4 1//4 5//4 +f 3//5 7//5 5//5 +f 8//6 4//6 2//6 +f 2//1 4//1 1//1 +f 4//2 8//2 3//2 +f 8//3 6//3 7//3 +f 6//4 2//4 5//4 +f 1//5 3//5 5//5 +f 6//6 8//6 2//6 diff --git a/assets/hbm/models/cwis_gun.obj b/assets/hbm/models/cwis_gun.obj new file mode 100644 index 000000000..291bf3e99 --- /dev/null +++ b/assets/hbm/models/cwis_gun.obj @@ -0,0 +1,260 @@ +# Blender v2.76 (sub 0) OBJ File: 'cwis_gun.blend' +# www.blender.org +o Cylinder +v -0.000000 0.125000 0.950000 +v -0.000000 0.125000 1.050000 +v 0.088388 0.088388 0.950000 +v 0.088388 0.088388 1.050000 +v 0.125000 -0.000000 0.950000 +v 0.125000 -0.000000 1.050000 +v 0.088388 -0.088388 0.950000 +v 0.088388 -0.088388 1.050000 +v -0.000000 -0.125000 0.950000 +v -0.000000 -0.125000 1.050000 +v -0.088388 -0.088388 0.950000 +v -0.088388 -0.088388 1.050000 +v -0.125000 0.000000 0.950000 +v -0.125000 0.000000 1.050000 +v -0.088388 0.088388 0.950000 +v -0.088388 0.088388 1.050000 +v -0.000000 0.125000 0.450000 +v -0.000000 0.125000 0.550000 +v 0.088388 0.088388 0.450000 +v 0.088388 0.088388 0.550000 +v 0.125000 -0.000000 0.450000 +v 0.125000 -0.000000 0.550000 +v 0.088388 -0.088388 0.450000 +v 0.088388 -0.088388 0.550000 +v -0.000000 -0.125000 0.450000 +v -0.000000 -0.125000 0.550000 +v -0.088388 -0.088388 0.450000 +v -0.088388 -0.088388 0.550000 +v -0.125000 0.000000 0.450000 +v -0.125000 0.000000 0.550000 +v -0.088388 0.088388 0.450000 +v -0.088388 0.088388 0.550000 +v -0.000000 0.125000 1.450000 +v -0.000000 0.125000 1.950000 +v 0.088388 0.088388 1.450000 +v 0.088388 0.088388 1.950000 +v 0.125000 -0.000000 1.450000 +v 0.125000 -0.000000 1.950000 +v 0.088388 -0.088388 1.450000 +v 0.088388 -0.088388 1.950000 +v -0.000000 -0.125000 1.450000 +v -0.000000 -0.125000 1.950000 +v -0.088388 -0.088388 1.450000 +v -0.088388 -0.088388 1.950000 +v -0.125000 0.000000 1.450000 +v -0.125000 0.000000 1.950000 +v -0.088388 0.088388 1.450000 +v -0.088388 0.088388 1.950000 +v -0.025000 0.050000 2.000000 +v -0.025000 0.100000 2.000000 +v -0.025000 0.050000 0.550000 +v -0.025000 0.100000 0.550000 +v 0.025000 0.050000 2.000000 +v 0.025000 0.100000 2.000000 +v 0.025000 0.050000 0.550000 +v 0.025000 0.100000 0.550000 +v -0.025000 -0.100000 2.000000 +v -0.025000 -0.050000 2.000000 +v -0.025000 -0.100000 0.550000 +v -0.025000 -0.050000 0.550000 +v 0.025000 -0.100000 2.000000 +v 0.025000 -0.050000 2.000000 +v 0.025000 -0.100000 0.550000 +v 0.025000 -0.050000 0.550000 +v 0.030801 0.046651 2.000000 +v 0.074103 0.071651 2.000000 +v 0.030801 0.046651 0.550000 +v 0.074103 0.071651 0.550000 +v 0.055801 0.003349 2.000000 +v 0.099103 0.028349 2.000000 +v 0.055801 0.003349 0.550000 +v 0.099103 0.028349 0.550000 +v -0.099103 -0.028349 2.000000 +v -0.055801 -0.003349 2.000000 +v -0.099103 -0.028349 0.550000 +v -0.055801 -0.003349 0.550000 +v -0.074103 -0.071651 2.000000 +v -0.030801 -0.046651 2.000000 +v -0.074103 -0.071651 0.550000 +v -0.030801 -0.046651 0.550000 +v 0.055801 -0.003349 2.000000 +v 0.099103 -0.028349 2.000000 +v 0.055801 -0.003349 0.550000 +v 0.099103 -0.028349 0.550000 +v 0.030801 -0.046651 2.000000 +v 0.074103 -0.071651 2.000000 +v 0.030801 -0.046651 0.550000 +v 0.074103 -0.071651 0.550000 +v -0.074103 0.071651 2.000000 +v -0.030801 0.046651 2.000000 +v -0.074103 0.071651 0.550000 +v -0.030801 0.046651 0.550000 +v -0.099103 0.028349 2.000000 +v -0.055801 0.003349 2.000000 +v -0.099103 0.028349 0.550000 +v -0.055801 0.003349 0.550000 +vn 0.382700 0.923900 0.000000 +vn 0.923900 0.382700 -0.000000 +vn 0.923900 -0.382700 0.000000 +vn 0.382700 -0.923900 0.000000 +vn -0.382700 -0.923900 0.000000 +vn -0.923900 -0.382700 0.000000 +vn 0.000000 0.000000 1.000000 +vn -0.382700 0.923900 0.000000 +vn -0.923900 0.382700 -0.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 -1.000000 -0.000000 +vn 0.000000 1.000000 0.000000 +vn -0.500000 0.866000 -0.000000 +vn 0.500000 -0.866000 0.000000 +vn -0.866000 -0.500000 -0.000000 +vn 0.866000 0.500000 0.000000 +vn 0.500000 0.866000 -0.000000 +vn -0.500000 -0.866000 0.000000 +vn -0.866000 0.500000 -0.000000 +vn 0.866000 -0.500000 0.000000 +s off +f 2//1 4//1 3//1 +f 3//2 4//2 6//2 +f 6//3 8//3 7//3 +f 8//4 10//4 9//4 +f 10//5 12//5 11//5 +f 11//6 12//6 14//6 +f 14//7 10//7 6//7 +f 16//8 2//8 1//8 +f 14//9 16//9 15//9 +f 7//10 11//10 15//10 +f 17//1 18//1 20//1 +f 20//2 22//2 21//2 +f 22//3 24//3 23//3 +f 24//4 26//4 25//4 +f 26//5 28//5 27//5 +f 27//6 28//6 30//6 +f 30//7 26//7 22//7 +f 32//8 18//8 17//8 +f 29//9 30//9 32//9 +f 34//1 36//1 35//1 +f 36//2 38//2 37//2 +f 38//3 40//3 39//3 +f 40//4 42//4 41//4 +f 42//5 44//5 43//5 +f 44//6 46//6 45//6 +f 46//7 40//7 38//7 +f 47//8 48//8 34//8 +f 46//9 48//9 47//9 +f 39//10 45//10 47//10 +f 52//11 51//11 49//11 +f 60//11 59//11 57//11 +f 54//12 53//12 55//12 +f 50//7 49//7 53//7 +f 51//13 55//13 53//13 +f 56//14 52//14 50//14 +f 62//12 61//12 63//12 +f 58//7 57//7 61//7 +f 59//13 63//13 61//13 +f 64//14 60//14 58//14 +f 68//15 67//15 65//15 +f 76//15 75//15 73//15 +f 70//16 69//16 71//16 +f 66//7 65//7 69//7 +f 67//17 71//17 69//17 +f 72//18 68//18 66//18 +f 78//16 77//16 79//16 +f 74//7 73//7 77//7 +f 75//17 79//17 77//17 +f 80//18 76//18 74//18 +f 84//19 83//19 81//19 +f 92//19 91//19 89//19 +f 86//20 85//20 87//20 +f 82//7 81//7 85//7 +f 83//21 87//21 85//21 +f 88//22 84//22 82//22 +f 94//20 93//20 95//20 +f 94//7 90//7 89//7 +f 91//21 95//21 93//21 +f 96//22 92//22 90//22 +f 1//1 2//1 3//1 +f 5//2 3//2 6//2 +f 5//3 6//3 7//3 +f 7//4 8//4 9//4 +f 9//5 10//5 11//5 +f 13//6 11//6 14//6 +f 6//7 4//7 2//7 +f 2//7 16//7 14//7 +f 14//7 12//7 10//7 +f 10//7 8//7 6//7 +f 6//7 2//7 14//7 +f 15//8 16//8 1//8 +f 13//9 14//9 15//9 +f 15//10 1//10 3//10 +f 3//10 5//10 15//10 +f 7//10 9//10 11//10 +f 11//10 13//10 15//10 +f 15//10 5//10 7//10 +f 19//1 17//1 20//1 +f 19//2 20//2 21//2 +f 21//3 22//3 23//3 +f 23//4 24//4 25//4 +f 25//5 26//5 27//5 +f 29//6 27//6 30//6 +f 22//7 20//7 18//7 +f 18//7 32//7 30//7 +f 30//7 28//7 26//7 +f 26//7 24//7 22//7 +f 22//7 18//7 30//7 +f 31//8 32//8 17//8 +f 31//9 29//9 32//9 +f 33//1 34//1 35//1 +f 35//2 36//2 37//2 +f 37//3 38//3 39//3 +f 39//4 40//4 41//4 +f 41//5 42//5 43//5 +f 43//6 44//6 45//6 +f 38//7 36//7 34//7 +f 34//7 48//7 46//7 +f 46//7 44//7 42//7 +f 42//7 40//7 46//7 +f 38//7 34//7 46//7 +f 33//8 47//8 34//8 +f 45//9 46//9 47//9 +f 47//10 33//10 35//10 +f 35//10 37//10 47//10 +f 39//10 41//10 43//10 +f 43//10 45//10 39//10 +f 47//10 37//10 39//10 +f 50//11 52//11 49//11 +f 58//11 60//11 57//11 +f 56//12 54//12 55//12 +f 54//7 50//7 53//7 +f 49//13 51//13 53//13 +f 54//14 56//14 50//14 +f 64//12 62//12 63//12 +f 62//7 58//7 61//7 +f 57//13 59//13 61//13 +f 62//14 64//14 58//14 +f 66//15 68//15 65//15 +f 74//15 76//15 73//15 +f 72//16 70//16 71//16 +f 70//7 66//7 69//7 +f 65//17 67//17 69//17 +f 70//18 72//18 66//18 +f 80//16 78//16 79//16 +f 78//7 74//7 77//7 +f 73//17 75//17 77//17 +f 78//18 80//18 74//18 +f 82//19 84//19 81//19 +f 90//19 92//19 89//19 +f 88//20 86//20 87//20 +f 86//7 82//7 85//7 +f 81//21 83//21 85//21 +f 86//22 88//22 82//22 +f 96//20 94//20 95//20 +f 93//7 94//7 89//7 +f 89//21 91//21 93//21 +f 94//22 96//22 90//22 diff --git a/assets/hbm/models/cwis_head.obj b/assets/hbm/models/cwis_head.obj new file mode 100644 index 000000000..8fc1d2175 --- /dev/null +++ b/assets/hbm/models/cwis_head.obj @@ -0,0 +1,401 @@ +# Blender v2.76 (sub 0) OBJ File: 'cwis_head.blend' +# www.blender.org +o Cube.001_Cube.002 +v -0.500000 -0.250000 0.500000 +v -0.500000 0.250000 0.500000 +v -0.500000 -0.250000 -0.500000 +v -0.500000 0.250000 -0.500000 +v 0.500000 -0.250000 0.500000 +v 0.500000 0.250000 0.500000 +v 0.500000 -0.250000 -0.500000 +v 0.500000 0.250000 -0.500000 +v -0.187500 -0.187500 1.000000 +v -0.187500 0.187500 1.000000 +v 0.187500 -0.187500 1.000000 +v 0.187500 0.187500 1.000000 +v 0.250000 2.183013 0.000000 +v 0.000000 2.250000 0.000000 +v 0.000000 0.250000 -0.500000 +v 0.250000 0.250000 -0.433013 +v 0.433013 0.250000 -0.250000 +v 0.500000 0.250000 0.000000 +v 0.433013 0.250000 0.250000 +v 0.250000 0.250000 0.433013 +v 0.000000 0.250000 0.500000 +v -0.250000 0.250000 0.433013 +v -0.433013 0.250000 0.250000 +v -0.500000 0.250000 0.000000 +v -0.433013 0.250000 -0.250000 +v -0.250000 0.250000 -0.433013 +v 0.433013 2.000000 0.000000 +v 0.500000 1.750000 0.000000 +v -0.433013 1.750000 0.250000 +v 0.433013 1.750000 -0.250000 +v 0.375000 2.000000 -0.216506 +v 0.216506 2.183013 -0.125000 +v -0.500000 1.750000 0.000000 +v -0.433013 2.000000 0.000000 +v -0.250000 2.183012 0.000000 +v -0.375000 2.000000 0.216506 +v -0.216507 2.183012 0.125000 +v -0.250000 1.750000 0.433013 +v 0.250000 1.750000 -0.433013 +v 0.216506 2.000000 -0.375000 +v 0.125000 2.183013 -0.216506 +v -0.216506 2.000000 0.375000 +v -0.125000 2.183012 0.216507 +v 0.000000 1.750000 0.500000 +v -0.000000 1.750000 -0.500000 +v -0.000000 2.000000 -0.433013 +v -0.000000 2.183013 -0.250000 +v 0.000000 2.000000 0.433013 +v 0.000000 2.183012 0.250000 +v 0.250000 1.750000 0.433013 +v -0.250000 1.750000 -0.433013 +v -0.216507 2.000000 -0.375000 +v -0.125000 2.183013 -0.216506 +v 0.216507 2.000000 0.375000 +v 0.125000 2.183012 0.216507 +v 0.433013 1.750000 0.250000 +v -0.433013 1.750000 -0.250000 +v -0.375000 2.000000 -0.216506 +v -0.216507 2.183013 -0.125000 +v 0.375000 2.000000 0.216506 +v 0.216507 2.183012 0.125000 +v 0.000000 -0.250000 -0.650000 +v 0.000000 -0.250000 0.500000 +v 0.125000 -0.283494 -0.650000 +v 0.125000 -0.283494 0.500000 +v 0.216506 -0.375000 -0.650000 +v 0.216506 -0.375000 0.500000 +v 0.250000 -0.500000 -0.650000 +v 0.250000 -0.500000 0.500000 +v 0.216506 -0.625000 -0.650000 +v 0.216506 -0.625000 0.500000 +v 0.125000 -0.716506 -0.650000 +v 0.125000 -0.716506 0.500000 +v 0.000000 -0.750000 -0.650000 +v 0.000000 -0.750000 0.500000 +v -0.125000 -0.716506 -0.650000 +v -0.125000 -0.716506 0.500000 +v -0.216506 -0.625000 -0.650000 +v -0.216506 -0.625000 0.500000 +v -0.250000 -0.500000 -0.650000 +v -0.250000 -0.500000 0.500000 +v -0.216506 -0.375000 -0.650000 +v -0.216506 -0.375000 0.500000 +v -0.125000 -0.283494 -0.650000 +v -0.125000 -0.283494 0.500000 +v 0.106250 -0.315970 0.650000 +v -0.000000 -0.287500 0.650000 +v 0.184030 -0.393750 0.650000 +v 0.212500 -0.500000 0.650000 +v 0.184030 -0.606250 0.650000 +v 0.106250 -0.684030 0.650000 +v 0.000000 -0.712500 0.650000 +v -0.106250 -0.684030 0.650000 +v -0.184030 -0.606250 0.650000 +v -0.212500 -0.500000 0.650000 +v -0.184030 -0.393750 0.650000 +v -0.106250 -0.315970 0.650000 +v -0.300000 -0.500000 0.300000 +v -0.400000 -0.250000 0.400000 +v -0.300000 -0.500000 0.250000 +v -0.400000 -0.250000 0.150000 +v 0.300000 -0.500000 0.300000 +v 0.400000 -0.250000 0.400000 +v 0.300000 -0.500000 0.250000 +v 0.400000 -0.250000 0.150000 +v -0.300000 -0.500000 -0.250000 +v -0.400000 -0.250000 -0.150000 +v -0.300000 -0.500000 -0.300000 +v -0.400000 -0.250000 -0.400000 +v 0.300000 -0.500000 -0.250000 +v 0.400000 -0.250000 -0.150000 +v 0.300000 -0.500000 -0.300000 +v 0.400000 -0.250000 -0.400000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 0.992300 0.124000 +vn 0.000000 -0.992300 0.124000 +vn -0.848000 0.000000 0.530000 +vn 0.258800 0.000000 -0.965900 +vn 0.707100 0.000000 -0.707100 +vn 0.965900 0.000000 -0.258800 +vn 0.965900 0.000000 0.258800 +vn 0.707100 0.000000 0.707100 +vn -0.069200 0.963600 0.258200 +vn -0.186200 0.694700 0.694700 +vn -0.250600 0.250600 0.935100 +vn 0.069200 0.963600 0.258200 +vn 0.186200 0.694700 0.694700 +vn 0.250600 0.250600 0.935100 +vn 0.189000 0.963600 0.189000 +vn 0.258200 0.963600 0.069200 +vn 0.258200 0.963600 -0.069200 +vn 0.189000 0.963600 -0.189000 +vn 0.069200 0.963600 -0.258200 +vn -0.069200 0.963600 -0.258200 +vn -0.189000 0.963600 -0.189000 +vn -0.258200 0.963600 -0.069200 +vn -0.258200 0.963600 0.069200 +vn -0.189000 0.963600 0.189000 +vn -0.508600 0.694700 0.508600 +vn -0.684600 0.250600 0.684600 +vn -0.694700 0.694700 0.186200 +vn -0.935100 0.250600 0.250600 +vn -0.694700 0.694700 -0.186200 +vn -0.935100 0.250600 -0.250600 +vn -0.508600 0.694700 -0.508600 +vn -0.684600 0.250600 -0.684500 +vn -0.186200 0.694700 -0.694700 +vn -0.250600 0.250600 -0.935100 +vn 0.186200 0.694700 -0.694700 +vn 0.250600 0.250600 -0.935100 +vn 0.508600 0.694700 -0.508600 +vn 0.684600 0.250600 -0.684500 +vn 0.694700 0.694700 -0.186200 +vn 0.935100 0.250600 -0.250600 +vn 0.694700 0.694700 0.186200 +vn 0.508600 0.694700 0.508600 +vn 0.684600 0.250600 0.684500 +vn 0.935100 0.250600 0.250600 +vn -0.258800 0.000000 -0.965900 +vn -0.707100 0.000000 -0.707100 +vn 0.258800 -0.000000 0.965900 +vn -0.258800 0.000000 0.965900 +vn -0.707100 -0.000000 0.707100 +vn -0.965900 -0.000000 0.258800 +vn -0.965900 -0.000000 -0.258800 +vn 0.848000 0.000000 0.530000 +vn 0.258800 0.965900 -0.000000 +vn 0.707100 0.707100 -0.000000 +vn 0.965900 0.258800 -0.000000 +vn 0.965900 -0.258800 0.000000 +vn 0.707100 -0.707100 0.000000 +vn 0.258800 -0.965900 0.000000 +vn -0.258800 -0.965900 0.000000 +vn -0.707100 -0.707100 0.000000 +vn -0.965900 -0.258800 0.000000 +vn -0.965900 0.258800 -0.000000 +vn 0.938900 -0.251600 0.234700 +vn -0.258800 0.965900 -0.000000 +vn -0.707100 0.707100 -0.000000 +vn -0.251600 0.938900 0.234700 +vn 0.251600 0.938900 0.234700 +vn 0.938900 0.251600 0.234700 +vn -0.687400 0.687300 0.234700 +vn 0.687400 0.687300 0.234700 +vn -0.938900 0.251600 0.234700 +vn -0.938900 -0.251600 0.234700 +vn -0.687300 -0.687400 0.234700 +vn -0.251600 -0.938900 0.234700 +vn 0.251600 -0.938900 0.234700 +vn 0.687300 -0.687300 0.234700 +vn -0.928500 -0.371400 0.000000 +vn 0.000000 -0.371400 -0.928500 +vn 0.928500 -0.371400 0.000000 +vn 0.000000 -0.371400 0.928500 +vn 0.684600 0.250600 -0.684600 +vn 0.684600 0.250600 0.684600 +vn 0.687300 0.687400 0.234700 +vn 0.687300 -0.687400 0.234700 +s off +f 4//1 3//1 1//1 +f 8//2 7//2 3//2 +f 6//3 5//3 7//3 +f 2//4 1//4 5//4 +f 3//5 7//5 5//5 +f 8//6 4//6 2//6 +f 10//4 9//4 11//4 +f 6//7 2//7 10//7 +f 1//8 5//8 11//8 +f 9//9 10//9 2//9 +f 15//10 45//10 39//10 +f 39//11 30//11 17//11 +f 17//12 30//12 28//12 +f 18//13 28//13 56//13 +f 19//14 56//14 50//14 +f 49//15 14//15 43//15 +f 49//16 43//16 42//16 +f 48//17 42//17 38//17 +f 55//18 14//18 49//18 +f 48//19 54//19 55//19 +f 44//20 50//20 54//20 +f 61//21 14//21 55//21 +f 14//22 61//22 13//22 +f 14//23 13//23 32//23 +f 32//24 41//24 14//24 +f 41//25 47//25 14//25 +f 53//26 14//26 47//26 +f 59//27 14//27 53//27 +f 35//28 14//28 59//28 +f 35//29 37//29 14//29 +f 43//30 14//30 37//30 +f 43//31 37//31 36//31 +f 29//32 38//32 42//32 +f 36//33 37//33 35//33 +f 29//34 36//34 34//34 +f 35//35 59//35 58//35 +f 57//36 33//36 34//36 +f 53//37 52//37 58//37 +f 52//38 51//38 57//38 +f 47//39 46//39 52//39 +f 46//40 45//40 51//40 +f 41//41 40//41 46//41 +f 40//42 39//42 45//42 +f 32//43 31//43 40//43 +f 31//44 30//44 39//44 +f 32//45 13//45 27//45 +f 28//46 30//46 31//46 +f 27//47 13//47 61//47 +f 54//48 60//48 61//48 +f 50//49 56//49 60//49 +f 28//50 27//50 60//50 +f 45//51 15//51 26//51 +f 57//52 51//52 26//52 +f 50//53 44//53 21//53 +f 21//54 44//54 38//54 +f 38//55 29//55 23//55 +f 29//56 33//56 24//56 +f 24//57 33//57 57//57 +f 12//58 11//58 5//58 +f 63//59 65//59 64//59 +f 65//60 67//60 66//60 +f 67//61 69//61 68//61 +f 69//62 71//62 70//62 +f 71//63 73//63 72//63 +f 73//64 75//64 74//64 +f 75//65 77//65 76//65 +f 77//66 79//66 78//66 +f 79//67 81//67 80//67 +f 81//68 83//68 82//68 +f 69//69 89//69 90//69 +f 85//70 63//70 62//70 +f 83//71 85//71 84//71 +f 68//2 76//2 84//2 +f 94//4 92//4 88//4 +f 63//72 85//72 97//72 +f 63//73 87//73 86//73 +f 67//74 88//74 89//74 +f 83//75 96//75 97//75 +f 67//76 65//76 86//76 +f 81//77 95//77 96//77 +f 79//78 94//78 95//78 +f 79//79 77//79 93//79 +f 75//80 92//80 93//80 +f 73//81 91//81 92//81 +f 71//82 90//82 91//82 +f 101//83 100//83 98//83 +f 105//84 104//84 100//84 +f 103//85 102//85 104//85 +f 99//86 98//86 102//86 +f 100//5 104//5 102//5 +f 109//83 108//83 106//83 +f 113//84 112//84 108//84 +f 111//85 110//85 112//85 +f 107//86 106//86 110//86 +f 108//5 112//5 110//5 +f 2//1 4//1 1//1 +f 4//2 8//2 3//2 +f 8//3 6//3 7//3 +f 6//4 2//4 5//4 +f 1//5 3//5 5//5 +f 6//6 8//6 2//6 +f 12//4 10//4 11//4 +f 12//7 6//7 10//7 +f 9//8 1//8 11//8 +f 1//9 9//9 2//9 +f 16//10 15//10 39//10 +f 16//11 39//11 17//11 +f 18//12 17//12 28//12 +f 19//13 18//13 56//13 +f 20//14 19//14 50//14 +f 48//16 49//16 42//16 +f 44//17 48//17 38//17 +f 49//19 48//19 55//19 +f 48//20 44//20 54//20 +f 42//31 43//31 36//31 +f 36//32 29//32 42//32 +f 34//33 36//33 35//33 +f 33//34 29//34 34//34 +f 34//35 35//35 58//35 +f 58//36 57//36 34//36 +f 59//37 53//37 58//37 +f 58//38 52//38 57//38 +f 53//39 47//39 52//39 +f 52//40 46//40 51//40 +f 47//41 41//41 46//41 +f 46//42 40//42 45//42 +f 41//43 32//43 40//43 +f 40//87 31//87 39//87 +f 31//45 32//45 27//45 +f 27//46 28//46 31//46 +f 60//47 27//47 61//47 +f 55//48 54//48 61//48 +f 54//88 50//88 60//88 +f 56//50 28//50 60//50 +f 51//51 45//51 26//51 +f 25//52 57//52 26//52 +f 20//53 50//53 21//53 +f 22//54 21//54 38//54 +f 22//55 38//55 23//55 +f 23//56 29//56 24//56 +f 25//57 24//57 57//57 +f 6//58 12//58 5//58 +f 62//59 63//59 64//59 +f 64//60 65//60 66//60 +f 66//61 67//61 68//61 +f 68//62 69//62 70//62 +f 70//63 71//63 72//63 +f 72//64 73//64 74//64 +f 74//65 75//65 76//65 +f 76//66 77//66 78//66 +f 78//67 79//67 80//67 +f 80//68 81//68 82//68 +f 71//69 69//69 90//69 +f 84//70 85//70 62//70 +f 82//71 83//71 84//71 +f 84//2 62//2 64//2 +f 64//2 66//2 84//2 +f 68//2 70//2 72//2 +f 72//2 74//2 68//2 +f 76//2 78//2 80//2 +f 80//2 82//2 84//2 +f 84//2 66//2 68//2 +f 68//2 74//2 76//2 +f 76//2 80//2 84//2 +f 88//4 86//4 96//4 +f 87//4 97//4 96//4 +f 96//4 95//4 94//4 +f 94//4 93//4 92//4 +f 92//4 91//4 88//4 +f 90//4 89//4 88//4 +f 86//4 87//4 96//4 +f 96//4 94//4 88//4 +f 91//4 90//4 88//4 +f 87//72 63//72 97//72 +f 65//73 63//73 86//73 +f 69//74 67//74 89//74 +f 85//75 83//75 97//75 +f 88//89 67//89 86//89 +f 83//77 81//77 96//77 +f 81//78 79//78 95//78 +f 94//79 79//79 93//79 +f 77//80 75//80 93//80 +f 75//81 73//81 92//81 +f 73//90 71//90 91//90 +f 99//83 101//83 98//83 +f 101//84 105//84 100//84 +f 105//85 103//85 104//85 +f 103//86 99//86 102//86 +f 98//5 100//5 102//5 +f 107//83 109//83 106//83 +f 109//84 113//84 108//84 +f 113//85 111//85 112//85 +f 111//86 107//86 110//86 +f 106//5 108//5 110//5 diff --git a/assets/hbm/models/cwis_rotor.obj b/assets/hbm/models/cwis_rotor.obj new file mode 100644 index 000000000..d5df9d87a --- /dev/null +++ b/assets/hbm/models/cwis_rotor.obj @@ -0,0 +1,126 @@ +# Blender v2.76 (sub 0) OBJ File: 'cwis_rotor.blend' +# www.blender.org +o Cylinder.001 +v 0.000000 0.250000 -1.000000 +v 0.000000 0.375000 -1.000000 +v 0.500000 0.250000 -0.866025 +v 0.500000 0.375000 -0.866025 +v 0.866025 0.250000 -0.500000 +v 0.866025 0.375000 -0.500000 +v 1.000000 0.250000 0.000000 +v 1.000000 0.375000 0.000000 +v 0.866025 0.250000 0.500000 +v 0.866025 0.375000 0.500000 +v 0.500000 0.250000 0.866025 +v 0.500000 0.375000 0.866025 +v 0.000000 0.250000 1.000000 +v 0.000000 0.375000 1.000000 +v -0.500000 0.250000 0.866026 +v -0.500000 0.375000 0.866026 +v -0.866025 0.250000 0.500000 +v -0.866025 0.375000 0.500000 +v -1.000000 0.250000 0.000000 +v -1.000000 0.375000 0.000000 +v -0.866026 0.250000 -0.499999 +v -0.866026 0.375000 -0.499999 +v -0.500001 0.250000 -0.866025 +v -0.500001 0.375000 -0.866025 +v 0.500000 0.375000 0.500000 +v 0.850000 0.375000 0.500000 +v 0.500000 0.375000 -0.500000 +v 0.850000 0.375000 -0.500000 +v 0.500000 1.875000 -0.325000 +v 0.500000 1.875000 0.325000 +v 0.850000 1.875000 0.325000 +v 0.850000 1.875000 -0.325000 +v -0.850000 0.375000 0.500000 +v -0.500000 0.375000 0.500000 +v -0.850000 0.375000 -0.500000 +v -0.500000 0.375000 -0.500000 +v -0.850000 1.875000 -0.325000 +v -0.850000 1.875000 0.325000 +v -0.500000 1.875000 0.325000 +v -0.500000 1.875000 -0.325000 +vn 0.258800 0.000000 -0.965900 +vn 0.707100 0.000000 -0.707100 +vn 0.965900 0.000000 -0.258800 +vn 0.965900 0.000000 0.258800 +vn 0.707100 0.000000 0.707100 +vn 0.258800 0.000000 0.965900 +vn -0.258800 0.000000 0.965900 +vn -0.707100 0.000000 0.707100 +vn -0.965900 0.000000 0.258800 +vn -0.965900 0.000000 -0.258800 +vn 0.000000 1.000000 0.000000 +vn -0.258800 0.000000 -0.965900 +vn -0.707100 0.000000 -0.707100 +vn 0.000000 -1.000000 0.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.115900 -0.993300 +vn 0.000000 0.115900 0.993300 +vn 1.000000 0.000000 0.000000 +s off +f 2//1 4//1 3//1 +f 4//2 6//2 5//2 +f 6//3 8//3 7//3 +f 8//4 10//4 9//4 +f 10//5 12//5 11//5 +f 12//6 14//6 13//6 +f 14//7 16//7 15//7 +f 16//8 18//8 17//8 +f 18//9 20//9 19//9 +f 20//10 22//10 21//10 +f 22//11 14//11 6//11 +f 24//12 2//12 1//12 +f 22//13 24//13 23//13 +f 7//14 19//14 23//14 +f 39//11 40//11 37//11 +f 31//11 32//11 29//11 +f 25//15 30//15 29//15 +f 27//16 29//16 32//16 +f 26//17 31//17 30//17 +f 28//18 32//18 31//18 +f 33//15 38//15 37//15 +f 35//16 37//16 40//16 +f 34//17 39//17 38//17 +f 36//18 40//18 39//18 +f 1//1 2//1 3//1 +f 3//2 4//2 5//2 +f 5//3 6//3 7//3 +f 7//4 8//4 9//4 +f 9//5 10//5 11//5 +f 11//6 12//6 13//6 +f 13//7 14//7 15//7 +f 15//8 16//8 17//8 +f 17//9 18//9 19//9 +f 19//10 20//10 21//10 +f 6//11 4//11 2//11 +f 2//11 24//11 22//11 +f 22//11 20//11 18//11 +f 18//11 16//11 14//11 +f 14//11 12//11 10//11 +f 10//11 8//11 6//11 +f 6//11 2//11 22//11 +f 22//11 18//11 14//11 +f 14//11 10//11 6//11 +f 23//12 24//12 1//12 +f 21//13 22//13 23//13 +f 23//14 1//14 3//14 +f 3//14 5//14 7//14 +f 7//14 9//14 11//14 +f 11//14 13//14 15//14 +f 15//14 17//14 19//14 +f 19//14 21//14 23//14 +f 23//14 3//14 7//14 +f 7//14 11//14 15//14 +f 15//14 19//14 7//14 +f 38//11 39//11 37//11 +f 30//11 31//11 29//11 +f 27//15 25//15 29//15 +f 28//16 27//16 32//16 +f 25//17 26//17 30//17 +f 26//18 28//18 31//18 +f 35//15 33//15 37//15 +f 36//16 35//16 40//16 +f 33//17 34//17 38//17 +f 34//18 36//18 39//18 diff --git a/assets/hbm/textures/gui/centrifuge.png b/assets/hbm/textures/gui/centrifuge.png index 1a6d5b97c..04d90340a 100644 Binary files a/assets/hbm/textures/gui/centrifuge.png and b/assets/hbm/textures/gui/centrifuge.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index c75812ea1..e854761a6 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -409,6 +409,7 @@ public class ModBlocks { public static Block turret_flamer; public static Block turret_tau; public static Block turret_spitfire; + public static Block turret_cwis; public static Block book_guide; @@ -744,6 +745,7 @@ public class ModBlocks { turret_flamer = new TurretFlamer(Material.iron).setBlockName("turret_flamer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":turret_flamer"); turret_tau = new TurretTau(Material.iron).setBlockName("turret_tau").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":turret_tau"); turret_spitfire = new TurretSpitfire(Material.iron).setBlockName("turret_spitfire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":turret_spitfire"); + turret_cwis = new TurretCWIS(Material.iron).setBlockName("turret_cwis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":turret_cwis"); book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke); @@ -990,13 +992,14 @@ public class ModBlocks { GameRegistry.registerBlock(turret_flamer, turret_flamer.getUnlocalizedName()); GameRegistry.registerBlock(turret_tau, turret_tau.getUnlocalizedName()); GameRegistry.registerBlock(turret_spitfire, turret_spitfire.getUnlocalizedName()); + GameRegistry.registerBlock(turret_cwis, turret_cwis.getUnlocalizedName()); //Block Bombs GameRegistry.registerBlock(flame_war, flame_war.getUnlocalizedName()); GameRegistry.registerBlock(float_bomb, float_bomb.getUnlocalizedName()); GameRegistry.registerBlock(therm_endo, therm_endo.getUnlocalizedName()); GameRegistry.registerBlock(therm_exo, therm_exo.getUnlocalizedName()); - GameRegistry.registerBlock(rejuvinator, rejuvinator.getUnlocalizedName()); + //GameRegistry.registerBlock(rejuvinator, rejuvinator.getUnlocalizedName()); GameRegistry.registerBlock(det_cord, det_cord.getUnlocalizedName()); GameRegistry.registerBlock(det_charge, det_charge.getUnlocalizedName()); GameRegistry.registerBlock(red_barrel, red_barrel.getUnlocalizedName()); diff --git a/com/hbm/blocks/bomb/TurretCWIS.java b/com/hbm/blocks/bomb/TurretCWIS.java new file mode 100644 index 000000000..dc552962c --- /dev/null +++ b/com/hbm/blocks/bomb/TurretCWIS.java @@ -0,0 +1,83 @@ +package com.hbm.blocks.bomb; + +import com.hbm.entity.particle.EntityGasFlameFX; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.tileentity.bomb.TileEntityTurretCWIS; +import com.hbm.tileentity.bomb.TileEntityTurretSpitfire; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class TurretCWIS extends TurretBase { + + public TurretCWIS(Material mat) { + super(mat); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityTurretCWIS(); + } + + @Override + public boolean executeHoldAction(World world, int i, double yaw, double pitch, int x, int y, int z) { + + boolean flag = false; + + if(pitch < -60) + pitch = -60; + if(pitch > 30) + pitch = 30; + + TileEntityTurretCWIS te = (TileEntityTurretCWIS)world.getTileEntity(x, y, z); + + if(te.spin < 35) + te.spin += 5; + + if(te.spin > 25) { + Vec3 vector = Vec3.createVectorHelper( + -Math.sin(yaw / 180.0F * (float) Math.PI) * Math.cos(pitch / 180.0F * (float) Math.PI), + -Math.sin(pitch / 180.0F * (float) Math.PI), + Math.cos(yaw / 180.0F * (float) Math.PI) * Math.cos(pitch / 180.0F * (float) Math.PI)); + + vector.normalize(); + + if(!world.isRemote) { + EntityBullet bullet = new EntityBullet(world); + bullet.posX = x + vector.xCoord * 2.5 + 0.5; + bullet.posY = y + vector.yCoord * 2.5 + 1.5; + bullet.posZ = z + vector.zCoord * 2.5 + 0.5; + + bullet.motionX = vector.xCoord * 3; + bullet.motionY = vector.yCoord * 3; + bullet.motionZ = vector.zCoord * 3; + + bullet.setDamage(65 + rand.nextInt(55)); + + world.spawnEntityInWorld(bullet); + + EntityGasFlameFX smoke = new EntityGasFlameFX(world); + smoke.posX = x + vector.xCoord * 2.5 + 0.5; + smoke.posY = y + vector.yCoord * 2.5 + 1; + smoke.posZ = z + vector.zCoord * 2.5 + 0.5; + + smoke.motionX = vector.xCoord * 0.25; + smoke.motionY = vector.yCoord * 0.25; + smoke.motionZ = vector.zCoord * 0.25; + + world.spawnEntityInWorld(smoke); + } + + world.playSoundEffect(x, y, z, "hbm:entity.oldExplosion", 1.0F, 0.5F); + + flag = true; + } + + return flag; + } + + @Override + public void executeReleaseAction(World world, int i, double yaw, double pitch, int x, int y, int z) { } +} diff --git a/com/hbm/entity/missile/EntityMissileBaseAdvanced.java b/com/hbm/entity/missile/EntityMissileBaseAdvanced.java index 50c4946c7..0306a93a4 100644 --- a/com/hbm/entity/missile/EntityMissileBaseAdvanced.java +++ b/com/hbm/entity/missile/EntityMissileBaseAdvanced.java @@ -30,7 +30,7 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk int startZ; int targetX; int targetZ; - int velocity; + public int velocity; double decelY; double accelXZ; boolean isCluster = false; @@ -65,6 +65,7 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk if (this.health <= 0) { + this.setDead(); this.killMissile(); } } @@ -77,7 +78,6 @@ public abstract class EntityMissileBaseAdvanced extends Entity implements IChunk ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true); ExplosionLarge.spawnShrapnelShower(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 15, 0.075); ExplosionLarge.spawnMissileDebris(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 0.25, getDebris(), getDebrisRareDrop()); - this.setDead(); } public EntityMissileBaseAdvanced(World world, float x, float y, float z, int a, int b) { diff --git a/com/hbm/handler/nei/CentrifugeRecipeHandler.java b/com/hbm/handler/nei/CentrifugeRecipeHandler.java index f220a546c..e45ea5dc2 100644 --- a/com/hbm/handler/nei/CentrifugeRecipeHandler.java +++ b/com/hbm/handler/nei/CentrifugeRecipeHandler.java @@ -85,7 +85,7 @@ public class CentrifugeRecipeHandler extends TemplateRecipeHandler { public TemplateRecipeHandler newInstance() { if (fuels == null || fuels.isEmpty()) fuels = new ArrayList(); - for(ItemStack i : MachineRecipes.instance().getCentrifugeFuels()) + for(ItemStack i : MachineRecipes.instance().getBatteries()) { fuels.add(new Fuel(i)); } diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index c0987d3d1..14a061492 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -1558,6 +1558,8 @@ public class MachineRecipes { public ArrayList getBatteries() { ArrayList fuels = new ArrayList(); + fuels.add(new ItemStack(ModItems.battery_su)); + fuels.add(new ItemStack(ModItems.battery_su_l)); fuels.add(new ItemStack(ModItems.battery_generic)); fuels.add(new ItemStack(ModItems.battery_red_cell)); fuels.add(new ItemStack(ModItems.battery_red_cell_6)); @@ -1574,6 +1576,9 @@ public class MachineRecipes { fuels.add(new ItemStack(ModItems.battery_schrabidium_cell)); fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_2)); fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_4)); + fuels.add(new ItemStack(ModItems.battery_spark)); + fuels.add(new ItemStack(ModItems.battery_spark_cell_6)); + fuels.add(new ItemStack(ModItems.battery_spark_cell_25)); fuels.add(new ItemStack(ModItems.fusion_core)); fuels.add(new ItemStack(ModItems.energy_core)); return fuels; diff --git a/com/hbm/inventory/container/ContainerCentrifuge.java b/com/hbm/inventory/container/ContainerCentrifuge.java index 66ef6f99a..689dd508a 100644 --- a/com/hbm/inventory/container/ContainerCentrifuge.java +++ b/com/hbm/inventory/container/ContainerCentrifuge.java @@ -14,11 +14,9 @@ public class ContainerCentrifuge extends Container { private TileEntityMachineCentrifuge diFurnace; private int dualCookTime; - private int dualPower; public ContainerCentrifuge(InventoryPlayer invPlayer, TileEntityMachineCentrifuge tedf) { dualCookTime = 0; - dualPower = 0; diFurnace = tedf; @@ -95,15 +93,9 @@ public class ContainerCentrifuge extends Container { { par1.sendProgressBarUpdate(this, 0, this.diFurnace.dualCookTime); } - - if(this.dualPower != this.diFurnace.dualPower) - { - par1.sendProgressBarUpdate(this, 1, this.diFurnace.dualPower); - } } this.dualCookTime = this.diFurnace.dualCookTime; - this.dualPower = this.diFurnace.dualPower; } @Override @@ -112,10 +104,6 @@ public class ContainerCentrifuge extends Container { { diFurnace.dualCookTime = j; } - if(i == 1) - { - diFurnace.dualPower = j; - } } } \ No newline at end of file diff --git a/com/hbm/inventory/gui/GUIMachineCentrifuge.java b/com/hbm/inventory/gui/GUIMachineCentrifuge.java index 3bf4486f3..387cad551 100644 --- a/com/hbm/inventory/gui/GUIMachineCentrifuge.java +++ b/com/hbm/inventory/gui/GUIMachineCentrifuge.java @@ -12,7 +12,7 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -public class GUIMachineCentrifuge extends GuiContainer { +public class GUIMachineCentrifuge extends GuiInfoContainer { public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/centrifuge.png"); private TileEntityMachineCentrifuge centrifuge; @@ -24,6 +24,13 @@ public class GUIMachineCentrifuge extends GuiContainer { this.xSize = 176; this.ySize = 166; } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, centrifuge.power, centrifuge.maxPower); + } @Override protected void drawGuiContainerForegroundLayer( int i, int j) { @@ -41,7 +48,7 @@ public class GUIMachineCentrifuge extends GuiContainer { if(centrifuge.hasPower()) { - int i1 = centrifuge.getPowerRemainingScaled(54); + int i1 = (int)centrifuge.getPowerRemainingScaled(54); drawTexturedModalRect(guiLeft + 8, guiTop + 69 - i1, 177, 107 - i1, 16, i1); } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 38d3172c9..c71bdc6f7 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -94,6 +94,9 @@ public class ModItems { public static Item ingot_dineutronium; public static Item nugget_dineutronium; public static Item powder_dineutronium; + public static Item ingot_tetraneutronium; + public static Item nugget_tetraneutronium; + public static Item powder_tetraneutronium; public static Item ingot_starmetal; public static Item nugget_uranium; diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 957d79d78..1690166e8 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -73,6 +73,7 @@ public class ClientProxy extends ServerProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretFlamer.class, new RenderFlamerTurret()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretTau.class, new RenderTauTurret()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretSpitfire.class, new RenderSpitfireTurret()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretCWIS.class, new RenderCWISTurret()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePumpjack.class, new RenderPumpjack()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineTurbofan.class, new RenderTurbofan()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePress.class, new RenderPress()); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index a20f15f20..8b9f5ca2f 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -755,6 +755,7 @@ public class CraftingManager { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.can_redbomb, 1), new Object[] { ModItems.can_empty, Items.potionitem, Items.sugar, ModItems.pellet_cluster }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.can_mrsugar, 1), new Object[] { ModItems.can_empty, Items.potionitem, Items.sugar, ModItems.fluorite }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.can_overcharge, 1), new Object[] { ModItems.can_empty, Items.potionitem, Items.sugar, ModItems.sulfur }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.can_luna, 1), new Object[] { ModItems.can_empty, Items.potionitem, Items.sugar, ModItems.powder_meteorite_tiny }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.bottle_empty, 6), new Object[] { " G ", "G G", "GGG", 'G', "paneGlass" })); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle_nuka, 1), new Object[] { ModItems.bottle_empty, Items.potionitem, Items.sugar, ModItems.powder_coal }); @@ -821,7 +822,7 @@ public class CraftingManager { //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.therm_exo), 1), new Object[] { "TGT", "TUT", "TGT", 'T', "plateTitanium", 'U', ModItems.thermo_unit_exo, 'G', ModItems.circuit_gold })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.det_cord), 8), new Object[] { "TNT", "NGN", "TNT", 'T', "plateIron", 'N', "dustNiter", 'G', Items.gunpowder })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.det_charge), 1), new Object[] { "PDP", "DTD", "PDP", 'P', "plateSteel", 'D', ModBlocks.det_cord, 'T', Blocks.tnt })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.rejuvinator), 1), new Object[] { "TDT", "PCP", "TST", 'P', ModItems.pipes_steel, 'T', ModBlocks.factory_titanium_hull, 'D', "ingotDesh", 'S', "ingotSchrabidium", 'C', Items.clock })); + ////GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.rejuvinator), 1), new Object[] { "TDT", "PCP", "TST", 'P', ModItems.pipes_steel, 'T', ModBlocks.factory_titanium_hull, 'D', "ingotDesh", 'S', "ingotSchrabidium", 'C', Items.clock })); //GameRegistry.addRecipe(new ItemStack(ModItems.gadget_core, 1), new Object[] { "PPP", "PUP", "PPP", 'P', ModItems.nugget_pu239, 'U', ModItems.nugget_u238 }); //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gadget_explosive, 16), new Object[] { "ATP", "ATW", "ATP", 'P', "plateTitanium", 'A', "plateAluminum", 'T', Item.getItemFromBlock(Blocks.tnt), 'W', ModItems.wire_gold })); @@ -1080,6 +1081,12 @@ public class CraftingManager { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.powder_desh_mix, 1), new Object[] { ModItems.powder_actinium_tiny, ModItems.powder_actinium_tiny, ModItems.powder_lanthanium_tiny, ModItems.powder_lanthanium_tiny, ModItems.powder_cerium_tiny, ModItems.powder_cobalt_tiny, ModItems.powder_lithium_tiny, ModItems.powder_neodymium_tiny, ModItems.powder_niobium_tiny }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.powder_desh_mix, 9), new Object[] { ModItems.powder_actinium, ModItems.powder_actinium, ModItems.powder_lanthanium, ModItems.powder_lanthanium, ModItems.powder_cerium, ModItems.powder_cobalt, ModItems.powder_lithium, ModItems.powder_neodymium, ModItems.powder_niobium }); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.dynosphere_base), new Object[] { "RPR", "PBP", "RPR", 'R', "dustRedAlloy", 'P', "plateSteel", 'B', "blockRedstone" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_desh), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_desh_mix, 'P', "ingotDesh", 'B', ModItems.dynosphere_base })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_schrabidium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_power, 'P', "ingotSchrabidium", 'B', ModItems.dynosphere_desh_charged })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_euphemium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_power, 'P', "ingotEuphemium", 'B', ModItems.dynosphere_schrabidium_charged })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_dineutronium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_power, 'P', "ingotDineutronium", 'B', ModItems.dynosphere_euphemium_charged })); //Temporary Crappy Recipes GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', Blocks.glass_pane, 'S', "plateSteel", 'P', ModItems.powder_power, 'T', ModItems.wire_tungsten, 'I', "ingotPolymer" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip_ammo, 1), new Object[] { "S", "G", "C", 'S', "plateSteel", 'G', Items.gunpowder, 'C', "plateCopper" })); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 649fe4efc..40a8a4d6f 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -171,6 +171,7 @@ import com.hbm.tileentity.bomb.TileEntityNukeTsar; import com.hbm.tileentity.bomb.TileEntityRedBarrel; import com.hbm.tileentity.bomb.TileEntityTestBombAdvanced; import com.hbm.tileentity.bomb.TileEntityTestNuke; +import com.hbm.tileentity.bomb.TileEntityTurretCWIS; import com.hbm.tileentity.bomb.TileEntityTurretFlamer; import com.hbm.tileentity.bomb.TileEntityTurretHeavy; import com.hbm.tileentity.bomb.TileEntityTurretLight; @@ -568,6 +569,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityTurretSpitfire.class, "tileentity_turret_spitfire"); GameRegistry.registerTileEntity(TileEntityMachineRadGen.class, "tileentity_radgen"); GameRegistry.registerTileEntity(TileEntityMachineTransformer.class, "tileentity_transformer"); + GameRegistry.registerTileEntity(TileEntityTurretCWIS.class, "tileentity_turret_cwis"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); diff --git a/com/hbm/main/ResourceManager.java b/com/hbm/main/ResourceManager.java index 1437b9a04..5d46570dd 100644 --- a/com/hbm/main/ResourceManager.java +++ b/com/hbm/main/ResourceManager.java @@ -17,12 +17,17 @@ public class ResourceManager { public static final IModelCustom turret_spitfire_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_spitfire_base.obj")); public static final IModelCustom turret_spitfire_rotor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_spitfire_rotor.obj")); + public static final IModelCustom turret_cwis_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/cwis_base.obj")); + public static final IModelCustom turret_cwis_rotor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/cwis_rotor.obj")); + public static final IModelCustom turret_heavy_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_heavy_gun.obj")); public static final IModelCustom turret_rocket_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_rocket_gun.obj")); public static final IModelCustom turret_light_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_light_gun.obj")); public static final IModelCustom turret_flamer_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_flamer_gun.obj")); public static final IModelCustom turret_tau_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_tau_gun.obj")); public static final IModelCustom turret_spitfire_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/turret_spitfire_gun.obj")); + public static final IModelCustom turret_cwis_head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/cwis_head.obj")); + public static final IModelCustom turret_cwis_gun = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/cwis_gun.obj")); //Pumpjack public static final IModelCustom pumpjack_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pumpjack_base.obj")); diff --git a/com/hbm/packet/AuxGaugePacket.java b/com/hbm/packet/AuxGaugePacket.java index 828d4ba26..913ec1a51 100644 --- a/com/hbm/packet/AuxGaugePacket.java +++ b/com/hbm/packet/AuxGaugePacket.java @@ -2,6 +2,7 @@ package com.hbm.packet; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; +import com.hbm.tileentity.bomb.TileEntityTurretCWIS; import com.hbm.tileentity.machine.TileEntityAMSBase; import com.hbm.tileentity.machine.TileEntityAMSEmitter; import com.hbm.tileentity.machine.TileEntityAMSLimiter; @@ -89,6 +90,11 @@ public class AuxGaugePacket implements IMessage { else if(m.id == 3) base.field = m.value; } + if (te instanceof TileEntityTurretCWIS) { + TileEntityTurretCWIS cwis = (TileEntityTurretCWIS)te; + + cwis.rotation = m.value; + } } catch (Exception x) { } return null; diff --git a/com/hbm/render/tileentity/RenderCWISTurret.java b/com/hbm/render/tileentity/RenderCWISTurret.java new file mode 100644 index 000000000..ba0aa0306 --- /dev/null +++ b/com/hbm/render/tileentity/RenderCWISTurret.java @@ -0,0 +1,95 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.main.ResourceManager; +import com.hbm.tileentity.bomb.TileEntityTurretBase; +import com.hbm.tileentity.bomb.TileEntityTurretCWIS; + +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; + +public class RenderCWISTurret extends TileEntitySpecialRenderer { + + public RenderCWISTurret() { } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + + double yaw = 0; + double pitch = 0; + + if(tileEntity instanceof TileEntityTurretBase) { + yaw = ((TileEntityTurretBase)tileEntity).rotationYaw; + pitch = ((TileEntityTurretBase)tileEntity).rotationPitch; + } + + this.bindTexture(ResourceManager.universal); + ResourceManager.turret_cwis_base.renderAll(); + + GL11.glPopMatrix(); + + renderTileEntityAt2(tileEntity, x, y, z, f, yaw, pitch); + } + + public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f, double yaw, double pitch) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + + GL11.glRotated(yaw + 180, 0F, -1F, 0F); + + this.bindTexture(ResourceManager.universal); + ResourceManager.turret_cwis_rotor.renderAll(); + + GL11.glPopMatrix(); + + renderTileEntityAt3(tileEntity, x, y, z, f, yaw, pitch); + } + + public void renderTileEntityAt3(TileEntity tileEntity, double x, double y, double z, float f, double yaw, double pitch) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + + GL11.glRotated(yaw + 180, 0F, -1F, 0F); + GL11.glRotated(pitch, 1F, 0F, 0F); + + this.bindTexture(ResourceManager.universal); + ResourceManager.turret_cwis_head.renderAll(); + + GL11.glPopMatrix(); + + renderTileEntityAt4(tileEntity, x, y, z, f, yaw, pitch); + } + + public void renderTileEntityAt4(TileEntity tileEntity, double x, double y, double z, float f, double yaw, double pitch) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + + GL11.glRotated(yaw + 180, 0F, -1F, 0F); + GL11.glRotated(pitch, 1F, 0F, 0F); + GL11.glRotated(((TileEntityTurretCWIS)tileEntity).rotation, 0F, 0F, 1F); + + this.bindTexture(ResourceManager.universal); + ResourceManager.turret_cwis_gun.renderAll(); + + GL11.glPopMatrix(); + } +} diff --git a/com/hbm/tileentity/bomb/TileEntityTurretBase.java b/com/hbm/tileentity/bomb/TileEntityTurretBase.java index ef1e141bc..8c935eceb 100644 --- a/com/hbm/tileentity/bomb/TileEntityTurretBase.java +++ b/com/hbm/tileentity/bomb/TileEntityTurretBase.java @@ -40,6 +40,8 @@ public abstract class TileEntityTurretBase extends TileEntity { radius /= 2; if(this instanceof TileEntityTurretSpitfire) radius *= 3; + if(this instanceof TileEntityTurretCWIS) + radius *= 100; Entity target = null; for (int i = 0; i < iter.length; i++) { @@ -56,7 +58,14 @@ public abstract class TileEntityTurretBase extends TileEntity { } if(target != null) { + Vec3 turret = Vec3.createVectorHelper(target.posX - (xCoord + 0.5), target.posY + target.getEyeHeight() - (yCoord + 1), target.posZ - (zCoord + 0.5)); + + if(this instanceof TileEntityTurretCWIS) { + double[] est = getEstPos(Vec3.createVectorHelper(xCoord + 0.5, yCoord + 1.5, zCoord + 0.5), target); + turret = Vec3.createVectorHelper(est[0] - (xCoord + 0.5), est[1] - (yCoord + 1.5), est[2] - (zCoord + 0.5)); + } + rotationPitch = -Math.asin(turret.yCoord/turret.lengthVector()) * 180 / Math.PI; rotationYaw = -Math.atan2(turret.xCoord, turret.zCoord) * 180 / Math.PI; @@ -85,11 +94,14 @@ public abstract class TileEntityTurretBase extends TileEntity { if(!(e instanceof EntityLivingBase) && !(e instanceof EntityMissileBaseAdvanced)) return false; + if(this instanceof TileEntityTurretCWIS && !(e instanceof EntityMissileBaseAdvanced)) + return false; + if(e instanceof EntityPlayer && ((EntityPlayer)e).getUniqueID().toString().equals(uuid)) return false; Vec3 turret; - if(this instanceof TileEntityTurretSpitfire) + if(this instanceof TileEntityTurretSpitfire || this instanceof TileEntityTurretCWIS) turret = Vec3.createVectorHelper(xCoord + 0.5, yCoord + 1.5, zCoord + 0.5); else turret = Vec3.createVectorHelper(xCoord + 0.5, yCoord + 1, zCoord + 0.5); @@ -105,7 +117,28 @@ public abstract class TileEntityTurretBase extends TileEntity { if(this instanceof TileEntityTurretTau) return true; - return !Library.isObstructed(worldObj, turret.xCoord, turret.yCoord, turret.zCoord, entity.xCoord, entity.yCoord, entity.zCoord); + if(this instanceof TileEntityTurretCWIS) { + double[] est = getEstPos(turret, e); + return !Library.isObstructed(worldObj, turret.xCoord, turret.yCoord, turret.zCoord, est[0], est[1], est[2]); + } else { + return !Library.isObstructed(worldObj, turret.xCoord, turret.yCoord, turret.zCoord, entity.xCoord, entity.yCoord, entity.zCoord); + } + } + + public double[] getEstPos(Vec3 turret, Entity e) { + Vec3 dist = Vec3.createVectorHelper(e.posX - turret.xCoord, e.posY - turret.yCoord, e.posZ - turret.zCoord); + double travelTime = dist.lengthVector() / 3; + double acc = 1; + + if(e instanceof EntityMissileBaseAdvanced) { + acc = ((EntityMissileBaseAdvanced)e).velocity; + } + + double estX = e.posX + e.motionX * travelTime * acc; + double estY = e.posY + e.motionY * travelTime * acc; + double estZ = e.posZ + e.motionZ * travelTime * acc; + + return new double[] {estX, estY, estZ}; } @Override diff --git a/com/hbm/tileentity/bomb/TileEntityTurretCWIS.java b/com/hbm/tileentity/bomb/TileEntityTurretCWIS.java new file mode 100644 index 000000000..a9e832903 --- /dev/null +++ b/com/hbm/tileentity/bomb/TileEntityTurretCWIS.java @@ -0,0 +1,35 @@ +package com.hbm.tileentity.bomb; + +import com.hbm.main.MainRegistry; +import com.hbm.packet.AuxGaugePacket; +import com.hbm.packet.PacketDispatcher; + +import net.minecraft.tileentity.TileEntity; + +public class TileEntityTurretCWIS extends TileEntityTurretBase { + + public int spin; + public int rotation; + + @Override + public void updateEntity() { + + super.updateEntity(); + + this.ammo = 100; + + + + if(!worldObj.isRemote) { + + if(spin > 0) + spin -= 1; + + rotation += spin; + rotation = rotation % 360; + + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0)); + } + } + +} diff --git a/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java b/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java index 23c1b810f..d1ae01117 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java +++ b/com/hbm/tileentity/machine/TileEntityMachineCentrifuge.java @@ -1,7 +1,11 @@ package com.hbm.tileentity.machine; +import com.hbm.interfaces.IConsumer; import com.hbm.inventory.MachineRecipes; import com.hbm.items.ModItems; +import com.hbm.lib.Library; +import com.hbm.packet.AuxElectricityPacket; +import com.hbm.packet.PacketDispatcher; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -16,14 +20,14 @@ import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInventory { +public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInventory, IConsumer { private ItemStack slots[]; public int dualCookTime; - public int dualPower; + public long power; public int soundCycle = 0; - public static final int maxPower = 100000; + public static final int maxPower = 1000000; public static final int processingSpeed = 500; private static final int[] slots_top = new int[] {0}; @@ -109,38 +113,9 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv return false; } - if(i == 1 && hasItemPower(itemStack)) - { - return true; - } - return true; } - public boolean hasItemPower(ItemStack itemStack) { - return getItemPower(itemStack) > 0; - } - - private static int getItemPower(ItemStack itemStack) { - if(itemStack == null) - { - return 0; - }else{ - Item item = itemStack.getItem(); - - if(item == Items.coal) return 2500; - if(item == Item.getItemFromBlock(Blocks.coal_block)) return 25000; - if(item == Items.lava_bucket) return 50000; - if(item == Items.redstone) return 1000; - if(item == Item.getItemFromBlock(Blocks.redstone_block)) return 10000; - if(item == Item.getItemFromBlock(Blocks.netherrack)) return 1750; - if(item == Items.blaze_rod) return 15000; - if(item == Items.blaze_powder) return 5000; - - return 0; - } - } - @Override public ItemStack decrStackSize(int i, int j) { if(slots[i] != null) @@ -168,7 +143,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); - dualPower = nbt.getInteger("powerTime"); + power = nbt.getLong("powerTime"); dualCookTime = nbt.getShort("CookTime"); slots = new ItemStack[getSizeInventory()]; @@ -186,7 +161,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("powerTime", dualPower); + nbt.setLong("powerTime", power); nbt.setShort("cookTime", (short) dualCookTime); NBTTagList list = new NBTTagList(); @@ -223,8 +198,8 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv return (dualCookTime * i) / processingSpeed; } - public int getPowerRemainingScaled(int i) { - return (dualPower * i) / maxPower; + public long getPowerRemainingScaled(int i) { + return (power * i) / maxPower; } @@ -309,7 +284,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv } public boolean hasPower() { - return dualPower > 0; + return power > 0; } public boolean isProcessing() { @@ -321,37 +296,20 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv boolean flag = this.hasPower(); boolean flag1 = false; - if(hasPower() && isProcessing()) - { - this.dualPower = this.dualPower - 50; + if(!worldObj.isRemote) { - if(this.dualPower < 0) + power = Library.chargeTEFromItems(slots, 1, power, maxPower); + + if(hasPower() && isProcessing()) { - this.dualPower = 0; - } - } - - if(!worldObj.isRemote) - { - if(this.hasItemPower(this.slots[1]) && this.dualPower <= (TileEntityMachineCentrifuge.maxPower - TileEntityMachineCentrifuge.getItemPower(this.slots[1]))) - { - this.dualPower += getItemPower(this.slots[1]); - if(this.slots[1] != null) + this.power -= 2500; + + if(this.power < 0) { - flag1 = true; - this.slots[1].stackSize--; - if(this.slots[1].stackSize == 0) - { - this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]); - } + this.power = 0; } } - if(this.slots[1] != null && this.slots[1].getItem() == ModItems.pellet_rtg) - { - this.dualPower = maxPower; - } - boolean trigger = true; if(hasPower() && canProcess() && this.dualCookTime == 0) @@ -363,6 +321,8 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv { flag1 = true; } + + PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); } if(hasPower() && canProcess()) @@ -380,7 +340,7 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv this.dualCookTime = 0; this.processItem(); } - }else{ + } else { dualCookTime = 0; } @@ -401,4 +361,20 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv { return 65536.0D; } + + @Override + public void setPower(long i) { + power = i; + } + + @Override + public long getPower() { + return power; + + } + + @Override + public long getMaxPower() { + return maxPower; + } }