preliminary armor model work

This commit is contained in:
MachineMuse 2013-04-13 23:35:54 -06:00
parent 286a2b6869
commit 5e622f19dc
15 changed files with 4457 additions and 4239 deletions

View file

@ -5,21 +5,57 @@ Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd diffuse3.psd
Ni 1.00
newmtl jetpack1:wire_000214253
illum 4
Kd 0.00 0.84 0.99
Ka 0.00 0.84 0.99
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_002002002
illum 4
Kd 0.01 0.01 0.01
Ka 0.01 0.01 0.01
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_013013013
illum 4
Kd 0.05 0.05 0.05
Ka 0.05 0.05 0.05
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_035035035
illum 4
Kd 0.14 0.14 0.14
Ka 0.14 0.14 0.14
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_086086086
illum 4
Kd 0.34 0.34 0.34
Ka 0.34 0.34 0.34
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_115115115
illum 4
Kd 0.45 0.45 0.45
Ka 0.45 0.45 0.45
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl lambert3SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -5,21 +5,57 @@ Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd diffuse3.psd
Ni 1.00
newmtl jetpack1:wire_000214253
illum 4
Kd 0.00 0.84 0.99
Ka 0.00 0.84 0.99
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_002002002
illum 4
Kd 0.01 0.01 0.01
Ka 0.01 0.01 0.01
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_013013013
illum 4
Kd 0.05 0.05 0.05
Ka 0.05 0.05 0.05
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_035035035
illum 4
Kd 0.14 0.14 0.14
Ka 0.14 0.14 0.14
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_086086086
illum 4
Kd 0.34 0.34 0.34
Ka 0.34 0.34 0.34
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_115115115
illum 4
Kd 0.45 0.45 0.45
Ka 0.45 0.45 0.45
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl lambert3SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

View file

@ -2,18 +2,6 @@
mtllib mps_boots.mtl
g default
v -0.036693 -0.155665 -2.317372
v 4.278701 -0.155665 -2.537469
v 0.224660 5.036316 2.806901
v 4.540053 5.036316 2.586804
v -0.069546 3.273812 -2.961529
v 4.245847 3.273812 -3.181626
v 4.546938 3.308486 2.721785
v 0.231544 3.308486 2.941882
v 0.834607 0.101970 6.480335
v 4.307010 0.101970 6.303234
v 4.293207 1.546936 6.032610
v 0.820805 1.546936 6.209712
v 0.036693 -0.155665 -2.317372
v -4.278701 -0.155665 -2.537469
v -0.224660 5.036316 2.806901
@ -27,71 +15,27 @@ v -4.307010 0.101970 6.303234
v -4.293207 1.546936 6.032610
v -0.820805 1.546936 6.209712
vt 0.819810 0.412004
vt 0.825360 0.423488
vt 0.854460 0.406394
vt 0.852766 0.419116
vt 0.825360 0.423488
vt 0.828449 0.471225
vt 0.864048 0.465959
vt 0.915989 0.475181
vt 0.956820 0.488897
vt 0.925997 0.443507
vt 0.969841 0.356932
vt 0.866440 0.449970
vt 0.821685 0.456740
vt 0.909915 0.293073
vt 0.883716 0.315406
vt 0.937281 0.384687
vt 0.967177 0.455404
vt 0.977924 0.433065
vt 0.919870 0.433223
vt 0.977811 0.391525
vt 0.919757 0.391683
vt 0.782244 0.493925
vt 0.764550 0.468627
vt 0.819810 0.412004
vt 0.854460 0.406394
vt 0.852766 0.419116
vt 0.825360 0.423488
vt 0.977811 0.391525
vt 0.977924 0.433065
vt 0.919870 0.433223
vt 0.919757 0.391683
vt 0.956820 0.488897
vt 0.967177 0.455404
vt 0.915989 0.475181
vt 0.925997 0.443507
vt 0.967177 0.455404
vt 0.866440 0.449970
vt 0.864048 0.465959
vt 0.866440 0.449970
vt 0.828449 0.471225
vt 0.821685 0.456740
vt 0.782244 0.493925
vt 0.764550 0.468627
vt 0.821685 0.456740
vt 0.828449 0.471225
vt 0.969841 0.356932
vt 0.909915 0.293073
vt 0.937281 0.384687
vt 0.883716 0.315406
vt 0.909915 0.293073
vn 0.050064 0.184317 0.981591
vn 0.050064 0.184317 0.981591
vn -0.281682 0.419662 0.862867
vn 0.361550 0.652692 0.665789
vn -0.402485 0.490936 0.772650
vn 0.450035 0.878624 0.159651
vn -0.716701 0.676320 -0.170091
vn 0.886618 0.427742 -0.175914
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn 0.998944 -0.037895 -0.025988
vn 0.841555 0.202122 0.500931
vn -0.996404 -0.037895 0.075780
vn -0.796364 0.368644 0.479485
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.998691 -0.024698 0.044792
vn -0.988952 -0.024698 0.146168
vn -0.050064 0.184317 0.981591
vn 0.281682 0.419662 0.862867
vn -0.050064 0.184317 0.981591
@ -115,54 +59,113 @@ vn -0.001485 -0.999575 0.029125
vn -0.998691 -0.024697 0.044792
vn 0.988952 -0.024698 0.146168
s 1
g booties
g boots1
usemtl initialShadingGroup
f 9/1/1 10/2/2 12/4/3
f 12/4/3 10/2/2 11/3/4
f 3/19/5 4/17/6 5/20/7
f 5/20/7 4/17/6 6/18/8
f 9/1/1 12/2/2 10/3/3
f 10/3/3 12/2/2 11/4/4
f 3/5/5 5/6/6 4/7/7
f 4/7/7 5/6/6 6/8/8
s 3
f 5/8/9 6/7/10 1/16/11
f 1/16/11 6/7/10 2/9/12
f 5/9/9 1/10/10 6/11/11
f 6/11/11 1/10/10 2/12/12
s 1
f 2/9/13 6/7/8 7/11/14
f 7/11/14 6/7/8 4/6/6
f 1/22/15 8/12/16 5/21/7
f 5/21/7 8/12/16 3/5/5
f 8/12/16 7/11/14 3/5/5
f 3/5/5 7/11/14 4/6/6
f 4/13/7 6/11/8 7/14/13
f 7/14/13 6/11/8 2/12/14
f 3/15/5 8/16/15 5/17/6
f 5/17/6 8/16/15 1/18/16
f 8/16/15 3/15/5 7/14/13
f 7/14/13 3/15/5 4/13/7
s 4
f 1/19/17 9/20/18 2/21/19
f 2/21/19 9/20/18 10/22/20
s 1
f 2/12/14 10/3/21 7/14/13
f 7/14/13 10/3/21 11/4/4
f 7/14/13 11/4/4 8/16/15
f 8/16/15 11/4/4 12/2/2
f 12/2/2 9/1/22 8/16/15
f 8/16/15 9/1/22 1/18/16
g default
v -0.036693 -0.155665 -2.317372
v 4.278701 -0.155665 -2.537469
v 0.224660 5.036316 2.806901
v 4.540053 5.036316 2.586804
v -0.069546 3.273812 -2.961529
v 4.245847 3.273812 -3.181626
v 4.546938 3.308486 2.721785
v 0.231544 3.308486 2.941882
v 0.834607 0.101970 6.480335
v 4.307010 0.101970 6.303234
v 4.293207 1.546936 6.032610
v 0.820805 1.546936 6.209712
vt 0.819810 0.412004
vt 0.854460 0.406394
vt 0.825360 0.423488
vt 0.852766 0.419116
vt 0.977811 0.391525
vt 0.977924 0.433065
vt 0.919757 0.391683
vt 0.919870 0.433223
vt 0.956820 0.488897
vt 0.915989 0.475181
vt 0.967177 0.455404
vt 0.925997 0.443507
vt 0.866440 0.449970
vt 0.864048 0.465959
vt 0.764550 0.468627
vt 0.821685 0.456740
vt 0.782244 0.493925
vt 0.828449 0.471225
vt 0.969841 0.356932
vt 0.937281 0.384687
vt 0.909915 0.293073
vt 0.883716 0.315406
vn 0.050064 0.184317 0.981591
vn 0.050064 0.184317 0.981591
vn -0.281682 0.419662 0.862867
vn 0.361550 0.652692 0.665789
vn -0.402485 0.490936 0.772650
vn 0.450035 0.878624 0.159651
vn -0.716701 0.676320 -0.170091
vn 0.886618 0.427742 -0.175914
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn -0.050059 -0.184833 -0.981494
vn 0.998944 -0.037895 -0.025988
vn 0.841555 0.202122 0.500931
vn -0.996404 -0.037895 0.075780
vn -0.796364 0.368644 0.479485
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.001485 -0.999575 0.029125
vn 0.998691 -0.024698 0.044792
vn -0.988952 -0.024698 0.146168
s 1
g boots2
usemtl initialShadingGroup
f 21/23/23 22/24/24 24/25/25
f 24/25/25 22/24/24 23/26/26
f 15/27/27 16/28/28 17/29/29
f 17/29/29 16/28/28 18/30/30
s 3
f 17/31/31 18/32/32 13/33/33
f 13/33/33 18/32/32 14/34/34
s 1
f 14/34/35 18/32/30 19/35/36
f 19/35/36 18/32/30 16/36/28
f 13/37/37 20/38/38 17/39/29
f 17/39/29 20/38/38 15/40/27
f 20/38/38 19/35/36 15/40/27
f 15/40/27 19/35/36 16/36/28
s 5
f 1/10/17 2/15/18 9/13/19
f 9/13/19 2/15/18 10/14/20
f 13/41/39 14/42/40 21/43/41
f 21/43/41 14/42/40 22/44/42
s 1
f 2/9/13 7/11/14 10/2/21
f 10/2/21 7/11/14 11/3/4
f 7/11/14 8/12/16 11/3/4
f 11/3/4 8/12/16 12/4/3
f 1/22/15 9/1/22 8/12/16
f 8/12/16 9/1/22 12/4/3
s 6
f 21/23/23 24/26/24 22/24/25
f 22/24/25 24/26/24 23/25/26
f 15/27/27 17/30/28 16/28/29
f 16/28/29 17/30/28 18/29/30
s 8
f 17/31/31 13/34/32 18/32/33
f 18/32/33 13/34/32 14/33/34
s 6
f 16/36/29 18/32/30 19/35/35
f 19/35/35 18/32/30 14/33/36
f 15/40/27 20/39/37 17/37/28
f 17/37/28 20/39/37 13/38/38
f 20/39/37 15/40/27 19/35/35
f 19/35/35 15/40/27 16/36/29
s 9
f 13/41/39 21/44/40 14/42/41
f 14/42/41 21/44/40 22/43/42
s 6
f 14/33/36 22/24/43 19/35/35
f 19/35/35 22/24/43 23/25/26
f 19/35/35 23/25/26 20/39/37
f 20/39/37 23/25/26 24/26/24
f 24/26/24 21/23/44 20/39/37
f 20/39/37 21/23/44 13/38/38
f 14/34/35 19/35/36 22/24/43
f 22/24/43 19/35/36 23/26/26
f 19/35/36 20/38/38 23/26/26
f 23/26/26 20/38/38 24/25/25
f 13/37/37 21/23/44 20/38/38
f 20/38/38 21/23/44 24/25/25

View file

@ -5,21 +5,57 @@ Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd diffuse3.psd
Ni 1.00
newmtl jetpack1:wire_000214253
illum 4
Kd 0.00 0.84 0.99
Ka 0.00 0.84 0.99
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_002002002
illum 4
Kd 0.01 0.01 0.01
Ka 0.01 0.01 0.01
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_013013013
illum 4
Kd 0.05 0.05 0.05
Ka 0.05 0.05 0.05
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_035035035
illum 4
Kd 0.14 0.14 0.14
Ka 0.14 0.14 0.14
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_086086086
illum 4
Kd 0.34 0.34 0.34
Ka 0.34 0.34 0.34
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_115115115
illum 4
Kd 0.45 0.45 0.45
Ka 0.45 0.45 0.45
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl lambert3SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -5,21 +5,57 @@ Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd diffuse3.psd
Ni 1.00
newmtl jetpack1:wire_000214253
illum 4
Kd 0.00 0.84 0.99
Ka 0.00 0.84 0.99
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_002002002
illum 4
Kd 0.01 0.01 0.01
Ka 0.01 0.01 0.01
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_013013013
illum 4
Kd 0.05 0.05 0.05
Ka 0.05 0.05 0.05
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_035035035
illum 4
Kd 0.14 0.14 0.14
Ka 0.14 0.14 0.14
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_086086086
illum 4
Kd 0.34 0.34 0.34
Ka 0.34 0.34 0.34
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_115115115
illum 4
Kd 0.45 0.45 0.45
Ka 0.45 0.45 0.45
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl lambert3SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -5,21 +5,57 @@ Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd diffuse3.psd
Ni 1.00
newmtl jetpack1:wire_000214253
illum 4
Kd 0.00 0.84 0.99
Ka 0.00 0.84 0.99
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_002002002
illum 4
Kd 0.01 0.01 0.01
Ka 0.01 0.01 0.01
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_013013013
illum 4
Kd 0.05 0.05 0.05
Ka 0.05 0.05 0.05
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_035035035
illum 4
Kd 0.14 0.14 0.14
Ka 0.14 0.14 0.14
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_086086086
illum 4
Kd 0.34 0.34 0.34
Ka 0.34 0.34 0.34
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl jetpack1:wire_115115115
illum 4
Kd 0.45 0.45 0.45
Ka 0.45 0.45 0.45
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.35 0.35 0.35
Ns 32.00
newmtl lambert3SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

