Added fill/drain fluid item helpers to fluid helper
Simple code to work with fluid container items.
This commit is contained in:
parent
78208ed1ac
commit
36a480b9c0
3 changed files with 983 additions and 10 deletions
871
resources/assets/dark/models/xpFurnaceSample.obj
Normal file
871
resources/assets/dark/models/xpFurnaceSample.obj
Normal file
|
@ -0,0 +1,871 @@
|
|||
# Blender v2.67 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib xpFurnaceSample.mtl
|
||||
o Figure_1
|
||||
v -0.306690 1.285600 0.595960
|
||||
v 0.297980 1.285700 0.596120
|
||||
v -0.343758 1.131700 0.528362
|
||||
v 0.336026 1.131700 0.616992
|
||||
v 0.297980 1.285700 0.696120
|
||||
v -0.343758 1.131700 0.616992
|
||||
v -0.306690 1.285600 0.695960
|
||||
v 0.336026 1.131700 0.528362
|
||||
v 0.601250 1.285600 0.700250
|
||||
v 0.601280 1.285600 0.596130
|
||||
v 0.600690 0.163950 0.596100
|
||||
v 0.600590 0.163950 0.700020
|
||||
v 0.298100 0.163950 0.596100
|
||||
v -0.598470 1.285700 0.595950
|
||||
v -0.306850 0.163950 0.596100
|
||||
v -0.306670 0.163950 0.695950
|
||||
v -0.598500 0.163950 0.700020
|
||||
v -0.700000 1.285600 0.700020
|
||||
v -0.598480 1.285700 0.700340
|
||||
v -0.700000 1.285600 -0.699980
|
||||
v -0.598480 0.163950 -0.699680
|
||||
v -0.700000 0.163950 0.700020
|
||||
v 0.700000 1.285600 0.700030
|
||||
v 0.601250 1.285600 -0.699750
|
||||
v 0.700000 0.163950 -0.699980
|
||||
v 0.700000 0.163950 0.700020
|
||||
v -0.699990 1.285700 -0.600000
|
||||
v 0.700020 1.285600 -0.599990
|
||||
v 0.700000 1.285600 -0.699970
|
||||
v 0.700000 0.163950 -0.600020
|
||||
v -0.700000 0.163950 -0.699980
|
||||
v -0.700000 1.450000 -0.700000
|
||||
v 0.700000 1.450000 -0.700000
|
||||
v 0.700000 1.450000 0.700000
|
||||
v -0.700000 1.450000 0.700000
|
||||
v -0.700000 -0.041440 -0.699980
|
||||
v 0.700000 -0.041440 0.700020
|
||||
v -0.700000 -0.041440 0.700020
|
||||
v 0.700000 -0.041440 -0.699980
|
||||
v -0.343768 1.131700 0.528242
|
||||
v -0.546300 1.130700 0.528230
|
||||
v -0.546290 1.130700 0.620700
|
||||
v -0.638950 1.130400 -0.620400
|
||||
v -0.598480 1.285700 -0.699660
|
||||
v -0.638950 1.130400 0.620450
|
||||
v -0.546280 1.130700 -0.620120
|
||||
v -0.638940 1.130400 -0.531780
|
||||
v 0.548760 1.132100 0.528370
|
||||
v 0.548720 1.132100 0.620620
|
||||
v 0.548720 1.132100 -0.620200
|
||||
v 0.638950 1.130600 0.620460
|
||||
v 0.638950 1.130600 -0.620400
|
||||
v 0.335816 1.130600 0.616972
|
||||
v 0.335816 1.130600 0.528362
|
||||
v 0.638950 1.130600 -0.620400
|
||||
v 0.638950 1.130600 0.620460
|
||||
v 0.638960 1.130600 -0.531780
|
||||
v -0.346738 0.607388 0.528372
|
||||
v -0.598640 0.163950 0.596100
|
||||
v -0.551900 0.607390 0.620570
|
||||
v -0.552000 0.607390 0.528370
|
||||
v -0.349558 0.607388 0.616902
|
||||
v -0.551880 0.607390 -0.620130
|
||||
v -0.645500 0.607390 -0.620400
|
||||
v -0.645500 0.607390 0.620510
|
||||
v -0.645500 0.607390 -0.531790
|
||||
v -0.700000 0.163950 -0.600020
|
||||
v 0.338676 0.607388 0.528402
|
||||
v 0.298080 0.163950 0.695960
|
||||
v 0.554050 0.607390 0.528410
|
||||
v 0.338656 0.607388 0.616942
|
||||
v 0.553960 0.607390 0.620550
|
||||
v 0.645500 0.607390 -0.620400
|
||||
v 0.553980 0.607390 -0.620210
|
||||
v 0.600610 0.163930 -0.699770
|
||||
v 0.645500 0.607390 0.620510
|
||||
v 0.645500 0.607390 -0.531790
|
||||
v -0.546440 1.128400 0.528240
|
||||
v -0.546430 1.128400 0.620700
|
||||
v -0.546430 1.128400 -0.620110
|
||||
v -0.639120 1.128100 -0.620400
|
||||
v -0.639120 1.128100 0.620450
|
||||
v -0.639110 1.128100 -0.531780
|
||||
v 0.335876 1.131200 0.528362
|
||||
v 0.335876 1.131200 0.616972
|
||||
v 0.548870 1.132100 0.528370
|
||||
v 0.548840 1.132100 0.620620
|
||||
v 0.639080 1.132400 -0.620390
|
||||
v 0.548840 1.132100 -0.620200
|
||||
v 0.639080 1.132400 0.620460
|
||||
v 0.639090 1.132400 -0.531780
|
||||
v -0.349058 1.129300 0.528252
|
||||
v -0.349108 1.128500 0.528252
|
||||
v -0.345668 1.129100 0.620402
|
||||
v -0.345758 1.129300 0.620332
|
||||
v 0.600000 1.150000 -0.350000
|
||||
v 0.800000 1.150000 -0.350000
|
||||
v 0.800000 0.450000 -0.350000
|
||||
v 0.800000 0.450000 0.350000
|
||||
v 0.800000 1.150000 0.350000
|
||||
v 0.600000 1.150000 0.350000
|
||||
v 0.600000 0.450000 -0.350000
|
||||
v 0.600000 0.450000 0.350000
|
||||
v -0.350000 1.150000 -0.800000
|
||||
v 0.350000 1.150000 -0.800000
|
||||
v 0.350000 0.450000 -0.800000
|
||||
v 0.350000 0.450000 -0.600000
|
||||
v 0.350000 1.150000 -0.600000
|
||||
v -0.350000 1.150000 -0.600000
|
||||
v -0.350000 0.450000 -0.800000
|
||||
v -0.350000 0.450000 -0.600000
|
||||
v -0.800000 1.150000 -0.350000
|
||||
v -0.600000 1.150000 -0.350000
|
||||
v -0.600000 0.450000 -0.350000
|
||||
v -0.600000 0.450000 0.350000
|
||||
v -0.600000 1.150000 0.350000
|
||||
v -0.800000 1.150000 0.350000
|
||||
v -0.800000 0.450000 -0.350000
|
||||
v -0.800000 0.450000 0.350000
|
||||
vt 0.908398 0.616468
|
||||
vt 0.820633 0.616488
|
||||
vt 0.913779 0.585634
|
||||
vt 0.422656 0.585634
|
||||
vt 0.417134 0.616488
|
||||
vt 0.323989 0.585634
|
||||
vt 0.222617 0.616468
|
||||
vt 0.212806 0.585634
|
||||
vt 0.237132 0.616468
|
||||
vt 0.525127 0.616488
|
||||
vt 0.510612 0.616488
|
||||
vt 0.522098 0.585634
|
||||
vt 0.417134 0.695286
|
||||
vt 0.329369 0.695318
|
||||
vt 0.417134 0.675251
|
||||
vt 0.422656 0.291138
|
||||
vt 0.422656 0.308896
|
||||
vt 0.323989 0.308896
|
||||
vt 0.461152 0.674424
|
||||
vt 0.461157 0.695284
|
||||
vt 0.461071 0.304710
|
||||
vt 0.461057 0.325530
|
||||
vt 0.417152 0.304710
|
||||
vt 0.287019 0.695320
|
||||
vt 0.329369 0.675283
|
||||
vt 0.329346 0.304710
|
||||
vt 0.329372 0.324715
|
||||
vt 0.287014 0.325530
|
||||
vt 0.272282 0.674470
|
||||
vt 0.287017 0.674406
|
||||
vt 0.272282 0.954961
|
||||
vt 0.287017 0.045099
|
||||
vt 0.272282 0.325530
|
||||
vt 0.475485 0.674468
|
||||
vt 0.461152 0.954915
|
||||
vt 0.475485 0.045039
|
||||
vt 0.475485 0.325530
|
||||
vt 0.272283 0.934930
|
||||
vt 0.475488 0.934928
|
||||
vt 0.475485 0.954959
|
||||
vt 0.475485 0.065066
|
||||
vt 0.272282 0.045039
|
||||
vt 0.965485 0.649406
|
||||
vt 0.762282 0.649406
|
||||
vt 0.965485 0.616468
|
||||
vt 0.475485 0.616468
|
||||
vt 0.475485 0.649406
|
||||
vt 0.272282 0.616468
|
||||
vt 0.237721 0.616468
|
||||
vt 0.237718 0.649406
|
||||
vt 0.034515 0.649406
|
||||
vt 0.713253 0.649406
|
||||
vt 0.510049 0.649406
|
||||
vt 0.713248 0.616468
|
||||
vt 0.272282 0.674474
|
||||
vt 0.475485 0.674474
|
||||
vt 0.475485 0.954965
|
||||
vt 0.475485 0.045041
|
||||
vt 0.475485 0.325532
|
||||
vt 0.965485 0.391744
|
||||
vt 0.762282 0.391744
|
||||
vt 0.965485 0.350594
|
||||
vt 0.475485 0.350594
|
||||
vt 0.475485 0.391744
|
||||
vt 0.272282 0.391744
|
||||
vt 0.237721 0.350594
|
||||
vt 0.237721 0.391744
|
||||
vt 0.034517 0.350594
|
||||
vt 0.713250 0.391744
|
||||
vt 0.510046 0.391744
|
||||
vt 0.510046 0.350594
|
||||
vt 0.475485 0.674470
|
||||
vt 0.475485 0.954961
|
||||
vt 0.913780 0.585634
|
||||
vt 0.943177 0.585434
|
||||
vt 0.226208 0.585434
|
||||
vt 0.237767 0.616488
|
||||
vt 0.212786 0.585434
|
||||
vt 0.956624 0.585373
|
||||
vt 0.950750 0.616488
|
||||
vt 0.294592 0.585434
|
||||
vt 0.287017 0.616488
|
||||
vt 0.226172 0.585373
|
||||
vt 0.034517 0.616468
|
||||
vt 0.701659 0.585434
|
||||
vt 0.713204 0.616488
|
||||
vt 0.521559 0.585434
|
||||
vt 0.058931 0.585373
|
||||
vt 0.049029 0.616488
|
||||
vt 0.534961 0.585714
|
||||
vt 0.525126 0.616468
|
||||
vt 0.521571 0.585714
|
||||
vt 0.784240 0.585714
|
||||
vt 0.776615 0.616468
|
||||
vt 0.762282 0.616468
|
||||
vt 0.466624 0.585414
|
||||
vt 0.453528 0.585714
|
||||
vt 0.226196 0.585714
|
||||
vt 0.237754 0.616468
|
||||
vt 0.046097 0.585714
|
||||
vt 0.701699 0.585414
|
||||
vt 0.510045 0.616468
|
||||
vt 0.698737 0.616468
|
||||
vt 0.225667 0.585414
|
||||
vt 0.237155 0.616488
|
||||
vt 0.212806 0.585414
|
||||
vt 0.815142 0.585414
|
||||
vt 0.784234 0.585714
|
||||
vt 0.461152 0.616468
|
||||
vt 0.422626 0.585414
|
||||
vt 0.701670 0.585714
|
||||
vt 0.521594 0.585414
|
||||
vt 0.688837 0.585414
|
||||
vt 0.914211 0.480588
|
||||
vt 0.908422 0.391744
|
||||
vt 0.950774 0.391744
|
||||
vt 0.293778 0.480588
|
||||
vt 0.287014 0.391744
|
||||
vt 0.329372 0.391744
|
||||
vt 0.212807 0.480588
|
||||
vt 0.222637 0.391744
|
||||
vt 0.522111 0.480588
|
||||
vt 0.510637 0.391744
|
||||
vt 0.525130 0.391744
|
||||
vt 0.943987 0.480588
|
||||
vt 0.950750 0.391744
|
||||
vt 0.957575 0.480588
|
||||
vt 0.280192 0.480588
|
||||
vt 0.046068 0.480588
|
||||
vt 0.034517 0.391744
|
||||
vt 0.226180 0.480588
|
||||
vt 0.521578 0.480588
|
||||
vt 0.701660 0.480588
|
||||
vt 0.058929 0.480588
|
||||
vt 0.212811 0.480588
|
||||
vt 0.237132 0.391744
|
||||
vt 0.783466 0.480588
|
||||
vt 0.776696 0.391744
|
||||
vt 0.820616 0.391744
|
||||
vt 0.423038 0.480588
|
||||
vt 0.417149 0.391744
|
||||
vt 0.461057 0.391744
|
||||
vt 0.521581 0.480588
|
||||
vt 0.770192 0.480588
|
||||
vt 0.783476 0.480588
|
||||
vt 0.454288 0.480588
|
||||
vt 0.046096 0.480588
|
||||
vt 0.034548 0.391740
|
||||
vt 0.226186 0.480588
|
||||
vt 0.521587 0.480588
|
||||
vt 0.701699 0.480588
|
||||
vt 0.688838 0.480588
|
||||
vt 0.698741 0.391744
|
||||
vt 0.212788 0.584973
|
||||
vt 0.226208 0.584973
|
||||
vt 0.943196 0.584973
|
||||
vt 0.956649 0.584913
|
||||
vt 0.281118 0.584913
|
||||
vt 0.294572 0.584973
|
||||
vt 0.046068 0.584913
|
||||
vt 0.226172 0.584913
|
||||
vt 0.521559 0.584973
|
||||
vt 0.701657 0.584973
|
||||
vt 0.058931 0.584913
|
||||
vt 0.281120 0.584913
|
||||
vt 0.467575 0.480588
|
||||
vt 0.212806 0.585534
|
||||
vt 0.225663 0.480588
|
||||
vt 0.522100 0.585534
|
||||
vt 0.522100 0.585414
|
||||
vt 0.534962 0.585414
|
||||
vt 0.784218 0.585714
|
||||
vt 0.814726 0.480588
|
||||
vt 0.422635 0.585534
|
||||
vt 0.453534 0.585714
|
||||
vt 0.453545 0.309622
|
||||
vt 0.453528 0.309622
|
||||
vt 0.422635 0.308892
|
||||
vt 0.453550 0.708860
|
||||
vt 0.453534 0.708860
|
||||
vt 0.453545 0.690378
|
||||
vt 0.771124 0.585774
|
||||
vt 0.784222 0.585714
|
||||
vt 0.453545 0.585714
|
||||
vt 0.466643 0.585774
|
||||
vt 0.771143 0.585414
|
||||
vt 0.453528 0.061023
|
||||
vt 0.521594 0.585774
|
||||
vt 0.046070 0.585774
|
||||
vt 0.046068 0.585414
|
||||
vt 0.226173 0.585774
|
||||
vt 0.688837 0.585774
|
||||
vt 0.701698 0.585774
|
||||
vt 0.058931 0.585774
|
||||
vt 0.914548 0.585153
|
||||
vt 0.943197 0.584973
|
||||
vt 0.323147 0.480588
|
||||
vt 0.212790 0.585153
|
||||
vt 0.212790 0.584993
|
||||
vt 0.226165 0.585113
|
||||
vt 0.521613 0.585153
|
||||
vt 0.534978 0.585153
|
||||
vt 0.771123 0.585774
|
||||
vt 0.771142 0.585414
|
||||
vt 0.956648 0.584913
|
||||
vt 0.914555 0.584993
|
||||
vt 0.046068 0.585373
|
||||
vt 0.521603 0.585113
|
||||
vt 0.534978 0.584993
|
||||
vt 0.510636 0.616468
|
||||
vt 0.815111 0.585634
|
||||
vt 0.329369 0.616468
|
||||
vt 0.225670 0.585634
|
||||
vt 0.534962 0.585634
|
||||
vt 0.323989 0.291138
|
||||
vt 0.417149 0.324717
|
||||
vt 0.286994 0.304710
|
||||
vt 0.287017 0.954897
|
||||
vt 0.461059 0.045081
|
||||
vt 0.272282 0.065066
|
||||
vt 0.272282 0.649406
|
||||
vt 0.272282 0.954965
|
||||
vt 0.762282 0.350594
|
||||
vt 0.272282 0.350594
|
||||
vt 0.713250 0.350594
|
||||
vt 0.950749 0.616488
|
||||
vt 0.222616 0.616488
|
||||
vt 0.943174 0.585434
|
||||
vt 0.281143 0.585373
|
||||
vt 0.510000 0.616488
|
||||
vt 0.510013 0.616468
|
||||
vt 0.034551 0.616468
|
||||
vt 0.222640 0.616488
|
||||
vt 0.776611 0.616468
|
||||
vt 0.944004 0.480588
|
||||
vt 0.226189 0.480588
|
||||
vt 0.534960 0.480588
|
||||
vt 0.713206 0.391744
|
||||
vt 0.049026 0.391744
|
||||
vt 0.534955 0.480588
|
||||
vt 0.776708 0.391740
|
||||
vt 0.466645 0.585774
|
||||
vt 0.225667 0.585534
|
||||
vt 0.534962 0.585534
|
||||
vt 0.815133 0.585534
|
||||
vt 0.453528 0.690378
|
||||
vt 0.453545 0.061023
|
||||
vt 0.226173 0.585414
|
||||
vt 0.058931 0.585414
|
||||
vt 0.323699 0.585153
|
||||
vt 0.226155 0.585153
|
||||
vt 0.466626 0.585414
|
||||
vt 0.475488 0.616468
|
||||
vt 0.272283 0.616488
|
||||
vt 0.965484 0.616488
|
||||
vt 0.956623 0.585373
|
||||
vt 0.034519 0.616468
|
||||
vt 0.323987 0.585634
|
||||
vt 0.323212 0.584993
|
||||
vt 0.525150 0.616468
|
||||
vt 0.776797 0.589300
|
||||
vt 0.747767 0.589300
|
||||
vt 0.747767 0.449055
|
||||
vt 0.490000 0.449055
|
||||
vt 0.490000 0.589300
|
||||
vt 0.460971 0.589300
|
||||
vt 0.085315 0.589300
|
||||
vt 0.085315 0.449055
|
||||
vt 0.186917 0.589300
|
||||
vt 0.662452 0.589300
|
||||
vt 0.560850 0.589300
|
||||
vt 0.560850 0.449055
|
||||
vt 0.490000 0.884842
|
||||
vt 0.460971 0.884842
|
||||
vt 0.460971 0.744597
|
||||
vt 0.490000 0.115158
|
||||
vt 0.490000 0.255403
|
||||
vt 0.460971 0.255403
|
||||
vt 0.776797 0.449055
|
||||
vt 0.460971 0.449055
|
||||
vt 0.186917 0.449055
|
||||
vt 0.662452 0.449055
|
||||
vt 0.490000 0.744597
|
||||
vt 0.460971 0.115158
|
||||
vt 0.914685 0.589300
|
||||
vt 0.813083 0.589300
|
||||
vt 0.813083 0.449055
|
||||
vt 0.424685 0.449055
|
||||
vt 0.424685 0.589300
|
||||
vt 0.323083 0.589300
|
||||
vt 0.020000 0.589300
|
||||
vt 0.020000 0.449055
|
||||
vt 0.049029 0.589300
|
||||
vt 0.727767 0.589300
|
||||
vt 0.698738 0.589300
|
||||
vt 0.698738 0.449055
|
||||
vt 0.424685 0.975000
|
||||
vt 0.323083 0.975000
|
||||
vt 0.323083 0.934930
|
||||
vt 0.424685 0.025000
|
||||
vt 0.424685 0.065070
|
||||
vt 0.323083 0.065070
|
||||
vt 0.914685 0.449055
|
||||
vt 0.323083 0.449055
|
||||
vt 0.049029 0.449055
|
||||
vt 0.727767 0.449055
|
||||
vt 0.424685 0.934930
|
||||
vt 0.323083 0.025000
|
||||
vt 0.980000 0.589300
|
||||
vt 0.950971 0.589300
|
||||
vt 0.950971 0.449055
|
||||
vt 0.286796 0.449055
|
||||
vt 0.286796 0.589300
|
||||
vt 0.257767 0.589300
|
||||
vt 0.286796 0.884842
|
||||
vt 0.257767 0.884842
|
||||
vt 0.257767 0.744597
|
||||
vt 0.286796 0.115158
|
||||
vt 0.286796 0.255403
|
||||
vt 0.257767 0.255403
|
||||
vt 0.980000 0.449055
|
||||
vt 0.257767 0.449055
|
||||
vt 0.286796 0.744597
|
||||
vt 0.257767 0.115158
|
||||
vn 0.000176 0.402116 -0.915589
|
||||
vn 0.000000 -0.457020 0.889457
|
||||
vn -0.972198 0.234161 0.000000
|
||||
vn 0.970812 0.239841 0.000000
|
||||
vn -0.000165 1.000000 0.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000330 1.000000 0.000000
|
||||
vn 0.000343 1.000000 0.000000
|
||||
vn -0.000985 0.999999 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.000071 1.000000 -0.000000
|
||||
vn -0.000000 -0.000121 -1.000000
|
||||
vn -0.000007 0.000183 1.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 1.000000 -0.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -0.000000 0.000000 1.000000
|
||||
vn -0.001936 0.403139 -0.915137
|
||||
vn -0.947703 -0.319154 0.000103
|
||||
vn 0.003255 -0.455256 -0.890355
|
||||
vn -0.002351 -0.457636 0.889136
|
||||
vn -0.930591 -0.366060 -0.000000
|
||||
vn 0.947699 0.319164 0.000008
|
||||
vn -0.930740 -0.365682 0.000459
|
||||
vn 0.946096 -0.323887 0.000410
|
||||
vn -0.001979 -0.459588 -0.888130
|
||||
vn -0.005981 -0.454820 0.890563
|
||||
vn -0.946132 0.323781 0.000000
|
||||
vn 0.930430 -0.366469 -0.000000
|
||||
vn 0.930398 -0.366552 -0.000186
|
||||
vn -0.971511 -0.236996 0.000000
|
||||
vn -0.002781 0.399761 -0.916615
|
||||
vn -0.012016 -0.457212 0.889277
|
||||
vn 0.000000 0.000000 0.000000
|
||||
vn 0.000000 -0.150983 -0.988536
|
||||
vn 0.013730 0.174944 0.984483
|
||||
vn -0.994492 0.104803 0.001340
|
||||
vn 0.995384 0.095951 -0.001794
|
||||
vn 0.002839 0.176285 -0.984335
|
||||
vn 0.000000 0.176488 0.984303
|
||||
vn -0.992532 0.121985 0.000000
|
||||
vn 0.994524 -0.104509 0.000016
|
||||
vn 0.000000 -0.152076 0.988369
|
||||
vn -0.995842 0.091092 -0.000199
|
||||
vn 0.000000 -0.150899 -0.988549
|
||||
vn -0.013209 0.176586 0.984196
|
||||
vn 0.994498 0.104748 0.000957
|
||||
vn -0.002044 0.176395 -0.984317
|
||||
vn 0.000000 0.176402 0.984318
|
||||
vn -0.994517 -0.104571 -0.000016
|
||||
vn 0.992532 0.121985 0.000000
|
||||
vn 0.000000 0.176639 -0.984276
|
||||
vn -0.999943 0.010671 0.000108
|
||||
vn -0.998152 0.060761 0.000108
|
||||
vn 0.003129 0.000006 -0.999995
|
||||
vn 0.003130 -0.000231 -0.999995
|
||||
vn -0.002697 0.000148 0.999996
|
||||
vn -0.002697 0.000164 0.999996
|
||||
vn -0.999925 0.012252 0.000000
|
||||
vn -0.997280 0.073712 0.000000
|
||||
vn 0.999945 -0.010498 -0.000000
|
||||
vn 0.997881 -0.065063 0.000008
|
||||
vn -0.999925 0.012252 0.000112
|
||||
vn -0.997278 0.073737 0.000112
|
||||
vn 0.000000 -0.000019 1.000000
|
||||
vn -0.999986 -0.005345 -0.000226
|
||||
vn 0.995038 -0.099494 0.000000
|
||||
vn 0.000037 -0.000076 -1.000000
|
||||
vn -0.000038 0.000004 1.000000
|
||||
vn -0.016755 -0.000146 0.999860
|
||||
vn 0.000000 -0.970887 0.239537
|
||||
vn 0.999952 0.009757 0.000326
|
||||
vn -0.002106 -0.000007 -0.999998
|
||||
vn 0.000000 -0.535028 -0.844834
|
||||
vn 0.001774 -0.000116 0.999998
|
||||
vn -0.001772 0.000128 -0.999998
|
||||
vn -0.999952 -0.009795 -0.000000
|
||||
vn 0.999925 0.012227 0.000000
|
||||
vn -0.997402 0.072031 0.000000
|
||||
vn 0.999925 0.012208 -0.000113
|
||||
vn -0.997402 0.072030 0.000113
|
||||
vn 0.000000 0.000019 -1.000000
|
||||
vn 0.000062 -0.000230 -1.000000
|
||||
vn 0.018125 -0.000440 0.999836
|
||||
vn -0.997375 0.062345 0.036827
|
||||
vn 0.999334 -0.007041 -0.035815
|
||||
vn -0.789959 0.048088 -0.611271
|
||||
vn -0.001948 0.000122 -0.999998
|
||||
vn -0.738026 0.054550 0.672564
|
||||
vn 0.973585 -0.225644 -0.034875
|
||||
vn 0.000000 0.402729 -0.915319
|
||||
vn -0.000160 -0.456492 0.889727
|
||||
vn 0.000201 -1.000000 0.000014
|
||||
vn 0.000000 0.999999 -0.001000
|
||||
vn 0.000007 -0.000182 -1.000000
|
||||
vn -0.000000 0.000122 1.000000
|
||||
vn 0.000169 0.400408 -0.916337
|
||||
vn -0.947768 -0.318961 -0.000091
|
||||
vn 0.004165 -0.455442 -0.890256
|
||||
vn -0.000922 -0.456514 0.889716
|
||||
vn -0.930591 -0.366061 -0.000000
|
||||
vn 0.947719 0.319106 0.000000
|
||||
vn -0.930609 -0.366014 0.000105
|
||||
vn 0.946089 -0.323907 0.000272
|
||||
vn -0.009518 -0.453703 -0.891102
|
||||
vn 0.001977 -0.461020 0.887387
|
||||
vn 0.930394 -0.366562 -0.000105
|
||||
vn 0.000163 0.403790 -0.914851
|
||||
vn -0.012263 -0.456878 0.889445
|
||||
vn 0.000008 -0.150987 -0.988536
|
||||
vn 0.017840 0.177139 0.984024
|
||||
vn -0.994503 0.104703 0.001078
|
||||
vn 0.995035 0.094346 0.031695
|
||||
vn 0.002909 0.176292 -0.984334
|
||||
vn -0.000631 0.176423 0.984314
|
||||
vn 0.994523 -0.104514 0.000014
|
||||
vn -0.995843 0.091083 -0.000225
|
||||
vn 0.000038 -0.150921 -0.988546
|
||||
vn -0.016499 0.174697 0.984484
|
||||
vn 0.994498 0.104747 0.000972
|
||||
vn -0.002116 0.176372 -0.984321
|
||||
vn 0.000430 0.176539 0.984294
|
||||
vn -0.994516 -0.104581 -0.000013
|
||||
vn -0.999944 0.010498 0.001084
|
||||
vn -0.998152 0.060762 0.000108
|
||||
vn 0.002884 -0.000035 -0.999996
|
||||
vn 0.003036 -0.004552 -0.999985
|
||||
vn -0.000641 -0.000243 1.000000
|
||||
vn -0.002698 0.000199 0.999996
|
||||
vn 0.999945 -0.010460 0.000016
|
||||
vn 0.998152 -0.060761 -0.000000
|
||||
vn -0.999925 0.012271 0.000000
|
||||
vn -0.997280 0.073712 0.000113
|
||||
vn -0.999986 -0.005307 0.000000
|
||||
vn 0.000038 -0.000076 -1.000000
|
||||
vn 0.000000 0.008940 -0.999960
|
||||
vn -0.017126 -0.000301 0.999853
|
||||
vn 0.017144 -0.001714 -0.999852
|
||||
vn 0.999951 0.009872 0.000977
|
||||
vn -0.002076 -0.000001 -0.999998
|
||||
vn 0.002122 -0.005716 0.999981
|
||||
vn 0.000437 0.000100 1.000000
|
||||
vn 0.000000 0.470616 0.882338
|
||||
vn -0.999952 -0.009757 -0.000016
|
||||
vn -0.997402 0.072031 0.000113
|
||||
vn 0.000008 0.000000 -1.000000
|
||||
vn 0.000010 -0.000249 -1.000000
|
||||
vn 0.001863 -0.006586 0.999977
|
||||
vn -0.915696 -0.400529 0.032817
|
||||
vn 0.999483 0.004450 0.031837
|
||||
vn -0.000788 0.403048 0.915179
|
||||
vn 0.000022 0.397255 0.917708
|
||||
vn 0.684242 -0.050592 -0.727498
|
||||
vn -0.760460 -0.118828 0.638421
|
||||
vn 0.003607 -0.436284 0.899802
|
||||
vn 0.013264 -0.448164 0.893853
|
||||
vn 0.000081 -0.004350 -0.999991
|
||||
vn 0.000081 -0.004359 -0.999991
|
||||
vn -0.848206 0.064181 -0.525763
|
||||
vn 0.000006 -0.460972 -0.887415
|
||||
vn 0.001523 -0.450503 -0.892774
|
||||
vn 0.266007 -0.441211 0.857072
|
||||
vn 0.965427 -0.260672 0.000000
|
||||
usemtl None
|
||||
s off
|
||||
f 1/1/1 2/2/1 3/3/1
|
||||
f 4/4/2 5/5/2 6/6/2
|
||||
f 1/7/3 3/8/3 7/9/3
|
||||
f 2/10/4 5/11/4 4/12/4
|
||||
f 2/13/5 1/14/5 5/15/5
|
||||
f 8/16/6 4/17/6 6/18/6
|
||||
f 5/15/7 9/19/7 10/20/7
|
||||
f 11/21/6 12/22/6 13/23/6
|
||||
f 1/14/8 14/24/8 7/25/8
|
||||
f 15/26/6 16/27/6 17/28/6
|
||||
f 18/29/9 19/30/9 20/31/9
|
||||
f 21/32/6 17/28/6 22/33/6
|
||||
f 9/19/10 23/34/10 24/35/10
|
||||
f 25/36/6 26/37/6 12/22/6
|
||||
f 27/38/11 28/39/11 29/40/11
|
||||
f 25/36/6 30/41/6 31/42/6
|
||||
f 32/43/12 33/44/12 20/45/12
|
||||
f 23/46/13 34/47/13 18/48/13
|
||||
f 18/49/14 35/50/14 32/51/14
|
||||
f 33/52/15 34/53/15 29/54/15
|
||||
f 35/55/10 34/56/10 33/57/10
|
||||
f 29/58/6 23/59/6 18/33/6
|
||||
f 31/60/16 25/61/16 36/62/16
|
||||
f 37/63/17 26/64/17 22/65/17
|
||||
f 38/66/14 22/67/14 36/68/14
|
||||
f 25/69/15 26/70/15 37/71/15
|
||||
f 22/29/10 26/72/10 25/73/10
|
||||
f 39/36/6 37/37/6 36/42/6
|
||||
f 1/1/18 40/74/18 41/75/18
|
||||
f 42/76/19 19/77/19 41/78/19
|
||||
f 43/79/20 20/45/20 44/80/20
|
||||
f 42/81/21 19/82/21 18/48/21
|
||||
f 45/83/22 18/49/22 20/84/22
|
||||
f 46/85/23 44/86/23 42/87/23
|
||||
f 47/88/24 27/89/24 20/84/24
|
||||
f 48/90/25 10/91/25 49/92/25
|
||||
f 50/93/26 24/94/26 29/95/26
|
||||
f 51/96/27 23/46/27 49/97/27
|
||||
f 49/98/28 9/99/28 50/100/28
|
||||
f 52/101/29 29/54/29 23/102/29
|
||||
f 52/101/30 29/54/30 28/103/30
|
||||
f 53/104/31 5/105/31 54/106/31
|
||||
f 54/107/32 2/2/32 48/108/32
|
||||
f 49/97/33 9/109/33 53/110/33
|
||||
f 50/111/34 52/101/34 55/101/34
|
||||
f 56/112/34 51/112/34 49/92/34
|
||||
f 55/101/34 52/101/34 51/112/34
|
||||
f 55/101/34 52/101/34 57/113/34
|
||||
f 58/114/35 15/115/35 59/116/35
|
||||
f 60/117/36 17/118/36 16/119/36
|
||||
f 61/120/37 59/121/37 17/67/37
|
||||
f 62/122/38 16/123/38 15/124/38
|
||||
f 63/125/39 21/126/39 64/127/39
|
||||
f 65/128/40 22/65/40 17/118/40
|
||||
f 64/129/41 31/130/41 65/131/41
|
||||
f 60/132/42 17/70/42 63/133/42
|
||||
f 64/129/41 31/130/41 66/134/41
|
||||
f 66/128/43 67/65/43 30/64/43
|
||||
f 68/135/44 13/121/44 69/136/44
|
||||
f 70/137/45 11/138/45 13/139/45
|
||||
f 71/140/46 69/141/46 12/142/46
|
||||
f 72/143/47 12/70/47 11/124/47
|
||||
f 73/144/48 25/61/48 74/145/48
|
||||
f 72/146/49 12/142/49 26/64/49
|
||||
f 74/147/50 75/148/50 72/149/50
|
||||
f 76/150/51 26/70/51 73/151/51
|
||||
f 77/152/51 30/153/51 73/151/51
|
||||
f 73/144/52 25/61/52 64/127/52
|
||||
f 78/154/53 61/120/53 79/155/53
|
||||
f 79/155/54 42/76/54 41/78/54
|
||||
f 80/156/55 63/125/55 81/157/55
|
||||
f 81/157/56 43/79/56 80/156/56
|
||||
f 82/158/57 65/128/57 79/159/57
|
||||
f 79/159/58 42/81/58 82/158/58
|
||||
f 81/160/59 64/129/59 65/131/59
|
||||
f 82/161/60 45/83/60 81/160/60
|
||||
f 79/162/61 60/132/61 80/163/61
|
||||
f 80/163/62 46/85/62 42/87/62
|
||||
f 81/160/63 64/129/63 83/164/63
|
||||
f 83/164/64 47/88/64 81/160/64
|
||||
f 83/165/65 66/128/65 77/166/65
|
||||
f 84/167/66 68/135/66 71/168/66
|
||||
f 85/169/67 53/170/67 54/171/67
|
||||
f 86/172/68 70/137/68 68/173/68
|
||||
f 84/174/69 54/110/69 48/175/69
|
||||
f 85/174/70 71/140/70 72/146/70
|
||||
f 87/176/71 49/177/71 85/178/71
|
||||
f 87/92/72 72/143/72 86/90/72
|
||||
f 86/179/10 48/180/10 87/181/10
|
||||
f 88/182/73 73/144/73 89/183/73
|
||||
f 89/183/74 50/93/74 88/182/74
|
||||
f 87/184/75 72/146/75 90/185/75
|
||||
f 90/182/76 56/186/76 49/93/76
|
||||
f 89/100/77 74/147/77 87/98/77
|
||||
f 87/176/6 49/177/6 50/187/6
|
||||
f 90/188/78 76/150/78 73/151/78
|
||||
f 88/189/79 55/190/79 90/191/79
|
||||
f 91/192/80 77/152/80 88/193/80
|
||||
f 88/189/81 55/190/81 91/194/81
|
||||
f 88/182/82 73/144/82 64/127/82
|
||||
f 92/195/83 58/114/83 78/196/83
|
||||
f 79/159/84 60/117/84 62/197/84
|
||||
f 92/198/85 93/199/85 94/200/85
|
||||
f 95/201/86 62/122/86 92/202/86
|
||||
f 91/203/16 57/204/16 83/205/16
|
||||
f 42/76/87 79/155/87 19/77/87
|
||||
f 40/74/88 93/206/88 92/195/88
|
||||
f 43/207/89 20/84/89 81/160/89
|
||||
f 94/208/90 93/209/90 7/210/90
|
||||
f 2/2/91 8/211/91 3/3/91
|
||||
f 5/5/92 7/212/92 6/6/92
|
||||
f 3/8/3 6/213/3 7/9/3
|
||||
f 8/214/4 2/10/4 4/12/4
|
||||
f 1/14/5 7/25/5 5/15/5
|
||||
f 3/215/6 8/16/6 6/18/6
|
||||
f 2/13/7 5/15/7 10/20/7
|
||||
f 12/22/6 69/216/6 13/23/6
|
||||
f 14/24/8 19/30/8 7/25/8
|
||||
f 59/217/6 15/26/6 17/28/6
|
||||
f 19/30/9 44/218/9 20/31/9
|
||||
f 31/42/6 21/32/6 22/33/6
|
||||
f 23/34/10 29/40/10 24/35/10
|
||||
f 75/219/93 25/36/93 12/22/93
|
||||
f 20/31/94 27/38/94 29/40/94
|
||||
f 30/41/6 67/220/6 31/42/6
|
||||
f 33/44/95 29/95/95 20/45/95
|
||||
f 34/47/96 35/221/96 18/48/96
|
||||
f 20/84/14 18/49/14 32/51/14
|
||||
f 34/53/15 23/102/15 29/54/15
|
||||
f 32/222/10 35/55/10 33/57/10
|
||||
f 20/42/6 29/58/6 18/33/6
|
||||
f 25/61/16 39/223/16 36/62/16
|
||||
f 38/224/17 37/63/17 22/65/17
|
||||
f 22/67/14 31/130/14 36/68/14
|
||||
f 39/225/15 25/69/15 37/71/15
|
||||
f 31/31/10 22/29/10 25/73/10
|
||||
f 37/37/6 38/33/6 36/42/6
|
||||
f 14/226/97 1/1/97 41/75/97
|
||||
f 19/77/98 14/227/98 41/78/98
|
||||
f 46/228/99 43/79/99 44/80/99
|
||||
f 45/229/100 42/81/100 18/48/100
|
||||
f 43/207/101 45/83/101 20/84/101
|
||||
f 44/86/102 19/230/102 42/87/102
|
||||
f 43/207/103 47/88/103 20/84/103
|
||||
f 10/91/104 9/231/104 49/92/104
|
||||
f 52/186/105 50/93/105 29/95/105
|
||||
f 23/46/106 9/109/106 49/97/106
|
||||
f 9/99/28 24/232/28 50/100/28
|
||||
f 51/112/29 52/101/29 23/102/29
|
||||
f 57/113/107 52/101/107 28/103/107
|
||||
f 5/105/31 2/233/31 54/106/31
|
||||
f 2/2/108 10/234/108 48/108/108
|
||||
f 9/109/109 5/5/109 53/110/109
|
||||
f 56/112/34 55/101/34 51/112/34
|
||||
f 61/235/110 58/114/110 59/116/110
|
||||
f 62/197/111 60/117/111 16/119/111
|
||||
f 60/236/112 61/120/112 17/67/112
|
||||
f 58/237/113 62/122/113 15/124/113
|
||||
f 21/126/114 31/60/114 64/127/114
|
||||
f 60/117/115 65/128/115 17/118/115
|
||||
f 31/130/41 22/67/41 65/131/41
|
||||
f 17/70/116 21/238/116 63/133/116
|
||||
f 31/130/41 67/239/41 66/134/41
|
||||
f 77/166/43 66/128/43 30/64/43
|
||||
f 71/168/117 68/135/117 69/136/117
|
||||
f 68/173/118 70/137/118 13/139/118
|
||||
f 72/146/119 71/140/119 12/142/119
|
||||
f 70/240/120 72/143/120 11/124/120
|
||||
f 25/61/121 75/241/121 74/145/121
|
||||
f 76/166/122 72/146/122 26/64/122
|
||||
f 75/148/123 12/67/123 72/149/123
|
||||
f 26/70/51 25/69/51 73/151/51
|
||||
f 30/153/51 25/69/51 73/151/51
|
||||
f 25/61/52 31/60/52 64/127/52
|
||||
f 61/120/124 60/236/124 79/155/124
|
||||
f 78/154/125 79/155/125 41/78/125
|
||||
f 63/125/126 64/127/126 81/157/126
|
||||
f 43/79/127 46/228/127 80/156/127
|
||||
f 65/128/128 60/117/128 79/159/128
|
||||
f 42/81/129 45/229/129 82/158/129
|
||||
f 82/161/59 81/160/59 65/131/59
|
||||
f 45/83/60 43/207/60 81/160/60
|
||||
f 60/132/130 63/133/130 80/163/130
|
||||
f 79/162/131 80/163/131 42/87/131
|
||||
f 64/129/132 66/134/132 83/164/132
|
||||
f 47/88/133 43/207/133 81/160/133
|
||||
f 91/242/65 83/165/65 77/166/65
|
||||
f 85/243/134 84/167/134 71/168/134
|
||||
f 84/244/67 85/169/67 54/171/67
|
||||
f 84/245/135 86/172/135 68/173/135
|
||||
f 86/172/136 84/245/136 48/108/136
|
||||
f 87/184/137 85/174/137 72/146/137
|
||||
f 49/93/138 53/107/138 85/245/138
|
||||
f 72/143/139 70/240/139 86/90/139
|
||||
f 48/180/10 49/246/10 87/181/10
|
||||
f 73/144/140 74/145/140 89/183/140
|
||||
f 50/97/141 55/96/141 88/185/141
|
||||
f 72/146/142 76/166/142 90/185/142
|
||||
f 87/184/143 90/185/143 49/97/143
|
||||
f 74/147/144 72/149/144 87/98/144
|
||||
f 89/247/6 87/176/6 50/187/6
|
||||
f 88/193/78 90/188/78 73/151/78
|
||||
f 55/190/79 56/248/79 90/191/79
|
||||
f 77/152/78 73/151/78 88/193/78
|
||||
f 55/190/145 57/249/145 91/194/145
|
||||
f 81/157/146 88/182/146 64/127/146
|
||||
f 58/114/147 61/235/147 78/196/147
|
||||
f 95/250/148 79/159/148 62/197/148
|
||||
f 95/251/149 92/198/149 94/200/149
|
||||
f 62/122/150 58/237/150 92/202/150
|
||||
f 57/252/151 28/253/151 83/165/151
|
||||
f 28/253/152 27/254/152 83/165/152
|
||||
f 27/255/153 47/256/153 83/205/153
|
||||
f 95/251/154 94/200/154 7/9/154
|
||||
f 79/159/155 95/250/155 7/212/155
|
||||
f 19/82/156 79/159/156 7/212/156
|
||||
f 41/75/157 40/74/157 92/195/157
|
||||
f 78/196/158 41/75/158 92/195/158
|
||||
f 29/257/159 52/190/159 88/189/159
|
||||
f 20/45/160 29/95/160 88/182/160
|
||||
f 81/157/161 20/45/161 88/182/161
|
||||
f 40/258/162 1/212/162 93/259/162
|
||||
f 93/209/163 1/260/163 7/210/163
|
||||
f 96/261/16 97/262/16 98/263/16
|
||||
f 99/264/17 100/265/17 101/266/17
|
||||
f 96/267/14 102/268/14 101/269/14
|
||||
f 97/270/15 100/271/15 99/272/15
|
||||
f 97/273/10 96/274/10 101/275/10
|
||||
f 98/276/6 99/277/6 103/278/6
|
||||
f 102/279/16 96/261/16 98/263/16
|
||||
f 103/280/17 99/264/17 101/266/17
|
||||
f 102/268/14 103/281/14 101/269/14
|
||||
f 98/282/15 97/270/15 99/272/15
|
||||
f 100/283/10 97/273/10 101/275/10
|
||||
f 102/284/6 98/276/6 103/278/6
|
||||
f 104/285/16 105/286/16 106/287/16
|
||||
f 107/288/17 108/289/17 109/290/17
|
||||
f 104/291/14 110/292/14 109/293/14
|
||||
f 105/294/15 108/295/15 107/296/15
|
||||
f 105/297/10 104/298/10 109/299/10
|
||||
f 106/300/6 107/301/6 111/302/6
|
||||
f 110/303/16 104/285/16 106/287/16
|
||||
f 111/304/17 107/288/17 109/290/17
|
||||
f 110/292/14 111/305/14 109/293/14
|
||||
f 106/306/15 105/294/15 107/296/15
|
||||
f 108/307/10 105/297/10 109/299/10
|
||||
f 110/308/6 106/300/6 111/302/6
|
||||
f 112/309/16 113/310/16 114/311/16
|
||||
f 115/312/17 116/313/17 117/314/17
|
||||
f 112/267/14 118/268/14 117/269/14
|
||||
f 113/270/15 116/271/15 115/272/15
|
||||
f 113/315/10 112/316/10 117/317/10
|
||||
f 114/318/6 115/319/6 119/320/6
|
||||
f 118/321/16 112/309/16 114/311/16
|
||||
f 119/322/17 115/312/17 117/314/17
|
||||
f 118/268/14 119/281/14 117/269/14
|
||||
f 114/282/15 113/270/15 115/272/15
|
||||
f 116/323/10 113/315/10 117/317/10
|
||||
f 118/324/6 114/318/6 119/320/6
|
|
@ -11,7 +11,7 @@ import dark.core.interfaces.IInvBox;
|
|||
import dark.core.prefab.invgui.InvChest;
|
||||
|
||||
/** Prefab for simple object who only need basic inv support and nothing more
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public class TileEntityInv extends TileEntityAdvanced implements IExternalInv, ISidedInventory
|
||||
{
|
||||
|
@ -129,7 +129,11 @@ public class TileEntityInv extends TileEntityAdvanced implements IExternalInv, I
|
|||
@Override
|
||||
public boolean canRemove(ItemStack stack, int slot, ForgeDirection side)
|
||||
{
|
||||
return false;
|
||||
if (slot >= this.getSizeInventory())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,6 +8,9 @@ import java.util.Map.Entry;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFluid;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
@ -59,7 +62,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Gets the block's fluid if it has one
|
||||
*
|
||||
*
|
||||
* @param world - world we are working in
|
||||
* @param vector - 3D location in world
|
||||
* @return @Fluid that the block is */
|
||||
|
@ -98,10 +101,10 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Drains a block of fluid
|
||||
*
|
||||
*
|
||||
* @Note sets the block with a client update only. Doesn't tick the block allowing for better
|
||||
* placement of fluid that can flow infinitely
|
||||
*
|
||||
*
|
||||
* @param doDrain - do the action
|
||||
* @return FluidStack drained from the block */
|
||||
public static FluidStack drainBlock(World world, Vector3 node, boolean doDrain)
|
||||
|
@ -110,7 +113,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Drains a block of fluid
|
||||
*
|
||||
*
|
||||
* @param doDrain - do the action
|
||||
* @param update - block update flag to use
|
||||
* @return FluidStack drained from the block */
|
||||
|
@ -209,9 +212,9 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Helper method to fill a location with a fluid
|
||||
*
|
||||
*
|
||||
* Note: This does not update the block to prevent the liquid from flowing
|
||||
*
|
||||
*
|
||||
* @return */
|
||||
public static int fillBlock(World world, Vector3 node, FluidStack stack, boolean doFill)
|
||||
{
|
||||
|
@ -245,7 +248,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Fills all instances of IFluidHandler surrounding the origin
|
||||
*
|
||||
*
|
||||
* @param stack - FluidStack that will be filled into the tanks
|
||||
* @param doFill - Actually perform the action or simulate action
|
||||
* @param ignore - ForgeDirections to ignore
|
||||
|
@ -278,7 +281,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Fills an instance of IFluidHandler in the given direction
|
||||
*
|
||||
*
|
||||
* @param stack - FluidStack to fill the tank will
|
||||
* @param doFill - Actually perform the action or simulate action
|
||||
* @param direction - direction to fill in from the origin
|
||||
|
@ -293,6 +296,97 @@ public class FluidHelper
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Does all the work needed to fill or drain an item of fluid when a player clicks on the block. */
|
||||
public static boolean playerActivatedFluidItem(World world, int x, int y, int z, EntityPlayer entityplayer, int side)
|
||||
{
|
||||
if (entityplayer != null && !entityplayer.isSneaking())
|
||||
{
|
||||
ItemStack current = entityplayer.inventory.getCurrentItem().copy();
|
||||
|
||||
if (current != null && world.getBlockTileEntity(x, y, z) instanceof IFluidHandler)
|
||||
{
|
||||
IFluidHandler tank = (IFluidHandler) world.getBlockTileEntity(x, y, z);
|
||||
ItemStack reStack = FluidHelper.drainItem(current, tank, ForgeDirection.getOrientation(side), !entityplayer.capabilities.isCreativeMode);
|
||||
if (reStack != null && reStack.isItemEqual(current))
|
||||
{
|
||||
reStack = FluidHelper.fillItem(current, tank, ForgeDirection.getOrientation(side), !entityplayer.capabilities.isCreativeMode);
|
||||
}
|
||||
if (!entityplayer.capabilities.isCreativeMode && (reStack == null || !reStack.isItemEqual(current)))
|
||||
{
|
||||
if (current.stackSize > 1)
|
||||
{
|
||||
if (reStack != null && !entityplayer.inventory.addItemStackToInventory(reStack))
|
||||
{
|
||||
ItemWorldHelper.dropItemStack(world, new Vector3(x, y, z), reStack, true);
|
||||
}
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, AutoCraftingManager.consumeItem(current, 1));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, reStack);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Drains an item of fluid and fills the tank with what was drained
|
||||
*
|
||||
* @param consumeItem - should it consume the item. Used mainly for creative mode players. This
|
||||
* does effect the return of the method
|
||||
* @return Item stack that would be returned if the item was drain of its fluid. Water bucket ->
|
||||
* empty bucket */
|
||||
public static ItemStack drainItem(ItemStack stack, IFluidHandler tank, ForgeDirection side, boolean consumeItem)
|
||||
{
|
||||
if (stack != null && tank != null)
|
||||
{
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(stack);
|
||||
if (liquid != null)
|
||||
{
|
||||
int fill = tank.fill(side, liquid, true);
|
||||
if (fill > 0 && consumeItem)
|
||||
{
|
||||
return AutoCraftingManager.consumeItem(stack.copy(), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
/** Fills an item with fluid from the tank
|
||||
*
|
||||
* @param consumeItem - should it consume the item. Used mainly for creative mode players. This
|
||||
* does effect the return of the method
|
||||
* @return Item stack that would be returned if the item was filled with fluid. empty bucket ->
|
||||
* water bucket */
|
||||
public static ItemStack fillItem(ItemStack stack, IFluidHandler tank, ForgeDirection side, boolean consumeItem)
|
||||
{
|
||||
if (stack != null && tank != null)
|
||||
{
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(stack);
|
||||
FluidStack drainStack = tank.drain(side, Integer.MAX_VALUE, false);
|
||||
if (liquid == null && drainStack != null)
|
||||
{
|
||||
ItemStack liquidItem = FluidContainerRegistry.fillFluidContainer(drainStack, stack);
|
||||
liquid = FluidContainerRegistry.getFluidForFilledItem(liquidItem);
|
||||
tank.drain(side, liquid, true);
|
||||
|
||||
if (liquid != null)
|
||||
{
|
||||
if (consumeItem)
|
||||
{
|
||||
return liquidItem;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
/** Builds a list of fluidStacks from FluidTankInfo general taken from an instanceof
|
||||
* IFluidHandler */
|
||||
public static List<FluidStack> getFluidList(FluidTankInfo... fluidTankInfos)
|
||||
|
@ -328,6 +422,10 @@ public class FluidHelper
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* Fluid restriction handler for color codes
|
||||
*/
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onLiquidRegistered(FluidRegisterEvent event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue