mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-20 20:22:21 +00:00
Work on the Effect jar, which is finally done! \o/
This commit is contained in:
1 parent
ebb8298c9d
commit
092c076dba
24 files changed
+1182
-223
No files matched your search
@@ -1,3 +1,8 @@
|
||||
Added the Bee Collector's Jar.
|
||||
Created an alternate recipe for the Temporal Frame that is always active.
|
||||
Adjusted TC3 alternate recipe for the Temporal Frame.
|
||||
Fixed an issue with the "Pick Block" function on the Greatwood & Silverwood planks. Should also stop NEI from providing incorrect block info on them.
|
||||
Fixed the Node flower growing flowers.
|
||||
Adding Apatite bees.
|
||||
|
||||
1.4.6
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<entry key="tile.tb.slab.wood.greatwood.name">Greatwood Slab</entry>
|
||||
<entry key="tile.tb.planks.silverwood.name">Silverwood Planks</entry>
|
||||
<entry key="tile.tb.slab.wood.silverwood.name">Silverwood Slab</entry>
|
||||
<entry key="tile.tb.effectJar.name">Bee Collector's Jar</entry>
|
||||
|
||||
<!-- Comb names -->
|
||||
<entry key="tb.comb.occult">Occult Comb</entry>
|
||||
|
||||
@@ -0,0 +1,582 @@
|
||||
# Blender v2.61 (sub 0) OBJ File: 'untitled.blend'
|
||||
# www.blender.org
|
||||
o jarLid
|
||||
v 0.662251 0.792153 0.427678
|
||||
v 0.662251 0.792153 0.561617
|
||||
v 0.567542 0.792153 0.656327
|
||||
v 0.433603 0.792153 0.656327
|
||||
v 0.338893 0.792153 0.561618
|
||||
v 0.338893 0.792153 0.427678
|
||||
v 0.500572 0.792153 0.494648
|
||||
v 0.433603 0.792153 0.332969
|
||||
v 0.567542 0.792153 0.332969
|
||||
v 0.670335 0.764287 0.424330
|
||||
v 0.670335 0.764287 0.564966
|
||||
v 0.570890 0.764287 0.664411
|
||||
v 0.430254 0.764287 0.664411
|
||||
v 0.330809 0.764287 0.564966
|
||||
v 0.330809 0.764287 0.424330
|
||||
v 0.430254 0.764287 0.324885
|
||||
v 0.500572 0.764287 0.494648
|
||||
v 0.570890 0.764287 0.324885
|
||||
vt 0.492673 0.825009
|
||||
vt 0.525702 0.795846
|
||||
vt 0.646961 0.969937
|
||||
vt 0.608157 0.990808
|
||||
vt 0.031140 0.631984
|
||||
vt 0.074045 0.639292
|
||||
vt 0.050933 0.785797
|
||||
vt 0.006872 0.785813
|
||||
vt 0.081042 0.977922
|
||||
vt 0.038143 0.987974
|
||||
vt 0.013744 0.777223
|
||||
vt 0.057805 0.777207
|
||||
vt 0.342147 0.199526
|
||||
vt 0.338921 0.243469
|
||||
vt 0.187294 0.207947
|
||||
vt 0.197740 0.165696
|
||||
vt 0.544028 0.191123
|
||||
vt 0.550896 0.234645
|
||||
vt 0.600295 0.357122
|
||||
vt 0.644058 0.362232
|
||||
vt 0.602062 0.512194
|
||||
vt 0.560298 0.499944
|
||||
vt 0.600562 0.155067
|
||||
vt 0.644339 0.150074
|
||||
vt 0.560944 0.012139
|
||||
vt 0.602740 0.000000
|
||||
vt 0.608113 0.498928
|
||||
vt 0.649745 0.750816
|
||||
vt 0.324872 0.675127
|
||||
vt 0.400562 0.350255
|
||||
vt 0.148673 0.391886
|
||||
vt 0.000000 0.599437
|
||||
vt 0.046785 0.851326
|
||||
vt 0.005154 0.599437
|
||||
vt 0.330026 0.675127
|
||||
vt 0.249183 1.000000
|
||||
vt 0.041631 0.851326
|
||||
vt 0.501072 0.958366
|
||||
vt 0.324194 0.325913
|
||||
vt 0.648389 0.190915
|
||||
vt 0.648389 0.460910
|
||||
vt 0.458480 0.651825
|
||||
vt 0.189908 0.651825
|
||||
vt 0.017180 0.452320
|
||||
vt 0.341374 0.317323
|
||||
vt 0.207088 0.643235
|
||||
vt 0.025770 0.189197
|
||||
vt 0.349964 0.324195
|
||||
vt 0.025770 0.459192
|
||||
vt 0.201935 0.000000
|
||||
vt 0.336220 0.325913
|
||||
vt 0.012026 0.190915
|
||||
vt 0.458481 0.000000
|
||||
vt 0.189909 -0.000000
|
||||
vn 0.679110 0.278604 -0.679110
|
||||
vn 0.960403 0.278615 0.000000
|
||||
vn 0.679109 0.278615 0.679106
|
||||
vn 0.000000 0.278615 0.960403
|
||||
vn -0.679105 0.278615 0.679109
|
||||
vn -0.960403 0.278615 0.000000
|
||||
vn -0.679105 0.278616 -0.679109
|
||||
vn 0.000000 0.278615 -0.960403
|
||||
vn 0.620930 0.740440 -0.257210
|
||||
vn 0.257210 0.740440 -0.620930
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.620930 0.740440 0.257179
|
||||
vn 0.257210 0.740440 0.620930
|
||||
vn -0.257179 0.740440 0.620930
|
||||
vn -0.620930 0.740440 0.257210
|
||||
vn -0.620930 0.740440 -0.257210
|
||||
vn -0.257179 0.740440 -0.620930
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.328410 -0.513199 -0.792901
|
||||
vn 0.792901 -0.513199 -0.328410
|
||||
vn 0.792901 -0.513199 0.328440
|
||||
vn 0.328440 -0.513199 0.792901
|
||||
vn -0.328440 -0.513199 0.792901
|
||||
vn -0.792932 -0.513199 0.328440
|
||||
vn -0.792901 -0.513199 -0.328440
|
||||
vn -0.328440 -0.513199 -0.792901
|
||||
s off
|
||||
f 1/1/1 10/2/1 18/3/1
|
||||
f 1/1/1 18/3/1 9/4/1
|
||||
f 10/5/2 1/6/2 2/7/2
|
||||
f 10/5/2 2/7/2 11/8/2
|
||||
f 3/9/3 12/10/3 11/11/3
|
||||
f 3/9/3 11/11/3 2/12/3
|
||||
f 4/13/4 13/14/4 12/15/4
|
||||
f 4/13/4 12/15/4 3/16/4
|
||||
f 5/17/5 14/18/5 13/14/5
|
||||
f 5/17/5 13/14/5 4/13/5
|
||||
f 6/19/6 15/20/6 14/21/6
|
||||
f 6/19/6 14/21/6 5/22/6
|
||||
f 8/23/7 16/24/7 15/20/7
|
||||
f 8/23/7 15/20/7 6/19/7
|
||||
f 9/25/8 18/26/8 16/24/8
|
||||
f 9/25/8 16/24/8 8/23/8
|
||||
s 1
|
||||
f 1/27/9 9/28/10 7/29/11
|
||||
f 2/30/12 1/27/9 7/29/11
|
||||
f 3/31/13 2/30/12 7/29/11
|
||||
f 4/32/14 3/31/13 7/29/11
|
||||
f 5/33/15 4/34/14 7/35/11
|
||||
f 6/36/16 5/37/15 7/29/11
|
||||
f 8/38/17 6/36/16 7/29/11
|
||||
f 9/28/10 8/38/17 7/29/11
|
||||
f 17/39/18 18/40/19 10/41/20
|
||||
f 11/42/21 17/39/18 10/41/20
|
||||
f 12/43/22 17/39/18 11/42/21
|
||||
f 13/44/23 17/45/18 12/46/22
|
||||
f 14/47/24 17/48/18 13/49/23
|
||||
f 15/50/25 17/51/18 14/52/24
|
||||
f 16/53/26 17/39/18 15/54/25
|
||||
f 18/40/19 17/39/18 16/53/26
|
||||
o jarBase
|
||||
v 0.586676 0.028885 0.286775
|
||||
v 0.586676 0.627663 0.286775
|
||||
v 0.414468 0.627663 0.286775
|
||||
v 0.414468 0.028885 0.286775
|
||||
v 0.292699 0.627663 0.408544
|
||||
v 0.292699 0.028885 0.408544
|
||||
v 0.292699 0.627663 0.580752
|
||||
v 0.292699 0.028885 0.580752
|
||||
v 0.414468 0.627663 0.702521
|
||||
v 0.414468 0.028885 0.702521
|
||||
v 0.586676 0.627663 0.702521
|
||||
v 0.586676 0.028885 0.702521
|
||||
v 0.708445 0.627663 0.580752
|
||||
v 0.708445 0.028885 0.580752
|
||||
v 0.708445 0.627663 0.408544
|
||||
v 0.708445 0.028885 0.408544
|
||||
v 0.500572 0.017159 0.494648
|
||||
v 0.560845 0.706413 0.349137
|
||||
v 0.440299 0.706413 0.349137
|
||||
v 0.355061 0.706413 0.434375
|
||||
v 0.355061 0.706413 0.554921
|
||||
v 0.440300 0.706413 0.640159
|
||||
v 0.560845 0.706413 0.640159
|
||||
v 0.646083 0.706413 0.554920
|
||||
v 0.646083 0.706413 0.434375
|
||||
v 0.560845 0.764881 0.349137
|
||||
v 0.440299 0.764881 0.349137
|
||||
v 0.355061 0.764881 0.434375
|
||||
v 0.355061 0.764881 0.554921
|
||||
v 0.440300 0.764881 0.640159
|
||||
v 0.560845 0.764881 0.640159
|
||||
v 0.646083 0.764881 0.554920
|
||||
v 0.646083 0.764881 0.434375
|
||||
v 0.596243 0.003573 0.263678
|
||||
v 0.404901 0.003573 0.263678
|
||||
v 0.404901 0.633581 0.263678
|
||||
v 0.596243 0.633580 0.263678
|
||||
v 0.269602 0.003573 0.398977
|
||||
v 0.269602 0.633581 0.398977
|
||||
v 0.269602 0.003573 0.590319
|
||||
v 0.269602 0.633581 0.590319
|
||||
v 0.404901 0.003573 0.725618
|
||||
v 0.404901 0.633581 0.725618
|
||||
v 0.596243 0.003573 0.725618
|
||||
v 0.596243 0.633581 0.725618
|
||||
v 0.731542 0.003573 0.590319
|
||||
v 0.731542 0.633581 0.590319
|
||||
v 0.731542 0.003573 0.398977
|
||||
v 0.731542 0.633580 0.398977
|
||||
v 0.500572 0.003573 0.494648
|
||||
v 0.433603 0.721081 0.332969
|
||||
v 0.567542 0.721080 0.332969
|
||||
v 0.338893 0.721081 0.427678
|
||||
v 0.338893 0.721081 0.561618
|
||||
v 0.433603 0.721081 0.656327
|
||||
v 0.567542 0.721081 0.656327
|
||||
v 0.662251 0.721081 0.561617
|
||||
v 0.662251 0.721080 0.427678
|
||||
v 0.433603 0.764830 0.332969
|
||||
v 0.567542 0.764830 0.332969
|
||||
v 0.338893 0.764830 0.427678
|
||||
v 0.338893 0.764830 0.561618
|
||||
v 0.433603 0.764830 0.656327
|
||||
v 0.567542 0.764830 0.656327
|
||||
v 0.662251 0.764830 0.561617
|
||||
v 0.662251 0.764830 0.427678
|
||||
vt 0.897412 0.384835
|
||||
vt 0.897412 0.173090
|
||||
vt 0.797595 0.173090
|
||||
vt 0.797595 0.384835
|
||||
vt 0.818211 0.268012
|
||||
vt 0.818211 0.056267
|
||||
vt 0.718393 0.056267
|
||||
vt 0.718393 0.268012
|
||||
vt 0.777909 0.678223
|
||||
vt 0.777909 0.889966
|
||||
vt 0.877726 0.889966
|
||||
vt 0.877726 0.678223
|
||||
vt 0.817596 0.319163
|
||||
vt 0.817596 0.530907
|
||||
vt 0.917413 0.530907
|
||||
vt 0.917413 0.319163
|
||||
vt 0.882340 0.406610
|
||||
vt 0.882340 0.618355
|
||||
vt 0.982158 0.618355
|
||||
vt 0.982158 0.406610
|
||||
vt 0.881285 0.612768
|
||||
vt 0.881285 0.824513
|
||||
vt 0.981102 0.824513
|
||||
vt 0.981102 0.612768
|
||||
vt 0.670291 0.319645
|
||||
vt 0.670291 0.531390
|
||||
vt 0.770109 0.531390
|
||||
vt 0.770109 0.319645
|
||||
vt 0.852746 0.536544
|
||||
vt 0.852746 0.324799
|
||||
vt 0.752929 0.324799
|
||||
vt 0.752929 0.536544
|
||||
vt 0.854462 0.336299
|
||||
vt 0.824517 0.286892
|
||||
vt 0.754645 0.286892
|
||||
vt 0.754645 0.336299
|
||||
vt 0.984538 0.633510
|
||||
vt 0.984538 0.584103
|
||||
vt 0.914665 0.584103
|
||||
vt 0.884720 0.633510
|
||||
vt 0.759011 0.817811
|
||||
vt 0.788956 0.867218
|
||||
vt 0.858828 0.867218
|
||||
vt 0.858828 0.817811
|
||||
vt 0.788390 0.950593
|
||||
vt 0.788390 1.000000
|
||||
vt 0.858262 1.000000
|
||||
vt 0.888207 0.950593
|
||||
vt 0.823928 0.889797
|
||||
vt 0.853874 0.939204
|
||||
vt 0.923746 0.939204
|
||||
vt 0.923746 0.889797
|
||||
vt 0.877361 0.869181
|
||||
vt 0.877361 0.918588
|
||||
vt 0.947233 0.918588
|
||||
vt 0.977178 0.869181
|
||||
vt 0.668573 0.536544
|
||||
vt 0.698519 0.585951
|
||||
vt 0.768391 0.585951
|
||||
vt 0.768391 0.536544
|
||||
vt 0.752929 0.585951
|
||||
vt 0.822801 0.585951
|
||||
vt 0.750644 0.137427
|
||||
vt 0.750644 0.096811
|
||||
vt 0.680772 0.096811
|
||||
vt 0.680772 0.137427
|
||||
vt 0.979701 0.372791
|
||||
vt 0.979701 0.332175
|
||||
vt 0.909828 0.332175
|
||||
vt 0.909828 0.372791
|
||||
vt 0.790674 0.862064
|
||||
vt 0.790674 0.902681
|
||||
vt 0.860546 0.902681
|
||||
vt 0.860546 0.862064
|
||||
vt 0.707645 0.959383
|
||||
vt 0.707645 1.000000
|
||||
vt 0.777517 1.000000
|
||||
vt 0.777517 0.959383
|
||||
vt 0.685512 0.880792
|
||||
vt 0.685512 0.921408
|
||||
vt 0.755384 0.921408
|
||||
vt 0.755384 0.880792
|
||||
vt 0.666048 0.925460
|
||||
vt 0.666048 0.966076
|
||||
vt 0.735920 0.966076
|
||||
vt 0.735920 0.925460
|
||||
vt 0.683057 0.585951
|
||||
vt 0.683057 0.626568
|
||||
vt 0.752929 0.626568
|
||||
vt 0.822801 0.626568
|
||||
vt 0.718750 0.375000
|
||||
vt 0.875000 0.375000
|
||||
vt 0.843750 0.687500
|
||||
vt 0.687500 0.656250
|
||||
vt 0.967358 0.400183
|
||||
vt 0.873608 0.400183
|
||||
vt 0.873608 0.118933
|
||||
vt 0.967358 0.087683
|
||||
vt 0.822829 0.901835
|
||||
vt 0.666579 0.901835
|
||||
vt 0.666579 0.620585
|
||||
vt 0.822829 0.620585
|
||||
vt 0.982820 0.535099
|
||||
vt 0.857820 0.535099
|
||||
vt 0.857820 0.253849
|
||||
vt 0.982820 0.222599
|
||||
vt 0.834116 0.281250
|
||||
vt 0.677866 0.281250
|
||||
vt 0.677866 0.000000
|
||||
vt 0.834116 0.000000
|
||||
vt 0.889178 0.312500
|
||||
vt 0.795428 0.312500
|
||||
vt 0.795428 0.000000
|
||||
vt 0.889178 0.031250
|
||||
vt 0.679410 0.005633
|
||||
vt 0.835660 0.005633
|
||||
vt 0.835660 0.286883
|
||||
vt 0.710660 0.286883
|
||||
vt 0.667297 0.383590
|
||||
vt 0.792297 0.383590
|
||||
vt 0.792297 0.664840
|
||||
vt 0.667297 0.664840
|
||||
vt 0.812500 0.750000
|
||||
vt 0.687500 0.718750
|
||||
vt 0.982168 0.829767
|
||||
vt 0.982168 0.986017
|
||||
vt 0.919668 0.954767
|
||||
vt 0.919668 0.861017
|
||||
vt 0.817675 0.867975
|
||||
vt 0.661425 0.867975
|
||||
vt 0.692675 0.774225
|
||||
vt 0.786425 0.774225
|
||||
vt 0.875000 0.656250
|
||||
vt 0.875000 0.531250
|
||||
vt 0.937500 0.531250
|
||||
vt 0.937500 0.656250
|
||||
vt 0.984538 0.121564
|
||||
vt 0.828288 0.121564
|
||||
vt 0.859538 0.027814
|
||||
vt 0.984538 0.027814
|
||||
vt 0.826178 0.623521
|
||||
vt 0.826178 0.467271
|
||||
vt 0.888678 0.498521
|
||||
vt 0.888678 0.592271
|
||||
vt 0.832637 0.797125
|
||||
vt 0.957637 0.797125
|
||||
vt 0.957637 0.890875
|
||||
vt 0.832637 0.890875
|
||||
vt 0.937500 0.375000
|
||||
vt 0.875000 0.500000
|
||||
vt 0.812500 0.781250
|
||||
vt 0.687500 0.781250
|
||||
vt 0.875000 0.781250
|
||||
vt 0.875000 0.812500
|
||||
vt 0.958224 0.659120
|
||||
vt 0.864474 0.659120
|
||||
vt 0.864474 0.627870
|
||||
vt 0.958224 0.627870
|
||||
vt 0.872564 0.031250
|
||||
vt 0.810064 0.031250
|
||||
vt 0.810064 0.000000
|
||||
vt 0.872564 0.000000
|
||||
vt 0.913143 0.617084
|
||||
vt 0.788143 0.617084
|
||||
vt 0.788143 0.585834
|
||||
vt 0.913143 0.585834
|
||||
vt 0.917884 0.561021
|
||||
vt 0.980384 0.561021
|
||||
vt 0.980384 0.592271
|
||||
vt 0.917884 0.592271
|
||||
vt 0.803431 0.765462
|
||||
vt 0.928431 0.765462
|
||||
vt 0.928431 0.796712
|
||||
vt 0.803431 0.796712
|
||||
vt 0.679323 0.945850
|
||||
vt 0.741823 0.945850
|
||||
vt 0.741823 0.977100
|
||||
vt 0.679323 0.977100
|
||||
vt 0.856845 0.759676
|
||||
vt 0.757027 0.659859
|
||||
vt 0.715682 0.759676
|
||||
vt 0.757027 0.859494
|
||||
vt 0.779536 1.000000
|
||||
vt 0.779536 0.858837
|
||||
vt 0.679718 0.958655
|
||||
vt 0.884507 0.957419
|
||||
vt 0.784690 0.857601
|
||||
vt 0.784690 0.998764
|
||||
vt 0.925853 0.900182
|
||||
vt 0.784690 0.900182
|
||||
vt 0.884507 1.000000
|
||||
vt 0.954944 0.896941
|
||||
vt 0.855127 0.996758
|
||||
vt 0.996290 0.996758
|
||||
vt 0.856845 0.618513
|
||||
vt 0.956662 0.659859
|
||||
vt 0.981102 0.318719
|
||||
vt 0.856102 0.443719
|
||||
vt 0.793602 0.256219
|
||||
vt 0.988800 0.133264
|
||||
vt 0.988800 0.289514
|
||||
vt 0.801300 0.227014
|
||||
vt 0.862974 0.068719
|
||||
vt 0.987974 0.162469
|
||||
vt 0.800474 0.256219
|
||||
vt 0.819698 0.018898
|
||||
vt 0.975948 0.018898
|
||||
vt 0.913448 0.206398
|
||||
vt 0.812500 0.093750
|
||||
vt 0.906250 0.000000
|
||||
vt 1.000000 0.187500
|
||||
vt 0.661904 0.317001
|
||||
vt 0.661904 0.160751
|
||||
vt 0.849404 0.254501
|
||||
vt 0.750500 0.438566
|
||||
vt 0.656750 0.313566
|
||||
vt 0.844250 0.251066
|
||||
vt 0.891288 0.397334
|
||||
vt 0.735038 0.397334
|
||||
vt 0.828788 0.209834
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.707107 -0.000000 0.707107
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn 0.707107 0.000000 -0.707107
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn -0.707107 0.000000 -0.707107
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn -0.707107 -0.000000 0.707107
|
||||
vn 0.000000 -0.620815 0.783957
|
||||
vn 0.554342 -0.620814 0.554342
|
||||
vn 0.783958 -0.620814 -0.000000
|
||||
vn 0.554339 -0.620816 -0.554342
|
||||
vn 0.000000 -0.620815 -0.783957
|
||||
vn -0.554342 -0.620816 -0.554340
|
||||
vn -0.783957 -0.620815 -0.000000
|
||||
vn -0.554342 -0.620814 0.554342
|
||||
vn 0.707102 0.000000 -0.707111
|
||||
vn -0.707111 0.000000 -0.707103
|
||||
vn 0.000004 0.620814 -0.783958
|
||||
vn -0.554340 0.620815 -0.554343
|
||||
vn -0.783958 0.620814 0.000000
|
||||
vn -0.554340 0.620815 0.554343
|
||||
vn 0.000000 0.620814 0.783958
|
||||
vn 0.554343 0.620815 0.554340
|
||||
vn 0.783958 0.620814 -0.000004
|
||||
vn 0.554342 0.620813 -0.554342
|
||||
vn -0.707103 0.000000 -0.707111
|
||||
vn -0.707103 0.000000 0.707111
|
||||
vn 0.707111 0.000000 0.707103
|
||||
vn 0.000000 0.999969 0.000000
|
||||
vn -0.302011 0.614032 0.729179
|
||||
vn 0.302011 0.614032 0.729179
|
||||
vn 0.729179 0.614032 0.302011
|
||||
vn 0.729179 0.614032 -0.302011
|
||||
vn 0.302011 0.614032 -0.729179
|
||||
vn -0.302011 0.614032 -0.729179
|
||||
vn -0.729179 0.614032 -0.302011
|
||||
vn -0.729179 0.614032 0.302011
|
||||
vn -0.297098 -0.630238 -0.717277
|
||||
vn 0.297098 -0.630238 -0.717277
|
||||
vn -0.717277 -0.630238 -0.297098
|
||||
vn -0.717277 -0.630238 0.297098
|
||||
vn -0.297098 -0.630238 0.717277
|
||||
vn 0.297098 -0.630238 0.717277
|
||||
vn 0.717277 -0.630238 0.297098
|
||||
vn 0.717277 -0.630238 -0.297098
|
||||
s off
|
||||
f 19/55/27 20/56/27 21/57/27
|
||||
f 19/55/27 21/57/27 22/58/27
|
||||
f 22/59/28 21/60/28 23/61/28
|
||||
f 22/59/28 23/61/28 24/62/28
|
||||
f 24/63/29 23/64/29 25/65/29
|
||||
f 24/63/29 25/65/29 26/66/29
|
||||
f 26/67/30 25/68/30 27/69/30
|
||||
f 26/67/30 27/69/30 28/70/30
|
||||
f 28/71/31 27/72/31 29/73/31
|
||||
f 28/71/31 29/73/31 30/74/31
|
||||
f 30/75/32 29/76/32 31/77/32
|
||||
f 30/75/32 31/77/32 32/78/32
|
||||
f 32/79/33 31/80/33 33/81/33
|
||||
f 32/79/33 33/81/33 34/82/33
|
||||
f 20/83/34 19/84/34 34/85/34
|
||||
f 20/83/34 34/85/34 33/86/34
|
||||
f 20/87/35 36/88/35 37/89/35
|
||||
f 20/87/35 37/89/35 21/90/35
|
||||
f 21/91/36 37/92/36 38/93/36
|
||||
f 21/91/36 38/93/36 23/94/36
|
||||
f 23/95/37 38/96/37 39/97/37
|
||||
f 23/95/37 39/97/37 25/98/37
|
||||
f 25/99/38 39/100/38 40/101/38
|
||||
f 25/99/38 40/101/38 27/102/38
|
||||
f 27/103/39 40/104/39 41/105/39
|
||||
f 27/103/39 41/105/39 29/106/39
|
||||
f 29/107/40 41/108/40 42/109/40
|
||||
f 29/107/40 42/109/40 31/110/40
|
||||
f 31/111/41 42/112/41 43/113/41
|
||||
f 31/111/41 43/113/41 33/114/41
|
||||
f 33/86/42 43/115/42 36/116/42
|
||||
f 33/86/42 36/116/42 20/83/42
|
||||
f 36/117/27 44/118/27 45/119/27
|
||||
f 36/117/27 45/119/27 37/120/27
|
||||
f 37/121/28 45/122/28 46/123/28
|
||||
f 37/121/28 46/123/28 38/124/28
|
||||
f 38/125/29 46/126/29 47/127/29
|
||||
f 38/125/29 47/127/29 39/128/29
|
||||
f 39/129/43 47/130/43 48/131/43
|
||||
f 39/129/43 48/131/43 40/132/43
|
||||
f 40/133/31 48/134/31 49/135/31
|
||||
f 40/133/31 49/135/31 41/136/31
|
||||
f 41/137/44 49/138/44 50/139/44
|
||||
f 41/137/44 50/139/44 42/140/44
|
||||
f 42/141/33 50/142/33 51/143/33
|
||||
f 42/141/33 51/143/33 43/115/33
|
||||
f 43/115/34 51/143/34 44/144/34
|
||||
f 43/115/34 44/144/34 36/116/34
|
||||
f 52/145/31 53/146/31 54/147/31
|
||||
f 52/145/31 54/147/31 55/148/31
|
||||
f 53/149/32 56/150/32 57/151/32
|
||||
f 53/149/32 57/151/32 54/152/32
|
||||
f 56/153/33 58/154/33 59/155/33
|
||||
f 56/153/33 59/155/33 57/156/33
|
||||
f 58/157/34 60/158/34 61/159/34
|
||||
f 58/157/34 61/159/34 59/160/34
|
||||
f 60/161/27 62/162/27 63/163/27
|
||||
f 60/161/27 63/163/27 61/164/27
|
||||
f 62/165/28 64/166/28 65/167/28
|
||||
f 62/165/28 65/167/28 63/168/28
|
||||
f 64/169/29 66/170/29 67/171/29
|
||||
f 64/169/29 67/171/29 65/172/29
|
||||
f 66/173/30 52/174/30 55/175/30
|
||||
f 66/173/30 55/175/30 67/176/30
|
||||
f 55/148/45 54/147/45 69/177/45
|
||||
f 55/148/45 69/177/45 70/178/45
|
||||
f 54/179/46 57/180/46 71/181/46
|
||||
f 54/179/46 71/181/46 69/182/46
|
||||
f 57/183/47 59/184/47 72/185/47
|
||||
f 57/183/47 72/185/47 71/186/47
|
||||
f 59/187/48 61/188/48 73/189/48
|
||||
f 59/187/48 73/189/48 72/190/48
|
||||
f 61/191/49 63/192/49 74/193/49
|
||||
f 61/191/49 74/193/49 73/194/49
|
||||
f 63/195/50 65/196/50 75/197/50
|
||||
f 63/195/50 75/197/50 74/198/50
|
||||
f 65/199/51 67/200/51 76/201/51
|
||||
f 65/199/51 76/201/51 75/202/51
|
||||
f 67/203/52 55/189/52 70/204/52
|
||||
f 67/203/52 70/204/52 76/146/52
|
||||
f 70/178/31 69/177/31 77/205/31
|
||||
f 70/178/31 77/205/31 78/206/31
|
||||
f 69/177/53 71/207/53 79/208/53
|
||||
f 69/177/53 79/208/53 77/205/53
|
||||
f 71/209/33 72/210/33 80/211/33
|
||||
f 71/209/33 80/211/33 79/212/33
|
||||
f 72/213/54 73/214/54 81/215/54
|
||||
f 72/213/54 81/215/54 80/216/54
|
||||
f 73/217/27 74/218/27 82/219/27
|
||||
f 73/217/27 82/219/27 81/220/27
|
||||
f 74/221/55 75/222/55 83/223/55
|
||||
f 74/221/55 83/223/55 82/224/55
|
||||
f 75/225/29 76/226/29 84/227/29
|
||||
f 75/225/29 84/227/29 83/228/29
|
||||
f 76/229/30 70/230/30 78/231/30
|
||||
f 76/229/30 78/231/30 84/232/30
|
||||
s 1
|
||||
f 35/233/56 19/234/57 22/235/58
|
||||
f 24/236/59 35/233/56 22/235/58
|
||||
f 26/237/60 35/238/56 24/239/59
|
||||
f 28/240/61 35/241/56 26/242/60
|
||||
f 30/243/62 35/244/56 28/245/61
|
||||
f 32/246/63 35/247/56 30/248/62
|
||||
f 34/249/64 35/233/56 32/250/63
|
||||
f 19/234/57 35/233/56 34/249/64
|
||||
f 53/251/65 52/252/66 68/253/18
|
||||
f 56/254/67 53/255/65 68/256/18
|
||||
f 58/257/68 56/258/67 68/259/18
|
||||
f 60/260/69 58/261/68 68/262/18
|
||||
f 62/263/70 60/264/69 68/265/18
|
||||
f 64/266/71 62/267/70 68/268/18
|
||||
f 66/269/72 64/270/71 68/271/18
|
||||
f 52/272/66 66/273/72 68/274/18
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
+14
-4
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.gui;
|
||||
package net.mysteriousages.utils.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -6,7 +6,13 @@ import java.util.List;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class SlotCustomItems extends Slot
|
||||
{
|
||||
private List<ItemStack> items;
|
||||
@@ -27,6 +33,10 @@ public class SlotCustomItems extends Slot
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return List of valid ItemStacks
|
||||
*/
|
||||
public List<ItemStack> getValidItems()
|
||||
{
|
||||
return this.items;
|
||||
@@ -40,7 +50,7 @@ public class SlotCustomItems extends Slot
|
||||
ItemStack s = this.items.get(i);
|
||||
if (s.itemID == newItem.itemID)
|
||||
{
|
||||
if (s.getItemDamage() == -1)
|
||||
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
||||
{
|
||||
contains = true;
|
||||
break;
|
||||
@@ -69,7 +79,7 @@ public class SlotCustomItems extends Slot
|
||||
ItemStack s = this.items.get(i);
|
||||
if (s.itemID == removeItem.itemID)
|
||||
{
|
||||
if (s.getItemDamage() == -1)
|
||||
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
||||
{
|
||||
this.items.remove(i);
|
||||
break;
|
||||
@@ -98,7 +108,7 @@ public class SlotCustomItems extends Slot
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = this.items.get(i).getItemDamage() == -1;
|
||||
flag = this.items.get(i).getItemDamage() ==OreDictionary.WILDCARD_VALUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -30,16 +30,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
@Override
|
||||
public boolean growFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
int blockDown = world.getBlockId(x, y - 1, z);
|
||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
||||
{
|
||||
int rand = world.rand.nextInt(10);
|
||||
world.setBlockMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
package thaumicbees.block;
|
||||
|
||||
import thaumicbees.gui.UIScreens;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import thaumicbees.client.gui.UIScreens;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.TabThaumicBees;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
public class BlockEffectJar extends BlockContainer
|
||||
{
|
||||
public BlockEffectJar(int id)
|
||||
{
|
||||
super(id, Material.glass);
|
||||
// Copy glass's block icon for the breaking & running textures.
|
||||
this.blockIcon = Block.glass.getIcon(0, 0);
|
||||
this.setCreativeTab(TabThaumicBees.tabThaumicBees);
|
||||
this.setUnlocalizedName("tb.effectJar");
|
||||
this.setBlockBounds(0.25f, 0f, 0.25f, 0.75f, 0.81f, 0.74f);
|
||||
this.setHardness(0.1f);
|
||||
this.setResistance(1.5f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -44,4 +48,57 @@ public class BlockEffectJar extends BlockContainer
|
||||
return new TileEntityEffectJar();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return CommonProxy.RenderIdEffectJar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int id, int meta)
|
||||
{
|
||||
super.breakBlock(world, x, y, z, id, meta);
|
||||
this.dropInventory(world, x, y, z);
|
||||
}
|
||||
|
||||
private void dropInventory(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity e = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if (e != null && e instanceof TileEntityEffectJar)
|
||||
{
|
||||
TileEntityEffectJar jar = (TileEntityEffectJar)e;
|
||||
|
||||
// 0 is the only droppable stack.
|
||||
ItemStack stack = jar.getStackInSlot(0);
|
||||
|
||||
if (stack != null && stack.stackSize > 0)
|
||||
{
|
||||
float pX = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||
float pY = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||
float pZ = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, x + pX, y + pY, z + pZ, stack.copy());
|
||||
|
||||
entityItem.motionX = world.rand.nextGaussian() * 0.05f;
|
||||
entityItem.motionY = world.rand.nextGaussian() * 0.05f + 0.2f;
|
||||
entityItem.motionZ = world.rand.nextGaussian() * 0.05f;
|
||||
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
stack.stackSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.VersionInfo;
|
||||
|
||||
@@ -8,8 +8,11 @@ import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
@@ -43,7 +46,7 @@ public class BlockWoodSlab extends BlockHalfSlab
|
||||
|
||||
protected ItemStack createStackedBlock(int meta)
|
||||
{
|
||||
return new ItemStack(Config.slabWoodHalf.blockID, 2, meta & 7);
|
||||
return new ItemStack(Config.planksWood.blockID, 1, meta & 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,4 +81,23 @@ public class BlockWoodSlab extends BlockHalfSlab
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":" + t.name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
{
|
||||
int id = world.getBlockId(x, y, z);
|
||||
|
||||
if (id == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = Item.itemsList[id];
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(id, 1, getDamageValue(world, x, y, z) & 7);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package thaumicbees.client.gui;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.mysteriousages.utils.gui.SlotCustomItems;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import forestry.api.core.ItemInterface;
|
||||
|
||||
public class ContainerEffectJar extends Container
|
||||
{
|
||||
public TileEntityEffectJar jar;
|
||||
|
||||
public int lastBeeHealth = 0;
|
||||
public int speciesColour = 0xffffff;
|
||||
|
||||
public ContainerEffectJar(TileEntityEffectJar tileEntityEffectJar, EntityPlayer player)
|
||||
{
|
||||
this.jar = tileEntityEffectJar;
|
||||
this.addSlotToContainer(new SlotCustomItems(this.jar, 0, 80, 22, new ItemStack[] { ItemInterface.getItem("beeDroneGE") }));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting)
|
||||
{
|
||||
super.addCraftingToCrafters(crafting);
|
||||
|
||||
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
||||
crafting.sendProgressBarUpdate(this, 1, this.jar.currentBeeColour);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (int i = 0; i < this.crafters.size(); ++i)
|
||||
{
|
||||
ICrafting crafting = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if (this.lastBeeHealth != this.jar.currentBeeHealth)
|
||||
{
|
||||
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
||||
this.lastBeeHealth = this.jar.currentBeeHealth;
|
||||
}
|
||||
if (this.speciesColour != this.jar.currentBeeColour)
|
||||
{
|
||||
crafting.sendProgressBarUpdate(this, 1, this.jar.currentBeeColour);
|
||||
this.speciesColour = this.jar.currentBeeColour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateProgressBar(int craftingId, int value)
|
||||
{
|
||||
if (craftingId == 0)
|
||||
{
|
||||
this.jar.currentBeeHealth = value;
|
||||
}
|
||||
else if (craftingId == 1)
|
||||
{
|
||||
this.jar.currentBeeColour = value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
return this.jar.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot)
|
||||
{
|
||||
Slot itemSlot = this.getSlot(slot);
|
||||
boolean clearSlot = false;
|
||||
|
||||
if (itemSlot != null && itemSlot.getHasStack())
|
||||
{
|
||||
ItemStack srcStack = itemSlot.getStack();
|
||||
if (slot == 0 && srcStack != null)
|
||||
{
|
||||
clearSlot = this.mergeItemStack(srcStack, 1, 36 + 1, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.getSlot(0).isItemValid(srcStack))
|
||||
{
|
||||
clearSlot = this.mergeItemStack(srcStack, 0, 1, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (clearSlot)
|
||||
{
|
||||
itemSlot.putStack(null);
|
||||
}
|
||||
itemSlot.onSlotChanged();
|
||||
player.inventory.onInventoryChanged();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
+17
-10
@@ -1,10 +1,13 @@
|
||||
package thaumicbees.gui;
|
||||
package thaumicbees.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
|
||||
public class GUIEffectJar extends GuiContainer
|
||||
{
|
||||
@@ -26,9 +29,9 @@ public class GUIEffectJar extends GuiContainer
|
||||
private static final int BAR_WIDTH = 10;
|
||||
private static final int BAR_HEIGHT = 40;
|
||||
|
||||
public GUIEffectJar(ContainerEffectJar container)
|
||||
public GUIEffectJar(TileEntityEffectJar jar, EntityPlayer player)
|
||||
{
|
||||
super(container);
|
||||
super(new ContainerEffectJar(jar, player));
|
||||
this.xSize = WIDTH;
|
||||
this.ySize = HEIGHT;
|
||||
}
|
||||
@@ -42,18 +45,22 @@ public class GUIEffectJar extends GuiContainer
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
int texture = this.mc.renderEngine.getTexture(CommonProxy.TCBEES_GUI_PATH + BACKGROUND_FILE);
|
||||
int texture = this.mc.renderEngine.getTexture(CommonProxy.GUI_PATH + BACKGROUND_FILE);
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 0.2f);
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture);
|
||||
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
TileEntityEffectJar jar = ((ContainerEffectJar)this.inventorySlots).jar;
|
||||
float r = ((jar.currentBeeColour >> 16) & 255) / 255f;
|
||||
float g = ((jar.currentBeeColour >> 8) & 255) / 255f;
|
||||
float b = (jar.currentBeeColour & 255) / 255f;
|
||||
|
||||
float percent = 0.0f;
|
||||
int value = BAR_HEIGHT - (int)(percent * BAR_HEIGHT);
|
||||
GL11.glColor3f(r, g, b);
|
||||
|
||||
int value = BAR_HEIGHT - (jar.currentBeeHealth * BAR_HEIGHT) / 100;
|
||||
this.drawTexturedModalRect(this.guiLeft + BAR_DEST_X, this.guiTop + value + BAR_DEST_Y, BAR_SRC_X, BAR_SRC_Y, BAR_WIDTH, BAR_HEIGHT - value);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.gui;
|
||||
package thaumicbees.client.gui;
|
||||
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -15,7 +15,7 @@ public class GUIHandler implements IGuiHandler
|
||||
|
||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
||||
{
|
||||
value = new ContainerEffectJar((TileEntityEffectJar)(world.getBlockTileEntity(x, y, z)), player);
|
||||
value = new ContainerEffectJar((TileEntityEffectJar)world.getBlockTileEntity(x, y, z), player);
|
||||
}
|
||||
|
||||
return value;
|
||||
@@ -28,7 +28,7 @@ public class GUIHandler implements IGuiHandler
|
||||
|
||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
||||
{
|
||||
value = new GUIEffectJar(new ContainerEffectJar((TileEntityEffectJar)(world.getBlockTileEntity(x, y, z)), player));
|
||||
value = new GUIEffectJar((TileEntityEffectJar)world.getBlockTileEntity(x, y, z), player);
|
||||
}
|
||||
|
||||
return value;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.gui;
|
||||
package thaumicbees.client.gui;
|
||||
|
||||
public enum UIScreens
|
||||
{
|
||||
@@ -0,0 +1,38 @@
|
||||
package thaumicbees.client.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelEffectJar
|
||||
{
|
||||
public static final String objFile = CommonProxy.MODEL_PATH + "effectJar.obj";
|
||||
public static final String textureFile = CommonProxy.MODEL_TEXTURE_PATH + "jarTexture.png";
|
||||
|
||||
public static final ModelEffectJar model = new ModelEffectJar();
|
||||
|
||||
private IModelCustom effectJarObj;
|
||||
|
||||
public ModelEffectJar()
|
||||
{
|
||||
this.effectJarObj = AdvancedModelLoader.loadModel(objFile);
|
||||
}
|
||||
|
||||
public void render()
|
||||
{
|
||||
this.effectJarObj.renderPart("jarLid");
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
this.effectJarObj.renderPart("jarBase");
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package thaumicbees.client.render;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import thaumicbees.client.model.ModelEffectJar;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class EffectJarRenderer extends TileEntitySpecialRenderer implements IItemRenderer
|
||||
{
|
||||
public static EffectJarRenderer instance = new EffectJarRenderer();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
||||
{
|
||||
if (tileEntity instanceof TileEntityEffectJar)
|
||||
{
|
||||
this.doRender(x, y, z, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
doRender(0, 0, 0, 1.8f);
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
doRender(-.5, .5, 0.25, 1f);
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
doRender(0.3, 0.25, 0.3, 1.5f);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void doRender(double x, double y, double z, float scale)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(ModelEffectJar.textureFile);
|
||||
|
||||
ModelEffectJar.model.render();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package thaumicbees.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import forestry.api.core.ItemInterface;
|
||||
|
||||
public class ContainerEffectJar extends Container
|
||||
{
|
||||
private TileEntityEffectJar jar;
|
||||
|
||||
public ContainerEffectJar(TileEntityEffectJar tileEntityEffectJar, EntityPlayer player)
|
||||
{
|
||||
this.jar = tileEntityEffectJar;
|
||||
SlotCustomItems slot = new SlotCustomItems(this.jar, 0, 80, 22);
|
||||
slot.addValidItem(ItemInterface.getItem("beeDroneGE"));
|
||||
this.addSlotToContainer(slot);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9+9, 8 + j * 18, 74 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
||||
{
|
||||
return this.jar.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot)
|
||||
{
|
||||
ItemStack value = null;
|
||||
Slot s = (Slot)this.inventorySlots.get(slot);
|
||||
|
||||
if (s != null && s.getHasStack())
|
||||
{
|
||||
ItemStack source = s.getStack();
|
||||
value = source.copy();
|
||||
|
||||
if (slot == 0)
|
||||
{
|
||||
if (!this.mergeItemStack(source, 1, 36, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
s.onSlotChange(source, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((SlotCustomItems)(this.inventorySlots.get(0))).isItemValid(source))
|
||||
{
|
||||
if (this.mergeItemStack(source, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
s.onSlotChange(source, value);
|
||||
}
|
||||
}
|
||||
|
||||
if (source.stackSize == 0)
|
||||
{
|
||||
s.putStack(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
s.onSlotChanged();
|
||||
}
|
||||
|
||||
if (source.stackSize == value.stackSize)
|
||||
{
|
||||
value = null;
|
||||
}
|
||||
|
||||
s.onPickupFromSlot(player, source);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +1,22 @@
|
||||
package thaumicbees.item;
|
||||
|
||||
import thaumcraft.api.IVisRepairable;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.IVisRepairable;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
|
||||
public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGrafter
|
||||
{
|
||||
@@ -45,7 +48,7 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityliving) {
|
||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityLiving) {
|
||||
int damage = 1;
|
||||
if (id == Config.tcLeaf.blockID)
|
||||
{
|
||||
@@ -61,7 +64,13 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
damage = 4;
|
||||
}
|
||||
}
|
||||
itemstack.damageItem(damage, entityliving);
|
||||
itemstack.damageItem(damage, entityLiving);
|
||||
|
||||
if (entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer)entityLiving;
|
||||
p.addExhaustion(8f);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,15 +103,15 @@ public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGr
|
||||
{
|
||||
if (stack.getItemDamage() > 0)
|
||||
{
|
||||
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 2, true))
|
||||
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 5, true))
|
||||
{
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer)e;
|
||||
p.addExhaustion(0.19f);
|
||||
}
|
||||
stack.damageItem(-1, (EntityLiving)e);
|
||||
}
|
||||
if (e instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer p = (EntityPlayer)e;
|
||||
p.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 600));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import thaumicbees.main.render.BeeRenderEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import thaumicbees.client.render.EffectJarRenderer;
|
||||
import thaumicbees.main.render.BeeRenderEffect;
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -14,6 +16,16 @@ public class ClientProxy extends CommonProxy
|
||||
|
||||
public ClientProxy() { }
|
||||
|
||||
@Override
|
||||
public void registerTileEntities()
|
||||
{
|
||||
super.registerTileEntities();
|
||||
|
||||
RenderIdEffectJar = RenderingRegistry.getNextAvailableRenderId();
|
||||
MinecraftForgeClient.registerItemRenderer(Config.effectJar.blockID, EffectJarRenderer.instance);
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEffectJar.class, EffectJarRenderer.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
||||
{
|
||||
|
||||
@@ -1,22 +1,33 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import thaumicbees.tileentity.TileEntityEffectJar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CommonProxy
|
||||
{
|
||||
public static final String TCBEES_GFX = "/mods/thaumicbees/textures/";
|
||||
public static final String TEXTURE_PATH = "/mods/thaumicbees/textures/";
|
||||
public static final String MODEL_PATH = "/mods/thaumicbees/model/";
|
||||
public static final String TCBEES_RESEARCH = "/research/thaumicbees/";
|
||||
public static final String TCBEES_LOCDIR = "/lang/thaumicbees/";
|
||||
|
||||
public static String FORESTRY_GFX_ITEMS;
|
||||
public static String FORESTRY_GFX_BEEEFFECTS;
|
||||
|
||||
public static final String TCBEES_GUI_PATH = TCBEES_GFX + "gui/";
|
||||
public static final String GUI_PATH = TEXTURE_PATH + "gui/";
|
||||
public static final String MODEL_TEXTURE_PATH = TEXTURE_PATH + "model/";
|
||||
|
||||
public static int RenderIdEffectJar;
|
||||
|
||||
public CommonProxy() { }
|
||||
|
||||
public void registerTileEntities()
|
||||
{
|
||||
GameRegistry.registerTileEntity(TileEntityEffectJar.class, "tb.entity.effectJar");
|
||||
}
|
||||
|
||||
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
||||
{
|
||||
// Does nothing in common.
|
||||
@@ -26,5 +37,7 @@ public class CommonProxy
|
||||
{
|
||||
return FMLClientHandler.instance().getClient();
|
||||
}
|
||||
|
||||
public void registerRenderers() { }
|
||||
|
||||
}
|
||||
@@ -211,11 +211,6 @@ public class Config
|
||||
GameRegistry.registerBlock(effectJar, "tb.effectJar");
|
||||
}
|
||||
|
||||
public void registerTileEntities()
|
||||
{
|
||||
GameRegistry.registerTileEntity(TileEntityEffectJar.class, "tb.entity.effectJar");
|
||||
}
|
||||
|
||||
public void setupItems()
|
||||
{
|
||||
ThaumcraftHelper.getItems();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import thaumicbees.gui.GUIHandler;
|
||||
import thaumicbees.client.gui.GUIHandler;
|
||||
import thaumicbees.main.utils.CompatabilityManager;
|
||||
import thaumicbees.main.utils.CraftingManager;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
@@ -15,6 +15,7 @@ import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
@Mod(
|
||||
@@ -25,6 +26,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
version=VersionInfo.Version + " - " + VersionInfo.Build,
|
||||
dependencies=VersionInfo.Depends
|
||||
)
|
||||
@NetworkMod(serverSideRequired=false, clientSideRequired=true)
|
||||
public class ThaumicBees
|
||||
{
|
||||
|
||||
@@ -57,7 +59,7 @@ public class ThaumicBees
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
this.modConfig.setupBlocks();
|
||||
this.modConfig.registerTileEntities();
|
||||
this.proxy.registerTileEntities();
|
||||
this.modConfig.setupItems();
|
||||
|
||||
CompatabilityManager.setupBackpacks();
|
||||
|
||||
@@ -16,6 +16,7 @@ import thaumicbees.item.types.HiveFrameType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.item.types.NuggetType;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.item.types.WaxType;
|
||||
@@ -122,6 +123,21 @@ public class CraftingManager
|
||||
'w', Config.wax.getStackForType(WaxType.SOUL)
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Config.hiveFrameTemporal), new Object[] {
|
||||
"sPs", "PfP", "sPs",
|
||||
's', Block.sand,
|
||||
'P', Config.pollen.getStackForType(PollenType.PHASED),
|
||||
'f', Config.hiveFrameMagic
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Config.effectJar), new Object[] {
|
||||
"GSG", "QPQ", "GGG",
|
||||
'G', Block.glass,
|
||||
'S', "slabWood",
|
||||
'P', Config.pollen.getStackForType(PollenType.UNUSUAL),
|
||||
'Q', Item.netherQuartz
|
||||
}));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Config.moonDial), new Object[] {
|
||||
"DqD", "qrq", "DqD",
|
||||
'r', Item.redstone,
|
||||
@@ -509,14 +525,14 @@ public class CraftingManager
|
||||
"wSt", "wFw", "tSw",
|
||||
't', Item.stick,
|
||||
'S', Block.sand,
|
||||
'F', input,
|
||||
'F', Config.hiveFrameMagic,
|
||||
'w', Config.wax.getStackForType(WaxType.MAGIC)
|
||||
});
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"tSw", "wFw", "wSt",
|
||||
't', Item.stick,
|
||||
'S', Block.sand,
|
||||
'F', input,
|
||||
'F', Config.hiveFrameMagic,
|
||||
'w', Config.wax.getStackForType(WaxType.MAGIC)
|
||||
});
|
||||
|
||||
|
||||
@@ -9,19 +9,29 @@ import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
|
||||
/**
|
||||
*
|
||||
* Singleton object to simulate enough of a bee house to fire the bee effects. =D
|
||||
*
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class EffectJarHousing implements IBeeHousing
|
||||
{
|
||||
private static EffectJarHousing instance = new EffectJarHousing();
|
||||
|
||||
TileEntityEffectJar jarEntity;
|
||||
|
||||
public EffectJarHousing(TileEntityEffectJar entity)
|
||||
public static EffectJarHousing getFor(TileEntityEffectJar entity)
|
||||
{
|
||||
this.jarEntity = entity;
|
||||
instance.jarEntity = entity;
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
return 0f;
|
||||
return 0.9f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,7 +43,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
return 0.5f;
|
||||
return 0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,19 +79,19 @@ public class EffectJarHousing implements IBeeHousing
|
||||
@Override
|
||||
public boolean isSealed()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfLighted()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated()
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,19 +101,13 @@ public class EffectJarHousing implements IBeeHousing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onQueenChange(ItemStack queen)
|
||||
{
|
||||
|
||||
}
|
||||
public void onQueenChange(ItemStack queen) { }
|
||||
|
||||
@Override
|
||||
public void wearOutEquipment(int amount) { }
|
||||
|
||||
@Override
|
||||
public void onQueenDeath(IBee queen)
|
||||
{
|
||||
|
||||
}
|
||||
public void onQueenDeath(IBee queen) { }
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen) { }
|
||||
@@ -111,7 +115,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
@Override
|
||||
public ItemStack getQueen()
|
||||
{
|
||||
return this.jarEntity.queenSlot;
|
||||
return this.jarEntity.getStackInSlot(TileEntityEffectJar.QUEEN_SLOT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,7 +127,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
@Override
|
||||
public void setQueen(ItemStack itemStack)
|
||||
{
|
||||
this.jarEntity.queenSlot = itemStack;
|
||||
this.jarEntity.setInventorySlotContents(TileEntityEffectJar.QUEEN_SLOT, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,7 +143,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
public EnumTemperature getTemperature()
|
||||
{
|
||||
EnumTemperature temp = EnumTemperature.NORMAL;
|
||||
ItemStack stack = this.jarEntity.queenSlot;
|
||||
ItemStack stack = this.jarEntity.getStackInSlot(TileEntityEffectJar.QUEEN_SLOT);
|
||||
if (stack != null)
|
||||
{
|
||||
IBee queen = BeeManager.beeInterface.getBee(stack);
|
||||
@@ -152,7 +156,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
public EnumHumidity getHumidity()
|
||||
{
|
||||
EnumHumidity humid = EnumHumidity.NORMAL;
|
||||
ItemStack stack = this.jarEntity.queenSlot;
|
||||
ItemStack stack = this.jarEntity.getStackInSlot(TileEntityEffectJar.QUEEN_SLOT);
|
||||
if (stack != null)
|
||||
{
|
||||
IBee queen = BeeManager.beeInterface.getBee(stack);
|
||||
@@ -179,7 +183,7 @@ public class EffectJarHousing implements IBeeHousing
|
||||
@Override
|
||||
public int getErrorOrdinal()
|
||||
{
|
||||
return 0;
|
||||
return 1; // EnumErrorCode.OK.ordinal() value.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,29 +1,36 @@
|
||||
package thaumicbees.tileentity;
|
||||
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
{
|
||||
private String ownerName;
|
||||
private EffectJarHousing housingLogic;
|
||||
|
||||
private ItemStack[] droneSlots;
|
||||
protected ItemStack queenSlot;
|
||||
private static final int SLOT_COUNT = 2;
|
||||
public static final int DRONE_SLOT = 0;
|
||||
public static final int QUEEN_SLOT = SLOT_COUNT - 1;
|
||||
|
||||
private int lifeTicksRemaining;
|
||||
private static final int lifeTicks = 135;
|
||||
private ItemStack[] beeSlots;
|
||||
private IEffectData[] effectData = new IEffectData[2];
|
||||
|
||||
private int throttle;
|
||||
public int currentBeeHealth;
|
||||
public int currentBeeColour;
|
||||
|
||||
public TileEntityEffectJar()
|
||||
{
|
||||
super();
|
||||
this.droneSlots = new ItemStack[1];
|
||||
this.beeSlots = new ItemStack[SLOT_COUNT];
|
||||
}
|
||||
|
||||
public void setOwner(EntityPlayer player)
|
||||
@@ -39,27 +46,96 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return this.droneSlots.length;
|
||||
// Last slot reserved for "queen"
|
||||
return this.beeSlots.length - 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slot)
|
||||
{
|
||||
return droneSlots[slot];
|
||||
return beeSlots[slot];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
if (this.beeSlots[QUEEN_SLOT] != null)
|
||||
{
|
||||
IBee queen = BeeManager.beeInterface.getBee(this.beeSlots[QUEEN_SLOT]);
|
||||
|
||||
currentBeeHealth = (queen.getHealth() * 100) / queen.getMaxHealth();
|
||||
currentBeeColour = ((IAlleleBeeSpecies)queen.getGenome().getPrimary()).getIconColour(0);
|
||||
|
||||
EffectJarHousing housingLogic = EffectJarHousing.getFor(this);
|
||||
this.effectData = queen.doEffect(this.effectData, housingLogic);
|
||||
if (this.worldObj.getWorldTime() % 5 == 0)
|
||||
{
|
||||
this.effectData = queen.doFX(this.effectData, housingLogic);
|
||||
}
|
||||
|
||||
// run the queen
|
||||
if (throttle > 550)
|
||||
{
|
||||
throttle = 0;
|
||||
queen.age(this.worldObj, 0.26f);
|
||||
|
||||
if (queen.getHealth() == 0)
|
||||
{
|
||||
this.beeSlots[QUEEN_SLOT] = null;
|
||||
currentBeeHealth = 0;
|
||||
currentBeeColour = 0x0ffffff;
|
||||
}
|
||||
else
|
||||
{
|
||||
queen.writeToNBT(this.beeSlots[QUEEN_SLOT].stackTagCompound);
|
||||
}
|
||||
this.onInventoryChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
throttle++;
|
||||
}
|
||||
}
|
||||
else if (this.beeSlots[DRONE_SLOT] != null)
|
||||
{
|
||||
// make a queen
|
||||
ItemStack droneStack = this.beeSlots[DRONE_SLOT];
|
||||
if (BeeManager.beeInterface.isDrone(droneStack))
|
||||
{
|
||||
IBee bee = BeeManager.beeInterface.getBee(droneStack);
|
||||
if (droneStack.stackSize == 1)
|
||||
{
|
||||
this.beeSlots[DRONE_SLOT] = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
droneStack.stackSize--;
|
||||
}
|
||||
|
||||
this.beeSlots[QUEEN_SLOT] = droneStack.copy();
|
||||
this.beeSlots[QUEEN_SLOT].stackSize = 1;
|
||||
|
||||
int current = bee.getHealth();
|
||||
int max = bee.getMaxHealth();
|
||||
currentBeeHealth = (current * 100) / max;
|
||||
currentBeeColour = ((IAlleleBeeSpecies)bee.getGenome().getPrimary()).getIconColour(0);
|
||||
}
|
||||
this.onInventoryChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, int count)
|
||||
{
|
||||
ItemStack value = null;
|
||||
if (this.droneSlots[slot] != null)
|
||||
if (this.beeSlots[slot] != null)
|
||||
{
|
||||
value = this.droneSlots[slot].copy();
|
||||
value.stackSize = Math.min(count, this.droneSlots[slot].stackSize);
|
||||
this.droneSlots[slot].stackSize -= value.stackSize;
|
||||
if (this.droneSlots[slot].stackSize == 0)
|
||||
value = this.beeSlots[slot].copy();
|
||||
value.stackSize = Math.min(count, this.beeSlots[slot].stackSize);
|
||||
this.beeSlots[slot].stackSize -= value.stackSize;
|
||||
if (this.beeSlots[slot].stackSize == 0)
|
||||
{
|
||||
this.droneSlots[slot] = null;
|
||||
this.beeSlots[slot] = null;
|
||||
}
|
||||
}
|
||||
onInventoryChanged();
|
||||
@@ -70,10 +146,10 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
public ItemStack getStackInSlotOnClosing(int slot)
|
||||
{
|
||||
ItemStack value = null;
|
||||
if (this.droneSlots[slot] != null)
|
||||
if (this.beeSlots[slot] != null)
|
||||
{
|
||||
value = this.droneSlots[slot];
|
||||
this.droneSlots[slot] = null;
|
||||
value = this.beeSlots[slot];
|
||||
this.beeSlots[slot] = null;
|
||||
}
|
||||
onInventoryChanged();
|
||||
return value;
|
||||
@@ -84,41 +160,51 @@ public class TileEntityEffectJar extends TileEntity implements IInventory
|
||||
{
|
||||
super.readFromNBT(tagRoot);
|
||||
|
||||
if (tagRoot.hasKey("drones"))
|
||||
{
|
||||
this.droneSlots[0] = ItemStack.loadItemStackFromNBT((NBTTagCompound)tagRoot.getTag("drones"));
|
||||
}
|
||||
if (tagRoot.hasKey("queen"))
|
||||
{
|
||||
this.queenSlot = ItemStack.loadItemStackFromNBT((NBTTagCompound)tagRoot.getTag("queen"));
|
||||
}
|
||||
this.lifeTicksRemaining = tagRoot.getInteger("lifeTicksRemaining");
|
||||
|
||||
NBTTagList nbttaglist = tagRoot.getTagList("Items");
|
||||
this.beeSlots = new ItemStack[SLOT_COUNT];
|
||||
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
|
||||
byte b0 = nbttagcompound1.getByte("Slot");
|
||||
|
||||
if (b0 >= 0 && b0 < this.beeSlots.length)
|
||||
{
|
||||
this.beeSlots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
this.currentBeeHealth = tagRoot.getInteger("currentBeeHealth");
|
||||
this.throttle = tagRoot.getInteger("throttle");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagRoot)
|
||||
{
|
||||
super.writeToNBT(tagRoot);
|
||||
|
||||
if (this.droneSlots[0] != null)
|
||||
{
|
||||
tagRoot.setTag("drones", this.droneSlots[0].writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
if (this.queenSlot != null)
|
||||
{
|
||||
tagRoot.setTag("queen", this.queenSlot.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
tagRoot.setInteger("lifeTicksRemaining", this.lifeTicksRemaining);
|
||||
|
||||
NBTTagList inventory = new NBTTagList();
|
||||
for (int i = 0; i < this.beeSlots.length; ++i)
|
||||
{
|
||||
if (this.beeSlots[i] != null)
|
||||
{
|
||||
NBTTagCompound itemTag = new NBTTagCompound();
|
||||
itemTag.setByte("Slot", (byte)i);
|
||||
this.beeSlots[i].writeToNBT(itemTag);
|
||||
inventory.appendTag(itemTag);
|
||||
}
|
||||
}
|
||||
tagRoot.setTag("Items", inventory);
|
||||
tagRoot.setInteger("currentBeeHealth", this.currentBeeHealth);
|
||||
tagRoot.setInteger("throttle", this.throttle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack itemStack)
|
||||
{
|
||||
this.droneSlots[slot] = itemStack;
|
||||
if (this.droneSlots[slot] != null)
|
||||
this.beeSlots[slot] = itemStack;
|
||||
if (this.beeSlots[slot] != null)
|
||||
{
|
||||
this.droneSlots[slot].stackSize = Math.min(this.droneSlots[slot].stackSize, this.droneSlots[slot].getItem().getItemStackLimit());
|
||||
this.beeSlots[slot].stackSize = Math.min(this.beeSlots[slot].stackSize, this.beeSlots[slot].getItem().getItemStackLimit());
|
||||
}
|
||||
onInventoryChanged();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user