File diff suppressed because it is too large Load diff

View file

@ -1,45 +1,48 @@
package net.machinemuse.powersuits.client.render;
import net.machinemuse.powersuits.common.MuseLogger;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.client.model.obj.GroupObject;
import net.minecraftforge.client.model.obj.WavefrontObject;
import org.lwjgl.opengl.GL11;
public class ArmorModel extends ModelBiped {
public IModelCustom armorHelmet;
public IModelCustom armorLeftArm;
public IModelCustom armorRightArm;
public IModelCustom armorChestplate;
public IModelCustom armorLeftLeg;
public IModelCustom armorRightLeg;
protected static ArmorModel instance;
public ModelRenderer bipedHead;
public ModelRenderer bipedHeadwear;
public ModelRenderer bipedBody;
public ModelRenderer bipedRightArm;
public ModelRenderer bipedLeftArm;
public ModelRenderer bipedRightLeg;
public ModelRenderer bipedLeftLeg;
public static ArmorModel getInstance() {
if (instance == null) {
instance = new ArmorModel();
}
return instance;
}
public WavefrontObject armorHelm;
public WavefrontObject armorArms;
public WavefrontObject armorChest;
public WavefrontObject armorLegs;
public WavefrontObject armorBoots;
/**
* Records whether the model should be rendered holding an item in the left
* hand, and if that item is a block.
*/
public int heldItemLeft;
// public int heldItemLeft;
/**
* Records whether the model should be rendered holding an item in the right
* hand, and if that item is a block.
*/
public int heldItemRight;
public boolean isSneak;
// public int heldItemRight;
// public boolean isSneak;
/** Records whether the model should be rendered aiming a bow. */
public boolean aimedBow;
// public boolean aimedBow;
public ArmorModel()
{
@ -51,15 +54,31 @@ public class ArmorModel extends ModelBiped {
this(par1, 0.0F, 64, 32);
}
private void logModelParts(IModelCustom modelc) {
if (modelc instanceof WavefrontObject) {
WavefrontObject model = (WavefrontObject) modelc;
MuseLogger.logDebug(model.toString() + ":");
for (GroupObject group : model.groupObjects) {
MuseLogger.logDebug("-" + group.name);
}
}
}
public ArmorModel(float par1, float par2, int par3, int par4)
{
// New stuff
this.armorHelmet = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_helm.obj");
this.armorLeftArm = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_arms.obj");
this.armorRightArm = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_arms.obj");
this.armorChestplate = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_legs.obj");
this.armorLeftLeg = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_boots.obj");
this.armorRightLeg = AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_boots.obj");
this.armorHelm = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_helm.obj");
this.armorArms = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_arms.obj");
this.armorChest = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_chest.obj");
this.armorLegs = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_pantaloons.obj");
this.armorBoots = (WavefrontObject) AdvancedModelLoader.loadModel("/mods/mmmPowersuits/models/mps_boots.obj");
// logModelParts(armorHelm);
// logModelParts(armorArms);
// logModelParts(armorChest);
// logModelParts(armorLegs);
// logModelParts(armorBoots);
// Old stuff
this.heldItemLeft = 0;
@ -103,36 +122,51 @@ public class ArmorModel extends ModelBiped {
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
if (this.isChild)
{
float f6 = 2.0F;
GL11.glPushMatrix();
GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F);
this.bipedHead.render(par7);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
this.bipedBody.render(par7);
this.bipedRightArm.render(par7);
this.bipedLeftArm.render(par7);
this.bipedRightLeg.render(par7);
this.bipedLeftLeg.render(par7);
this.bipedHeadwear.render(par7);
GL11.glPopMatrix();
}
else
{
this.bipedHead.render(par7);
this.bipedBody.render(par7);
this.bipedRightArm.render(par7);
this.bipedLeftArm.render(par7);
this.bipedRightLeg.render(par7);
this.bipedLeftLeg.render(par7);
this.bipedHeadwear.render(par7);
}
GL11.glPushMatrix();
GL11.glTranslated(0, 1.625, 0);
double scale = 0.0625;
GL11.glScaled(scale, scale, scale);
GL11.glRotatef(180, 1, 0, 0);
this.armorChest.renderAll();
// this.armorHelm.renderAll();
this.armorLegs.renderAll();
this.armorArms.renderAll();
this.armorBoots.renderAll();
this.armorChest.renderPart("default");
this.armorHelm.renderPart("default");
this.armorLegs.renderPart("default");
this.armorArms.renderPart("default");
this.armorBoots.renderPart("default");
GL11.glPopMatrix();
// if (this.isChild)
// {
// float f6 = 2.0F;
// GL11.glPushMatrix();
// GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
// GL11.glTranslatef(0.0F, 16.0F * par7, 0.0F);
// this.bipedHead.render(par7);
// GL11.glPopMatrix();
// GL11.glPushMatrix();
// GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
// GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F);
// this.bipedBody.render(par7);
// this.bipedRightArm.render(par7);
// this.bipedLeftArm.render(par7);
// this.bipedRightLeg.render(par7);
// this.bipedLeftLeg.render(par7);
// this.bipedHeadwear.render(par7);
// GL11.glPopMatrix();
// }
// else
// {
// this.bipedHead.render(par7);
// this.bipedBody.render(par7);
// this.bipedRightArm.render(par7);
// this.bipedLeftArm.render(par7);
// this.bipedRightLeg.render(par7);
// this.bipedLeftLeg.render(par7);
// this.bipedHeadwear.render(par7);
// }
}
/**

View file

@ -0,0 +1,12 @@
package net.machinemuse.powersuits.client.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
public class ArmorPartRenderer extends ModelRenderer {
public ArmorPartRenderer(ModelBase par1ModelBase) {
super(par1ModelBase);
}
}

View file

@ -28,7 +28,7 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements IS
public TinkerTableRenderer(int renderId) {
model = new TinkerTableModel();
this.renderId = renderId;
// armormodel = new ArmorModel();
armormodel = new ArmorModel();
}
@Override
@ -37,8 +37,6 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements IS
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
// armormodel.armorChestplate.renderAll();
model.doRender(null, x, y, z, partialTickTime, partialTickTime);
// float texturex = 80 / 256.0f;
// float texturey = 32 / 256.0f;
@ -57,7 +55,6 @@ public class TinkerTableRenderer extends TileEntitySpecialRenderer implements IS
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
Minecraft.getMinecraft().renderEngine.bindTexture(Config.TINKERTABLE_TEXTURE_PATH);
GL11.glPushMatrix();
GL11.glTranslated(-0.5, -0.5 + -1.0 / 16.0, -0.5);
model.doRender(null, 0, 0, 0, 0, 0);

View file

@ -9,42 +9,16 @@ import net.machinemuse.api.IPowerModule;
import net.machinemuse.api.ModuleManager;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.powersuits.block.BlockTinkerTable;
import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.item.ItemPowerArmorBoots;
import net.machinemuse.powersuits.item.ItemPowerArmorChestplate;
import net.machinemuse.powersuits.item.ItemPowerArmorHelmet;
import net.machinemuse.powersuits.item.ItemPowerArmorLeggings;
import net.machinemuse.powersuits.item.ItemPowerGauntlet;
import net.machinemuse.powersuits.item.*;
import net.machinemuse.powersuits.powermodule.armor.BasicPlatingModule;
import net.machinemuse.powersuits.powermodule.armor.DiamondPlatingModule;
import net.machinemuse.powersuits.powermodule.armor.EnergyShieldModule;
import net.machinemuse.powersuits.powermodule.energy.AdvancedBatteryModule;
import net.machinemuse.powersuits.powermodule.energy.BasicBatteryModule;
import net.machinemuse.powersuits.powermodule.energy.EliteBatteryModule;
import net.machinemuse.powersuits.powermodule.misc.CitizenJoeStyle;
import net.machinemuse.powersuits.powermodule.misc.InvisibilityModule;
import net.machinemuse.powersuits.powermodule.misc.NightVisionModule;
import net.machinemuse.powersuits.powermodule.misc.TintModule;
import net.machinemuse.powersuits.powermodule.misc.TransparentArmorModule;
import net.machinemuse.powersuits.powermodule.misc.WaterElectrolyzerModule;
import net.machinemuse.powersuits.powermodule.movement.BlinkDriveModule;
import net.machinemuse.powersuits.powermodule.movement.ClimbAssistModule;
import net.machinemuse.powersuits.powermodule.movement.FlightControlModule;
import net.machinemuse.powersuits.powermodule.movement.GliderModule;
import net.machinemuse.powersuits.powermodule.movement.JetBootsModule;
import net.machinemuse.powersuits.powermodule.movement.JetPackModule;
import net.machinemuse.powersuits.powermodule.movement.JumpAssistModule;
import net.machinemuse.powersuits.powermodule.movement.ParachuteModule;
import net.machinemuse.powersuits.powermodule.movement.ShockAbsorberModule;
import net.machinemuse.powersuits.powermodule.movement.SprintAssistModule;
import net.machinemuse.powersuits.powermodule.movement.SwimAssistModule;
import net.machinemuse.powersuits.powermodule.tool.AquaAffinityModule;
import net.machinemuse.powersuits.powermodule.tool.AxeModule;
import net.machinemuse.powersuits.powermodule.tool.DiamondPickUpgradeModule;
import net.machinemuse.powersuits.powermodule.tool.HoeModule;
import net.machinemuse.powersuits.powermodule.tool.PickaxeModule;
import net.machinemuse.powersuits.powermodule.tool.ShearsModule;
import net.machinemuse.powersuits.powermodule.tool.ShovelModule;
import net.machinemuse.powersuits.powermodule.misc.*;
import net.machinemuse.powersuits.powermodule.movement.*;
import net.machinemuse.powersuits.powermodule.tool.*;
import net.machinemuse.powersuits.powermodule.weapon.MeleeAssistModule;
import net.machinemuse.powersuits.powermodule.weapon.PlasmaCannonModule;
import net.machinemuse.powersuits.powermodule.weapon.RailgunModule;
@ -76,6 +50,7 @@ public class Config {
// public static final String WC_ICON_PATH =
// "/resources/machinemuse/watericons.png";
public static final String TINKERTABLE_TEXTURE_PATH = TEXTURE_PREFIX + "models/tinkertable_tx.png";
public static final String ARMOR_TEXTURE_PATH = TEXTURE_PREFIX + "models/diffuse.png";
public static final String BLANK_ARMOR_MODEL_PATH = TEXTURE_PREFIX + "models/blankarmor.png";
// public static final String MUSE_ICON_PATH =
// "/resources/machinemuse/museicons.png";

View file

@ -10,11 +10,11 @@ import net.machinemuse.api.MuseItemUtils;
import net.machinemuse.api.electricity.ElectricItemUtils;
import net.machinemuse.general.MuseStringUtils;
import net.machinemuse.general.geometry.Colour;
import net.machinemuse.powersuits.client.render.ArmorModel;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.powermodule.misc.CitizenJoeStyle;
import net.machinemuse.powersuits.powermodule.misc.HazmatModule;
import net.machinemuse.powersuits.powermodule.misc.TintModule;
import net.machinemuse.powersuits.powermodule.misc.TransparentArmorModule;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
@ -54,31 +54,36 @@ public abstract class ItemPowerArmor extends ItemElectricArmor
@Override
public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, int layer) {
if (itemstack != null) {
NBTTagCompound itemTag = MuseItemUtils.getMuseItemTag(itemstack);
// MinecraftForgeClient.getRenderPass()? nope
if (itemTag.hasKey("didColour")) {
itemTag.removeTag("didColour");
return Config.BLANK_ARMOR_MODEL_PATH;
} else {
if (MuseItemUtils.itemHasActiveModule(itemstack, TransparentArmorModule.MODULE_TRANSPARENT_ARMOR)) {
return Config.BLANK_ARMOR_MODEL_PATH;
} else if (itemstack.getItem() instanceof ItemPowerArmorLeggings) {
if (MuseItemUtils.itemHasModule(itemstack, CitizenJoeStyle.CITIZEN_JOE_STYLE)) {
return Config.CITIZENJOE_ARMORPANTS_PATH;
}
return Config.SEBK_ARMORPANTS_PATH;
} else {
if (MuseItemUtils.itemHasModule(itemstack, CitizenJoeStyle.CITIZEN_JOE_STYLE)) {
return Config.CITIZENJOE_ARMOR_PATH;
}
return Config.SEBK_ARMOR_PATH;
}
}
}
return Config.BLANK_ARMOR_MODEL_PATH;
return Config.ARMOR_TEXTURE_PATH;
// if (itemstack != null) {
// NBTTagCompound itemTag = MuseItemUtils.getMuseItemTag(itemstack);
// // MinecraftForgeClient.getRenderPass()? nope
// if (itemTag.hasKey("didColour")) {
//
// itemTag.removeTag("didColour");
// return Config.BLANK_ARMOR_MODEL_PATH;
// } else {
// if (MuseItemUtils.itemHasActiveModule(itemstack,
// TransparentArmorModule.MODULE_TRANSPARENT_ARMOR)) {
// return Config.BLANK_ARMOR_MODEL_PATH;
// } else if (itemstack.getItem() instanceof ItemPowerArmorLeggings) {
// if (MuseItemUtils.itemHasModule(itemstack,
// CitizenJoeStyle.CITIZEN_JOE_STYLE)) {
// return Config.CITIZENJOE_ARMORPANTS_PATH;
// }
//
// return Config.SEBK_ARMORPANTS_PATH;
// } else {
// if (MuseItemUtils.itemHasModule(itemstack,
// CitizenJoeStyle.CITIZEN_JOE_STYLE)) {
// return Config.CITIZENJOE_ARMOR_PATH;
// }
// return Config.SEBK_ARMOR_PATH;
// }
// }
// }
// return Config.BLANK_ARMOR_MODEL_PATH;
}
/**
@ -259,4 +264,10 @@ public abstract class ItemPowerArmor extends ItemElectricArmor
public void onProtectFromPoison(ItemStack itemStack, EntityLiving entityLiving, Poison type) {
}
@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int armorSlot) {
return ArmorModel.getInstance();
}
}