diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 4ab1c35a8..44484813d 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -191,6 +191,12 @@ tile.machine_assembler.name=Fertigungsmaschine container.assembler=Fertigungsmaschine tile.machine_chemplant.name=Chemiefabrik container.chemplant=Chemiefabrik +tile.fluid_duct.name=Universelles Flüssigkeitsrohr +tile.machine_fluidtank.name=Tank +container.fluidtank=Tank + +tile.crate_iron.name=Eisenkiste +tile.crate_steel.name=Stahlkiste tile.red_pylon.name=Strommasten item.wiring_red_copper.name=Kabeltrommel diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index c11b45f77..864cd8529 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -191,6 +191,12 @@ tile.machine_assembler.name=Assembly Machine container.assembler=Assembly Machine tile.machine_chemplant.name=Chemical Plant container.chemplant=Chemical Plant +tile.fluid_duct.name=Universal Fluid Duct +tile.machine_fluidtank.name=Tank +container.fluidtank=Tank + +tile.crate_iron.name=Iron Crate +tile.crate_steel.name=Steel Crate tile.red_pylon.name=Electricity Pole item.wiring_red_copper.name=Cable Drum @@ -256,6 +262,8 @@ tile.machine_rtg_cyan.name=Schrabidium Decay Generator (WIP) tile.machine_rtg_blue.name=Convection Generator tile.machine_rtg_purple.name=Antimatter Annihilation Generator +item.fluid_identifier.name=Fluid Identifier + item.assembly_template.TEST.name=Assembly Template: Test item.assembly_template.MIXED_PLATE.name=Assembly Template: Mixed Plate item.assembly_template.HAZMAT_CLOTH.name=Assembly Template: Hazmat Cloth diff --git a/assets/hbm/models/fluidtank_label.obj b/assets/hbm/models/fluidtank_label.obj new file mode 100644 index 000000000..4126e941a --- /dev/null +++ b/assets/hbm/models/fluidtank_label.obj @@ -0,0 +1,38 @@ +# Blender v2.76 (sub 0) OBJ File: 'fluidtank_label.blend' +# www.blender.org +o Cube.001_Cube.000 +v -1.260000 1.750000 0.875000 +v -1.260000 1.750000 -1.000000 +v -1.260000 1.750000 1.000000 +v -1.164849 2.228354 -1.000000 +v -1.164849 2.228355 1.000000 +v -1.260000 1.750000 -0.875000 +v 1.260000 1.750000 0.875000 +v 1.164849 2.228354 -1.000000 +v 1.164849 2.228354 1.000000 +v 1.260000 1.750000 -1.000000 +v 1.260000 1.750000 1.000000 +v 1.260000 1.750000 -0.875000 +vt 0.000697 0.000139 +vt 0.937966 0.487721 +vt 0.071437 0.487780 +vt 0.935055 0.505640 +vt 0.997387 0.992019 +vt 0.062467 0.505674 +vt 0.000139 0.487453 +vt 0.999693 -0.000208 +vt 0.999861 0.487717 +vt 0.000139 0.505676 +vt 0.000144 0.992057 +vt 0.997383 0.505637 +vn -0.980800 0.195100 0.000000 +vn 0.980800 0.195100 0.000000 +s off +f 5/1/1 6/2/1 1/3/1 +f 12/4/2 8/5/2 7/6/2 +f 1/3/1 3/7/1 5/1/1 +f 5/1/1 4/8/1 6/2/1 +f 2/9/1 6/2/1 4/8/1 +f 11/10/2 7/6/2 9/11/2 +f 12/4/2 10/12/2 8/5/2 +f 8/5/2 9/11/2 7/6/2 diff --git a/assets/hbm/models/fluidtank_main.obj b/assets/hbm/models/fluidtank_main.obj new file mode 100644 index 000000000..a1f065dd2 --- /dev/null +++ b/assets/hbm/models/fluidtank_main.obj @@ -0,0 +1,1118 @@ +# Blender v2.76 (sub 0) OBJ File: 'fluidtank_main.blend' +# www.blender.org +o Cube_Cube.001 +v 1.250000 1.750000 1.750000 +v -1.250000 1.750000 1.750000 +v -1.250000 0.000000 2.000000 +v -1.250000 0.000000 1.750000 +v 1.250000 0.000000 1.750000 +v 0.000000 3.000000 -2.000000 +v 0.000000 3.000000 2.000000 +v 0.478354 2.904849 -2.000000 +v 0.478354 2.904850 2.000000 +v 0.883883 2.633883 -2.000000 +v 0.883883 2.633883 2.000000 +v 1.154849 2.228354 -2.000000 +v 1.154849 2.228354 2.000000 +v 1.250000 1.750000 -2.000000 +v 1.250000 1.750000 2.000000 +v 1.154849 1.271646 -2.000000 +v 1.154849 1.271646 2.000000 +v 0.883883 0.866117 -2.000000 +v 0.883883 0.866117 2.000000 +v 0.478354 0.595150 -2.000000 +v 0.478354 0.595151 2.000000 +v 0.000000 0.500000 -2.000000 +v 0.000000 0.500000 2.000000 +v -0.478354 0.595150 -2.000000 +v -0.478354 0.595150 2.000000 +v -0.883883 0.866116 -2.000000 +v -0.883883 0.866116 2.000000 +v -1.154849 1.271646 -2.000000 +v -1.154849 1.271646 2.000000 +v -1.250000 1.750000 -2.000000 +v -1.250000 1.750000 2.000000 +v -1.154849 2.228354 -2.000000 +v -1.154849 2.228355 2.000000 +v -0.883883 2.633884 -2.000000 +v -0.883883 2.633884 2.000000 +v -0.478354 2.904850 -2.000000 +v -0.478354 2.904850 2.000000 +v 0.430519 2.789365 2.250000 +v 0.000000 2.875000 2.250000 +v -0.430518 2.789365 2.250000 +v -0.795495 2.545496 2.250000 +v -1.039364 2.180519 2.250000 +v -1.125000 1.750000 2.250000 +v -1.039364 1.319481 2.250000 +v -0.795495 0.954505 2.250000 +v -0.430519 0.710635 2.250000 +v 0.000000 0.625000 2.250000 +v 0.430519 0.710636 2.250000 +v 0.795495 0.954505 2.250000 +v 1.039364 1.319481 2.250000 +v 1.125000 1.750000 2.250000 +v 1.039364 2.180519 2.250000 +v 0.795495 2.545495 2.250000 +v 0.000000 2.875000 -2.250000 +v 0.430519 2.789364 -2.250000 +v 0.795495 2.545495 -2.250000 +v 1.039364 2.180519 -2.250000 +v 1.125000 1.750000 -2.250000 +v 1.039364 1.319481 -2.250000 +v 0.795495 0.954505 -2.250000 +v 0.430519 0.710635 -2.250000 +v 0.000000 0.625000 -2.250000 +v -0.430519 0.710635 -2.250000 +v -0.795495 0.954504 -2.250000 +v -1.039364 1.319481 -2.250000 +v -1.125000 1.750000 -2.250000 +v -1.039364 2.180519 -2.250000 +v -0.795495 2.545495 -2.250000 +v -0.430518 2.789365 -2.250000 +v 0.239177 2.327425 2.500000 +v 0.000000 2.375000 2.500000 +v -0.239177 2.327425 2.500000 +v -0.441941 2.191942 2.500000 +v -0.577425 1.989177 2.500000 +v -0.625000 1.750000 2.500000 +v -0.577425 1.510823 2.500000 +v -0.441942 1.308058 2.500000 +v -0.239177 1.172575 2.500000 +v 0.000000 1.125000 2.500000 +v 0.239177 1.172575 2.500000 +v 0.441942 1.308058 2.500000 +v 0.577425 1.510823 2.500000 +v 0.625000 1.750000 2.500000 +v 0.577425 1.989177 2.500000 +v 0.441942 2.191942 2.500000 +v 0.000000 2.375000 -2.500000 +v 0.239177 2.327425 -2.500000 +v 0.441942 2.191942 -2.500000 +v 0.577425 1.989177 -2.500000 +v 0.625000 1.750000 -2.500000 +v 0.577425 1.510823 -2.500000 +v 0.441942 1.308058 -2.500000 +v 0.239177 1.172575 -2.500000 +v 0.000000 1.125000 -2.500000 +v -0.239177 1.172575 -2.500000 +v -0.441942 1.308058 -2.500000 +v -0.577425 1.510823 -2.500000 +v -0.625000 1.750000 -2.500000 +v -0.577425 1.989177 -2.500000 +v -0.441942 2.191942 -2.500000 +v -0.239177 2.327425 -2.500000 +v 1.250000 0.000000 2.000000 +v 1.154849 1.271646 1.750000 +v 0.883883 0.866117 1.750000 +v 0.478354 0.595151 1.750000 +v 0.000000 0.500000 1.750000 +v -0.478354 0.595150 1.750000 +v -0.883883 0.866116 1.750000 +v -1.154849 1.271646 1.750000 +v 1.250000 1.750000 -1.750000 +v -1.250000 1.750000 -1.750000 +v 1.154849 1.271646 -1.750000 +v 0.883883 0.866117 -1.750000 +v 0.478354 0.595151 -1.750000 +v 0.000000 0.500000 -1.750000 +v -0.478354 0.595150 -1.750000 +v -0.883883 0.866116 -1.750000 +v -1.154849 1.271646 -1.750000 +v -1.250000 0.000000 -1.750000 +v -1.250000 0.000000 -2.000000 +v 1.250000 0.000000 -2.000000 +v 1.250000 0.000000 -1.750000 +v 1.500000 0.656250 -1.156250 +v 1.500000 0.343750 -1.156250 +v 1.500000 0.656250 -0.843750 +v 1.500000 0.343750 -0.843750 +v 1.500000 0.343750 1.156250 +v 1.500000 0.656250 1.156250 +v 1.500000 0.343750 0.843750 +v 1.500000 0.656250 0.843750 +v -1.500000 0.343750 -1.156250 +v -1.500000 0.656250 -1.156250 +v -1.500000 0.343750 -0.843750 +v -1.500000 0.656250 -0.843750 +v -1.500000 0.656250 1.156250 +v -1.500000 0.343750 1.156250 +v -1.500000 0.656250 0.843750 +v -1.500000 0.343750 0.843750 +v -0.750000 2.700000 -2.000000 +v -0.750000 3.000000 -2.000000 +v -0.500000 2.850000 -1.933013 +v -0.500000 3.000000 -1.933013 +v -0.316987 2.900000 -1.750000 +v -0.316987 3.000000 -1.750000 +v -0.250000 2.900000 -1.500000 +v -0.250000 3.000000 -1.500000 +v -0.316987 2.900000 -1.250000 +v -0.316987 3.000000 -1.250000 +v -0.500000 2.850000 -1.066987 +v -0.500000 3.000000 -1.066987 +v -0.750000 2.700000 -1.000000 +v -0.750000 3.000000 -1.000000 +v -1.000000 2.400000 -1.066987 +v -1.000000 3.000000 -1.066987 +v -1.183013 2.000000 -1.250000 +v -1.183013 3.000000 -1.250000 +v -1.250000 1.750000 -1.500000 +v -1.250000 3.000000 -1.500000 +v -1.183013 2.000000 -1.750000 +v -1.183013 3.000000 -1.750000 +v -1.000000 2.400000 -1.933012 +v -1.000000 3.000000 -1.933012 +v -0.537500 3.000000 -1.868061 +v -0.750000 3.000000 -1.925000 +v -0.381939 3.000000 -1.712500 +v -0.325000 3.000000 -1.500000 +v -0.381939 3.000000 -1.287500 +v -0.537500 3.000000 -1.131939 +v -0.750000 3.000000 -1.075000 +v -0.962500 3.000000 -1.131939 +v -1.118061 3.000000 -1.287500 +v -1.175000 3.000000 -1.500000 +v -1.118061 3.000000 -1.712500 +v -0.962500 3.000000 -1.868061 +v -0.537500 3.050000 -1.868061 +v -0.750000 3.050000 -1.925000 +v -0.381939 3.050000 -1.712500 +v -0.325000 3.050000 -1.500000 +v -0.381939 3.050000 -1.287500 +v -0.537500 3.050000 -1.131939 +v -0.750000 3.050000 -1.075000 +v -0.962500 3.050000 -1.131939 +v -1.118061 3.050000 -1.287500 +v -1.175000 3.050000 -1.500000 +v -1.118061 3.050000 -1.712500 +v -0.962500 3.050000 -1.868061 +v -0.918125 3.050000 -1.355209 +v -0.950000 3.050000 -1.363750 +v -0.894791 3.050000 -1.331875 +v -0.886250 3.050000 -1.300000 +v -0.894791 3.050000 -1.268125 +v -0.918125 3.050000 -1.244791 +v -0.950000 3.050000 -1.236250 +v -0.981875 3.050000 -1.244791 +v -1.005209 3.050000 -1.268125 +v -1.013750 3.050000 -1.300000 +v -1.005209 3.050000 -1.331875 +v -0.981875 3.050000 -1.355209 +v -0.918125 3.075000 -1.355209 +v -0.950000 3.075000 -1.363750 +v -0.894791 3.075000 -1.331875 +v -0.886250 3.075000 -1.300000 +v -0.894791 3.075000 -1.268125 +v -0.918125 3.075000 -1.244791 +v -0.950000 3.075000 -1.236250 +v -0.981875 3.075000 -1.244791 +v -1.005209 3.075000 -1.268125 +v -1.013750 3.075000 -1.300000 +v -1.005209 3.075000 -1.331875 +v -0.981875 3.075000 -1.355209 +vt 0.007264 0.482161 +vt 0.007314 0.442568 +vt 0.332035 0.442981 +vt 0.007365 0.402974 +vt 0.332086 0.403387 +vt 0.007415 0.363380 +vt 0.332136 0.363793 +vt 0.488222 0.487464 +vt 0.346312 0.487464 +vt 0.346312 0.467192 +vt 0.832860 0.467191 +vt 0.832860 0.487464 +vt 0.690951 0.487464 +vt 0.312193 0.086611 +vt 0.028063 0.086250 +vt 0.028113 0.046657 +vt 0.007113 0.600942 +vt 0.007163 0.561349 +vt 0.331884 0.561761 +vt 0.693411 0.854768 +vt 0.701321 0.810132 +vt 0.721096 0.810132 +vt 0.007214 0.521755 +vt 0.331985 0.482574 +vt 0.331935 0.522168 +vt 0.683051 0.718283 +vt 0.753349 0.732266 +vt 0.739366 0.802564 +vt 0.691434 0.877347 +vt 0.729006 0.854768 +vt 0.658662 0.840775 +vt 0.691548 0.854397 +vt 0.684734 0.876014 +vt 0.631912 0.814550 +vt 0.657082 0.839720 +vt 0.642514 0.857084 +vt 0.617235 0.780085 +vt 0.630857 0.812970 +vt 0.610753 0.823438 +vt 0.616864 0.742626 +vt 0.616864 0.778221 +vt 0.594285 0.780199 +vt 0.610753 0.697409 +vt 0.630857 0.707877 +vt 0.617235 0.740762 +vt 0.657082 0.681127 +vt 0.631912 0.706297 +vt 0.614548 0.691729 +vt 0.691548 0.666450 +vt 0.658662 0.680072 +vt 0.648194 0.659968 +vt 0.729006 0.666079 +vt 0.693411 0.666079 +vt 0.691433 0.643500 +vt 0.763756 0.680072 +vt 0.730870 0.666450 +vt 0.737684 0.644833 +vt 0.807869 0.691729 +vt 0.790505 0.706297 +vt 0.765335 0.681127 +vt 0.805182 0.740762 +vt 0.791561 0.707877 +vt 0.811664 0.697409 +vt 0.805553 0.778221 +vt 0.805553 0.742626 +vt 0.828132 0.740648 +vt 0.791561 0.812970 +vt 0.805182 0.780085 +vt 0.826800 0.786898 +vt 0.779903 0.857084 +vt 0.765335 0.839720 +vt 0.790505 0.814550 +vt 0.730870 0.854397 +vt 0.763756 0.840775 +vt 0.774223 0.860879 +vt 0.559896 0.691729 +vt 0.542532 0.706297 +vt 0.517362 0.681127 +vt 0.557209 0.740763 +vt 0.543588 0.707877 +vt 0.563691 0.697409 +vt 0.580159 0.780199 +vt 0.557580 0.778221 +vt 0.557580 0.742626 +vt 0.543587 0.812970 +vt 0.557209 0.780085 +vt 0.578826 0.786899 +vt 0.517362 0.839720 +vt 0.542532 0.814550 +vt 0.559896 0.829118 +vt 0.482897 0.854397 +vt 0.515783 0.840775 +vt 0.526250 0.860879 +vt 0.445438 0.854768 +vt 0.481033 0.854768 +vt 0.483011 0.877347 +vt 0.400221 0.860879 +vt 0.410689 0.840775 +vt 0.443574 0.854397 +vt 0.383939 0.814550 +vt 0.409109 0.839720 +vt 0.394541 0.857084 +vt 0.369262 0.780085 +vt 0.382884 0.812970 +vt 0.362780 0.823438 +vt 0.346312 0.740648 +vt 0.368891 0.742626 +vt 0.368891 0.778221 +vt 0.382884 0.707877 +vt 0.369262 0.740762 +vt 0.347645 0.733949 +vt 0.409109 0.681127 +vt 0.383939 0.706297 +vt 0.366575 0.691729 +vt 0.443575 0.666450 +vt 0.410689 0.680072 +vt 0.400221 0.659968 +vt 0.483011 0.643500 +vt 0.481033 0.666079 +vt 0.445438 0.666079 +vt 0.515783 0.680072 +vt 0.482897 0.666450 +vt 0.489711 0.644833 +vt 0.683051 0.802564 +vt 0.669068 0.788581 +vt 0.661500 0.770311 +vt 0.661500 0.750536 +vt 0.669068 0.732266 +vt 0.701321 0.710715 +vt 0.721096 0.710715 +vt 0.739366 0.718283 +vt 0.760917 0.750536 +vt 0.760917 0.770311 +vt 0.753349 0.788581 +vt 0.453348 0.810132 +vt 0.413527 0.750536 +vt 0.473123 0.710715 +vt 0.505376 0.732266 +vt 0.491393 0.718283 +vt 0.512944 0.750536 +vt 0.512944 0.770311 +vt 0.505376 0.788581 +vt 0.491393 0.802564 +vt 0.473123 0.810132 +vt 0.435078 0.802564 +vt 0.421095 0.788581 +vt 0.413527 0.770311 +vt 0.421095 0.732266 +vt 0.435078 0.718283 +vt 0.453348 0.710715 +vt 0.488222 0.467192 +vt 0.690951 0.467191 +vt 0.028163 0.007063 +vt 0.312294 0.007424 +vt 0.589586 0.528010 +vt 0.312143 0.126205 +vt 0.028012 0.125844 +vt 0.312093 0.165799 +vt 0.027962 0.165438 +vt 0.312042 0.205393 +vt 0.027912 0.205031 +vt 0.311992 0.244986 +vt 0.027861 0.244625 +vt 0.311942 0.284580 +vt 0.311891 0.324174 +vt 0.027761 0.323812 +vt 0.027811 0.284219 +vt 0.331834 0.601355 +vt 0.313462 0.638064 +vt 0.051328 0.640592 +vt 0.589586 0.426646 +vt 0.550796 0.418930 +vt 0.517911 0.396957 +vt 0.488222 0.325282 +vt 0.495938 0.364072 +vt 0.628377 0.418930 +vt 0.661262 0.396957 +vt 0.683235 0.364072 +vt 0.690951 0.325282 +vt 0.628377 0.535726 +vt 0.661262 0.557699 +vt 0.683235 0.590584 +vt 0.690951 0.629374 +vt 0.550796 0.535726 +vt 0.517911 0.557699 +vt 0.495938 0.590584 +vt 0.488222 0.629374 +vt 0.488222 0.148973 +vt 0.690951 0.148973 +vt 0.690951 0.169245 +vt 0.589587 0.209791 +vt 0.488222 0.169246 +vt 0.589587 0.108427 +vt 0.628377 0.100711 +vt 0.628377 0.217507 +vt 0.550796 0.217507 +vt 0.550796 0.100711 +vt 0.517911 0.239480 +vt 0.495938 0.272365 +vt 0.488223 0.311156 +vt 0.346312 0.148973 +vt 0.517911 0.078738 +vt 0.495938 0.045853 +vt 0.488222 0.007063 +vt 0.661262 0.239480 +vt 0.683235 0.272365 +vt 0.690951 0.311155 +vt 0.832860 0.148973 +vt 0.683235 0.045853 +vt 0.690951 0.007063 +vt 0.661262 0.078738 +vt 0.275678 0.820890 +vt 0.275678 0.846231 +vt 0.032404 0.846231 +vt 0.275678 0.871572 +vt 0.032404 0.871572 +vt 0.301019 0.705400 +vt 0.275678 0.705400 +vt 0.275678 0.680059 +vt 0.032404 0.820890 +vt 0.007063 0.820890 +vt 0.007063 0.795549 +vt 0.032404 0.705400 +vt 0.007063 0.705400 +vt 0.007063 0.680059 +vt 0.301019 0.820890 +vt 0.275678 0.795549 +vt 0.032404 0.795549 +vt 0.032404 0.770208 +vt 0.032404 0.756082 +vt 0.032404 0.730741 +vt 0.275678 0.730741 +vt 0.032404 0.654718 +vt 0.275678 0.654718 +vt 0.070027 0.987062 +vt 0.049039 0.987062 +vt 0.049039 0.974899 +vt 0.028051 0.987062 +vt 0.028051 0.978953 +vt 0.007063 0.987062 +vt 0.007063 0.978953 +vt 0.258919 0.987062 +vt 0.237931 0.987062 +vt 0.237931 0.978953 +vt 0.216943 0.987062 +vt 0.216943 0.974899 +vt 0.195955 0.987062 +vt 0.195955 0.962735 +vt 0.174967 0.987062 +vt 0.174967 0.938408 +vt 0.153979 0.987062 +vt 0.153979 0.905971 +vt 0.132991 0.987062 +vt 0.112003 0.987062 +vt 0.112003 0.905971 +vt 0.194381 0.992937 +vt 0.091015 0.987062 +vt 0.070027 0.962735 +vt 0.091015 0.938408 +vt 0.916946 0.689764 +vt 0.912892 0.689764 +vt 0.912892 0.671924 +vt 0.215369 0.992937 +vt 0.197529 0.992937 +vt 0.236357 0.992937 +vt 0.218517 0.992937 +vt 0.257345 0.992937 +vt 0.239505 0.992937 +vt 0.089441 0.992937 +vt 0.071601 0.992937 +vt 0.068453 0.992937 +vt 0.050613 0.992937 +vt 0.026477 0.992937 +vt 0.008637 0.992937 +vt 0.110429 0.992937 +vt 0.092589 0.992937 +vt 0.047465 0.992937 +vt 0.029625 0.992937 +vt 0.131417 0.992937 +vt 0.113577 0.992937 +vt 0.152405 0.992937 +vt 0.134565 0.992937 +vt 0.173393 0.992937 +vt 0.846313 0.671924 +vt 0.855232 0.656474 +vt 0.864478 0.697052 +vt 0.905999 0.652963 +vt 0.903972 0.656474 +vt 0.888522 0.647554 +vt 0.870682 0.718188 +vt 0.870682 0.714133 +vt 0.888522 0.714134 +vt 0.842258 0.671924 +vt 0.846312 0.689764 +vt 0.888522 0.643500 +vt 0.870682 0.647555 +vt 0.890549 0.717645 +vt 0.903972 0.705214 +vt 0.842801 0.691791 +vt 0.855232 0.705214 +vt 0.868655 0.644043 +vt 0.907483 0.707241 +vt 0.916403 0.669897 +vt 0.853205 0.708725 +vt 0.851721 0.654447 +vt 0.325382 0.655411 +vt 0.324857 0.657369 +vt 0.322273 0.656676 +vt 0.873127 0.702045 +vt 0.873127 0.699369 +vt 0.871789 0.697052 +vt 0.866796 0.705701 +vt 0.869472 0.705701 +vt 0.863140 0.699369 +vt 0.869472 0.695714 +vt 0.871789 0.704363 +vt 0.863140 0.702045 +vt 0.866796 0.695714 +vt 0.864478 0.704363 +vt 0.317103 0.661846 +vt 0.319688 0.657369 +vt 0.327442 0.661846 +vt 0.322797 0.668974 +vt 0.322273 0.667015 +vt 0.324857 0.666323 +vt 0.328708 0.664955 +vt 0.326750 0.664431 +vt 0.315145 0.662371 +vt 0.317796 0.664431 +vt 0.321748 0.654718 +vt 0.329400 0.661321 +vt 0.326750 0.659261 +vt 0.316362 0.665864 +vt 0.319688 0.666323 +vt 0.318254 0.655935 +vt 0.317796 0.659261 +vt 0.328183 0.657828 +vt 0.319163 0.668281 +vt 0.326291 0.667756 +vt 0.315838 0.658736 +vt 0.312244 0.047018 +vt 0.730984 0.877347 +vt 0.648194 0.860879 +vt 0.614548 0.829118 +vt 0.595618 0.786898 +vt 0.594285 0.740648 +vt 0.595618 0.733949 +vt 0.642514 0.663763 +vt 0.684734 0.644833 +vt 0.730984 0.643500 +vt 0.774223 0.659968 +vt 0.779903 0.663763 +vt 0.826800 0.733949 +vt 0.828132 0.780199 +vt 0.811664 0.823438 +vt 0.807869 0.829118 +vt 0.737684 0.876014 +vt 0.531930 0.663763 +vt 0.578827 0.733949 +vt 0.580159 0.740649 +vt 0.563691 0.823438 +vt 0.531930 0.857084 +vt 0.489710 0.876015 +vt 0.443460 0.877347 +vt 0.436761 0.876015 +vt 0.366575 0.829118 +vt 0.347645 0.786898 +vt 0.346312 0.780199 +vt 0.362780 0.697409 +vt 0.394541 0.663763 +vt 0.436761 0.644833 +vt 0.443461 0.643500 +vt 0.526250 0.659968 +vt 0.007465 0.323787 +vt 0.332186 0.324200 +vt 0.007063 0.640536 +vt 0.332186 0.637883 +vt 0.346312 0.169246 +vt 0.832860 0.169245 +vt 0.301019 0.680059 +vt 0.032404 0.680059 +vt 0.301019 0.795549 +vt 0.275678 0.770208 +vt 0.275678 0.756082 +vt 0.258919 0.978953 +vt 0.132991 0.885698 +vt 0.176541 0.992937 +vt 0.916946 0.671924 +vt 0.155553 0.992937 +vt 0.890549 0.644043 +vt 0.888522 0.718188 +vt 0.842258 0.689764 +vt 0.870682 0.643500 +vt 0.905999 0.708725 +vt 0.851721 0.707241 +vt 0.853205 0.652963 +vt 0.916403 0.691791 +vt 0.907483 0.654447 +vt 0.868655 0.717645 +vt 0.842801 0.669897 +vt 0.322797 0.654718 +vt 0.325382 0.668281 +vt 0.329400 0.662371 +vt 0.315838 0.664955 +vt 0.319163 0.655411 +vt 0.328708 0.658736 +vt 0.318254 0.667756 +vt 0.316362 0.657828 +vt 0.326291 0.655935 +vt 0.321748 0.668974 +vt 0.328183 0.665864 +vt 0.315145 0.661321 +vn 0.195100 0.980800 -0.000000 +vn 0.555600 0.831500 0.000000 +vn 0.831500 0.555600 0.000000 +vn -1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn -0.831500 -0.555600 0.000000 +vn -0.831500 0.555600 -0.000000 +vn 0.088600 0.445500 0.890900 +vn -0.195100 0.980800 0.000000 +vn -0.555600 0.831500 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.175200 0.880600 0.440300 +vn -0.175200 0.880600 0.440300 +vn -0.498800 0.746500 0.440300 +vn -0.746500 0.498800 0.440300 +vn -0.880600 0.175200 0.440300 +vn -0.880600 -0.175200 0.440300 +vn -0.746500 -0.498800 0.440300 +vn -0.498800 -0.746500 0.440300 +vn -0.175200 -0.880600 0.440300 +vn 0.175200 -0.880600 0.440300 +vn 0.498800 -0.746500 0.440300 +vn 0.746500 -0.498800 0.440300 +vn 0.880600 -0.175200 0.440300 +vn 0.880600 0.175200 0.440300 +vn 0.746500 0.498800 0.440300 +vn 0.498800 0.746500 0.440300 +vn 0.175200 0.880600 -0.440300 +vn 0.498800 0.746500 -0.440300 +vn 0.746500 0.498800 -0.440300 +vn 0.880600 0.175200 -0.440300 +vn 0.880600 -0.175200 -0.440300 +vn 0.746500 -0.498800 -0.440300 +vn 0.498800 -0.746500 -0.440300 +vn 0.175200 -0.880600 -0.440300 +vn -0.175200 -0.880600 -0.440300 +vn -0.498800 -0.746500 -0.440300 +vn -0.746500 -0.498800 -0.440300 +vn -0.880600 -0.175200 -0.440300 +vn -0.880600 0.175200 -0.440300 +vn -0.746500 0.498800 -0.440300 +vn -0.498800 0.746500 -0.440300 +vn -0.175200 0.880600 -0.440300 +vn -0.088600 0.445500 0.890900 +vn -0.252300 0.377600 0.890900 +vn -0.377600 0.252300 0.890900 +vn -0.445500 0.088600 0.890900 +vn -0.445500 -0.088600 0.890900 +vn -0.377600 -0.252300 0.890900 +vn -0.252300 -0.377600 0.890900 +vn -0.088600 -0.445500 0.890900 +vn 0.088600 -0.445500 0.890900 +vn 0.252300 -0.377600 0.890900 +vn 0.377600 -0.252300 0.890900 +vn 0.445500 -0.088600 0.890900 +vn 0.445500 0.088600 0.890900 +vn 0.377600 0.252300 0.890900 +vn 0.252300 0.377600 0.890900 +vn 0.000000 0.000000 -1.000000 +vn 0.088600 0.445500 -0.890900 +vn 0.252300 0.377600 -0.890900 +vn 0.377600 0.252300 -0.890900 +vn 0.445500 0.088600 -0.890900 +vn 0.445500 -0.088600 -0.890900 +vn 0.377600 -0.252300 -0.890900 +vn 0.252300 -0.377600 -0.890900 +vn 0.088600 -0.445500 -0.890900 +vn -0.088600 -0.445500 -0.890900 +vn -0.252300 -0.377600 -0.890900 +vn -0.377600 -0.252300 -0.890900 +vn -0.445500 -0.088600 -0.890900 +vn -0.445500 0.088600 -0.890900 +vn -0.377600 0.252300 -0.890900 +vn -0.252300 0.377600 -0.890900 +vn -0.088600 0.445500 -0.890900 +vn 0.000000 -1.000000 0.000000 +vn -0.980800 -0.195100 0.000000 +vn -0.555600 -0.831500 0.000000 +vn -0.195100 -0.980800 0.000000 +vn 0.195100 -0.980800 0.000000 +vn 0.555600 -0.831500 0.000000 +vn 0.831500 -0.555600 0.000000 +vn 0.980800 -0.195100 0.000000 +vn 0.980800 0.195100 0.000000 +vn -0.980800 0.195100 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.258800 0.000000 -0.965900 +vn 0.707100 0.000000 -0.707100 +vn 0.965900 0.000000 -0.258800 +vn 0.965900 0.000000 0.258800 +vn 0.707100 0.000000 0.707100 +vn 0.258800 0.000000 0.965900 +vn -0.258800 0.000000 0.965900 +vn -0.707100 0.000000 0.707100 +vn -0.965900 0.000000 0.258800 +vn -0.965900 0.000000 -0.258800 +vn -0.258800 0.000000 -0.965900 +vn -0.707100 0.000000 -0.707100 +s off +f 7/1/1 9/2/1 8/3/1 +f 9/2/2 11/4/2 10/5/2 +f 11/4/3 13/6/3 12/7/3 +f 3/8/4 31/9/4 2/10/4 +f 1/11/5 15/12/5 102/13/5 +f 117/14/6 108/15/6 109/16/6 +f 33/17/7 35/18/7 34/19/7 +f 39/20/8 71/21/8 70/22/8 +f 37/23/9 7/1/9 6/24/9 +f 35/18/10 37/23/10 36/25/10 +f 77/26/11 81/27/11 85/28/11 +f 7/29/12 39/20/12 38/30/12 +f 40/31/13 39/32/13 7/33/13 +f 41/34/14 40/35/14 37/36/14 +f 42/37/15 41/38/15 35/39/15 +f 43/40/16 42/41/16 33/42/16 +f 29/43/17 44/44/17 43/45/17 +f 45/46/18 44/47/18 29/48/18 +f 46/49/19 45/50/19 27/51/19 +f 47/52/20 46/53/20 25/54/20 +f 48/55/21 47/56/21 23/57/21 +f 19/58/22 49/59/22 48/60/22 +f 50/61/23 49/62/23 19/63/23 +f 51/64/24 50/65/24 17/66/24 +f 52/67/25 51/68/25 15/69/25 +f 11/70/26 53/71/26 52/72/26 +f 38/73/27 53/74/27 11/75/27 +f 8/76/28 55/77/28 54/78/28 +f 56/79/29 55/80/29 8/81/29 +f 12/82/30 57/83/30 56/84/30 +f 58/85/31 57/86/31 12/87/31 +f 59/88/32 58/89/32 14/90/32 +f 60/91/33 59/92/33 16/93/33 +f 61/94/34 60/95/34 18/96/34 +f 22/97/35 62/98/35 61/99/35 +f 63/100/36 62/101/36 22/102/36 +f 64/103/37 63/104/37 24/105/37 +f 28/106/38 65/107/38 64/108/38 +f 66/109/39 65/110/39 28/111/39 +f 67/112/40 66/113/40 30/114/40 +f 68/115/41 67/116/41 32/117/41 +f 36/118/42 69/119/42 68/120/42 +f 54/121/43 69/122/43 36/123/43 +f 72/124/44 71/21/44 39/32/44 +f 41/34/45 73/125/45 72/124/45 +f 42/37/46 74/126/46 73/125/46 +f 43/40/47 75/127/47 74/126/47 +f 76/128/48 75/127/48 43/45/48 +f 45/46/49 77/26/49 76/128/49 +f 46/49/50 78/129/50 77/26/50 +f 79/130/51 78/129/51 46/53/51 +f 48/55/52 80/131/52 79/130/52 +f 81/27/53 80/131/53 48/60/53 +f 50/61/54 82/132/54 81/27/54 +f 83/133/55 82/132/55 50/65/55 +f 84/134/56 83/133/56 51/68/56 +f 85/28/57 84/134/57 52/72/57 +f 70/22/58 85/28/58 53/74/58 +f 93/135/59 97/136/59 101/137/59 +f 55/77/60 87/138/60 86/139/60 +f 88/140/61 87/138/61 55/80/61 +f 57/83/62 89/141/62 88/140/62 +f 90/142/63 89/141/63 57/86/63 +f 91/143/64 90/142/64 58/89/64 +f 92/144/65 91/143/65 59/92/65 +f 93/135/66 92/144/66 60/95/66 +f 62/98/67 94/145/67 93/135/67 +f 95/146/68 94/145/68 62/101/68 +f 96/147/69 95/146/69 63/104/69 +f 65/107/70 97/136/70 96/147/70 +f 98/148/71 97/136/71 65/110/71 +f 67/112/72 99/149/72 98/148/72 +f 100/150/73 99/149/73 67/116/73 +f 101/137/74 100/150/74 68/120/74 +f 54/121/75 86/139/75 101/137/75 +f 4/151/76 5/152/76 102/13/76 +f 109/16/77 2/153/77 111/154/77 +f 102/13/11 23/155/11 3/8/11 +f 108/15/78 117/14/78 116/156/78 +f 107/157/79 116/156/79 115/158/79 +f 106/159/80 115/158/80 114/160/80 +f 105/161/81 114/160/81 113/162/81 +f 104/163/82 113/162/82 112/164/82 +f 110/165/83 1/166/83 103/167/83 +f 110/165/84 13/6/84 1/166/84 +f 32/168/85 111/169/85 2/170/85 +f 106/171/59 5/152/59 4/151/59 +f 106/171/59 4/151/59 107/172/59 +f 107/172/59 4/151/59 108/173/59 +f 2/174/59 109/175/59 4/151/59 +f 109/175/59 108/173/59 4/151/59 +f 106/171/59 105/176/59 5/152/59 +f 104/177/59 5/152/59 105/176/59 +f 103/178/59 5/152/59 104/177/59 +f 5/152/59 103/178/59 1/179/59 +f 23/155/11 102/13/11 21/180/11 +f 19/181/11 21/180/11 102/13/11 +f 17/182/11 19/181/11 102/13/11 +f 15/183/11 17/182/11 102/13/11 +f 23/155/11 25/184/11 3/8/11 +f 25/184/11 27/185/11 3/8/11 +f 27/185/11 29/186/11 3/8/11 +f 3/8/11 29/186/11 31/187/11 +f 120/188/76 121/189/76 122/190/76 +f 122/190/11 115/191/11 119/192/11 +f 22/193/59 121/189/59 120/188/59 +f 22/193/59 20/194/59 121/189/59 +f 115/191/11 122/190/11 114/195/11 +f 115/191/11 116/196/11 119/192/11 +f 24/197/59 22/193/59 120/188/59 +f 116/196/11 117/198/11 119/192/11 +f 117/198/11 118/199/11 119/192/11 +f 118/199/11 111/200/11 119/192/11 +f 30/201/4 120/188/4 119/192/4 +f 26/202/59 24/197/59 120/188/59 +f 28/203/59 26/202/59 120/188/59 +f 30/204/59 28/203/59 120/188/59 +f 113/205/11 114/195/11 122/190/11 +f 112/206/11 113/205/11 122/190/11 +f 112/206/11 122/190/11 110/207/11 +f 122/190/5 121/189/5 14/208/5 +f 16/209/59 14/210/59 121/189/59 +f 18/211/59 16/209/59 121/189/59 +f 20/194/59 18/211/59 121/189/59 +f 126/212/11 125/213/11 134/214/11 +f 125/213/86 123/215/86 132/216/86 +f 128/217/5 127/218/5 129/219/5 +f 133/220/4 134/221/4 132/222/4 +f 136/223/4 135/224/4 137/225/4 +f 125/226/5 126/212/5 124/227/5 +f 124/227/59 131/228/59 132/229/59 +f 133/220/76 131/228/76 124/227/76 +f 137/230/86 135/231/86 128/232/86 +f 135/231/11 136/223/11 127/218/11 +f 137/233/59 130/234/59 129/219/59 +f 129/219/76 127/218/76 136/223/76 +f 140/235/87 142/236/87 141/237/87 +f 142/236/88 144/238/88 143/239/88 +f 144/238/89 146/240/89 145/241/89 +f 146/242/90 148/243/90 147/244/90 +f 147/244/91 148/243/91 150/245/91 +f 149/246/92 150/245/92 152/247/92 +f 151/248/93 152/247/93 154/249/93 +f 153/250/94 154/249/94 156/251/94 +f 155/252/95 156/251/95 158/253/95 +f 158/253/96 160/254/96 159/255/96 +f 154/249/86 152/247/86 169/256/86 +f 162/257/97 140/235/97 139/258/97 +f 160/254/98 162/257/98 161/259/98 +f 174/260/97 186/261/97 176/262/97 +f 150/245/86 168/263/86 169/264/86 +f 148/243/86 167/265/86 168/266/86 +f 146/242/86 166/267/86 167/268/86 +f 162/257/86 174/269/86 164/270/86 +f 140/235/86 164/271/86 163/272/86 +f 144/238/86 165/273/86 166/274/86 +f 160/254/86 173/275/86 174/276/86 +f 142/236/86 163/277/86 165/278/86 +f 158/253/86 172/279/86 173/280/86 +f 156/251/86 171/281/86 172/282/86 +f 156/251/86 154/249/86 170/283/86 +f 180/284/86 179/285/86 191/286/86 +f 163/287/88 175/288/88 177/289/88 +f 171/290/95 183/291/95 184/292/95 +f 168/293/92 180/284/92 181/294/92 +f 165/295/89 177/289/89 178/296/89 +f 172/297/96 184/292/96 185/298/96 +f 169/299/93 181/294/93 182/300/93 +f 166/301/90 178/296/90 179/285/90 +f 173/302/98 185/298/98 186/261/98 +f 164/303/87 176/262/87 175/288/87 +f 170/304/94 182/300/94 183/291/94 +f 167/305/91 179/285/91 180/284/91 +f 191/306/91 203/307/91 204/308/91 +f 186/261/86 198/309/86 188/310/86 +f 177/289/86 175/288/86 187/311/86 +f 183/291/86 195/312/86 196/313/86 +f 181/294/86 180/284/86 192/314/86 +f 178/296/86 177/289/86 189/315/86 +f 184/292/86 196/313/86 197/316/86 +f 182/300/86 181/294/86 193/317/86 +f 179/285/86 178/296/86 190/318/86 +f 185/298/86 197/316/86 198/309/86 +f 176/262/86 188/310/86 187/311/86 +f 183/291/86 182/300/86 194/319/86 +f 207/320/86 205/321/86 201/322/86 +f 198/323/97 210/324/97 200/325/97 +f 187/326/88 199/327/88 201/322/88 +f 195/328/95 207/320/95 208/329/95 +f 192/330/92 204/308/92 205/321/92 +f 189/331/89 201/322/89 202/332/89 +f 196/333/96 208/329/96 209/334/96 +f 193/335/93 205/321/93 206/336/93 +f 190/337/90 202/332/90 203/307/90 +f 197/338/98 209/334/98 210/324/98 +f 188/339/87 200/325/87 199/327/87 +f 194/340/94 206/336/94 207/320/94 +f 6/24/1 7/1/1 8/3/1 +f 8/3/2 9/2/2 10/5/2 +f 10/5/3 11/4/3 12/7/3 +f 4/151/4 3/8/4 2/10/4 +f 5/152/5 1/11/5 102/13/5 +f 118/341/6 117/14/6 109/16/6 +f 32/168/7 33/17/7 34/19/7 +f 38/30/8 39/20/8 70/22/8 +f 36/25/9 37/23/9 6/24/9 +f 34/19/10 35/18/10 36/25/10 +f 85/28/11 70/22/11 71/21/11 +f 71/21/11 72/124/11 73/125/11 +f 73/125/11 74/126/11 75/127/11 +f 75/127/11 76/128/11 77/26/11 +f 77/26/11 78/129/11 79/130/11 +f 79/130/11 80/131/11 77/26/11 +f 81/27/11 82/132/11 83/133/11 +f 83/133/11 84/134/11 85/28/11 +f 85/28/11 71/21/11 77/26/11 +f 73/125/11 75/127/11 77/26/11 +f 77/26/11 80/131/11 81/27/11 +f 81/27/11 83/133/11 85/28/11 +f 71/21/11 73/125/11 77/26/11 +f 9/342/12 7/29/12 38/30/12 +f 37/343/13 40/31/13 7/33/13 +f 35/344/14 41/34/14 37/36/14 +f 33/345/15 42/37/15 35/39/15 +f 31/346/16 43/40/16 33/42/16 +f 31/347/17 29/43/17 43/45/17 +f 27/348/18 45/46/18 29/48/18 +f 25/349/19 46/49/19 27/51/19 +f 23/350/20 47/52/20 25/54/20 +f 21/351/21 48/55/21 23/57/21 +f 21/352/22 19/58/22 48/60/22 +f 17/353/23 50/61/23 19/63/23 +f 15/354/24 51/64/24 17/66/24 +f 13/355/25 52/67/25 15/69/25 +f 13/356/26 11/70/26 52/72/26 +f 9/357/27 38/73/27 11/75/27 +f 6/358/28 8/76/28 54/78/28 +f 10/359/29 56/79/29 8/81/29 +f 10/360/30 12/82/30 56/84/30 +f 14/361/31 58/85/31 12/87/31 +f 16/362/32 59/88/32 14/90/32 +f 18/363/33 60/91/33 16/93/33 +f 20/364/34 61/94/34 18/96/34 +f 20/365/35 22/97/35 61/99/35 +f 24/366/36 63/100/36 22/102/36 +f 26/367/37 64/103/37 24/105/37 +f 26/368/38 28/106/38 64/108/38 +f 30/369/39 66/109/39 28/111/39 +f 32/370/40 67/112/40 30/114/40 +f 34/371/41 68/115/41 32/117/41 +f 34/372/42 36/118/42 68/120/42 +f 6/373/43 54/121/43 36/123/43 +f 40/31/44 72/124/44 39/32/44 +f 40/35/45 41/34/45 72/124/45 +f 41/38/46 42/37/46 73/125/46 +f 42/41/47 43/40/47 74/126/47 +f 44/44/48 76/128/48 43/45/48 +f 44/47/49 45/46/49 76/128/49 +f 45/50/50 46/49/50 77/26/50 +f 47/52/51 79/130/51 46/53/51 +f 47/56/52 48/55/52 79/130/52 +f 49/59/53 81/27/53 48/60/53 +f 49/62/54 50/61/54 81/27/54 +f 51/64/55 83/133/55 50/65/55 +f 52/67/56 84/134/56 51/68/56 +f 53/71/57 85/28/57 52/72/57 +f 38/73/58 70/22/58 53/74/58 +f 101/137/59 86/139/59 87/138/59 +f 87/138/59 88/140/59 89/141/59 +f 89/141/59 90/142/59 91/143/59 +f 91/143/59 92/144/59 89/141/59 +f 93/135/59 94/145/59 95/146/59 +f 95/146/59 96/147/59 97/136/59 +f 97/136/59 98/148/59 99/149/59 +f 99/149/59 100/150/59 97/136/59 +f 101/137/59 87/138/59 93/135/59 +f 89/141/59 92/144/59 93/135/59 +f 93/135/59 95/146/59 97/136/59 +f 97/136/59 100/150/59 101/137/59 +f 87/138/59 89/141/59 93/135/59 +f 54/78/60 55/77/60 86/139/60 +f 56/79/61 88/140/61 55/80/61 +f 56/84/62 57/83/62 88/140/62 +f 58/85/63 90/142/63 57/86/63 +f 59/88/64 91/143/64 58/89/64 +f 60/91/65 92/144/65 59/92/65 +f 61/94/66 93/135/66 60/95/66 +f 61/99/67 62/98/67 93/135/67 +f 63/100/68 95/146/68 62/101/68 +f 64/103/69 96/147/69 63/104/69 +f 64/108/70 65/107/70 96/147/70 +f 66/109/71 98/148/71 65/110/71 +f 66/113/72 67/112/72 98/148/72 +f 68/115/73 100/150/73 67/116/73 +f 69/119/74 101/137/74 68/120/74 +f 69/122/75 54/121/75 101/137/75 +f 3/8/76 4/151/76 102/13/76 +f 118/341/77 109/16/77 111/154/77 +f 107/157/78 108/15/78 116/156/78 +f 106/159/79 107/157/79 115/158/79 +f 105/161/80 106/159/80 114/160/80 +f 104/163/81 105/161/81 113/162/81 +f 103/167/82 104/163/82 112/164/82 +f 112/164/83 110/165/83 103/167/83 +f 15/374/84 1/166/84 13/6/84 +f 110/165/84 14/375/84 12/7/84 +f 12/7/84 13/6/84 110/165/84 +f 2/170/85 31/376/85 33/17/85 +f 33/17/85 32/168/85 2/170/85 +f 30/377/85 111/169/85 32/168/85 +f 119/192/76 120/188/76 122/190/76 +f 111/378/4 30/201/4 119/192/4 +f 110/379/5 122/190/5 14/208/5 +f 133/220/11 126/212/11 134/214/11 +f 134/214/86 125/213/86 132/216/86 +f 130/380/5 128/217/5 129/219/5 +f 131/228/4 133/220/4 132/222/4 +f 138/381/4 136/223/4 137/225/4 +f 123/382/5 125/226/5 124/227/5 +f 123/383/59 124/227/59 132/229/59 +f 126/212/76 133/220/76 124/227/76 +f 130/384/86 137/230/86 128/232/86 +f 128/232/11 135/231/11 127/218/11 +f 138/381/59 137/233/59 129/219/59 +f 138/381/76 129/219/76 136/223/76 +f 139/258/87 140/235/87 141/237/87 +f 141/237/88 142/236/88 143/239/88 +f 143/239/89 144/238/89 145/241/89 +f 145/385/90 146/242/90 147/244/90 +f 149/246/91 147/244/91 150/245/91 +f 151/248/92 149/246/92 152/247/92 +f 153/250/93 151/248/93 154/249/93 +f 155/252/94 153/250/94 156/251/94 +f 157/386/95 155/252/95 158/253/95 +f 157/386/96 158/253/96 159/255/96 +f 170/387/86 154/249/86 169/256/86 +f 161/259/97 162/257/97 139/258/97 +f 159/255/98 160/254/98 161/259/98 +f 164/388/97 174/260/97 176/262/97 +f 152/247/86 150/245/86 169/264/86 +f 150/245/86 148/243/86 168/266/86 +f 148/243/86 146/242/86 167/268/86 +f 140/235/86 162/257/86 164/270/86 +f 142/236/86 140/235/86 163/272/86 +f 146/240/86 144/238/86 166/274/86 +f 162/257/86 160/254/86 174/276/86 +f 144/238/86 142/236/86 165/278/86 +f 160/254/86 158/253/86 173/280/86 +f 158/253/86 156/251/86 172/282/86 +f 171/389/86 156/251/86 170/283/86 +f 192/314/86 180/284/86 191/286/86 +f 165/390/88 163/287/88 177/289/88 +f 172/391/95 171/290/95 184/292/95 +f 169/392/92 168/293/92 181/294/92 +f 166/393/89 165/295/89 178/296/89 +f 173/394/96 172/297/96 185/298/96 +f 170/395/93 169/299/93 182/300/93 +f 167/396/90 166/301/90 179/285/90 +f 174/397/98 173/302/98 186/261/98 +f 163/398/87 164/303/87 175/288/87 +f 171/399/94 170/304/94 183/291/94 +f 168/400/91 167/305/91 180/284/91 +f 192/401/91 191/306/91 204/308/91 +f 176/262/86 186/261/86 188/310/86 +f 189/315/86 177/289/86 187/311/86 +f 184/292/86 183/291/86 196/313/86 +f 193/317/86 181/294/86 192/314/86 +f 190/318/86 178/296/86 189/315/86 +f 185/298/86 184/292/86 197/316/86 +f 194/319/86 182/300/86 193/317/86 +f 191/286/86 179/285/86 190/318/86 +f 186/261/86 185/298/86 198/309/86 +f 175/288/86 176/262/86 187/311/86 +f 195/312/86 183/291/86 194/319/86 +f 201/322/86 199/327/86 200/325/86 +f 200/325/86 210/324/86 201/322/86 +f 209/334/86 208/329/86 207/320/86 +f 207/320/86 206/336/86 205/321/86 +f 205/321/86 204/308/86 203/307/86 +f 203/307/86 202/332/86 201/322/86 +f 201/322/86 210/324/86 209/334/86 +f 209/334/86 207/320/86 201/322/86 +f 205/321/86 203/307/86 201/322/86 +f 188/402/97 198/323/97 200/325/97 +f 189/403/88 187/326/88 201/322/88 +f 196/404/95 195/328/95 208/329/95 +f 193/405/92 192/330/92 205/321/92 +f 190/406/89 189/331/89 202/332/89 +f 197/407/96 196/333/96 209/334/96 +f 194/408/93 193/335/93 206/336/93 +f 191/409/90 190/337/90 203/307/90 +f 198/410/98 197/338/98 210/324/98 +f 187/411/87 188/339/87 199/327/87 +f 195/412/94 194/340/94 207/320/94 diff --git a/assets/hbm/textures/blocks/fluid_duct.png b/assets/hbm/textures/blocks/fluid_duct.png index 429166d5f..a5b49d7ce 100644 Binary files a/assets/hbm/textures/blocks/fluid_duct.png and b/assets/hbm/textures/blocks/fluid_duct.png differ diff --git a/assets/hbm/textures/blocks/fluid_duct_alt.png b/assets/hbm/textures/blocks/fluid_duct_alt.png new file mode 100644 index 000000000..a5adf5554 Binary files /dev/null and b/assets/hbm/textures/blocks/fluid_duct_alt.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index f44c86ccf..67b30bef3 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -406,6 +406,8 @@ public class ModBlocks { public static Block dummy_port_assembler; public static Block dummy_block_chemplant; public static Block dummy_port_chemplant; + public static Block dummy_block_fluidtank; + public static Block dummy_port_fluidtank; private static void initializeBlock() { @@ -719,6 +721,8 @@ public class ModBlocks { dummy_port_assembler = new DummyBlockAssembler(Material.iron).setBlockName("dummy_port_assembler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_block_chemplant = new DummyBlockChemplant(Material.iron).setBlockName("dummy_block_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_port_chemplant = new DummyBlockChemplant(Material.iron).setBlockName("dummy_port_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_block_fluidtank = new DummyBlockFluidTank(Material.iron).setBlockName("dummy_block_fluidtank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_port_fluidtank = new DummyBlockFluidTank(Material.iron).setBlockName("dummy_port_fluidtank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); } private static void registerBlock() { @@ -1017,6 +1021,8 @@ public class ModBlocks { GameRegistry.registerBlock(dummy_port_assembler, dummy_port_assembler.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_chemplant, dummy_block_chemplant.getUnlocalizedName()); GameRegistry.registerBlock(dummy_port_chemplant, dummy_port_chemplant.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_block_fluidtank, dummy_block_fluidtank.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_port_fluidtank, dummy_port_fluidtank.getUnlocalizedName()); //Other Technical Blocks GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName()); diff --git a/com/hbm/blocks/machine/DummyBlockFluidTank.java b/com/hbm/blocks/machine/DummyBlockFluidTank.java new file mode 100644 index 000000000..1aba47b74 --- /dev/null +++ b/com/hbm/blocks/machine/DummyBlockFluidTank.java @@ -0,0 +1,106 @@ +package com.hbm.blocks.machine; + +import java.util.Random; + +import com.hbm.blocks.ModBlocks; +import com.hbm.interfaces.IDummy; +import com.hbm.main.MainRegistry; +import com.hbm.tileentity.TileEntityDummy; +import com.hbm.tileentity.TileEntityMachineCyclotron; +import com.hbm.tileentity.TileEntityMachineFluidTank; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class DummyBlockFluidTank extends BlockContainer implements IDummy { + + public static boolean safeBreak = false; + + public DummyBlockFluidTank(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityDummy(); + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int i) + { + if(!safeBreak) { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + //world.getBlock(a, b, c).breakBlock(world, a, b, c, block, i); + if(!world.isRemote) + world.func_147480_a(a, b, c, true); + } + } + world.removeTileEntity(x, y, z); + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public Item getItem(World world, int x, int y, int z) + { + return Item.getItemFromBlock(ModBlocks.machine_fluidtank); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + TileEntityMachineFluidTank entity = (TileEntityMachineFluidTank) world.getTileEntity(a, b, c); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_fluidtank, world, a, b, c); + } + } + return true; + } else { + return false; + } + } +} diff --git a/com/hbm/blocks/machine/MachineFluidTank.java b/com/hbm/blocks/machine/MachineFluidTank.java index 7bfc376c9..7722a3a9e 100644 --- a/com/hbm/blocks/machine/MachineFluidTank.java +++ b/com/hbm/blocks/machine/MachineFluidTank.java @@ -1,6 +1,10 @@ package com.hbm.blocks.machine; +import java.util.Random; + import com.hbm.blocks.ModBlocks; +import com.hbm.handler.MultiblockHandler; +import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityDummy; import com.hbm.tileentity.TileEntityMachineFluidTank; @@ -9,11 +13,15 @@ import com.hbm.tileentity.TileEntityMachineGasFlare; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; -public class MachineFluidTank extends BlockContainer { +public class MachineFluidTank extends BlockContainer implements IMultiblock { public MachineFluidTank(Material p_i45386_1_) { super(p_i45386_1_); @@ -23,6 +31,26 @@ public class MachineFluidTank extends BlockContainer { public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityMachineFluidTank(); } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + return Item.getItemFromBlock(ModBlocks.machine_fluidtank); + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { @@ -42,4 +70,190 @@ public class MachineFluidTank extends BlockContainer { } } + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + + if (i == 0) { + world.setBlockMetadataWithNotify(x, y, z, 5, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.fluidTankDimensionEW)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.fluidTankDimensionEW, ModBlocks.dummy_block_fluidtank); + + // + DummyBlockFluidTank.safeBreak = true; + world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te = world.getTileEntity(x + 1, y, z + 1); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te1 = world.getTileEntity(x + 1, y, z - 1); + if(te1 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te1; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te2 = world.getTileEntity(x - 1, y, z + 1); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te3 = world.getTileEntity(x - 1, y, z - 1); + if(te3 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te3; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockFluidTank.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); + } + if (i == 1) { + world.setBlockMetadataWithNotify(x, y, z, 3, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.fluidTankDimensionNS)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.fluidTankDimensionNS, ModBlocks.dummy_block_fluidtank); + + // + DummyBlockFluidTank.safeBreak = true; + world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te = world.getTileEntity(x + 1, y, z + 1); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te1 = world.getTileEntity(x + 1, y, z - 1); + if(te1 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te1; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te2 = world.getTileEntity(x - 1, y, z + 1); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te3 = world.getTileEntity(x - 1, y, z - 1); + if(te3 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te3; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockFluidTank.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); + } + if (i == 2) { + world.setBlockMetadataWithNotify(x, y, z, 4, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.fluidTankDimensionEW)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.fluidTankDimensionEW, ModBlocks.dummy_block_fluidtank); + + // + DummyBlockFluidTank.safeBreak = true; + world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te = world.getTileEntity(x + 1, y, z + 1); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te1 = world.getTileEntity(x + 1, y, z - 1); + if(te1 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te1; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te2 = world.getTileEntity(x - 1, y, z + 1); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te3 = world.getTileEntity(x - 1, y, z - 1); + if(te3 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te3; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockFluidTank.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); + } + if (i == 3) { + world.setBlockMetadataWithNotify(x, y, z, 2, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.fluidTankDimensionNS)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.fluidTankDimensionNS, ModBlocks.dummy_block_fluidtank); + + // + DummyBlockFluidTank.safeBreak = true; + world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te = world.getTileEntity(x + 1, y, z + 1); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te1 = world.getTileEntity(x + 1, y, z - 1); + if(te1 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te1; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_fluidtank); + TileEntity te2 = world.getTileEntity(x - 1, y, z + 1); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_fluidtank); + TileEntity te3 = world.getTileEntity(x - 1, y, z - 1); + if(te3 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te3; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockFluidTank.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); + } + } + } diff --git a/com/hbm/handler/MultiblockHandler.java b/com/hbm/handler/MultiblockHandler.java index 8c25b44e8..66246ee8c 100644 --- a/com/hbm/handler/MultiblockHandler.java +++ b/com/hbm/handler/MultiblockHandler.java @@ -56,6 +56,8 @@ public class MultiblockHandler { public static final int[] chemplantDimensionEast = new int[] { 2, 1, 2, 0, 2, 1 }; public static final int[] chemplantDimensionSouth = new int[] { 1, 2, 2, 0, 2, 1 }; public static final int[] chemplantDimensionWest = new int[] { 1, 2, 2, 0, 1, 2 }; + public static final int[] fluidTankDimensionNS = new int[] { 1, 1, 2, 0, 2, 2 }; + public static final int[] fluidTankDimensionEW = new int[] { 2, 2, 2, 0, 1, 1 }; //Approved! public static boolean checkSpace(World world, int x, int y, int z, int[] i) { diff --git a/com/hbm/interfaces/IFluidAcceptor.java b/com/hbm/interfaces/IFluidAcceptor.java index eb93b8da4..abc355db5 100644 --- a/com/hbm/interfaces/IFluidAcceptor.java +++ b/com/hbm/interfaces/IFluidAcceptor.java @@ -4,10 +4,10 @@ import com.hbm.handler.FluidTypeHandler.FluidType; public interface IFluidAcceptor { - void setFluidFill(int i, FluidType type); + void setAFluidFill(int i, FluidType type); - int getFluidFill(FluidType type); + int getAFluidFill(FluidType type); - int getMaxFluidFill(FluidType type); + int getMaxAFluidFill(FluidType type); } diff --git a/com/hbm/interfaces/IFluidSource.java b/com/hbm/interfaces/IFluidSource.java index fbc876056..29e81d3d1 100644 --- a/com/hbm/interfaces/IFluidSource.java +++ b/com/hbm/interfaces/IFluidSource.java @@ -11,9 +11,9 @@ public interface IFluidSource { void fillFluid(int x, int y, int z, boolean newTact, FluidType type); boolean getTact(); - int getFluidFill(FluidType type); - void setFluidFill(int i, FluidType type); - List getFluidList(); - void clearFluidList(); + int getSFluidFill(FluidType type); + void setSFluidFill(int i, FluidType type); + List getFluidList(FluidType type); + void clearFluidList(FluidType type); } diff --git a/com/hbm/inventory/container/ContainerMachineFluidTank.java b/com/hbm/inventory/container/ContainerMachineFluidTank.java index 50e2cd03a..833364f07 100644 --- a/com/hbm/inventory/container/ContainerMachineFluidTank.java +++ b/com/hbm/inventory/container/ContainerMachineFluidTank.java @@ -22,8 +22,8 @@ public class ContainerMachineFluidTank extends Container { this.addSlotToContainer(new Slot(tedf, 0, 8, 17)); this.addSlotToContainer(new Slot(tedf, 1, 8, 53)); - this.addSlotToContainer(new Slot(tedf, 2, 53, 17)); - this.addSlotToContainer(new Slot(tedf, 3, 53, 53)); + this.addSlotToContainer(new Slot(tedf, 2, 53 - 18, 17)); + this.addSlotToContainer(new Slot(tedf, 3, 53 - 18, 53)); this.addSlotToContainer(new Slot(tedf, 4, 125, 17)); this.addSlotToContainer(new Slot(tedf, 5, 125, 53)); this.addSlotToContainer(new Slot(tedf, 6, 152, 17)); @@ -64,10 +64,10 @@ public class ContainerMachineFluidTank extends Container { return null; } } - /*else if (!this.mergeItemStack(var5, 0, 2, false)) + else if (!this.mergeItemStack(var5, 0, 6, false)) { return null; - }*/ + } if (var5.stackSize == 0) { diff --git a/com/hbm/items/tool/ItemFluidIdentifier.java b/com/hbm/items/tool/ItemFluidIdentifier.java index 88cbc3789..2f2393f59 100644 --- a/com/hbm/items/tool/ItemFluidIdentifier.java +++ b/com/hbm/items/tool/ItemFluidIdentifier.java @@ -26,12 +26,12 @@ public class ItemFluidIdentifier extends Item { this.setMaxDamage(0); } - @Override + /*@Override public String getUnlocalizedName(ItemStack stack) { int i = stack.getItemDamage(); return super.getUnlocalizedName() + "." + FluidType.getEnum(i).getName(); - } + }*/ @Override @SideOnly(Side.CLIENT) diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 346cce327..a91064fab 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -318,13 +318,16 @@ public class Library { public static boolean checkFluidConnectables(World world, int x, int y, int z, FluidType type) { TileEntity tileentity = world.getTileEntity(x, y, z); - if((tileentity != null && tileentity instanceof TileEntityFluidDuct) || + if(tileentity != null && tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).type == type) + return true; + if((tileentity != null && (tileentity instanceof IFluidAcceptor || + tileentity instanceof IFluidSource)) || world.getBlock(x, y, z) == ModBlocks.dummy_port_well || world.getBlock(x, y, z) == ModBlocks.dummy_port_flare || - world.getBlock(x, y, z) == ModBlocks.dummy_port_chemplant) + world.getBlock(x, y, z) == ModBlocks.dummy_port_chemplant || + world.getBlock(x, y, z) == ModBlocks.dummy_port_fluidtank) { - if(((TileEntityFluidDuct)tileentity).type == type) - return true; + return true; } return false; } @@ -368,7 +371,7 @@ public class Library { return false; } - public static boolean checkGasUnionListForFluids(List list, IFluidSource that) { + public static boolean checkUnionListForFluids(List list, IFluidSource that) { for(UnionOfTileEntitiesAndBooleansForFluids union : list) { @@ -1160,11 +1163,17 @@ public class Library { Block block = worldObj.getBlock(x, y, z); TileEntity tileentity = worldObj.getTileEntity(x, y, z); + //Chemplant + if(block == ModBlocks.dummy_port_chemplant) + { + tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); + } + if(tileentity instanceof IFluidDuct) { if(tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).type.name().equals(type.name())) { - if(Library.checkGasUnionListForFluids(((TileEntityFluidDuct)tileentity).uoteab, that)) + if(Library.checkUnionListForFluids(((TileEntityFluidDuct)tileentity).uoteab, that)) { for(int i = 0; i < ((TileEntityFluidDuct)tileentity).uoteab.size(); i++) { @@ -1190,31 +1199,54 @@ public class Library { if(tileentity instanceof IFluidAcceptor && newTact && !(tileentity instanceof TileEntityMachineFluidTank && ((TileEntityMachineFluidTank)tileentity).dna())) { - that.getFluidList().add((IFluidAcceptor)tileentity); + that.getFluidList(type).add((IFluidAcceptor)tileentity); } if(!newTact) { - int size = that.getFluidList().size(); + int size = that.getFluidList(type).size(); if(size > 0) { - int part = that.getFluidFill(type) / size; - for(IFluidAcceptor consume : that.getFluidList()) + int part = that.getSFluidFill(type) / size; + for(IFluidAcceptor consume : that.getFluidList(type)) { - if(consume.getFluidFill(type) < consume.getMaxFluidFill(type)) + if(consume.getAFluidFill(type) < consume.getMaxAFluidFill(type)) { - if(consume.getMaxFluidFill(type) - consume.getFluidFill(type) >= part) + if(consume.getMaxAFluidFill(type) - consume.getAFluidFill(type) >= part) { - that.setFluidFill(that.getFluidFill(type)-part, type); - consume.setFluidFill(consume.getFluidFill(type) + part, type); + that.setSFluidFill(that.getSFluidFill(type)-part, type); + consume.setAFluidFill(consume.getAFluidFill(type) + part, type); } else { - that.setFluidFill(that.getFluidFill(type) - (consume.getMaxFluidFill(type) - consume.getFluidFill(type)), type); - consume.setFluidFill(consume.getMaxFluidFill(type), type); + that.setSFluidFill(that.getSFluidFill(type) - (consume.getMaxAFluidFill(type) - consume.getAFluidFill(type)), type); + consume.setAFluidFill(consume.getMaxAFluidFill(type), type); } } } } - that.clearFluidList(); + that.clearFluidList(type); } } + + public static boolean isArrayEmpty(Object[] array) { + if(array == null) + return true; + if(array.length == 0) + return true; + + boolean flag = true; + + for(int i = 0; i < array.length; i++) { + if(array[i] != null) + flag = false; + } + + return flag; + } + + public static ItemStack carefulCopy(ItemStack stack) { + if(stack == null) + return null; + else + return stack.copy(); + } } diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 751690da9..9b825979d 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -174,6 +174,7 @@ import com.hbm.render.tileentity.RenderDecoBlock; import com.hbm.render.tileentity.RenderDecoBlockAlt; import com.hbm.render.tileentity.RenderDerrick; import com.hbm.render.tileentity.RenderFluidDuct; +import com.hbm.render.tileentity.RenderFluidTank; import com.hbm.render.tileentity.RenderGasDuct; import com.hbm.render.tileentity.RenderGasFlare; import com.hbm.render.tileentity.RenderIGenerator; @@ -226,6 +227,7 @@ import com.hbm.tileentity.TileEntityMachineAssembler; import com.hbm.tileentity.TileEntityMachineCentrifuge; import com.hbm.tileentity.TileEntityMachineChemplant; import com.hbm.tileentity.TileEntityMachineCyclotron; +import com.hbm.tileentity.TileEntityMachineFluidTank; import com.hbm.tileentity.TileEntityMachineGasFlare; import com.hbm.tileentity.TileEntityMachinePuF6Tank; import com.hbm.tileentity.TileEntityMachineUF6Tank; @@ -287,6 +289,7 @@ public class ClientProxy extends ServerProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningDrill.class, new RenderMiningDrill()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemplant.class, new RenderChemplant()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFluidTank.class, new RenderFluidTank()); //RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new RenderRocket()); RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new RenderSnowball(ModItems.man_core)); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 0a00d4a23..f6a3f90ca 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -158,6 +158,7 @@ import com.hbm.tileentity.TileEntityMachineCyclotron; import com.hbm.tileentity.TileEntityMachineDeuterium; import com.hbm.tileentity.TileEntityMachineDiesel; import com.hbm.tileentity.TileEntityMachineElectricFurnace; +import com.hbm.tileentity.TileEntityMachineFluidTank; import com.hbm.tileentity.TileEntityMachineGasFlare; import com.hbm.tileentity.TileEntityMachineGenerator; import com.hbm.tileentity.TileEntityMachinePuF6Tank; @@ -467,6 +468,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityMachineAssembler.class, "tileentity_assembly_machine"); GameRegistry.registerTileEntity(TileEntityFluidDuct.class, "tileentity_universal_duct"); GameRegistry.registerTileEntity(TileEntityMachineChemplant.class, "tileentity_chemical_plant"); + GameRegistry.registerTileEntity(TileEntityMachineFluidTank.class, "tileentity_fluid_tank"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); diff --git a/com/hbm/render/tileentity/RenderFluidTank.java b/com/hbm/render/tileentity/RenderFluidTank.java new file mode 100644 index 000000000..a4f0849c1 --- /dev/null +++ b/com/hbm/render/tileentity/RenderFluidTank.java @@ -0,0 +1,95 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.TileEntityMachineIGenerator; + +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; + +public class RenderFluidTank extends TileEntitySpecialRenderer { + + private static final ResourceLocation body = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/fluidtank_main.obj"); + private static final ResourceLocation rotor = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/fluidtank_label.obj"); + private IModelCustom genModel; + private IModelCustom rotModel; + private ResourceLocation genTexture; + private ResourceLocation rotTexture; + + public RenderFluidTank() + { + genModel = AdvancedModelLoader.loadModel(body); + rotModel = AdvancedModelLoader.loadModel(rotor); + //gadgetTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png"); + genTexture = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png"); + rotTexture = new ResourceLocation(RefStrings.MODID, "textures/models/textureIGenRotor.png"); + } + + @Override + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glRotatef(90, 0F, 1F, 0F); + switch(tileEntity.getBlockMetadata()) + { + case 2: + GL11.glRotatef(90, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 4: + GL11.glRotatef(180, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 3: + GL11.glRotatef(270, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 5: + GL11.glRotatef(0, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + } + + bindTexture(genTexture); + + genModel.renderAll(); + + GL11.glPopMatrix(); + + renderTileEntityAt2(tileEntity, x, y, z, f); + } + + public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glRotatef(90, 0F, 1F, 0F); + switch(tileEntity.getBlockMetadata()) + { + case 2: + GL11.glRotatef(90, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 4: + GL11.glRotatef(180, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 3: + GL11.glRotatef(270, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + case 5: + GL11.glRotatef(0, 0F, 1F, 0F); break; + //GL11.glTranslated(0.5D, 0.0D, 0.0D); + } + + bindTexture(rotTexture); + rotModel.renderAll(); + + GL11.glPopMatrix(); + } +} diff --git a/com/hbm/tileentity/TileEntityFluidDuct.java b/com/hbm/tileentity/TileEntityFluidDuct.java index 746b38af1..c1431a368 100644 --- a/com/hbm/tileentity/TileEntityFluidDuct.java +++ b/com/hbm/tileentity/TileEntityFluidDuct.java @@ -1,6 +1,7 @@ package com.hbm.tileentity; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; @@ -22,8 +23,6 @@ public class TileEntityFluidDuct extends TileEntity implements IFluidDuct { public FluidType type = FluidType.NONE; public List uoteab = new ArrayList(); - //public List uoteab = new ArrayList(); - public TileEntityFluidDuct() { } @@ -60,15 +59,15 @@ public class TileEntityFluidDuct extends TileEntity implements IFluidDuct { @Override public void readFromNBT(NBTTagCompound nbt) { - this.type = FluidType.values()[nbt.getInteger("fluid")]; + super.readFromNBT(nbt); + type = FluidType.getEnum(nbt.getInteger("fluid")); } @Override public void writeToNBT(NBTTagCompound nbt) { - for(int i = 0; i < FluidType.values().length; i++) - if(FluidType.values()[i] == this.type) - nbt.setInteger("fluid", i); + super.writeToNBT(nbt); + nbt.setInteger("fluid", Arrays.asList(FluidType.values()).indexOf(type)); } @Override diff --git a/com/hbm/tileentity/TileEntityMachineAssembler.java b/com/hbm/tileentity/TileEntityMachineAssembler.java index 1961dea4d..958216361 100644 --- a/com/hbm/tileentity/TileEntityMachineAssembler.java +++ b/com/hbm/tileentity/TileEntityMachineAssembler.java @@ -487,75 +487,6 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve return false; } - public boolean hasSpace(ItemStack stack) { - - ItemStack st = stack.copy(); - - if(st == null) - return true; - - for(int i = 1; i < 10; i++) { - if(slots[i] == null) - return true; - } - - int size = st.stackSize; - st.stackSize = 1; - - ItemStack[] fakeArray = slots.clone(); - boolean flag = true; - for(int i = 0; i < stack.stackSize; i++) { - if(!canAddItemToArray(st, fakeArray)) - flag = false; - } - - return flag; - } - - public void addItemToInventory(ItemStack stack) { - - ItemStack st = stack.copy(); - - if(st == null) - return; - - int size = st.stackSize; - st.stackSize = 1; - - for(int i = 0; i < size; i++) - canAddItemToArray(st, this.slots); - - } - - public boolean canAddItemToArray(ItemStack stack, ItemStack[] array) { - - ItemStack st = stack.copy(); - - if(st == null) - return true; - - for(int i = 1; i < 10; i++) { - - if(array[i] != null) { - ItemStack sta = array[i].copy(); - - if(sta != null && sta.getItem() == st.getItem() && sta.stackSize < st.getMaxStackSize()) { - array[i].stackSize++; - return true; - } - } - } - - for(int i = 1; i < 10; i++) { - if(array[i] == null) { - array[i] = stack.copy(); - return true; - } - } - - return false; - } - //boolean true: remove items, boolean false: simulation mode public boolean removeItems(List stack, ItemStack[] array) { diff --git a/com/hbm/tileentity/TileEntityMachineChemplant.java b/com/hbm/tileentity/TileEntityMachineChemplant.java index e961d70c5..580b14439 100644 --- a/com/hbm/tileentity/TileEntityMachineChemplant.java +++ b/com/hbm/tileentity/TileEntityMachineChemplant.java @@ -1,11 +1,14 @@ package com.hbm.tileentity; +import java.util.ArrayList; import java.util.List; import java.util.Random; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IFluidAcceptor; import com.hbm.interfaces.IFluidContainer; +import com.hbm.interfaces.IFluidSource; import com.hbm.inventory.FluidStack; import com.hbm.inventory.FluidTank; import com.hbm.inventory.MachineRecipes; @@ -20,6 +23,7 @@ import com.hbm.packet.TEAssemblerPacket; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -31,7 +35,7 @@ import net.minecraft.tileentity.TileEntityHopper; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.oredict.OreDictionary; -public class TileEntityMachineChemplant extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer { +public class TileEntityMachineChemplant extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor, IFluidSource { private ItemStack slots[]; @@ -44,6 +48,8 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve int consumption = 100; int speed = 100; public FluidTank[] tanks; + public List list1 = new ArrayList(); + public List list2 = new ArrayList(); Random rand = new Random(); @@ -169,6 +175,11 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve this.power = nbt.getInteger("powerTime"); slots = new ItemStack[getSizeInventory()]; + + tanks[0].readFromNBT(nbt, "input1"); + tanks[1].readFromNBT(nbt, "input2"); + tanks[2].readFromNBT(nbt, "output1"); + tanks[3].readFromNBT(nbt, "output2"); for(int i = 0; i < list.tagCount(); i++) { @@ -186,6 +197,11 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve super.writeToNBT(nbt); nbt.setInteger("powerTime", power); NBTTagList list = new NBTTagList(); + + tanks[0].writeToNBT(nbt, "input1"); + tanks[1].writeToNBT(nbt, "input2"); + tanks[2].writeToNBT(nbt, "output1"); + tanks[3].writeToNBT(nbt, "output2"); for(int i = 0; i < slots.length; i++) { @@ -226,9 +242,59 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve @Override public void updateEntity() { + + this.consumption = 100; + this.speed = 100; + + for(int i = 1; i < 4; i++) { + ItemStack stack = slots[i]; + + if(stack != null) { + if(stack.getItem() == ModItems.upgrade_speed_1) { + this.speed -= 25; + this.consumption += 300; + } + if(stack.getItem() == ModItems.upgrade_speed_2) { + this.speed -= 50; + this.consumption += 600; + } + if(stack.getItem() == ModItems.upgrade_speed_3) { + this.speed -= 75; + this.consumption += 900; + } + if(stack.getItem() == ModItems.upgrade_power_1) { + this.consumption -= 30; + this.speed += 5; + } + if(stack.getItem() == ModItems.upgrade_power_2) { + this.consumption -= 60; + this.speed += 10; + } + if(stack.getItem() == ModItems.upgrade_power_3) { + this.consumption -= 90; + this.speed += 15; + } + } + } + + if(speed < 25) + speed = 25; + if(consumption < 10) + consumption = 10; if(!worldObj.isRemote) { + age++; + if(age >= 20) + { + age = 0; + } + + if(age == 9 || age == 19) { + fillFluidInit(tanks[2].getTankType()); + //fillFluidInit(tanks[3].getTankType()); + } + setContainers(); power = Library.chargeTEFromItems(slots, 0, power, maxPower); @@ -241,6 +307,99 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve for(int i = 0; i < 4; i++) { tanks[i].updateTank(xCoord, yCoord, zCoord); } + + FluidStack[] inputs = MachineRecipes.getFluidInputFromTempate(slots[4]); + FluidStack[] outputs = MachineRecipes.getFluidOutputFromTempate(slots[4]); + + if((MachineRecipes.getChemInputFromTempate(slots[4]) != null || !Library.isArrayEmpty(inputs)) && + (MachineRecipes.getChemOutputFromTempate(slots[4]) != null || !Library.isArrayEmpty(outputs))) { + this.maxProgress = (ItemChemistryTemplate.getProcessTime(slots[4]) * speed) / 100; + + if(power >= consumption && removeItems(MachineRecipes.getChemInputFromTempate(slots[4]), cloneItemStackProper(slots)) && hasFluidsStored(inputs)) { + + if(hasSpaceForItems(MachineRecipes.getChemOutputFromTempate(slots[4])) && hasSpaceForFluids(outputs)) { + progress++; + + rotation += 5; + + if(rotation >= 360) + rotation -= 360; + + if(progress >= maxProgress) { + progress = 0; + + addItems(MachineRecipes.getChemOutputFromTempate(slots[4])); + addFluids(outputs); + + removeItems(MachineRecipes.getChemInputFromTempate(slots[4]), slots); + removeFluids(inputs); + } + + power -= consumption; + } + } else + progress = 0; + } else + progress = 0; + + int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); + TileEntity te = null; + if(meta == 2) { + te = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord); + } + if(meta == 3) { + te = worldObj.getTileEntity(xCoord + 2, yCoord, zCoord); + } + if(meta == 4) { + te = worldObj.getTileEntity(xCoord, yCoord, zCoord + 2); + } + if(meta == 5) { + te = worldObj.getTileEntity(xCoord, yCoord, zCoord - 2); + } + + if(te != null && te instanceof TileEntityChest) { + TileEntityChest chest = (TileEntityChest)te; + + for(int i = 5; i < 9; i++) + tryFillContainer(chest, i); + } + + if(te != null && te instanceof TileEntityHopper) { + TileEntityHopper hopper = (TileEntityHopper)te; + + for(int i = 5; i < 9; i++) + tryFillContainer(hopper, i); + } + + te = null; + if(meta == 2) { + te = worldObj.getTileEntity(xCoord + 3, yCoord, zCoord - 1); + } + if(meta == 3) { + te = worldObj.getTileEntity(xCoord - 3, yCoord, zCoord + 1); + } + if(meta == 4) { + te = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord - 3); + } + if(meta == 5) { + te = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord + 3); + } + + if(te != null && te instanceof TileEntityChest) { + TileEntityChest chest = (TileEntityChest)te; + + for(int i = 0; i < chest.getSizeInventory(); i++) + if(tryFillAssembler(chest, i)) + break; + } + + if(te != null && te instanceof TileEntityHopper) { + TileEntityHopper hopper = (TileEntityHopper)te; + + for(int i = 0; i < hopper.getSizeInventory(); i++) + if(tryFillAssembler(hopper, i)) + break; + } } } @@ -259,6 +418,107 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve } } + public boolean hasFluidsStored(FluidStack[] fluids) { + if(Library.isArrayEmpty(fluids)) + return true; + + if((fluids[0] == null || fluids[0] != null && fluids[0].fill <= tanks[0].getFill()) && + (fluids[1] == null || fluids[1] != null && fluids[1].fill <= tanks[1].getFill())) + return true; + + return false; + } + + public boolean hasSpaceForFluids(FluidStack[] fluids) { + if(Library.isArrayEmpty(fluids)) + return true; + + if((fluids[0] == null || fluids[0] != null && tanks[2].getFill() + fluids[0].fill <= tanks[2].getMaxFill()) && + (fluids[1] == null || fluids[1] != null && tanks[3].getFill() + fluids[1].fill <= tanks[3].getMaxFill())) + return true; + + return false; + } + + public void removeFluids(FluidStack[] fluids) { + if(Library.isArrayEmpty(fluids)) + return; + + if(fluids[0] != null) + tanks[0].setFill(tanks[0].getFill() - fluids[0].fill); + if(fluids[1] != null) + tanks[1].setFill(tanks[1].getFill() - fluids[1].fill); + } + + public boolean hasSpaceForItems(ItemStack[] stacks) { + if(stacks == null) + return true; + if(stacks != null && Library.isArrayEmpty(stacks)) + return true; + + ItemStack sta0 = Library.carefulCopy(slots[5]); + if(sta0 != null) + sta0.stackSize = 1; + ItemStack sta1 = Library.carefulCopy(stacks[0]); + if(sta1 != null) + sta1.stackSize = 1; + ItemStack sta2 = Library.carefulCopy(slots[6]); + if(sta2 != null) + sta2.stackSize = 1; + ItemStack sta3 = Library.carefulCopy(stacks[1]); + if(sta3 != null) + sta3.stackSize = 1; + ItemStack sta4 = Library.carefulCopy(slots[7]); + if(sta4 != null) + sta4.stackSize = 1; + ItemStack sta5 = Library.carefulCopy(stacks[2]); + if(sta5 != null) + sta5.stackSize = 1; + ItemStack sta6 = Library.carefulCopy(slots[8]); + if(sta6 != null) + sta6.stackSize = 1; + ItemStack sta7 = Library.carefulCopy(stacks[3]); + if(sta7 != null) + sta7.stackSize = 1; + + if(slots[5] == null || stacks[0] == null || (stacks[0] != null && ItemStack.areItemStacksEqual(sta0, sta1) && ItemStack.areItemStackTagsEqual(sta0, sta1) && slots[5].stackSize + stacks[0].stackSize <= slots[5].getMaxStackSize()) && + slots[6] == null || stacks[1] == null || (stacks[1] != null && ItemStack.areItemStacksEqual(sta2, sta3) && ItemStack.areItemStackTagsEqual(sta2, sta3) && slots[6].stackSize + stacks[1].stackSize <= slots[6].getMaxStackSize()) && + slots[7] == null || stacks[2] == null || (stacks[2] != null && ItemStack.areItemStacksEqual(sta4, sta5) && ItemStack.areItemStackTagsEqual(sta4, sta5) && slots[7].stackSize + stacks[2].stackSize <= slots[7].getMaxStackSize()) && + slots[8] == null || stacks[3] == null || (stacks[3] != null && ItemStack.areItemStacksEqual(sta6, sta7) && ItemStack.areItemStackTagsEqual(sta6, sta7) && slots[8].stackSize + stacks[3].stackSize <= slots[8].getMaxStackSize())) + return true; + + return false; + } + + public void addItems(ItemStack[] stacks) { + if(slots[5] == null && stacks[0] != null) + slots[5] = stacks[0].copy(); + else if (slots[5] != null && stacks[0] != null) + slots[5].stackSize += stacks[0].stackSize; + + if(slots[6] == null && stacks[1] != null) + slots[6] = stacks[1].copy(); + else if (slots[6] != null && stacks[1] != null) + slots[6].stackSize += stacks[1].stackSize; + + if(slots[7] == null && stacks[2] != null) + slots[7] = stacks[2].copy(); + else if (slots[7] != null && stacks[2] != null) + slots[7].stackSize += stacks[2].stackSize; + + if(slots[8] == null && stacks[3] != null) + slots[8] = stacks[3].copy(); + else if (slots[8] != null && stacks[3] != null) + slots[8].stackSize += stacks[3].stackSize; + } + + public void addFluids(FluidStack[] stacks) { + if(stacks[0] != null) + tanks[2].setFill(tanks[2].getFill() + stacks[0].fill); + if(stacks[1] != null) + tanks[3].setFill(tanks[3].getFill() + stacks[1].fill); + } + //I can't believe that worked. public ItemStack[] cloneItemStackProper(ItemStack[] array) { ItemStack[] stack = new ItemStack[array.length]; @@ -328,11 +588,15 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve //Loads assembler's input queue from chests public boolean tryFillAssembler(IInventory inventory, int slot) { + + FluidStack[] inputs = MachineRecipes.getFluidInputFromTempate(slots[4]); + FluidStack[] outputs = MachineRecipes.getFluidOutputFromTempate(slots[4]); - if(MachineRecipes.getOutputFromTempate(slots[4]) == null || MachineRecipes.getRecipeFromTempate(slots[4]) == null) + if(!((MachineRecipes.getChemInputFromTempate(slots[4]) != null || !Library.isArrayEmpty(inputs)) && + (MachineRecipes.getChemOutputFromTempate(slots[4]) != null || !Library.isArrayEmpty(outputs)))) return false; else { - List list = MachineRecipes.getRecipeFromTempate(slots[4]); + List list = MachineRecipes.getChemInputFromTempate(slots[4]); for(int i = 0; i < list.size(); i++) list.get(i).stackSize = 1; @@ -355,7 +619,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve } - for(int i = 6; i < 18; i++) { + for(int i = 13; i < 17; i++) { if(slots[i] != null) { @@ -379,7 +643,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve } } - for(int i = 6; i < 18; i++) { + for(int i = 13; i < 17; i++) { ItemStack sta2 = inventory.getStackInSlot(slot).copy(); if(slots[i] == null && sta2 != null) { @@ -399,75 +663,6 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve return false; } - public boolean hasSpace(ItemStack stack) { - - ItemStack st = stack.copy(); - - if(st == null) - return true; - - for(int i = 1; i < 10; i++) { - if(slots[i] == null) - return true; - } - - int size = st.stackSize; - st.stackSize = 1; - - ItemStack[] fakeArray = slots.clone(); - boolean flag = true; - for(int i = 0; i < stack.stackSize; i++) { - if(!canAddItemToArray(st, fakeArray)) - flag = false; - } - - return flag; - } - - public void addItemToInventory(ItemStack stack) { - - ItemStack st = stack.copy(); - - if(st == null) - return; - - int size = st.stackSize; - st.stackSize = 1; - - for(int i = 0; i < size; i++) - canAddItemToArray(st, this.slots); - - } - - public boolean canAddItemToArray(ItemStack stack, ItemStack[] array) { - - ItemStack st = stack.copy(); - - if(st == null) - return true; - - for(int i = 1; i < 10; i++) { - - if(array[i] != null) { - ItemStack sta = array[i].copy(); - - if(sta != null && sta.getItem() == st.getItem() && sta.stackSize < st.getMaxStackSize()) { - array[i].stackSize++; - return true; - } - } - } - - for(int i = 1; i < 10; i++) { - if(array[i] == null) { - array[i] = stack.copy(); - return true; - } - } - - return false; - } - //boolean true: remove items, boolean false: simulation mode public boolean removeItems(List stack, ItemStack[] array) { @@ -495,7 +690,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve if(st == null) return true; - for(int i = 6; i < 18; i++) { + for(int i = 13; i < 17; i++) { if(array[i] != null) { ItemStack sta = array[i].copy(); @@ -575,4 +770,134 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve if(index < 4 && tanks[index] != null) tanks[index].setTankType(type); } + + @Override + public void setAFluidFill(int i, FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + tanks[0].setFill(i); + else if(type.name().equals(tanks[1].getTankType().name())) + tanks[1].setFill(i); + else if(type.name().equals(tanks[2].getTankType().name())) + tanks[2].setFill(i); + else if(type.name().equals(tanks[3].getTankType().name())) + tanks[3].setFill(i); + } + + @Override + public int getAFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getFill(); + else if(type.name().equals(tanks[2].getTankType().name())) + return tanks[2].getFill(); + else if(type.name().equals(tanks[3].getTankType().name())) + return tanks[3].getFill(); + + return 0; + } + + @Override + public void setSFluidFill(int i, FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + tanks[0].setFill(i); + else if(type.name().equals(tanks[1].getTankType().name())) + tanks[1].setFill(i); + else if(type.name().equals(tanks[2].getTankType().name())) + tanks[2].setFill(i); + else if(type.name().equals(tanks[3].getTankType().name())) + tanks[3].setFill(i); + } + + @Override + public int getSFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getFill(); + else if(type.name().equals(tanks[2].getTankType().name())) + return tanks[2].getFill(); + else if(type.name().equals(tanks[3].getTankType().name())) + return tanks[3].getFill(); + + return 0; + } + + @Override + public int getMaxAFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getMaxFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getMaxFill(); + else if(type.name().equals(tanks[2].getTankType().name())) + return tanks[1].getMaxFill(); + else if(type.name().equals(tanks[3].getTankType().name())) + return tanks[1].getMaxFill(); + + return 0; + } + + @Override + public void fillFluidInit(FluidType type) { + int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); + if(meta == 5) { + fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type); + fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 1, getTact(), type); + fillFluid(this.xCoord + 3, this.yCoord, this.zCoord, getTact(), type); + fillFluid(this.xCoord + 3, this.yCoord, this.zCoord + 1, getTact(), type); + } + + if(meta == 3) { + fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, getTact(), type); + fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 2, getTact(), type); + fillFluid(this.xCoord, this.yCoord, this.zCoord + 3, getTact(), type); + fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 3, getTact(), type); + } + + if(meta == 2) { + fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, getTact(), type); + fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 1, getTact(), type); + fillFluid(this.xCoord - 3, this.yCoord, this.zCoord, getTact(), type); + fillFluid(this.xCoord - 3, this.yCoord, this.zCoord - 1, getTact(), type); + } + + if(meta == 4) { + fillFluid(this.xCoord, this.yCoord, this.zCoord + 2, getTact(), type); + fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 2, getTact(), type); + fillFluid(this.xCoord, this.yCoord, this.zCoord - 3, getTact(), type); + fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 3, getTact(), type); + } + fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type); + } + + @Override + public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) { + Library.transmitFluid(x, y, z, newTact, this, worldObj, type); + } + + @Override + public boolean getTact() { + if (age >= 0 && age < 10) { + return true; + } + + return false; + } + + @Override + public List getFluidList(FluidType type) { + if(type.name().equals(tanks[2].getTankType().name())) + return list1; + if(type.name().equals(tanks[3].getTankType().name())) + return list2; + return new ArrayList(); + } + + @Override + public void clearFluidList(FluidType type) { + if(type.name().equals(tanks[2].getTankType().name())) + list1.clear(); + if(type.name().equals(tanks[3].getTankType().name())) + list2.clear(); + } } diff --git a/com/hbm/tileentity/TileEntityMachineFluidTank.java b/com/hbm/tileentity/TileEntityMachineFluidTank.java index e4221fa5a..73d5b57b1 100644 --- a/com/hbm/tileentity/TileEntityMachineFluidTank.java +++ b/com/hbm/tileentity/TileEntityMachineFluidTank.java @@ -8,6 +8,7 @@ import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IFluidAcceptor; import com.hbm.interfaces.IFluidContainer; import com.hbm.interfaces.IFluidSource; +import com.hbm.interfaces.IMultiblock; import com.hbm.inventory.FluidTank; import com.hbm.items.ModItems; import com.hbm.lib.Library; @@ -200,6 +201,15 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve if(!worldObj.isRemote) { + age++; + if(age >= 20) + { + age = 0; + } + + if((age == 9 || age == 19) && dna()) + fillFluidInit(tank.getTankType()); + tank.loadTank(2, 3, slots); tank.setType(0, 1, slots); tank.unloadTank(4, 5, slots); @@ -236,18 +246,20 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve } @Override - public int getMaxFluidFill(FluidType type) { + public int getMaxAFluidFill(FluidType type) { return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0; } @Override public void fillFluidInit(FluidType type) { - fillFluid(this.xCoord, this.yCoord + 1, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord - 1, this.zCoord, getTact(), type); - fillFluid(this.xCoord - 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord + 1, this.yCoord, this.zCoord, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord - 1, getTact(), type); - fillFluid(this.xCoord, this.yCoord, this.zCoord + 1, getTact(), type); + fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 1, getTact(), type); + fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 1, getTact(), type); + fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 1, getTact(), type); + fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 1, getTact(), type); + fillFluid(this.xCoord - 1, this.yCoord, this.zCoord + 2, getTact(), type); + fillFluid(this.xCoord + 1, this.yCoord, this.zCoord + 2, getTact(), type); + fillFluid(this.xCoord - 1, this.yCoord, this.zCoord - 2, getTact(), type); + fillFluid(this.xCoord + 1, this.yCoord, this.zCoord - 2, getTact(), type); } @Override @@ -265,24 +277,34 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve } @Override - public int getFluidFill(FluidType type) { + public int getAFluidFill(FluidType type) { return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0; } @Override - public void setFluidFill(int i, FluidType type) { + public void setAFluidFill(int i, FluidType type) { if(type.name().equals(tank.getTankType().name())) tank.setFill(i); - } @Override - public List getFluidList() { + public List getFluidList(FluidType type) { return this.list; } @Override - public void clearFluidList() { + public void clearFluidList(FluidType type) { this.list.clear(); } + + @Override + public int getSFluidFill(FluidType type) { + return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0; + } + + @Override + public void setSFluidFill(int i, FluidType type) { + if(type.name().equals(tank.getTankType().name())) + tank.setFill(i); + } }