AMS animation and some base functionality
1975
assets/hbm/models/ams_limiter_destroyed.obj
Normal file
247
assets/hbm/models/sphere_iuv.obj
Normal file
@ -0,0 +1,247 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'sphere_iuv.blend'
|
||||
# www.blender.org
|
||||
o Icosphere
|
||||
v 0.000000 -0.500000 0.000000
|
||||
v 0.361804 -0.223610 0.262863
|
||||
v -0.138194 -0.223610 0.425325
|
||||
v -0.447213 -0.223608 0.000000
|
||||
v -0.138194 -0.223610 -0.425325
|
||||
v 0.361804 -0.223610 -0.262863
|
||||
v 0.138194 0.223610 0.425325
|
||||
v -0.361804 0.223610 0.262863
|
||||
v -0.361804 0.223610 -0.262863
|
||||
v 0.138194 0.223610 -0.425325
|
||||
v 0.447213 0.223608 0.000000
|
||||
v 0.000000 0.500000 0.000000
|
||||
v -0.081228 -0.425327 0.249998
|
||||
v 0.212661 -0.425327 0.154506
|
||||
v 0.131434 -0.262869 0.404506
|
||||
v 0.425324 -0.262868 0.000000
|
||||
v 0.212661 -0.425327 -0.154506
|
||||
v -0.262865 -0.425326 0.000000
|
||||
v -0.344095 -0.262868 0.249998
|
||||
v -0.081228 -0.425327 -0.249998
|
||||
v -0.344095 -0.262868 -0.249998
|
||||
v 0.131434 -0.262869 -0.404506
|
||||
v 0.475529 0.000000 0.154506
|
||||
v 0.475529 0.000000 -0.154506
|
||||
v 0.000000 0.000000 0.500000
|
||||
v 0.293893 0.000000 0.404508
|
||||
v -0.475529 0.000000 0.154506
|
||||
v -0.293893 0.000000 0.404508
|
||||
v -0.293893 0.000000 -0.404508
|
||||
v -0.475529 0.000000 -0.154506
|
||||
v 0.293893 0.000000 -0.404508
|
||||
v 0.000000 0.000000 -0.500000
|
||||
v 0.344095 0.262868 0.249998
|
||||
v -0.131434 0.262869 0.404506
|
||||
v -0.425324 0.262868 0.000000
|
||||
v -0.131434 0.262869 -0.404506
|
||||
v 0.344095 0.262868 -0.249998
|
||||
v 0.081228 0.425327 0.249998
|
||||
v 0.262865 0.425326 0.000000
|
||||
v -0.212661 0.425327 0.154506
|
||||
v -0.212661 0.425327 -0.154506
|
||||
v 0.081228 0.425327 -0.249998
|
||||
vt 0.932631 0.000097
|
||||
vt 0.000097 0.360641
|
||||
vt 0.932631 0.999904
|
||||
vt 0.000097 0.999903
|
||||
vt 0.932620 0.639362
|
||||
vt 0.000097 0.000097
|
||||
vt 0.999904 0.000097
|
||||
vt 0.639366 0.932625
|
||||
vt 0.999904 0.932624
|
||||
vt 0.639366 0.000097
|
||||
vt 0.000097 0.932624
|
||||
vt 0.500000 0.729345
|
||||
vt 0.360643 0.932653
|
||||
vt 0.360629 0.932645
|
||||
vt 0.000085 0.499986
|
||||
vt 0.729344 0.999915
|
||||
vt 0.729344 0.000085
|
||||
vt 0.500007 0.000085
|
||||
vt 0.000085 0.729356
|
||||
vt 0.999915 0.729356
|
||||
vt 0.500000 0.729360
|
||||
vt 0.932617 0.639349
|
||||
vt 0.932634 0.360652
|
||||
vt 0.000097 0.639362
|
||||
vt 0.865959 0.499989
|
||||
vt 0.865950 0.000093
|
||||
vt 0.865950 0.999907
|
||||
vt 0.360647 0.000097
|
||||
vt 0.000093 0.865964
|
||||
vt 0.999907 0.865964
|
||||
vt 0.865945 0.999907
|
||||
vt 0.865946 0.000093
|
||||
vt 0.729345 0.500014
|
||||
vt 0.932653 0.999903
|
||||
vt 0.932653 0.000097
|
||||
vt 0.499993 0.865968
|
||||
vt 0.639349 0.932634
|
||||
vt 0.932624 0.360645
|
||||
vt 0.999915 0.729347
|
||||
vt 0.000085 0.729347
|
||||
vt 0.360651 0.932631
|
||||
vn -0.102400 0.943500 -0.315100
|
||||
vn -0.700200 0.661700 -0.268000
|
||||
vn 0.268000 0.943500 -0.194700
|
||||
vn 0.268000 0.943500 0.194700
|
||||
vn -0.102400 0.943500 0.315100
|
||||
vn -0.905000 0.330400 -0.268000
|
||||
vn -0.024700 0.330400 -0.943500
|
||||
vn 0.889700 0.330400 -0.315100
|
||||
vn 0.574600 0.330400 0.748800
|
||||
vn -0.534600 0.330400 0.777900
|
||||
vn -0.802600 0.125600 -0.583100
|
||||
vn 0.306600 0.125600 -0.943500
|
||||
vn 0.992100 0.125600 0.000000
|
||||
vn 0.306600 0.125600 0.943500
|
||||
vn -0.802600 0.125600 0.583100
|
||||
vn -0.408900 -0.661700 -0.628400
|
||||
vn 0.471300 -0.661700 -0.583100
|
||||
vn 0.700200 -0.661700 0.268000
|
||||
vn -0.038500 -0.661700 0.748800
|
||||
vn -0.724000 -0.661700 0.194700
|
||||
vn -0.268000 -0.943500 0.194700
|
||||
vn -0.491100 -0.794700 0.356800
|
||||
vn -0.408900 -0.661700 0.628400
|
||||
vn 0.102400 -0.943500 0.315100
|
||||
vn 0.187600 -0.794700 0.577300
|
||||
vn 0.471300 -0.661700 0.583100
|
||||
vn 0.331300 -0.943500 0.000000
|
||||
vn 0.607100 -0.794700 0.000000
|
||||
vn 0.700200 -0.661700 -0.268000
|
||||
vn 0.102400 -0.943500 -0.315100
|
||||
vn 0.187600 -0.794700 -0.577300
|
||||
vn -0.038500 -0.661700 -0.748800
|
||||
vn -0.268000 -0.943500 -0.194700
|
||||
vn -0.491100 -0.794700 -0.356800
|
||||
vn -0.724000 -0.661700 -0.194700
|
||||
vn -0.889700 -0.330400 0.315100
|
||||
vn -0.794700 -0.187600 0.577300
|
||||
vn -0.574600 -0.330400 0.748800
|
||||
vn 0.024700 -0.330400 0.943500
|
||||
vn 0.303500 -0.187600 0.934200
|
||||
vn 0.534600 -0.330400 0.777900
|
||||
vn 0.905000 -0.330400 0.268000
|
||||
vn 0.982200 -0.187600 0.000000
|
||||
vn 0.905000 -0.330400 -0.268000
|
||||
vn 0.534600 -0.330400 -0.777900
|
||||
vn 0.303500 -0.187600 -0.934200
|
||||
vn 0.024700 -0.330400 -0.943500
|
||||
vn -0.574600 -0.330400 -0.748800
|
||||
vn -0.794700 -0.187600 -0.577300
|
||||
vn -0.889700 -0.330400 -0.315100
|
||||
vn -0.306600 -0.125600 0.943500
|
||||
vn -0.303500 0.187600 0.934200
|
||||
vn -0.024700 0.330400 0.943500
|
||||
vn 0.802600 -0.125600 0.583100
|
||||
vn 0.794700 0.187600 0.577300
|
||||
vn 0.889700 0.330400 0.315100
|
||||
vn 0.802600 -0.125600 -0.583100
|
||||
vn 0.794700 0.187600 -0.577300
|
||||
vn 0.574600 0.330400 -0.748800
|
||||
vn -0.306600 -0.125600 -0.943500
|
||||
vn -0.303500 0.187600 -0.934200
|
||||
vn -0.534600 0.330400 -0.777900
|
||||
vn -0.992100 -0.125600 0.000000
|
||||
vn -0.982200 0.187600 0.000000
|
||||
vn -0.905000 0.330400 0.268000
|
||||
vn -0.471300 0.661700 0.583100
|
||||
vn -0.187600 0.794700 0.577300
|
||||
vn 0.038500 0.661700 0.748800
|
||||
vn 0.408900 0.661700 0.628400
|
||||
vn 0.491100 0.794700 0.356800
|
||||
vn 0.724000 0.661700 0.194700
|
||||
vn 0.724000 0.661700 -0.194700
|
||||
vn 0.491100 0.794700 -0.356800
|
||||
vn 0.408900 0.661700 -0.628400
|
||||
vn -0.700200 0.661700 0.268000
|
||||
vn -0.607100 0.794700 0.000000
|
||||
vn -0.331300 0.943500 0.000000
|
||||
vn 0.038500 0.661700 -0.748800
|
||||
vn -0.187600 0.794700 -0.577300
|
||||
vn -0.471300 0.661700 -0.583100
|
||||
s off
|
||||
f 1/1/1 13/2/1 14/3/1
|
||||
f 2/4/2 16/5/2 14/6/2
|
||||
f 1/7/3 18/6/3 13/8/3
|
||||
f 1/9/4 20/10/4 18/11/4
|
||||
f 1/12/5 17/7/5 20/6/5
|
||||
f 2/6/6 23/13/6 16/7/6
|
||||
f 3/6/7 25/14/7 15/7/7
|
||||
f 4/6/8 27/14/8 19/7/8
|
||||
f 5/4/9 29/5/9 21/6/9
|
||||
f 6/15/10 31/16/10 22/17/10
|
||||
f 2/7/11 26/6/11 23/8/11
|
||||
f 3/18/12 28/19/12 25/20/12
|
||||
f 4/21/13 30/7/13 27/6/13
|
||||
f 5/4/14 32/22/14 29/6/14
|
||||
f 6/6/15 24/4/15 31/23/15
|
||||
f 7/6/16 38/14/16 33/7/16
|
||||
f 8/4/17 40/5/17 34/6/17
|
||||
f 9/3/18 41/1/18 35/24/18
|
||||
f 10/9/19 42/10/19 36/11/19
|
||||
f 11/18/20 39/19/20 37/20/20
|
||||
f 39/7/21 12/6/21 42/14/21
|
||||
f 39/6/22 42/4/22 37/25/22
|
||||
f 37/7/23 42/6/23 10/12/23
|
||||
f 42/3/24 12/1/24 41/2/24
|
||||
f 42/25/25 41/6/25 36/4/25
|
||||
f 36/7/26 41/6/26 9/12/26
|
||||
f 41/20/27 12/18/27 40/19/27
|
||||
f 41/26/28 40/15/28 35/27/28
|
||||
f 35/9/29 40/28/29 8/11/29
|
||||
f 40/6/30 12/12/30 38/7/30
|
||||
f 40/29/31 38/30/31 34/18/31
|
||||
f 34/6/32 38/8/32 7/7/32
|
||||
f 38/28/33 12/11/33 39/9/33
|
||||
f 38/15/34 39/27/34 33/26/34
|
||||
f 33/2/35 39/3/35 11/1/35
|
||||
f 24/7/36 11/6/36 37/14/36
|
||||
f 24/6/37 37/4/37 31/25/37
|
||||
f 31/10/38 37/11/38 10/9/38
|
||||
f 32/8/39 10/7/39 36/6/39
|
||||
f 32/31/40 36/32/40 29/15/40
|
||||
f 29/6/41 36/4/41 9/33/41
|
||||
f 30/7/42 9/6/42 35/14/42
|
||||
f 30/30/43 35/18/43 27/29/43
|
||||
f 27/2/44 35/34/44 8/35/44
|
||||
f 28/17/45 8/15/45 34/16/45
|
||||
f 28/6/46 34/36/46 25/7/46
|
||||
f 25/10/47 34/11/47 7/9/47
|
||||
f 26/6/48 7/4/48 33/5/48
|
||||
f 26/6/49 33/36/49 23/7/49
|
||||
f 23/10/50 33/11/50 11/9/50
|
||||
f 31/20/51 10/18/51 32/19/51
|
||||
f 31/7/52 32/6/52 22/36/52
|
||||
f 22/9/53 32/28/53 5/11/53
|
||||
f 29/37/54 9/7/54 30/6/54
|
||||
f 29/6/55 30/36/55 21/7/55
|
||||
f 21/10/56 30/11/56 4/9/56
|
||||
f 27/38/57 8/6/57 28/4/57
|
||||
f 27/6/58 28/4/58 19/25/58
|
||||
f 19/10/59 28/11/59 3/9/59
|
||||
f 25/6/60 7/4/60 26/22/60
|
||||
f 25/15/61 26/27/61 15/26/61
|
||||
f 15/6/62 26/4/62 2/33/62
|
||||
f 23/6/63 11/4/63 24/22/63
|
||||
f 23/29/64 24/30/64 16/18/64
|
||||
f 16/2/65 24/3/65 6/1/65
|
||||
f 17/6/66 6/4/66 22/5/66
|
||||
f 17/30/67 22/18/67 20/29/67
|
||||
f 20/14/68 22/7/68 5/6/68
|
||||
f 20/39/69 5/18/69 21/40/69
|
||||
f 20/26/70 21/15/70 18/27/70
|
||||
f 18/41/71 21/7/71 4/6/71
|
||||
f 18/37/72 4/7/72 19/6/72
|
||||
f 18/6/73 19/4/73 13/25/73
|
||||
f 13/7/74 19/6/74 3/12/74
|
||||
f 16/11/75 6/9/75 17/10/75
|
||||
f 16/4/76 17/25/76 14/6/76
|
||||
f 14/19/77 17/20/77 1/18/77
|
||||
f 13/28/78 3/11/78 15/9/78
|
||||
f 13/6/79 15/4/79 14/25/79
|
||||
f 14/7/80 15/6/80 2/12/80
|
||||
247
assets/hbm/models/sphere_ruv.obj
Normal file
@ -0,0 +1,247 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'sphere_ruv.blend'
|
||||
# www.blender.org
|
||||
o Icosphere
|
||||
v 0.000000 -0.500000 0.000000
|
||||
v 0.361804 -0.223610 0.262863
|
||||
v -0.138194 -0.223610 0.425325
|
||||
v -0.447213 -0.223608 0.000000
|
||||
v -0.138194 -0.223610 -0.425325
|
||||
v 0.361804 -0.223610 -0.262863
|
||||
v 0.138194 0.223610 0.425325
|
||||
v -0.361804 0.223610 0.262863
|
||||
v -0.361804 0.223610 -0.262863
|
||||
v 0.138194 0.223610 -0.425325
|
||||
v 0.447213 0.223608 0.000000
|
||||
v 0.000000 0.500000 0.000000
|
||||
v -0.081228 -0.425327 0.249998
|
||||
v 0.212661 -0.425327 0.154506
|
||||
v 0.131434 -0.262869 0.404506
|
||||
v 0.425324 -0.262868 0.000000
|
||||
v 0.212661 -0.425327 -0.154506
|
||||
v -0.262865 -0.425326 0.000000
|
||||
v -0.344095 -0.262868 0.249998
|
||||
v -0.081228 -0.425327 -0.249998
|
||||
v -0.344095 -0.262868 -0.249998
|
||||
v 0.131434 -0.262869 -0.404506
|
||||
v 0.475529 0.000000 0.154506
|
||||
v 0.475529 0.000000 -0.154506
|
||||
v 0.000000 0.000000 0.500000
|
||||
v 0.293893 0.000000 0.404508
|
||||
v -0.475529 0.000000 0.154506
|
||||
v -0.293893 0.000000 0.404508
|
||||
v -0.293893 0.000000 -0.404508
|
||||
v -0.475529 0.000000 -0.154506
|
||||
v 0.293893 0.000000 -0.404508
|
||||
v 0.000000 0.000000 -0.500000
|
||||
v 0.344095 0.262868 0.249998
|
||||
v -0.131434 0.262869 0.404506
|
||||
v -0.425324 0.262868 0.000000
|
||||
v -0.131434 0.262869 -0.404506
|
||||
v 0.344095 0.262868 -0.249998
|
||||
v 0.081228 0.425327 0.249998
|
||||
v 0.262865 0.425326 0.000000
|
||||
v -0.212661 0.425327 0.154506
|
||||
v -0.212661 0.425327 -0.154506
|
||||
v 0.081228 0.425327 -0.249998
|
||||
vt 0.932631 0.000097
|
||||
vt 0.932631 0.999904
|
||||
vt 0.000097 0.360641
|
||||
vt 0.000097 0.999903
|
||||
vt 0.000097 0.000097
|
||||
vt 0.932620 0.639362
|
||||
vt 0.999904 0.000097
|
||||
vt 0.639366 0.932625
|
||||
vt 0.999904 0.932624
|
||||
vt 0.000097 0.932624
|
||||
vt 0.639366 0.000097
|
||||
vt 0.500000 0.729345
|
||||
vt 0.360643 0.932653
|
||||
vt 0.360629 0.932645
|
||||
vt 0.000085 0.499986
|
||||
vt 0.729344 0.000085
|
||||
vt 0.729344 0.999915
|
||||
vt 0.500007 0.000085
|
||||
vt 0.999915 0.729356
|
||||
vt 0.000085 0.729356
|
||||
vt 0.500000 0.729360
|
||||
vt 0.932617 0.639349
|
||||
vt 0.932634 0.360652
|
||||
vt 0.000097 0.639362
|
||||
vt 0.865959 0.499989
|
||||
vt 0.865950 0.000093
|
||||
vt 0.865950 0.999907
|
||||
vt 0.360647 0.000097
|
||||
vt 0.000093 0.865964
|
||||
vt 0.999907 0.865964
|
||||
vt 0.865945 0.999907
|
||||
vt 0.865946 0.000093
|
||||
vt 0.729345 0.500014
|
||||
vt 0.932653 0.000097
|
||||
vt 0.932653 0.999903
|
||||
vt 0.499993 0.865968
|
||||
vt 0.639349 0.932634
|
||||
vt 0.932624 0.360645
|
||||
vt 0.999915 0.729347
|
||||
vt 0.000085 0.729347
|
||||
vt 0.360651 0.932631
|
||||
vn 0.102400 -0.943500 0.315100
|
||||
vn 0.700200 -0.661700 0.268000
|
||||
vn -0.268000 -0.943500 0.194700
|
||||
vn -0.268000 -0.943500 -0.194700
|
||||
vn 0.102400 -0.943500 -0.315100
|
||||
vn 0.905000 -0.330400 0.268000
|
||||
vn 0.024700 -0.330400 0.943500
|
||||
vn -0.889700 -0.330400 0.315100
|
||||
vn -0.574600 -0.330400 -0.748800
|
||||
vn 0.534600 -0.330400 -0.777900
|
||||
vn 0.802600 -0.125600 0.583100
|
||||
vn -0.306600 -0.125600 0.943500
|
||||
vn -0.992100 -0.125600 0.000000
|
||||
vn -0.306600 -0.125600 -0.943500
|
||||
vn 0.802600 -0.125600 -0.583100
|
||||
vn 0.408900 0.661700 0.628400
|
||||
vn -0.471300 0.661700 0.583100
|
||||
vn -0.700200 0.661700 -0.268000
|
||||
vn 0.038500 0.661700 -0.748800
|
||||
vn 0.724000 0.661700 -0.194700
|
||||
vn 0.268000 0.943500 -0.194700
|
||||
vn 0.491100 0.794700 -0.356800
|
||||
vn 0.408900 0.661700 -0.628400
|
||||
vn -0.102400 0.943500 -0.315100
|
||||
vn -0.187600 0.794700 -0.577300
|
||||
vn -0.471300 0.661700 -0.583100
|
||||
vn -0.331300 0.943500 0.000000
|
||||
vn -0.607100 0.794700 0.000000
|
||||
vn -0.700200 0.661700 0.268000
|
||||
vn -0.102400 0.943500 0.315100
|
||||
vn -0.187600 0.794700 0.577300
|
||||
vn 0.038500 0.661700 0.748800
|
||||
vn 0.268000 0.943500 0.194700
|
||||
vn 0.491100 0.794700 0.356800
|
||||
vn 0.724000 0.661700 0.194700
|
||||
vn 0.889700 0.330400 -0.315100
|
||||
vn 0.794700 0.187600 -0.577300
|
||||
vn 0.574600 0.330400 -0.748800
|
||||
vn -0.024700 0.330400 -0.943500
|
||||
vn -0.303500 0.187600 -0.934200
|
||||
vn -0.534600 0.330400 -0.777900
|
||||
vn -0.905000 0.330400 -0.268000
|
||||
vn -0.982200 0.187600 0.000000
|
||||
vn -0.905000 0.330400 0.268000
|
||||
vn -0.534600 0.330400 0.777900
|
||||
vn -0.303500 0.187600 0.934200
|
||||
vn -0.024700 0.330400 0.943500
|
||||
vn 0.574600 0.330400 0.748800
|
||||
vn 0.794700 0.187600 0.577300
|
||||
vn 0.889700 0.330400 0.315100
|
||||
vn 0.306600 0.125600 -0.943500
|
||||
vn 0.303500 -0.187600 -0.934200
|
||||
vn 0.024700 -0.330400 -0.943500
|
||||
vn -0.802600 0.125600 -0.583100
|
||||
vn -0.794700 -0.187600 -0.577300
|
||||
vn -0.889700 -0.330400 -0.315100
|
||||
vn -0.802600 0.125600 0.583100
|
||||
vn -0.794700 -0.187600 0.577300
|
||||
vn -0.574600 -0.330400 0.748800
|
||||
vn 0.306600 0.125600 0.943500
|
||||
vn 0.303500 -0.187600 0.934200
|
||||
vn 0.534600 -0.330400 0.777900
|
||||
vn 0.992100 0.125600 0.000000
|
||||
vn 0.982200 -0.187600 0.000000
|
||||
vn 0.905000 -0.330400 -0.268000
|
||||
vn 0.471300 -0.661700 -0.583100
|
||||
vn 0.187600 -0.794700 -0.577300
|
||||
vn -0.038500 -0.661700 -0.748800
|
||||
vn -0.408900 -0.661700 -0.628400
|
||||
vn -0.491100 -0.794700 -0.356800
|
||||
vn -0.724000 -0.661700 -0.194700
|
||||
vn -0.724000 -0.661700 0.194700
|
||||
vn -0.491100 -0.794700 0.356800
|
||||
vn -0.408900 -0.661700 0.628400
|
||||
vn 0.700200 -0.661700 -0.268000
|
||||
vn 0.607100 -0.794700 0.000000
|
||||
vn 0.331300 -0.943500 0.000000
|
||||
vn -0.038500 -0.661700 0.748800
|
||||
vn 0.187600 -0.794700 0.577300
|
||||
vn 0.471300 -0.661700 0.583100
|
||||
s off
|
||||
f 1/1/1 14/2/1 13/3/1
|
||||
f 2/4/2 14/5/2 16/6/2
|
||||
f 1/7/3 13/8/3 18/5/3
|
||||
f 1/9/4 18/10/4 20/11/4
|
||||
f 1/12/5 20/5/5 17/7/5
|
||||
f 2/5/6 16/7/6 23/13/6
|
||||
f 3/5/7 15/7/7 25/14/7
|
||||
f 4/5/8 19/7/8 27/14/8
|
||||
f 5/4/9 21/5/9 29/6/9
|
||||
f 6/15/10 22/16/10 31/17/10
|
||||
f 2/7/11 23/8/11 26/5/11
|
||||
f 3/18/12 25/19/12 28/20/12
|
||||
f 4/21/13 27/5/13 30/7/13
|
||||
f 5/4/14 29/5/14 32/22/14
|
||||
f 6/5/15 31/23/15 24/4/15
|
||||
f 7/5/16 33/7/16 38/14/16
|
||||
f 8/4/17 34/5/17 40/6/17
|
||||
f 9/2/18 35/24/18 41/1/18
|
||||
f 10/9/19 36/10/19 42/11/19
|
||||
f 11/18/20 37/19/20 39/20/20
|
||||
f 39/7/21 42/14/21 12/5/21
|
||||
f 39/5/22 37/25/22 42/4/22
|
||||
f 37/7/23 10/12/23 42/5/23
|
||||
f 42/2/24 41/3/24 12/1/24
|
||||
f 42/25/25 36/4/25 41/5/25
|
||||
f 36/7/26 9/12/26 41/5/26
|
||||
f 41/19/27 40/20/27 12/18/27
|
||||
f 41/26/28 35/27/28 40/15/28
|
||||
f 35/9/29 8/10/29 40/28/29
|
||||
f 40/5/30 38/7/30 12/12/30
|
||||
f 40/29/31 34/18/31 38/30/31
|
||||
f 34/5/32 7/7/32 38/8/32
|
||||
f 38/28/33 39/9/33 12/10/33
|
||||
f 38/15/34 33/26/34 39/27/34
|
||||
f 33/3/35 11/1/35 39/2/35
|
||||
f 24/7/36 37/14/36 11/5/36
|
||||
f 24/5/37 31/25/37 37/4/37
|
||||
f 31/11/38 10/9/38 37/10/38
|
||||
f 32/8/39 36/5/39 10/7/39
|
||||
f 32/31/40 29/15/40 36/32/40
|
||||
f 29/5/41 9/33/41 36/4/41
|
||||
f 30/7/42 35/14/42 9/5/42
|
||||
f 30/30/43 27/29/43 35/18/43
|
||||
f 27/3/44 8/34/44 35/35/44
|
||||
f 28/16/45 34/17/45 8/15/45
|
||||
f 28/5/46 25/7/46 34/36/46
|
||||
f 25/11/47 7/9/47 34/10/47
|
||||
f 26/5/48 33/6/48 7/4/48
|
||||
f 26/5/49 23/7/49 33/36/49
|
||||
f 23/11/50 11/9/50 33/10/50
|
||||
f 31/19/51 32/20/51 10/18/51
|
||||
f 31/7/52 22/36/52 32/5/52
|
||||
f 22/9/53 5/10/53 32/28/53
|
||||
f 29/37/54 30/5/54 9/7/54
|
||||
f 29/5/55 21/7/55 30/36/55
|
||||
f 21/11/56 4/9/56 30/10/56
|
||||
f 27/38/57 28/4/57 8/5/57
|
||||
f 27/5/58 19/25/58 28/4/58
|
||||
f 19/11/59 3/9/59 28/10/59
|
||||
f 25/5/60 26/22/60 7/4/60
|
||||
f 25/15/61 15/26/61 26/27/61
|
||||
f 15/5/62 2/33/62 26/4/62
|
||||
f 23/5/63 24/22/63 11/4/63
|
||||
f 23/29/64 16/18/64 24/30/64
|
||||
f 16/3/65 6/1/65 24/2/65
|
||||
f 17/5/66 22/6/66 6/4/66
|
||||
f 17/30/67 20/29/67 22/18/67
|
||||
f 20/14/68 5/5/68 22/7/68
|
||||
f 20/39/69 21/40/69 5/18/69
|
||||
f 20/26/70 18/27/70 21/15/70
|
||||
f 18/41/71 4/5/71 21/7/71
|
||||
f 18/37/72 19/5/72 4/7/72
|
||||
f 18/5/73 13/25/73 19/4/73
|
||||
f 13/7/74 3/12/74 19/5/74
|
||||
f 16/10/75 17/11/75 6/9/75
|
||||
f 16/4/76 14/5/76 17/25/76
|
||||
f 14/20/77 1/18/77 17/19/77
|
||||
f 13/28/78 15/9/78 3/10/78
|
||||
f 13/5/79 14/25/79 15/4/79
|
||||
f 14/7/80 2/12/80 15/5/80
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
assets/hbm/textures/items/ams_catalyst_aluminium.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
assets/hbm/textures/items/ams_catalyst_beryllium.png
Normal file
|
After Width: | Height: | Size: 285 B |
BIN
assets/hbm/textures/items/ams_catalyst_blank.png
Normal file
|
After Width: | Height: | Size: 271 B |
BIN
assets/hbm/textures/items/ams_catalyst_caesium.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
assets/hbm/textures/items/ams_catalyst_cerium.png
Normal file
|
After Width: | Height: | Size: 280 B |
BIN
assets/hbm/textures/items/ams_catalyst_cobalt.png
Normal file
|
After Width: | Height: | Size: 292 B |
BIN
assets/hbm/textures/items/ams_catalyst_copper.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
assets/hbm/textures/items/ams_catalyst_euphemium.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
assets/hbm/textures/items/ams_catalyst_iron.png
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
assets/hbm/textures/items/ams_catalyst_lithium.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
assets/hbm/textures/items/ams_catalyst_niobium.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
assets/hbm/textures/items/ams_catalyst_strontium.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
assets/hbm/textures/items/ams_catalyst_thorium.png
Normal file
|
After Width: | Height: | Size: 302 B |
BIN
assets/hbm/textures/items/ams_catalyst_tungsten.png
Normal file
|
After Width: | Height: | Size: 280 B |
@ -444,6 +444,10 @@ public class ModBlocks {
|
||||
public static Block dummy_port_pumpjack;
|
||||
public static Block dummy_block_turbofan;
|
||||
public static Block dummy_port_turbofan;
|
||||
public static Block dummy_block_ams_limiter;
|
||||
public static Block dummy_port_ams_limiter;
|
||||
public static Block dummy_block_ams_emitter;
|
||||
public static Block dummy_port_ams_emitter;
|
||||
|
||||
|
||||
private static void initializeBlock() {
|
||||
@ -693,9 +697,9 @@ public class ModBlocks {
|
||||
fwatz_core = new FWatzCore(Material.iron).setBlockName("fwatz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":fwatz_core");
|
||||
fwatz_plasma = new BlockPlasma(Material.iron).setBlockName("fwatz_plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":fwatz_plasma");
|
||||
|
||||
ams_base = new BlockAMSBase(Material.iron).setBlockName("ams_base").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_base");
|
||||
ams_emitter = new BlockAMSEmitter(Material.iron).setBlockName("ams_emitter").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_emitter");
|
||||
ams_limiter = new BlockAMSLimiter(Material.iron).setBlockName("ams_limiter").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_limiter");
|
||||
ams_base = new BlockAMSBase(Material.iron).setBlockName("ams_base").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_base");
|
||||
ams_emitter = new BlockAMSEmitter(Material.iron).setBlockName("ams_emitter").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_emitter");
|
||||
ams_limiter = new BlockAMSLimiter(Material.iron).setBlockName("ams_limiter").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_limiter");
|
||||
|
||||
machine_converter_he_rf = new BlockConverterHeRf(Material.iron).setBlockName("machine_converter_he_rf").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_converter_he_rf");
|
||||
machine_converter_rf_he = new BlockConverterRfHe(Material.iron).setBlockName("machine_converter_rf_he").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_converter_rf_he");
|
||||
@ -786,6 +790,10 @@ public class ModBlocks {
|
||||
dummy_port_pumpjack = new DummyBlockPumpjack(Material.iron).setBlockName("dummy_port_pumpjack").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
dummy_block_turbofan = new DummyBlockTurbofan(Material.iron).setBlockName("dummy_block_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_turbofan = new DummyBlockTurbofan(Material.iron).setBlockName("dummy_port_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_block_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_port_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_block_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_port_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
}
|
||||
|
||||
private static void registerBlock() {
|
||||
@ -1119,6 +1127,10 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(dummy_port_pumpjack, dummy_port_pumpjack.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_turbofan, dummy_block_turbofan.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_turbofan, dummy_port_turbofan.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_ams_limiter, dummy_block_ams_limiter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_ams_limiter, dummy_port_ams_limiter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_block_ams_emitter, dummy_block_ams_emitter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(dummy_port_ams_emitter, dummy_port_ams_emitter.getUnlocalizedName());
|
||||
|
||||
//Other Technical Blocks
|
||||
GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName());
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -18,6 +23,24 @@ public class BlockAMSBase extends BlockContainer {
|
||||
return new TileEntityAMSBase();
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntityAMSBase entity = (TileEntityAMSBase) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_base, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
|
||||
@ -1,13 +1,23 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAMSEmitter extends BlockContainer {
|
||||
public class BlockAMSEmitter extends BlockContainer implements IMultiblock {
|
||||
|
||||
public BlockAMSEmitter(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -32,5 +42,76 @@ public class BlockAMSEmitter extends BlockContainer {
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntityAMSEmitter entity = (TileEntityAMSEmitter) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_emitter, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSEmitterDimension)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSEmitterDimension, ModBlocks.dummy_block_ams_emitter);
|
||||
|
||||
DummyBlockAMSEmitter.safeBreak = true;
|
||||
world.setBlock(x, y + 5, z, ModBlocks.dummy_port_ams_emitter);
|
||||
TileEntity te = world.getTileEntity(x, y + 5, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y + 5, z - 1, ModBlocks.dummy_port_ams_emitter);
|
||||
TileEntity te2 = world.getTileEntity(x, y + 5, z - 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y + 5, z, ModBlocks.dummy_port_ams_emitter);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y + 5, z);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 5, z, ModBlocks.dummy_port_ams_emitter);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y + 5, z);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y + 5, z + 1, ModBlocks.dummy_port_ams_emitter);
|
||||
TileEntity te5 = world.getTileEntity(x, y + 5, z + 1);
|
||||
if(te5 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te5;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockAMSEmitter.safeBreak = false;
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityConverterHeRf;
|
||||
@ -17,7 +18,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockAMSLimiter extends BlockContainer {
|
||||
public class BlockAMSLimiter extends BlockContainer implements IMultiblock {
|
||||
|
||||
public BlockAMSLimiter(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -67,15 +68,119 @@ public class BlockAMSLimiter extends BlockContainer {
|
||||
|
||||
if (i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionEast)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionEast, ModBlocks.dummy_block_ams_limiter);
|
||||
|
||||
//
|
||||
DummyBlockAMSLimiter.safeBreak = true;
|
||||
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te = world.getTileEntity(x + 2, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te2 = world.getTileEntity(x - 2, y, z);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockAMSLimiter.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionSouth)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionSouth, ModBlocks.dummy_block_ams_limiter);
|
||||
|
||||
//
|
||||
DummyBlockAMSLimiter.safeBreak = true;
|
||||
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 2);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockAMSLimiter.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionWest)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionWest, ModBlocks.dummy_block_ams_limiter);
|
||||
|
||||
//
|
||||
DummyBlockAMSLimiter.safeBreak = true;
|
||||
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te = world.getTileEntity(x + 2, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te2 = world.getTileEntity(x - 2, y, z);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockAMSLimiter.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionNorth)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionNorth, ModBlocks.dummy_block_ams_limiter);
|
||||
|
||||
//
|
||||
DummyBlockAMSLimiter.safeBreak = true;
|
||||
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_ams_limiter);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 2);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockAMSLimiter.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
106
com/hbm/blocks/machine/DummyBlockAMSEmitter.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IDummy;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockAMSEmitter extends BlockContainer implements IDummy {
|
||||
|
||||
public static boolean safeBreak = false;
|
||||
|
||||
public DummyBlockAMSEmitter(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityDummy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i)
|
||||
{
|
||||
if(!safeBreak) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
//world.getBlock(a, b, c).breakBlock(world, a, b, c, block, i);
|
||||
if(!world.isRemote)
|
||||
world.func_147480_a(a, b, c, true);
|
||||
}
|
||||
}
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.ams_emitter);
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityAMSEmitter entity = (TileEntityAMSEmitter) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_emitter, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
106
com/hbm/blocks/machine/DummyBlockAMSLimiter.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IDummy;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockAMSLimiter extends BlockContainer implements IDummy {
|
||||
|
||||
public static boolean safeBreak = false;
|
||||
|
||||
public DummyBlockAMSLimiter(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityDummy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i)
|
||||
{
|
||||
if(!safeBreak) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
//world.getBlock(a, b, c).breakBlock(world, a, b, c, block, i);
|
||||
if(!world.isRemote)
|
||||
world.func_147480_a(a, b, c, true);
|
||||
}
|
||||
}
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.ams_limiter);
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityAMSLimiter entity = (TileEntityAMSLimiter) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_limiter, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -171,33 +171,4 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int i)
|
||||
{
|
||||
/*MultiblockHandler.EnumDirection dir = MultiblockHandler.IntToEnum(world.getBlockMetadata(x, y, z));
|
||||
|
||||
switch(dir) {
|
||||
case North:
|
||||
MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionNorth);
|
||||
break;
|
||||
case East:
|
||||
MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionEast);
|
||||
break;
|
||||
case West:
|
||||
MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionWest);
|
||||
break;
|
||||
case South:
|
||||
MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionSouth);
|
||||
break;
|
||||
default: break;
|
||||
}*/
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.entity.grenade;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
@ -26,6 +27,7 @@ public class EntityGrenadePulse extends EntityGrenadeBase {
|
||||
this.setDead();
|
||||
ExplosionChaos.pulse(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 7);
|
||||
this.worldObj.playSoundEffect((int)this.posX, (int)this.posY, (int)this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 24, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,13 @@ package com.hbm.explosion;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.entity.particle.EntityDSmokeFX;
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.entity.projectile.EntityOilSpill;
|
||||
import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.entity.projectile.EntityShrapnel;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ExplosionLarge {
|
||||
@ -27,6 +29,36 @@ public class ExplosionLarge {
|
||||
world.spawnEntityInWorld(fx);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnShock(World world, double x, double y, double z, int count, double strength) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(strength, 0, 0);
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
EntityDSmokeFX fx = new EntityDSmokeFX(world, x, y, z, 0.0, 0.0, 0.0);
|
||||
fx.motionY = 0;
|
||||
fx.motionX = vec.xCoord;
|
||||
fx.motionZ = vec.zCoord;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
vec.rotateAroundY(360 / count);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnBurst(World world, double x, double y, double z, int count, double strength) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(strength, 0, 0);
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
EntityGasFlameFX fx = new EntityGasFlameFX(world, x, y, z, 0.0, 0.0, 0.0);
|
||||
fx.motionY = 0;
|
||||
fx.motionX = vec.xCoord;
|
||||
fx.motionZ = vec.zCoord;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
vec.rotateAroundY(360 / count);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnRubble(World world, double x, double y, double z, int count) {
|
||||
|
||||
|
||||
@ -16,6 +16,8 @@ import com.hbm.tileentity.bomb.TileEntityNukeMike;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukePrototype;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeTsar;
|
||||
import com.hbm.tileentity.bomb.TileEntityTestNuke;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityConverterHeRf;
|
||||
import com.hbm.tileentity.machine.TileEntityConverterRfHe;
|
||||
@ -96,6 +98,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeGadget(player.inventory, (TileEntityNukeGadget) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_boy:
|
||||
@ -104,6 +107,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeBoy(player.inventory, (TileEntityNukeBoy) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_centrifuge:
|
||||
@ -112,6 +116,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerCentrifuge(player.inventory, (TileEntityMachineCentrifuge) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_man:
|
||||
@ -120,6 +125,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeMan(player.inventory, (TileEntityNukeMan) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_uf6_tank:
|
||||
@ -128,6 +134,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerUF6Tank(player.inventory, (TileEntityMachineUF6Tank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_puf6_tank:
|
||||
@ -136,6 +143,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerPuF6Tank(player.inventory, (TileEntityMachinePuF6Tank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor:
|
||||
@ -144,6 +152,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerReactor(player.inventory, (TileEntityMachineReactor) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_bomb_multi:
|
||||
@ -152,6 +161,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerBombMulti(player.inventory, (TileEntityBombMulti) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_mike:
|
||||
@ -160,6 +170,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeMike(player.inventory, (TileEntityNukeMike) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_tsar:
|
||||
@ -168,6 +179,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeTsar(player.inventory, (TileEntityNukeTsar) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_furnace:
|
||||
@ -176,6 +188,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeFurnace(player.inventory, (TileEntityNukeFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_rtg_furnace:
|
||||
@ -184,6 +197,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerRtgFurnace(player.inventory, (TileEntityRtgFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_generator:
|
||||
@ -192,6 +206,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerGenerator(player.inventory, (TileEntityMachineGenerator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_electric_furnace:
|
||||
@ -200,6 +215,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerElectricFurnace(player.inventory, (TileEntityMachineElectricFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_fleija:
|
||||
@ -208,6 +224,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeFleija(player.inventory, (TileEntityNukeFleija) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_deuterium:
|
||||
@ -216,6 +233,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineDeuterium(player.inventory, (TileEntityMachineDeuterium) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_battery:
|
||||
@ -224,6 +242,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineBattery(player.inventory, (TileEntityMachineBattery) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_coal:
|
||||
@ -232,6 +251,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineCoal(player.inventory, (TileEntityMachineCoal) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_prototype:
|
||||
@ -240,6 +260,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukePrototype(player.inventory, (TileEntityNukePrototype) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_launch_pad:
|
||||
@ -248,6 +269,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerLaunchPadTier1(player.inventory, (TileEntityLaunchPad) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_factory_titanium:
|
||||
@ -256,6 +278,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerCoreTitanium(player.inventory, (TileEntityCoreTitanium) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_factory_advanced:
|
||||
@ -264,6 +287,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerCoreAdvanced(player.inventory, (TileEntityCoreAdvanced) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor_multiblock:
|
||||
@ -272,6 +296,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerReactorMultiblock(player.inventory, (TileEntityReactorMultiblock) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_fusion_multiblock:
|
||||
@ -280,6 +305,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerFusionMultiblock(player.inventory, (TileEntityFusionMultiblock) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_converter_he_rf:
|
||||
@ -288,6 +314,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerConverterHeRf(player.inventory, (TileEntityConverterHeRf) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_converter_rf_he:
|
||||
@ -296,6 +323,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_schrabidium_transmutator:
|
||||
@ -304,6 +332,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_diesel:
|
||||
@ -312,6 +341,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_watz_multiblock:
|
||||
@ -320,6 +350,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerWatzCore(player.inventory, (TileEntityWatzCore) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_shredder:
|
||||
@ -328,6 +359,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineShredder(player.inventory, (TileEntityMachineShredder) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_combine_factory:
|
||||
@ -336,6 +368,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineCMBFactory(player.inventory, (TileEntityMachineCMBFactory) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_fwatz_multiblock:
|
||||
@ -344,6 +377,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerFWatzCore(player.inventory, (TileEntityFWatzCore) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_teleporter:
|
||||
@ -352,6 +386,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_custom:
|
||||
@ -360,6 +395,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerNukeCustom(player.inventory, (TileEntityNukeCustom) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_reix_mainframe:
|
||||
@ -368,6 +404,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerReiXMainframe(player.inventory, (TileEntityReiXMainframe) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_industrial_generator:
|
||||
@ -376,6 +413,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerIGenerator(player.inventory, (TileEntityMachineIGenerator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_rtg:
|
||||
@ -384,6 +422,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineRTG(player.inventory, (TileEntityMachineRTG) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_cyclotron:
|
||||
@ -392,6 +431,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineCyclotron(player.inventory, (TileEntityMachineCyclotron) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_well:
|
||||
@ -400,6 +440,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineOilWell(player.inventory, (TileEntityMachineOilWell) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_refinery:
|
||||
@ -408,6 +449,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineRefinery(player.inventory, (TileEntityMachineRefinery) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_flare:
|
||||
@ -416,6 +458,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineGasFlare(player.inventory, (TileEntityMachineGasFlare) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_drill:
|
||||
@ -424,6 +467,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineMiningDrill(player.inventory, (TileEntityMachineMiningDrill) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_assembler:
|
||||
@ -432,6 +476,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineAssembler(player.inventory, (TileEntityMachineAssembler) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_chemplant:
|
||||
@ -440,6 +485,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_fluidtank:
|
||||
@ -448,6 +494,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineFluidTank(player.inventory, (TileEntityMachineFluidTank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_pumpjack:
|
||||
@ -456,6 +503,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachinePumpjack(player.inventory, (TileEntityMachinePumpjack) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_turbofan:
|
||||
@ -464,6 +512,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachineTurbofan(player.inventory, (TileEntityMachineTurbofan) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_crate_iron:
|
||||
@ -472,6 +521,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerCrateIron(player.inventory, (TileEntityCrateIron) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_crate_steel:
|
||||
@ -480,6 +530,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerCrateSteel(player.inventory, (TileEntityCrateSteel) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_press:
|
||||
@ -488,6 +539,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerMachinePress(player.inventory, (TileEntityMachinePress) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_limiter:
|
||||
@ -496,6 +548,25 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new ContainerAMSLimiter(player.inventory, (TileEntityAMSLimiter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_emitter:
|
||||
{
|
||||
if(entity instanceof TileEntityAMSEmitter)
|
||||
{
|
||||
return new ContainerAMSEmitter(player.inventory, (TileEntityAMSEmitter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_base:
|
||||
{
|
||||
if(entity instanceof TileEntityAMSBase)
|
||||
{
|
||||
return new ContainerAMSBase(player.inventory, (TileEntityAMSBase) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -532,6 +603,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeGadget(player.inventory, (TileEntityNukeGadget) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_boy:
|
||||
@ -540,6 +612,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeBoy(player.inventory, (TileEntityNukeBoy) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_centrifuge:
|
||||
@ -548,6 +621,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineCentrifuge(player.inventory, (TileEntityMachineCentrifuge) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_man:
|
||||
@ -556,6 +630,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeMan(player.inventory, (TileEntityNukeMan) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_uf6_tank:
|
||||
@ -564,6 +639,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineUF6Tank(player.inventory, (TileEntityMachineUF6Tank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_puf6_tank:
|
||||
@ -572,6 +648,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachinePuF6Tank(player.inventory, (TileEntityMachinePuF6Tank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor:
|
||||
@ -580,6 +657,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineReactor(player.inventory, (TileEntityMachineReactor) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_bomb_multi:
|
||||
@ -588,6 +666,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIBombMulti(player.inventory, (TileEntityBombMulti) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_mike:
|
||||
@ -596,6 +675,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeMike(player.inventory, (TileEntityNukeMike) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_tsar:
|
||||
@ -604,6 +684,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeTsar(player.inventory, (TileEntityNukeTsar) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_furnace:
|
||||
@ -612,6 +693,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeFurnace(player.inventory, (TileEntityNukeFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_rtg_furnace:
|
||||
@ -620,6 +702,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIRtgFurnace(player.inventory, (TileEntityRtgFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_generator:
|
||||
@ -628,6 +711,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineGenerator(player.inventory, (TileEntityMachineGenerator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_electric_furnace:
|
||||
@ -636,6 +720,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineElectricFurnace(player.inventory, (TileEntityMachineElectricFurnace) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_fleija:
|
||||
@ -644,6 +729,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeFleija(player.inventory, (TileEntityNukeFleija) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_deuterium:
|
||||
@ -652,6 +738,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineDeuterium(player.inventory, (TileEntityMachineDeuterium) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_battery:
|
||||
@ -660,6 +747,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineBattery(player.inventory, (TileEntityMachineBattery) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_coal:
|
||||
@ -668,6 +756,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineCoal(player.inventory, (TileEntityMachineCoal) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_prototype:
|
||||
@ -676,6 +765,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukePrototype(player.inventory, (TileEntityNukePrototype) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_launch_pad:
|
||||
@ -684,6 +774,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUILaunchPadTier1(player.inventory, (TileEntityLaunchPad) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_factory_titanium:
|
||||
@ -692,6 +783,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUICoreTitanium(player.inventory, (TileEntityCoreTitanium) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_factory_advanced:
|
||||
@ -700,6 +792,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUICoreAdvanced(player.inventory, (TileEntityCoreAdvanced) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor_multiblock:
|
||||
@ -708,6 +801,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIReactorMultiblock(player.inventory, (TileEntityReactorMultiblock) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_fusion_multiblock:
|
||||
@ -716,6 +810,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIFusionMultiblock(player.inventory, (TileEntityFusionMultiblock) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_converter_he_rf:
|
||||
@ -724,6 +819,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIConverterHeRf(player.inventory, (TileEntityConverterHeRf) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_converter_rf_he:
|
||||
@ -732,6 +828,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_schrabidium_transmutator:
|
||||
@ -740,6 +837,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_diesel:
|
||||
@ -748,6 +846,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_watz_multiblock:
|
||||
@ -756,6 +855,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIWatzCore(player.inventory, (TileEntityWatzCore) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_shredder:
|
||||
@ -764,6 +864,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineShredder(player.inventory, (TileEntityMachineShredder) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_combine_factory:
|
||||
@ -772,6 +873,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineCMBFactory(player.inventory, (TileEntityMachineCMBFactory) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_fwatz_multiblock:
|
||||
@ -780,6 +882,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIFWatzCore(player.inventory, (TileEntityFWatzCore) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_teleporter:
|
||||
@ -788,6 +891,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_nuke_custom:
|
||||
@ -796,6 +900,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUINukeCustom(player.inventory, (TileEntityNukeCustom) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_reix_mainframe:
|
||||
@ -804,6 +909,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIReiXMainframe(player.inventory, (TileEntityReiXMainframe) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_industrial_generator:
|
||||
@ -812,6 +918,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIIGenerator(player.inventory, (TileEntityMachineIGenerator) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_rtg:
|
||||
@ -820,6 +927,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineRTG(player.inventory, (TileEntityMachineRTG) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_cyclotron:
|
||||
@ -828,6 +936,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineCyclotron(player.inventory, (TileEntityMachineCyclotron) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_well:
|
||||
@ -836,6 +945,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineOilWell(player.inventory, (TileEntityMachineOilWell) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_refinery:
|
||||
@ -844,6 +954,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineRefinery(player.inventory, (TileEntityMachineRefinery) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_flare:
|
||||
@ -852,6 +963,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineGasFlare(player.inventory, (TileEntityMachineGasFlare) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_drill:
|
||||
@ -860,6 +972,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineMiningDrill(player.inventory, (TileEntityMachineMiningDrill) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_assembler:
|
||||
@ -868,6 +981,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineAssembler(player.inventory, (TileEntityMachineAssembler) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_chemplant:
|
||||
@ -876,6 +990,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_fluidtank:
|
||||
@ -884,6 +999,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineFluidTank(player.inventory, (TileEntityMachineFluidTank) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_pumpjack:
|
||||
@ -892,6 +1008,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachinePumpjack(player.inventory, (TileEntityMachinePumpjack) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_turbofan:
|
||||
@ -900,6 +1017,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachineTurbofan(player.inventory, (TileEntityMachineTurbofan) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_crate_iron:
|
||||
@ -908,6 +1026,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUICrateIron(player.inventory, (TileEntityCrateIron) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_crate_steel:
|
||||
@ -916,6 +1035,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUICrateSteel(player.inventory, (TileEntityCrateSteel) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_press:
|
||||
@ -924,6 +1044,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIMachinePress(player.inventory, (TileEntityMachinePress) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_limiter:
|
||||
@ -932,6 +1053,25 @@ public class GUIHandler implements IGuiHandler {
|
||||
{
|
||||
return new GUIAMSLimiter(player.inventory, (TileEntityAMSLimiter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_emitter:
|
||||
{
|
||||
if(entity instanceof TileEntityAMSEmitter)
|
||||
{
|
||||
return new GUIAMSEmitter(player.inventory, (TileEntityAMSEmitter) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_ams_base:
|
||||
{
|
||||
if(entity instanceof TileEntityAMSBase)
|
||||
{
|
||||
return new GUIAMSBase(player.inventory, (TileEntityAMSBase) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -67,6 +67,11 @@ public class MultiblockHandler {
|
||||
public static final int[] turbofanDimensionEast = new int[] { 4, 4, 2, 0, 1, 1 };
|
||||
public static final int[] turbofanDimensionSouth = new int[] { 1, 1, 2, 0, 4, 4 };
|
||||
public static final int[] turbofanDimensionWest = new int[] { 4, 4, 2, 0, 1, 1 };
|
||||
public static final int[] AMSLimiterDimensionNorth = new int[] { 0, 0, 5, 0, 2, 2 };
|
||||
public static final int[] AMSLimiterDimensionEast = new int[] { 2, 2, 5, 0, 0, 0 };
|
||||
public static final int[] AMSLimiterDimensionSouth = new int[] { 0, 0, 5, 0, 2, 2 };
|
||||
public static final int[] AMSLimiterDimensionWest = new int[] { 2, 2, 5, 0, 0, 0 };
|
||||
public static final int[] AMSEmitterDimension = new int[] { 2, 2, 5, 0, 2, 2, };
|
||||
|
||||
//Approved!
|
||||
public static boolean checkSpace(World world, int x, int y, int z, int[] i) {
|
||||
|
||||
168
com/hbm/inventory/container/ContainerAMSBase.java
Normal file
@ -0,0 +1,168 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
|
||||
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 ContainerAMSBase extends Container {
|
||||
|
||||
private TileEntityAMSBase amsBase;
|
||||
|
||||
private int heat;
|
||||
private int field;
|
||||
private int efficiency;
|
||||
private int warning;
|
||||
private int mode;
|
||||
|
||||
public ContainerAMSBase(InventoryPlayer invPlayer, TileEntityAMSBase tedf) {
|
||||
field = 0;
|
||||
efficiency = 0;
|
||||
amsBase = tedf;
|
||||
|
||||
//Cool 1 In
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 18));
|
||||
//Cool 1 Out
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 8, 54));
|
||||
//Cool 2 In
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 152, 18));
|
||||
//Cool 2 Out
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 152, 54));
|
||||
//Fuel 1 In
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 8, 72));
|
||||
//Fuel 1 Out
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 8, 108));
|
||||
//Fuel 2 In
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 152, 72));
|
||||
//Fuel 2 Out
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 152, 108));
|
||||
//Moderator
|
||||
this.addSlotToContainer(new Slot(tedf, 8, 80, 45));
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 62, 63));
|
||||
this.addSlotToContainer(new Slot(tedf, 10, 98, 63));
|
||||
this.addSlotToContainer(new Slot(tedf, 11, 80, 81));
|
||||
//Core
|
||||
this.addSlotToContainer(new Slot(tedf, 12, 80, 63));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return amsBase.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if(this.heat != this.amsBase.heat)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 0, this.amsBase.heat);
|
||||
}
|
||||
|
||||
if(this.efficiency != this.amsBase.efficiency)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.amsBase.efficiency);
|
||||
}
|
||||
|
||||
if(this.warning != this.amsBase.warning)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 2, this.amsBase.warning);
|
||||
}
|
||||
|
||||
if(this.field != this.amsBase.field)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 3, this.amsBase.field);
|
||||
}
|
||||
|
||||
if(this.mode != this.amsBase.mode)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 4, this.amsBase.mode);
|
||||
}
|
||||
}
|
||||
|
||||
this.heat = this.amsBase.heat;
|
||||
this.field = this.amsBase.field;
|
||||
this.efficiency = this.amsBase.efficiency;
|
||||
this.warning = this.amsBase.warning;
|
||||
this.mode = this.amsBase.mode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
amsBase.heat = j;
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
amsBase.efficiency = j;
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
amsBase.warning = j;
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
amsBase.field = j;
|
||||
}
|
||||
if(i == 4)
|
||||
{
|
||||
amsBase.mode = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
130
com/hbm/inventory/container/ContainerAMSEmitter.java
Normal file
@ -0,0 +1,130 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
|
||||
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 ContainerAMSEmitter extends Container {
|
||||
|
||||
private TileEntityAMSEmitter amsEmitter;
|
||||
|
||||
private int heat;
|
||||
private int efficiency;
|
||||
private int warning;
|
||||
|
||||
public ContainerAMSEmitter(InventoryPlayer invPlayer, TileEntityAMSEmitter tedf) {
|
||||
efficiency = 0;
|
||||
amsEmitter = tedf;
|
||||
|
||||
//Fluid In
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 17));
|
||||
//Fluid Out
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 44, 53));
|
||||
//Focus
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 80, 53));
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 53));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public 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 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return amsEmitter.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if(this.heat != this.amsEmitter.heat)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 0, this.amsEmitter.heat);
|
||||
}
|
||||
|
||||
if(this.efficiency != this.amsEmitter.efficiency)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.amsEmitter.efficiency);
|
||||
}
|
||||
|
||||
if(this.warning != this.amsEmitter.warning)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 2, this.amsEmitter.warning);
|
||||
}
|
||||
}
|
||||
|
||||
this.heat = this.amsEmitter.heat;
|
||||
this.efficiency = this.amsEmitter.efficiency;
|
||||
this.warning = this.amsEmitter.warning;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
amsEmitter.heat = j;
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
amsEmitter.efficiency = j;
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
amsEmitter.warning = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ private TileEntityAMSLimiter amsLmiter;
|
||||
private int mode;
|
||||
|
||||
public ContainerAMSLimiter(InventoryPlayer invPlayer, TileEntityAMSLimiter tedf) {
|
||||
|
||||
efficiency = 0;
|
||||
amsLmiter = tedf;
|
||||
|
||||
//Fluid In
|
||||
|
||||
@ -17,6 +17,8 @@ public class ContainerCentrifuge extends Container {
|
||||
private int dualPower;
|
||||
|
||||
public ContainerCentrifuge(InventoryPlayer invPlayer, TileEntityMachineCentrifuge tedf) {
|
||||
dualCookTime = 0;
|
||||
dualPower = 0;
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ private TileEntityMachineAssembler nukeBoy;
|
||||
private int maxProgress;
|
||||
|
||||
public ContainerMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler tedf) {
|
||||
|
||||
progress = 0;
|
||||
nukeBoy = tedf;
|
||||
|
||||
//Battery
|
||||
|
||||
@ -19,7 +19,7 @@ private TileEntityMachineChemplant nukeBoy;
|
||||
private int maxProgress;
|
||||
|
||||
public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
|
||||
progress = 0;
|
||||
nukeBoy = tedf;
|
||||
|
||||
//Battery
|
||||
|
||||
97
com/hbm/inventory/gui/GUIAMSBase.java
Normal file
@ -0,0 +1,97 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerAMSBase;
|
||||
import com.hbm.inventory.container.ContainerMachinePumpjack;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityMachinePumpjack;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIAMSBase extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_ams_base.png");
|
||||
private TileEntityAMSBase base;
|
||||
|
||||
public GUIAMSBase(InventoryPlayer invPlayer, TileEntityAMSBase tedf) {
|
||||
super(new ContainerAMSBase(invPlayer, tedf));
|
||||
base = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
base.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 70 - 52, 16, 52);
|
||||
base.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 70 - 52, 16, 52);
|
||||
base.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 124 - 52, 16, 52);
|
||||
base.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 124 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 124 - 104, 7, 104, base.power, base.maxPower);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 124 - 104, 7, 104, new String[] { "Restriction Field:", base.field + "%" });
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 53, guiTop + 124 - 104, 7, 104, new String[] { "Efficiency:", base.efficiency + "%" });
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 125, guiTop + 124 - 104, 7, 104, new String[] { "Heat:", base.heat + "/" + base.maxHeat });
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.base.hasCustomInventoryName() ? this.base.getInventoryName() : I18n.format(this.base.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int)base.getPowerScaled(104);
|
||||
drawTexturedModalRect(guiLeft + 116, guiTop + 124 - i, 206, 106 - i, 7, i);
|
||||
|
||||
int j = base.getFieldScaled(104);
|
||||
drawTexturedModalRect(guiLeft + 44, guiTop + 124 - j, 192, 106 - j, 7, j);
|
||||
|
||||
int k = base.getEfficiencyScaled(104);
|
||||
drawTexturedModalRect(guiLeft + 53, guiTop + 124 - k, 199, 106 - k, 7, k);
|
||||
|
||||
int l = base.getHeatScaled(104);
|
||||
drawTexturedModalRect(guiLeft + 125, guiTop + 124 - l, 213, 106 - l, 7, l);
|
||||
|
||||
int m = base.mode;
|
||||
if(m > 0)
|
||||
drawTexturedModalRect(guiLeft + 80, guiTop + 108, 176, 32 + 16 * m, 16, 16);
|
||||
|
||||
int n = base.warning;
|
||||
if(n > 0)
|
||||
drawTexturedModalRect(guiLeft + 80, guiTop + 18, 176, 32 + 16 * n, 16, 16);
|
||||
|
||||
if(base.color > -1) {
|
||||
GL11.glColor3ub((byte)((base.color & 0xFF0000) >> 16), (byte)((base.color & 0x00FF00) >> 8), (byte)((base.color & 0x0000FF) >> 0));
|
||||
drawTexturedModalRect(guiLeft + 61, guiTop + 44, 176, 160, 54, 54);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
drawTexturedModalRect(guiLeft + 61, guiTop + 44, 176, 106, 54, 54);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[0].getSheet());
|
||||
base.tanks[0].renderTank(this, guiLeft + 26, guiTop + 70, base.tanks[0].getTankType().textureX() * FluidTank.x, base.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[1].getSheet());
|
||||
base.tanks[1].renderTank(this, guiLeft + 134, guiTop + 70, base.tanks[1].getTankType().textureX() * FluidTank.x, base.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[2].getSheet());
|
||||
base.tanks[2].renderTank(this, guiLeft + 26, guiTop + 124, base.tanks[2].getTankType().textureX() * FluidTank.x, base.tanks[2].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[3].getSheet());
|
||||
base.tanks[3].renderTank(this, guiLeft + 134, guiTop + 124, base.tanks[3].getTankType().textureX() * FluidTank.x, base.tanks[3].getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
}
|
||||
}
|
||||
71
com/hbm/inventory/gui/GUIAMSEmitter.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerAMSEmitter;
|
||||
import com.hbm.inventory.container.ContainerAMSLimiter;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIAMSEmitter extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_ams_emitter.png");
|
||||
private TileEntityAMSEmitter emitter;
|
||||
|
||||
public GUIAMSEmitter(InventoryPlayer invPlayer, TileEntityAMSEmitter tedf) {
|
||||
super(new ContainerAMSEmitter(invPlayer, tedf));
|
||||
emitter = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
emitter.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 69 - 52, 16, 52, emitter.power, emitter.maxPower);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, new String[] { "Power:", emitter.efficiency + "%" });
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, new String[] { "Heat:", emitter.heat + "/" + emitter.maxHeat });
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
String name = this.emitter.hasCustomInventoryName() ? this.emitter.getInventoryName() : I18n.format(this.emitter.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int) emitter.getPowerScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 134, guiTop + 69 - i, 192, 52 - i, 16, i);
|
||||
|
||||
int j = emitter.getEfficiencyScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 152, guiTop + 69 - j, 208, 52 - j, 16, j);
|
||||
|
||||
int k = emitter.getHeatScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 69 - k, 176, 52 - k, 16, k);
|
||||
|
||||
int m = emitter.warning;
|
||||
if(m > 0)
|
||||
drawTexturedModalRect(guiLeft + 80, guiTop + 17, 176, 36 + 16 * m, 16, 16);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(emitter.tank.getSheet());
|
||||
|
||||
emitter.tank.renderTank(this, guiLeft + 26, guiTop + 69, emitter.tank.getTankType().textureX() * FluidTank.x, emitter.tank.getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -61,6 +61,14 @@ public class GUIAMSLimiter extends GuiInfoContainer {
|
||||
int k = limiter.getHeatScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 69 - k, 176, 52 - k, 16, k);
|
||||
|
||||
int l = limiter.mode;
|
||||
if(l > 0)
|
||||
drawTexturedModalRect(guiLeft + 98, guiTop + 17, 176, 84 + 16 * l, 16, 16);
|
||||
|
||||
int m = limiter.warning;
|
||||
if(m > 0)
|
||||
drawTexturedModalRect(guiLeft + 80, guiTop + 17, 176, 36 + 16 * m, 16, 16);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(limiter.tank.getSheet());
|
||||
|
||||
limiter.tank.renderTank(this, guiLeft + 26, guiTop + 69, limiter.tank.getTankType().textureX() * FluidTank.x, limiter.tank.getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
|
||||
@ -375,6 +375,21 @@ public class ModItems {
|
||||
|
||||
public static Item crystal_energy;
|
||||
public static Item pellet_coolant;
|
||||
|
||||
public static Item ams_catalyst_blank;
|
||||
public static Item ams_catalyst_aluminium;
|
||||
public static Item ams_catalyst_beryllium;
|
||||
public static Item ams_catalyst_caesium;
|
||||
public static Item ams_catalyst_cerium;
|
||||
public static Item ams_catalyst_cobalt;
|
||||
public static Item ams_catalyst_copper;
|
||||
public static Item ams_catalyst_euphemium;
|
||||
public static Item ams_catalyst_iron;
|
||||
public static Item ams_catalyst_lithium;
|
||||
public static Item ams_catalyst_niobium;
|
||||
public static Item ams_catalyst_strontium;
|
||||
public static Item ams_catalyst_thorium;
|
||||
public static Item ams_catalyst_tungsten;
|
||||
|
||||
public static Item cell_empty;
|
||||
public static Item cell_uf6;
|
||||
@ -753,6 +768,10 @@ public class ModItems {
|
||||
public static Item factory_core_titanium;
|
||||
public static Item factory_core_advanced;
|
||||
|
||||
public static Item ams_focus_blank;
|
||||
public static Item ams_focus_limiter;
|
||||
public static Item ams_focus_booster;
|
||||
|
||||
public static Item upgrade_template;
|
||||
public static Item upgrade_speed_1;
|
||||
public static Item upgrade_speed_2;
|
||||
@ -1353,6 +1372,21 @@ public class ModItems {
|
||||
crystal_energy = new ItemCustomLore().setUnlocalizedName("crystal_energy").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":crystal_energy");
|
||||
pellet_coolant = new ItemCustomLore().setUnlocalizedName("pellet_coolant").setMaxDamage(41400).setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_coolant");
|
||||
|
||||
ams_catalyst_blank = new Item().setUnlocalizedName("ams_catalyst_blank").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_blank");
|
||||
ams_catalyst_aluminium = new ItemCatalyst(0xCCCCCC).setUnlocalizedName("ams_catalyst_aluminium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_aluminium");
|
||||
ams_catalyst_beryllium = new ItemCatalyst(0x97978B).setUnlocalizedName("ams_catalyst_beryllium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_beryllium");
|
||||
ams_catalyst_caesium = new ItemCatalyst(0x6400FF).setUnlocalizedName("ams_catalyst_caesium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_caesium");
|
||||
ams_catalyst_cerium = new ItemCatalyst(0x1D3FFF).setUnlocalizedName("ams_catalyst_cerium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_cerium");
|
||||
ams_catalyst_cobalt = new ItemCatalyst(0x789BBE).setUnlocalizedName("ams_catalyst_cobalt").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_cobalt");
|
||||
ams_catalyst_copper = new ItemCatalyst(0xAADE29).setUnlocalizedName("ams_catalyst_copper").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_copper");
|
||||
ams_catalyst_euphemium = new ItemCatalyst(0xFF9CD2).setUnlocalizedName("ams_catalyst_euphemium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_euphemium");
|
||||
ams_catalyst_iron = new ItemCatalyst(0xFF7E22).setUnlocalizedName("ams_catalyst_iron").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_iron");
|
||||
ams_catalyst_lithium = new ItemCatalyst(0xFF2727).setUnlocalizedName("ams_catalyst_lithium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_lithium");
|
||||
ams_catalyst_niobium = new ItemCatalyst(0x3BF1B6).setUnlocalizedName("ams_catalyst_niobium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_niobium");
|
||||
ams_catalyst_strontium = new ItemCatalyst(0xDD0D35).setUnlocalizedName("ams_catalyst_strontium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_strontium");
|
||||
ams_catalyst_thorium = new ItemCatalyst(0x653B22).setUnlocalizedName("ams_catalyst_thorium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_thorium");
|
||||
ams_catalyst_tungsten = new ItemCatalyst(0xF5FF48).setUnlocalizedName("ams_catalyst_tungsten").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_tungsten");
|
||||
|
||||
cell_empty = new ItemCell().setUnlocalizedName("cell_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":cell_empty");
|
||||
cell_uf6 = new Item().setUnlocalizedName("cell_uf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_uf6");
|
||||
cell_puf6 = new Item().setUnlocalizedName("cell_puf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_puf6");
|
||||
@ -1753,6 +1787,10 @@ public class ModItems {
|
||||
factory_core_titanium = new ItemBattery(70400).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_titanium");
|
||||
factory_core_advanced = new ItemBattery(41600).setUnlocalizedName("factory_core_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_advanced");
|
||||
|
||||
ams_focus_blank = new ItemCustomLore().setUnlocalizedName("ams_focus_blank").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_blank");
|
||||
ams_focus_limiter = new ItemCustomLore().setUnlocalizedName("ams_focus_limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_limiter");
|
||||
ams_focus_booster = new ItemCustomLore().setUnlocalizedName("ams_focus_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_booster");
|
||||
|
||||
upgrade_template = new ItemCustomLore().setUnlocalizedName("upgrade_template").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":upgrade_template");
|
||||
upgrade_speed_1 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_1").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":upgrade_speed_1");
|
||||
upgrade_speed_2 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_2").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":upgrade_speed_2");
|
||||
@ -2566,6 +2604,22 @@ public class ModItems {
|
||||
GameRegistry.registerItem(part_copper, part_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(part_plutonium, part_plutonium.getUnlocalizedName());
|
||||
|
||||
//AMS Catalysts
|
||||
GameRegistry.registerItem(ams_catalyst_blank, ams_catalyst_blank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_aluminium, ams_catalyst_aluminium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_beryllium, ams_catalyst_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_caesium, ams_catalyst_caesium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_cerium, ams_catalyst_cerium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_cobalt, ams_catalyst_cobalt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_copper, ams_catalyst_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_euphemium, ams_catalyst_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_iron, ams_catalyst_iron.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_lithium, ams_catalyst_lithium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_niobium, ams_catalyst_niobium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_strontium, ams_catalyst_strontium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_thorium, ams_catalyst_thorium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_catalyst_tungsten, ams_catalyst_tungsten.getUnlocalizedName());
|
||||
|
||||
//Shredder Blades
|
||||
GameRegistry.registerItem(blades_aluminium, blades_aluminium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(blades_gold, blades_gold.getUnlocalizedName());
|
||||
@ -2580,6 +2634,11 @@ public class ModItems {
|
||||
GameRegistry.registerItem(thermo_element, thermo_element.getUnlocalizedName());
|
||||
GameRegistry.registerItem(limiter, limiter.getUnlocalizedName());
|
||||
|
||||
//AMS Components
|
||||
GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_limiter, ams_focus_limiter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_booster, ams_focus_booster.getUnlocalizedName());
|
||||
|
||||
//Fuel Rods
|
||||
GameRegistry.registerItem(rod_empty, rod_empty.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_dual_empty, rod_dual_empty.getUnlocalizedName());
|
||||
|
||||
17
com/hbm/items/special/ItemCatalyst.java
Normal file
@ -0,0 +1,17 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class ItemCatalyst extends Item {
|
||||
|
||||
int color;
|
||||
|
||||
public ItemCatalyst(int color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
}
|
||||
@ -841,6 +841,16 @@ public class Library {
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
//AMS Limiter
|
||||
if(block == ModBlocks.dummy_port_ams_limiter)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
//AMS Emitter
|
||||
if(block == ModBlocks.dummy_port_ams_emitter)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
|
||||
if(tileentity instanceof IConductor)
|
||||
{
|
||||
@ -1035,6 +1045,16 @@ public class Library {
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(x - 9, y + 11, z);
|
||||
}
|
||||
//AMS Limiter
|
||||
if(block == ModBlocks.dummy_port_ams_limiter)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
//AMS Limiter
|
||||
if(block == ModBlocks.dummy_port_ams_emitter)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
|
||||
if(tileentity == that)
|
||||
tileentity = null;
|
||||
|
||||
@ -37,6 +37,11 @@ public class ResourceManager {
|
||||
public static final IModelCustom ams_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_base.obj"));
|
||||
public static final IModelCustom ams_emitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_emitter.obj"));
|
||||
public static final IModelCustom ams_limiter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_limiter.obj"));
|
||||
public static final IModelCustom ams_limiter_destroyed = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_limiter_destroyed.obj"));
|
||||
|
||||
//Sphere
|
||||
public static final IModelCustom sphere_ruv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_ruv.obj"));
|
||||
public static final IModelCustom sphere_iuv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_iuv.obj"));
|
||||
|
||||
////Textures TEs
|
||||
|
||||
|
||||
@ -2,6 +2,9 @@ package com.hbm.packet;
|
||||
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
@ -60,8 +63,21 @@ public class AuxGaugePacket implements IMessage {
|
||||
try {
|
||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||
|
||||
if (true) {
|
||||
if (te instanceof TileEntityAMSLimiter) {
|
||||
TileEntityAMSLimiter limiter = (TileEntityAMSLimiter)te;
|
||||
limiter.locked = m.value == 1;
|
||||
}
|
||||
if (te instanceof TileEntityAMSEmitter) {
|
||||
TileEntityAMSEmitter emitter = (TileEntityAMSEmitter)te;
|
||||
emitter.locked = m.value == 1;
|
||||
}
|
||||
if (te instanceof TileEntityAMSBase) {
|
||||
TileEntityAMSBase base = (TileEntityAMSBase)te;
|
||||
|
||||
if(m.id == 0)
|
||||
base.locked = m.value == 1;
|
||||
else if(m.id == 1)
|
||||
base.color = m.value;
|
||||
}
|
||||
|
||||
} catch (Exception x) { }
|
||||
|
||||
@ -1,15 +1,22 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderAMSBase extends TileEntitySpecialRenderer {
|
||||
|
||||
public RenderAMSBase() { }
|
||||
Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
@ -25,5 +32,183 @@ public class RenderAMSBase extends TileEntitySpecialRenderer {
|
||||
ResourceManager.ams_base.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderTileEntityAt2(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderTileEntityAt3(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 5.5, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glScalef(2.5F, 2.5F, 2.5F);
|
||||
|
||||
GL11.glColor3ub((byte)((((TileEntityAMSBase)tileEntity).color & 0xFF0000) >> 16), (byte)((((TileEntityAMSBase)tileEntity).color & 0x00FF00) >> 8), (byte)((((TileEntityAMSBase)tileEntity).color & 0x0000FF) >> 0));
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
int rot = (int) ((System.nanoTime()/100000000)%360) * 3;
|
||||
|
||||
GL11.glRotatef(rot, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
GL11.glScalef(1/0.5F, 1/0.5F, 1/0.5F);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
|
||||
GL11.glRotatef(-rot * 2, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
GL11.glScalef(1/0.6F, 1/0.6F, 1/0.6F);
|
||||
|
||||
GL11.glRotatef(rot * 2, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.7F, 0.7F, 0.7F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
GL11.glScalef(1/0.7F, 1/0.7F, 1/0.7F);
|
||||
|
||||
GL11.glRotatef(-rot * 2, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
GL11.glScalef(1/0.8F, 1/0.8F, 1/0.8F);
|
||||
|
||||
GL11.glRotatef(rot * 2, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
GL11.glScalef(1/0.9F, 1/0.9F, 1/0.9F);
|
||||
|
||||
GL11.glRotatef(-rot * 2, 0F, 1F, 0F);
|
||||
ResourceManager.sphere_ruv.renderAll();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderTileEntityAt4(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 5.5, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glScalef(2.5F, 2.5F, 2.5F);
|
||||
|
||||
int rot = (int) ((System.nanoTime()/100000000)%360) * 3;
|
||||
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID, "textures/models/EMPBlast.png"));
|
||||
|
||||
GL11.glRotatef(rot, 0F, 1F, 0F);
|
||||
GL11.glScalef(1.1F, 1.1F, 1.1F);
|
||||
ResourceManager.sphere_iuv.renderAll();
|
||||
GL11.glScalef(1/1.1F, 1/1.1F, 1/1.1F);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderTileEntityAt3(tileEntity, x, y, z, f);
|
||||
}
|
||||
|
||||
public void renderTileEntityAt4(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
float radius = 0.04F;
|
||||
int distance = 1;
|
||||
int layers = 3;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2, (float) z + 0.5F);
|
||||
|
||||
double lastPosX = 0;
|
||||
double lastPosZ = 0;
|
||||
|
||||
for(int i = 7; i > 0; i -= distance) {
|
||||
|
||||
double posX = rand.nextDouble() - 0.5;
|
||||
double posZ = rand.nextDouble() - 0.5;
|
||||
|
||||
for(int j = 1; j <= layers; j++) {
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 0.5F, 0, 1f);
|
||||
tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ + (radius * j));
|
||||
tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ - (radius * j));
|
||||
tessellator.addVertex(posX + (radius * j), i - distance, posZ - (radius * j));
|
||||
tessellator.addVertex(posX + (radius * j), i - distance, posZ + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 0.5F, 0, 1f);
|
||||
tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ + (radius * j));
|
||||
tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ - (radius * j));
|
||||
tessellator.addVertex(posX - (radius * j), i - distance, posZ - (radius * j));
|
||||
tessellator.addVertex(posX - (radius * j), i - distance, posZ + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 0.5F, 0, 1f);
|
||||
tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ + (radius * j));
|
||||
tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ + (radius * j));
|
||||
tessellator.addVertex(posX - (radius * j), i - distance, posZ + (radius * j));
|
||||
tessellator.addVertex(posX + (radius * j), i - distance, posZ + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 0.5F, 0, 1f);
|
||||
tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ - (radius * j));
|
||||
tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ - (radius * j));
|
||||
tessellator.addVertex(posX - (radius * j), i - distance, posZ - (radius * j));
|
||||
tessellator.addVertex(posX + (radius * j), i - distance, posZ - (radius * j));
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
lastPosX = posX;
|
||||
lastPosZ = posZ;
|
||||
}
|
||||
|
||||
for(int j = 1; j <= 2; j++) {
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 1, 0, 1f);
|
||||
tessellator.addVertex(0 + (radius * j), 7, 0 + (radius * j));
|
||||
tessellator.addVertex(0 + (radius * j), 7, 0 - (radius * j));
|
||||
tessellator.addVertex(0 + (radius * j), 0, 0 - (radius * j));
|
||||
tessellator.addVertex(0 + (radius * j), 0, 0 + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 1, 0, 1f);
|
||||
tessellator.addVertex(0 - (radius * j), 7, 0 + (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 7, 0 - (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 0, 0 - (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 0, 0 + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 1, 0, 1f);
|
||||
tessellator.addVertex(0 + (radius * j), 7, 0 + (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 7, 0 + (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 0, 0 + (radius * j));
|
||||
tessellator.addVertex(0 + (radius * j), 0, 0 + (radius * j));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(1, 1, 0, 1f);
|
||||
tessellator.addVertex(0 + (radius * j), 7, 0 - (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 7, 0 - (radius * j));
|
||||
tessellator.addVertex(0 - (radius * j), 0, 0 - (radius * j));
|
||||
tessellator.addVertex(0 + (radius * j), 0, 0 - (radius * j));
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -32,9 +33,12 @@ public class RenderAMSLimiter extends TileEntitySpecialRenderer {
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.ams_limiter_tex);
|
||||
bindTexture(ResourceManager.universal);
|
||||
|
||||
ResourceManager.ams_limiter.renderAll();
|
||||
if(((TileEntityAMSLimiter)tileEntity).locked)
|
||||
ResourceManager.ams_limiter_destroyed.renderAll();
|
||||
else
|
||||
ResourceManager.ams_limiter.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@ -1,11 +1,455 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemCatalyst;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.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;
|
||||
import scala.util.Random;
|
||||
|
||||
public class TileEntityAMSBase extends TileEntity {
|
||||
public class TileEntityAMSBase extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public long power = 0;
|
||||
public static final long maxPower = 1000000;
|
||||
public int field = 0;
|
||||
public static final int maxField = 100;
|
||||
public int efficiency = 0;
|
||||
public static final int maxEfficiency = 100;
|
||||
public int heat = 0;
|
||||
public static final int maxHeat = 5000;
|
||||
public int age = 0;
|
||||
public int warning = 0;
|
||||
public int mode = 0;
|
||||
public boolean locked = false;
|
||||
public FluidTank[] tanks;
|
||||
public List<IConsumer> list = new ArrayList();
|
||||
public int color = -1;
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
private static final int[] slots_bottom = new int[] { 0 };
|
||||
private static final int[] slots_side = new int[] { 0 };
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityAMSBase() {
|
||||
slots = new ItemStack[13];
|
||||
tanks = new FluidTank[4];
|
||||
tanks[0] = new FluidTank(FluidType.WATER, 64000, 0);
|
||||
tanks[1] = new FluidTank(FluidType.COOLANT, 64000, 1);
|
||||
tanks[2] = new FluidTank(FluidType.DEUTERIUM, 64000, 2);
|
||||
tanks[3] = new FluidTank(FluidType.TRITIUM, 64000, 3);
|
||||
}
|
||||
|
||||
@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.amsBase";
|
||||
}
|
||||
|
||||
@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) <=128;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
power = nbt.getLong("power");
|
||||
tanks[0].readFromNBT(nbt, "coolant1");
|
||||
tanks[1].readFromNBT(nbt, "coolant2");
|
||||
tanks[2].readFromNBT(nbt, "fuel1");
|
||||
tanks[3].readFromNBT(nbt, "fuel2");
|
||||
field = nbt.getInteger("field");
|
||||
efficiency = nbt.getInteger("efficiency");
|
||||
heat = nbt.getInteger("heat");
|
||||
locked = nbt.getBoolean("locked");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
tanks[0].writeToNBT(nbt, "coolant1");
|
||||
tanks[1].writeToNBT(nbt, "coolant2");
|
||||
tanks[2].writeToNBT(nbt, "fuel1");
|
||||
tanks[3].writeToNBT(nbt, "fuel2");
|
||||
nbt.setInteger("field", field);
|
||||
nbt.setInteger("efficiency", efficiency);
|
||||
nbt.setInteger("heat", heat);
|
||||
nbt.setBoolean("locked", locked);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
if(!locked) {
|
||||
|
||||
tanks[0].setType(0, 1, slots);
|
||||
tanks[1].setType(2, 3, slots);
|
||||
tanks[2].setType(4, 5, slots);
|
||||
tanks[3].setType(6, 7, slots);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord);
|
||||
|
||||
int f1 = 0, f2 = 0, f3 = 0, f4 = 0;
|
||||
|
||||
if(worldObj.getTileEntity(xCoord + 6, yCoord, zCoord) instanceof TileEntityAMSLimiter) {
|
||||
TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord + 6, yCoord, zCoord);
|
||||
if(!te.locked && worldObj.getBlockMetadata(xCoord + 6, yCoord, zCoord) == 4)
|
||||
f1 = te.efficiency;
|
||||
}
|
||||
if(worldObj.getTileEntity(xCoord - 6, yCoord, zCoord) instanceof TileEntityAMSLimiter) {
|
||||
TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord - 6, yCoord, zCoord);
|
||||
if(!te.locked && worldObj.getBlockMetadata(xCoord - 6, yCoord, zCoord) == 5)
|
||||
f2 = te.efficiency;
|
||||
}
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord + 6) instanceof TileEntityAMSLimiter) {
|
||||
TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord, yCoord, zCoord + 6);
|
||||
if(!te.locked && worldObj.getBlockMetadata(xCoord, yCoord, zCoord + 6) == 2)
|
||||
f3 = te.efficiency;
|
||||
}
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord - 6) instanceof TileEntityAMSLimiter) {
|
||||
TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord, yCoord, zCoord - 6);
|
||||
if(!te.locked && worldObj.getBlockMetadata(xCoord, yCoord, zCoord - 6) == 3)
|
||||
f4 = te.efficiency;
|
||||
}
|
||||
|
||||
this.field = Math.round(calcField(f1, f2, f3, f4));
|
||||
|
||||
if(worldObj.getTileEntity(xCoord, yCoord + 9, zCoord) instanceof TileEntityAMSEmitter) {
|
||||
TileEntityAMSEmitter te = (TileEntityAMSEmitter)worldObj.getTileEntity(xCoord, yCoord + 9, zCoord);
|
||||
this.efficiency = te.efficiency;
|
||||
}
|
||||
|
||||
this.color = -1;
|
||||
|
||||
if(slots[8] != null && slots[9] != null && slots[10] != null && slots[11] != null &&
|
||||
slots[8].getItem() instanceof ItemCatalyst && slots[9].getItem() instanceof ItemCatalyst &&
|
||||
slots[10].getItem() instanceof ItemCatalyst && slots[11].getItem() instanceof ItemCatalyst) {
|
||||
int a = ((ItemCatalyst)slots[8].getItem()).getColor();
|
||||
int b = ((ItemCatalyst)slots[9].getItem()).getColor();
|
||||
int c = ((ItemCatalyst)slots[10].getItem()).getColor();
|
||||
int d = ((ItemCatalyst)slots[11].getItem()).getColor();
|
||||
|
||||
int e = this.calcAvgHex(a, b);
|
||||
int f = this.calcAvgHex(c, d);
|
||||
|
||||
int g = this.calcAvgHex(e, f);
|
||||
|
||||
this.color = g;
|
||||
}
|
||||
|
||||
} else {
|
||||
field = 0;
|
||||
efficiency = 0;
|
||||
power = 0;
|
||||
warning = 3;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, color, 1));
|
||||
}
|
||||
}
|
||||
|
||||
private float gauss(float a, float x) {
|
||||
|
||||
//Greater values -> less difference of temperate impact
|
||||
double amplifier = 0.10;
|
||||
|
||||
return (float) ( (1/Math.sqrt(a * Math.PI)) * Math.pow(Math.E, -1 * Math.pow(x, 2)/amplifier) );
|
||||
}
|
||||
|
||||
private float calcEffect(float a, float x) {
|
||||
return (float) (gauss( 1 / a, x / maxHeat) * Math.sqrt(Math.PI * 2) / (Math.sqrt(2) * Math.sqrt(maxPower)));
|
||||
}
|
||||
|
||||
private float calcField(int a, int b, int c, int d) {
|
||||
return (float)Math.sqrt((Math.pow(a, 2) + Math.pow(b, 2) + Math.pow(c, 2) + Math.pow(d, 2)) / 4);
|
||||
}
|
||||
|
||||
private int calcAvgHex(int h1, int h2) {
|
||||
|
||||
int r1 = ((h1 & 0xFF0000) >> 16);
|
||||
int g1 = ((h1 & 0x00FF00) >> 8);
|
||||
int b1 = ((h1 & 0x0000FF) >> 0);
|
||||
|
||||
int r2 = ((h2 & 0xFF0000) >> 16);
|
||||
int g2 = ((h2 & 0x00FF00) >> 8);
|
||||
int b2 = ((h2 & 0x0000FF) >> 0);
|
||||
|
||||
int r = (((r1 + r2) / 2) << 16);
|
||||
int g = (((g1 + g2) / 2) << 8);
|
||||
int b = (((b1 + b2) / 2) << 0);
|
||||
|
||||
return r | g | b;
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
|
||||
public int getEfficiencyScaled(int i) {
|
||||
return (efficiency * i) / maxEfficiency;
|
||||
}
|
||||
|
||||
public int getFieldScaled(int i) {
|
||||
return (field * i) / maxField;
|
||||
}
|
||||
|
||||
public int getHeatScaled(int i) {
|
||||
return (heat * i) / maxHeat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
return tanks[2].getMaxFill();
|
||||
else if(type.name().equals(tanks[3].getTankType().name()))
|
||||
return tanks[3].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
tanks[2].setFill(i);
|
||||
else if(type.name().equals(tanks[3].getTankType().name()))
|
||||
tanks[3].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
return tanks[2].getFill();
|
||||
else if(type.name().equals(tanks[3].getTankType().name()))
|
||||
return tanks[3].getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
if(index < 4 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
if(index < 4 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeua(int x, int y, int z, boolean newTact) {
|
||||
|
||||
Library.ffgeua(x, y, z, newTact, this, worldObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeuaInit() {
|
||||
ffgeua(this.xCoord - 2, this.yCoord, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord + 2, this.yCoord, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord - 2, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord + 2, getTact());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getSPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSPower(long i) {
|
||||
this.power = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IConsumer> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearList() {
|
||||
this.list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
@ -18,5 +462,4 @@ public class TileEntityAMSBase extends TileEntity {
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,394 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
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.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.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;
|
||||
import scala.util.Random;
|
||||
|
||||
public class TileEntityAMSEmitter extends TileEntity {
|
||||
public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public long power = 0;
|
||||
public static final long maxPower = 1000000;
|
||||
public int efficiency = 0;
|
||||
public static final int maxEfficiency = 100;
|
||||
public int heat = 0;
|
||||
public static final int maxHeat = 2500;
|
||||
public int age = 0;
|
||||
public int warning = 0;
|
||||
public boolean locked = false;
|
||||
public FluidTank tank;
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
private static final int[] slots_bottom = new int[] { 0 };
|
||||
private static final int[] slots_side = new int[] { 0 };
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityAMSEmitter() {
|
||||
slots = new ItemStack[4];
|
||||
tank = new FluidTank(FluidType.COOLANT, 16000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.amsEmitter";
|
||||
}
|
||||
|
||||
@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) <=128;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
power = nbt.getLong("power");
|
||||
tank.readFromNBT(nbt, "coolant");
|
||||
efficiency = nbt.getInteger("efficiency");
|
||||
heat = nbt.getInteger("heat");
|
||||
locked = nbt.getBoolean("locked");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
tank.writeToNBT(nbt, "coolant");
|
||||
nbt.setInteger("efficiency", efficiency);
|
||||
nbt.setInteger("heat", heat);
|
||||
nbt.setBoolean("locked", locked);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
if(!locked) {
|
||||
|
||||
tank.setType(0, 1, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord);
|
||||
|
||||
if(power > 0) {
|
||||
//" - (maxHeat / 2)" offsets center to 50% instead of 0%
|
||||
efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100);
|
||||
power -= Math.ceil(power * 0.025);
|
||||
warning = 0;
|
||||
} else {
|
||||
efficiency = 0;
|
||||
warning = 1;
|
||||
}
|
||||
|
||||
if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) {
|
||||
|
||||
if(tank.getFill() >= 15) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 15);
|
||||
|
||||
if(heat <= maxHeat / 2)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 10; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
if(heat > maxHeat / 2)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else if(tank.getTankType().name().equals(FluidType.COOLANT.name())) {
|
||||
|
||||
if(tank.getFill() >= 15) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 15);
|
||||
|
||||
if(heat <= maxHeat / 4)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 5; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
if(heat > maxHeat / 4)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else if(tank.getTankType().name().equals(FluidType.WATER.name())) {
|
||||
|
||||
if(tank.getFill() >= 45) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 45);
|
||||
|
||||
if(heat <= maxHeat * 0.85)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(heat > maxHeat * 0.85)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else {
|
||||
heat += efficiency;
|
||||
warning = 2;
|
||||
}
|
||||
|
||||
if(tank.getFill() <= 5 || heat > maxHeat * 0.9)
|
||||
warning = 2;
|
||||
|
||||
if(heat > maxHeat) {
|
||||
heat = maxHeat;
|
||||
locked = true;
|
||||
ExplosionLarge.spawnShock(worldObj, xCoord, yCoord, zCoord, 24, 3);
|
||||
ExplosionLarge.spawnBurst(worldObj, xCoord, yCoord, zCoord, 24, 3);
|
||||
}
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 3, power, maxPower);
|
||||
|
||||
} else {
|
||||
//fire particles n stuff
|
||||
|
||||
efficiency = 0;
|
||||
power = 0;
|
||||
warning = 3;
|
||||
}
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
private float gauss(float a, float x) {
|
||||
|
||||
//Greater values -> less difference of temperate impact
|
||||
double amplifier = 0.10;
|
||||
|
||||
return (float) ( (1/Math.sqrt(a * Math.PI)) * Math.pow(Math.E, -1 * Math.pow(x, 2)/amplifier) );
|
||||
}
|
||||
|
||||
private float calcEffect(float a, float x) {
|
||||
return (float) (gauss( 1 / a, x / maxHeat) * Math.sqrt(Math.PI * 2) / (Math.sqrt(2) * Math.sqrt(maxPower)));
|
||||
}
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
|
||||
public int getEfficiencyScaled(int i) {
|
||||
return (efficiency * i) / maxEfficiency;
|
||||
}
|
||||
|
||||
public int getHeatScaled(int i) {
|
||||
return (heat * i) / maxHeat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
power = i;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return power;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
@ -18,5 +401,4 @@ public class TileEntityAMSEmitter extends TileEntity {
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -13,6 +15,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -24,6 +27,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import scala.util.Random;
|
||||
|
||||
public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor {
|
||||
|
||||
@ -38,7 +42,10 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
public int age = 0;
|
||||
public int warning = 0;
|
||||
public int mode = 0;
|
||||
public boolean locked = false;
|
||||
public FluidTank tank;
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
private static final int[] slots_bottom = new int[] { 0 };
|
||||
@ -48,7 +55,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
|
||||
public TileEntityAMSLimiter() {
|
||||
slots = new ItemStack[4];
|
||||
tank = new FluidTank(FluidType.COOLANT, 64000, 0);
|
||||
tank = new FluidTank(FluidType.COOLANT, 8000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -153,6 +160,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
tank.readFromNBT(nbt, "coolant");
|
||||
efficiency = nbt.getInteger("efficiency");
|
||||
heat = nbt.getInteger("heat");
|
||||
locked = nbt.getBoolean("locked");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
@ -171,8 +179,9 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
tank.writeToNBT(nbt, "coolant");
|
||||
nbt.setInteger("power", efficiency);
|
||||
nbt.setInteger("power", heat);
|
||||
nbt.setInteger("efficiency", efficiency);
|
||||
nbt.setInteger("heat", heat);
|
||||
nbt.setBoolean("locked", locked);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
@ -209,38 +218,127 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
tank.setType(0, 1, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord);
|
||||
|
||||
heat = 0;
|
||||
|
||||
if(slots[0] != null)
|
||||
heat += maxHeat/2;
|
||||
if(slots[1] != null)
|
||||
heat += maxHeat/2;
|
||||
|
||||
if(power > 0) {
|
||||
//" - (maxHeat / 2)" offsets center to 50% instead of 0%
|
||||
efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100);
|
||||
power -= Math.ceil(power * 0.025);
|
||||
heat += efficiency;
|
||||
} else {
|
||||
efficiency = 0;
|
||||
}
|
||||
|
||||
//TODO
|
||||
/*if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) {
|
||||
if(!locked) {
|
||||
|
||||
int i = (int) (1/Math.sqrt(heat + 1));
|
||||
tank.setType(0, 1, slots);
|
||||
tank.updateTank(xCoord, yCoord, zCoord);
|
||||
|
||||
if() {
|
||||
|
||||
if(power > 0) {
|
||||
//" - (maxHeat / 2)" offsets center to 50% instead of 0%
|
||||
efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100);
|
||||
power -= Math.ceil(power * 0.025);
|
||||
warning = 0;
|
||||
} else {
|
||||
efficiency = 0;
|
||||
warning = 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) {
|
||||
|
||||
if(tank.getFill() >= 5) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 5);
|
||||
|
||||
if(heat <= maxHeat / 2)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 10; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
if(heat > maxHeat / 2)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else if(tank.getTankType().name().equals(FluidType.COOLANT.name())) {
|
||||
|
||||
if(tank.getFill() >= 5) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 5);
|
||||
|
||||
if(heat <= maxHeat / 4)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 5; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
if(heat > maxHeat / 4)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else if(tank.getTankType().name().equals(FluidType.WATER.name())) {
|
||||
|
||||
if(tank.getFill() >= 15) {
|
||||
if(heat > 0)
|
||||
tank.setFill(tank.getFill() - 15);
|
||||
|
||||
if(heat <= maxHeat * 0.85)
|
||||
if(efficiency > 0)
|
||||
heat += efficiency;
|
||||
else
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(heat > 0)
|
||||
heat--;
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(heat > maxHeat * 0.85)
|
||||
heat--;
|
||||
} else {
|
||||
heat += efficiency;
|
||||
}
|
||||
} else {
|
||||
heat += efficiency;
|
||||
warning = 2;
|
||||
}
|
||||
|
||||
mode = 0;
|
||||
if(slots[2] != null) {
|
||||
if(slots[2].getItem() == ModItems.ams_focus_limiter)
|
||||
mode = 1;
|
||||
if(slots[2].getItem() == ModItems.ams_focus_booster)
|
||||
mode = 2;
|
||||
}
|
||||
|
||||
if(tank.getFill() <= 5 || heat > maxHeat * 0.9)
|
||||
warning = 2;
|
||||
|
||||
if(heat > maxHeat) {
|
||||
heat = maxHeat;
|
||||
locked = true;
|
||||
ExplosionLarge.spawnShock(worldObj, xCoord, yCoord, zCoord, 24, 3);
|
||||
ExplosionLarge.spawnBurst(worldObj, xCoord, yCoord, zCoord, 24, 3);
|
||||
}
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 3, power, maxPower);
|
||||
|
||||
} else {
|
||||
//fire particles n stuff
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
double pos = rand.nextDouble() * 2.5;
|
||||
double off = 0.25;
|
||||
if(meta == 2)
|
||||
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 + off, yCoord + 5.5, zCoord + 0.5 - pos, 0.0, 0.0, 0.0));
|
||||
if(meta == 3)
|
||||
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 - off, yCoord + 5.5, zCoord + 0.5 + pos, 0.0, 0.0, 0.0));
|
||||
if(meta == 4)
|
||||
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 - pos, yCoord + 5.5, zCoord + 0.5 - off, 0.0, 0.0, 0.0));
|
||||
if(meta == 5)
|
||||
worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 + pos, yCoord + 5.5, zCoord + 0.5 + off, 0.0, 0.0, 0.0));
|
||||
|
||||
efficiency = 0;
|
||||
power = 0;
|
||||
warning = 3;
|
||||
}
|
||||
|
||||
power = Library.chargeTEFromItems(slots, 3, power, maxPower);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||