From 8f660a29844e0cef413faa6ea91dbec5442abbb8 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 28 Nov 2017 21:53:42 +0100 Subject: [PATCH] AMS animation and some base functionality --- assets/hbm/models/ams_limiter_destroyed.obj | 1975 +++++++++++++++++ assets/hbm/models/sphere_iuv.obj | 247 +++ assets/hbm/models/sphere_ruv.obj | 247 +++ assets/hbm/textures/gui/gui_ams_base.png | Bin 4614 -> 6227 bytes .../textures/items/ams_catalyst_aluminium.png | Bin 0 -> 282 bytes .../textures/items/ams_catalyst_beryllium.png | Bin 0 -> 285 bytes .../hbm/textures/items/ams_catalyst_blank.png | Bin 0 -> 271 bytes .../textures/items/ams_catalyst_caesium.png | Bin 0 -> 291 bytes .../textures/items/ams_catalyst_cerium.png | Bin 0 -> 280 bytes .../textures/items/ams_catalyst_cobalt.png | Bin 0 -> 292 bytes .../textures/items/ams_catalyst_copper.png | Bin 0 -> 286 bytes .../textures/items/ams_catalyst_euphemium.png | Bin 0 -> 297 bytes .../hbm/textures/items/ams_catalyst_iron.png | Bin 0 -> 305 bytes .../textures/items/ams_catalyst_lithium.png | Bin 0 -> 297 bytes .../textures/items/ams_catalyst_niobium.png | Bin 0 -> 287 bytes .../textures/items/ams_catalyst_strontium.png | Bin 0 -> 312 bytes .../textures/items/ams_catalyst_thorium.png | Bin 0 -> 302 bytes .../textures/items/ams_catalyst_tungsten.png | Bin 0 -> 280 bytes com/hbm/blocks/ModBlocks.java | 18 +- com/hbm/blocks/machine/BlockAMSBase.java | 23 + com/hbm/blocks/machine/BlockAMSEmitter.java | 83 +- com/hbm/blocks/machine/BlockAMSLimiter.java | 107 +- .../blocks/machine/DummyBlockAMSEmitter.java | 106 + .../blocks/machine/DummyBlockAMSLimiter.java | 106 + com/hbm/blocks/machine/MachineIGenerator.java | 29 - .../entity/grenade/EntityGrenadePulse.java | 2 + com/hbm/explosion/ExplosionLarge.java | 32 + com/hbm/handler/GUIHandler.java | 140 ++ com/hbm/handler/MultiblockHandler.java | 5 + .../inventory/container/ContainerAMSBase.java | 168 ++ .../container/ContainerAMSEmitter.java | 130 ++ .../container/ContainerAMSLimiter.java | 2 +- .../container/ContainerCentrifuge.java | 2 + .../container/ContainerMachineAssembler.java | 2 +- .../container/ContainerMachineChemplant.java | 2 +- com/hbm/inventory/gui/GUIAMSBase.java | 97 + com/hbm/inventory/gui/GUIAMSEmitter.java | 71 + com/hbm/inventory/gui/GUIAMSLimiter.java | 8 + com/hbm/items/ModItems.java | 59 + com/hbm/items/special/ItemCatalyst.java | 17 + com/hbm/lib/Library.java | 20 + com/hbm/main/ResourceManager.java | 5 + com/hbm/packet/AuxGaugePacket.java | 18 +- com/hbm/render/tileentity/RenderAMSBase.java | 185 ++ .../render/tileentity/RenderAMSLimiter.java | 8 +- .../tileentity/machine/TileEntityAMSBase.java | 447 +++- .../machine/TileEntityAMSEmitter.java | 386 +++- .../machine/TileEntityAMSLimiter.java | 158 +- 48 files changed, 4831 insertions(+), 74 deletions(-) create mode 100644 assets/hbm/models/ams_limiter_destroyed.obj create mode 100644 assets/hbm/models/sphere_iuv.obj create mode 100644 assets/hbm/models/sphere_ruv.obj create mode 100644 assets/hbm/textures/items/ams_catalyst_aluminium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_beryllium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_blank.png create mode 100644 assets/hbm/textures/items/ams_catalyst_caesium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_cerium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_cobalt.png create mode 100644 assets/hbm/textures/items/ams_catalyst_copper.png create mode 100644 assets/hbm/textures/items/ams_catalyst_euphemium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_iron.png create mode 100644 assets/hbm/textures/items/ams_catalyst_lithium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_niobium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_strontium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_thorium.png create mode 100644 assets/hbm/textures/items/ams_catalyst_tungsten.png create mode 100644 com/hbm/blocks/machine/DummyBlockAMSEmitter.java create mode 100644 com/hbm/blocks/machine/DummyBlockAMSLimiter.java create mode 100644 com/hbm/inventory/container/ContainerAMSBase.java create mode 100644 com/hbm/inventory/container/ContainerAMSEmitter.java create mode 100644 com/hbm/inventory/gui/GUIAMSBase.java create mode 100644 com/hbm/inventory/gui/GUIAMSEmitter.java create mode 100644 com/hbm/items/special/ItemCatalyst.java diff --git a/assets/hbm/models/ams_limiter_destroyed.obj b/assets/hbm/models/ams_limiter_destroyed.obj new file mode 100644 index 000000000..91b48848e --- /dev/null +++ b/assets/hbm/models/ams_limiter_destroyed.obj @@ -0,0 +1,1975 @@ +# Blender v2.76 (sub 0) OBJ File: 'ams_limiter_destroyed.blend' +# www.blender.org +o Cube.001_Cube.002 +v 0.500001 0.000000 -2.500000 +v 0.250001 1.000000 -2.000000 +v 0.500000 0.000000 2.500000 +v 0.250000 1.000000 2.500000 +v -0.499999 0.000000 -2.500000 +v -0.249999 1.000000 -2.000000 +v -0.500000 0.000000 2.500000 +v -0.250000 1.000000 2.500000 +v 0.156251 0.343750 -2.500000 +v 0.156251 0.656250 -2.500000 +v 0.156251 0.343750 -2.150000 +v 0.156251 0.656250 -2.150000 +v -0.156249 0.343750 -2.500000 +v -0.156249 0.656250 -2.500000 +v -0.156249 0.343750 -2.150000 +v -0.156249 0.656250 -2.150000 +v -0.500000 0.343750 -0.156250 +v -0.500000 0.656250 -0.156250 +v 0.500000 0.343750 -0.156250 +v 0.500000 0.656250 -0.156250 +v -0.500000 0.343750 0.156250 +v -0.500000 0.656250 0.156250 +v 0.500000 0.343750 0.156250 +v 0.500000 0.656250 0.156250 +v -0.000000 6.000000 2.250000 +v 0.000000 6.000000 -0.750000 +v -0.353553 5.853553 2.250000 +v -0.284015 5.814950 -0.671109 +v -0.500000 5.500000 2.250000 +v -0.500000 5.500000 -0.750000 +v -0.353553 5.146447 2.250000 +v -0.353553 5.146447 -0.750000 +v 0.000000 5.000000 2.250000 +v 0.000000 5.000000 -0.750000 +v 0.353553 5.146447 2.250000 +v 0.353554 5.146447 -0.750000 +v 0.500000 5.500000 2.250000 +v 0.500000 5.500000 -0.750000 +v 0.353553 5.853553 2.250000 +v 0.353554 5.853553 -0.750000 +v -0.000000 5.875000 2.250000 +v -0.265165 5.765165 2.250000 +v -0.375000 5.500000 2.250000 +v -0.265165 5.234835 2.250000 +v -0.000000 5.125000 2.250000 +v 0.265165 5.234835 2.250000 +v 0.375000 5.500000 2.250000 +v 0.265165 5.765165 2.250000 +v -0.000000 5.875000 2.400000 +v -0.265165 5.765165 2.400000 +v -0.375000 5.500000 2.400000 +v -0.265165 5.234835 2.400000 +v -0.000000 5.125000 2.400000 +v 0.265165 5.234835 2.400000 +v 0.375000 5.500000 2.400000 +v 0.265165 5.765165 2.400000 +v -0.176776 5.676777 -1.000000 +v 0.000000 5.750000 -1.000000 +v -0.250000 5.500000 -1.000000 +v -0.176776 5.323223 -1.000000 +v 0.000000 5.250000 -1.000000 +v 0.176777 5.323223 -1.000000 +v 0.250000 5.500000 -1.000000 +v 0.117861 5.676777 -1.000000 +v 0.250000 3.000000 0.000000 +v -0.250000 3.000000 0.000000 +v 0.250000 3.000000 -1.000000 +v -0.250000 3.000000 -1.000000 +v 0.250000 5.500000 1.000000 +v -0.250000 5.500000 1.000000 +v 0.250000 5.500000 0.000000 +v -0.250000 5.500000 0.000000 +v 0.250000 1.000000 2.000000 +v -0.250000 1.000000 2.000000 +v 0.250000 1.000000 1.000000 +v -0.250000 1.000000 1.000000 +v 0.500000 2.668544 -0.168544 +v 0.500000 3.000000 -0.031250 +v -0.423231 5.685335 -0.750000 +v -0.500000 3.000000 0.125000 +v 0.500000 2.558058 -0.058058 +v -0.384796 2.558058 -0.058058 +v 0.500000 2.375000 -0.500000 +v -0.384796 2.375000 -0.500000 +v 0.500000 2.558058 -0.941942 +v -0.500000 2.558058 -0.941942 +v 0.500000 3.000000 -1.125000 +v -0.419908 3.000000 -1.125000 +v 0.500001 3.441942 -0.941942 +v -0.419908 3.441942 -0.941942 +v 0.500000 3.625000 -0.500000 +v -0.500000 3.625000 -0.500000 +v 0.500000 3.441942 -0.058058 +v -0.500000 3.441942 -0.058058 +v 0.500000 2.531250 -0.500000 +v 0.500000 2.668544 -0.831456 +v 0.500000 3.000000 -0.968750 +v 0.500001 3.331456 -0.831456 +v 0.500000 3.468750 -0.500000 +v 0.500000 3.331456 -0.168544 +v 0.375000 3.331456 -0.168544 +v 0.375000 3.000000 -0.031250 +v 0.375001 3.468750 -0.500000 +v 0.375001 3.331456 -0.831456 +v 0.375000 3.000000 -0.968750 +v 0.375000 2.668544 -0.831456 +v 0.375000 2.531250 -0.500000 +v 0.375000 2.668544 -0.168544 +v -0.384796 2.668544 -0.168544 +v -0.500000 3.000000 -0.031250 +v -0.384796 2.531250 -0.500000 +v -0.500000 2.668544 -0.831456 +v -0.419908 3.000000 -0.968750 +v -0.419908 3.331456 -0.831456 +v -0.500000 3.468750 -0.500000 +v -0.500000 3.331456 -0.168544 +v -0.375000 2.668544 -0.168544 +v -0.375000 3.000000 -0.031250 +v -0.375000 2.531250 -0.500000 +v -0.375000 2.668544 -0.831456 +v -0.375000 3.000000 -0.968750 +v -0.375000 3.331456 -0.831456 +v -0.375000 3.468750 -0.500000 +v -0.375000 3.331456 -0.168544 +v 0.500000 0.668544 1.831456 +v 0.442675 1.000000 1.968750 +v 0.500000 1.000000 2.125000 +v -0.500000 1.000000 2.125000 +v 0.500000 0.558058 1.941942 +v -0.500000 0.558058 1.941942 +v 0.473514 0.375000 1.500000 +v -0.500000 0.375000 1.500000 +v 0.500000 0.558058 1.058058 +v -0.409995 0.558058 1.058058 +v 0.500000 1.000000 0.875000 +v -0.500000 1.000000 0.875000 +v 0.500000 1.441942 1.058058 +v -0.389769 1.441942 1.058058 +v 0.500000 1.625000 1.500000 +v -0.500000 1.625000 1.500000 +v 0.454203 1.441942 1.941942 +v -0.500000 1.441942 1.941942 +v 0.500000 0.531250 1.500000 +v 0.500000 0.668544 1.168544 +v 0.468772 1.000000 1.031250 +v 0.500000 1.331456 1.168544 +v 0.500000 1.468750 1.500000 +v 0.500000 1.331456 1.831456 +v 0.375000 1.331456 1.831456 +v 0.375000 1.000000 1.968750 +v 0.375000 1.468750 1.500000 +v 0.375000 1.331456 1.168544 +v 0.375000 1.000000 1.031250 +v 0.375000 0.668544 1.168544 +v 0.375000 0.531250 1.500000 +v 0.375000 0.668544 1.831456 +v -0.500000 0.668544 1.831456 +v -0.500000 1.000000 1.968750 +v -0.500000 0.531250 1.500000 +v -0.437944 0.668544 1.168544 +v -0.500000 1.000000 1.031250 +v -0.500000 1.331456 1.168544 +v -0.500000 1.468750 1.500000 +v -0.500000 1.331456 1.831456 +v -0.375000 0.668544 1.831456 +v -0.375000 1.000000 1.968750 +v -0.375000 0.531250 1.500000 +v -0.375000 0.668544 1.168544 +v -0.375000 1.000000 1.031250 +v -0.375000 1.331456 1.168544 +v -0.375000 1.468750 1.500000 +v -0.375000 1.331456 1.831456 +v 0.125000 5.550000 -1.000000 +v 0.125001 5.550000 -1.529299 +v 0.081699 5.525000 -1.000000 +v 0.081699 5.525000 -1.500000 +v 0.081699 5.475000 -1.000000 +v 0.081699 5.475000 -1.500000 +v 0.125000 5.450000 -1.000000 +v 0.125001 5.465403 -1.500000 +v 0.168302 5.475000 -1.000000 +v 0.168302 5.490403 -1.500000 +v 0.168302 5.525000 -1.000000 +v 0.168302 5.525000 -1.529299 +v -0.125000 5.550000 -1.000000 +v -0.124999 5.550000 -1.415755 +v -0.168301 5.525000 -1.000000 +v -0.168301 5.525000 -1.415755 +v -0.168301 5.475000 -1.000000 +v -0.168301 5.475000 -1.444207 +v -0.125000 5.450000 -1.000000 +v -0.124999 5.450000 -1.444207 +v -0.081698 5.475000 -1.000000 +v -0.081698 5.475000 -1.401928 +v -0.081698 5.525000 -1.000000 +v -0.081698 5.525000 -1.401928 +v 0.081699 5.493492 -1.608551 +v 0.125001 5.516984 -1.617101 +v 0.081699 5.446507 -1.591449 +v 0.125001 5.423015 -1.582899 +v 0.158606 5.461866 -1.572706 +v 0.158606 5.508851 -1.589807 +v 0.060597 5.404948 -1.710039 +v 0.107675 5.424099 -1.726108 +v 0.060597 5.366646 -1.677899 +v 0.125001 5.378422 -1.661829 +v 0.149664 5.397573 -1.677899 +v 0.132338 5.404948 -1.710039 +v 0.088062 5.291929 -1.776042 +v 0.125001 5.296270 -1.779593 +v 0.088062 5.283247 -1.726802 +v 0.125001 5.278905 -1.702182 +v 0.168302 5.283247 -1.726802 +v 0.168302 5.291929 -1.754973 +v 0.081699 5.139866 -1.802469 +v 0.125001 5.139866 -1.827469 +v 0.081699 5.139866 -1.752469 +v 0.125001 5.139866 -1.727469 +v 0.168302 5.139866 -1.752469 +v 0.168302 5.139866 -1.802469 +v -0.168301 2.329531 -1.802469 +v -0.124999 2.329531 -1.827469 +v -0.168301 2.374010 -1.752469 +v -0.124999 2.374009 -1.727469 +v -0.081698 2.349475 -1.752469 +v -0.081698 2.349475 -1.802469 +v 0.081690 0.999866 -1.802482 +v 0.124992 0.999866 -1.827482 +v 0.081690 0.999866 -1.752481 +v 0.124992 0.999866 -1.727482 +v 0.168293 0.999866 -1.752481 +v 0.168293 0.999866 -1.802482 +v -0.168310 0.999866 -1.802482 +v -0.125008 0.999866 -1.827482 +v -0.168310 0.999866 -1.752481 +v -0.125008 0.999866 -1.727482 +v -0.081707 0.999866 -1.752481 +v -0.081707 0.999866 -1.802482 +v -0.353553 5.853553 2.109199 +v -0.000000 6.000000 2.100358 +v 0.000000 6.000000 0.153545 +v -0.353553 5.853553 -0.082499 +v 0.250000 6.112938 -0.437500 +v 0.288408 6.184640 -0.349866 +v 0.250000 5.875000 -0.437500 +v 0.250000 5.875000 -0.312500 +v -0.250000 2.597353 0.402647 +v -0.250000 2.463976 0.536024 +v -0.250000 2.398072 0.601928 +v -0.250000 2.289816 0.710184 +v -0.250000 2.256785 0.241390 +v -0.095115 2.543376 0.456624 +v -0.250000 2.042544 0.412356 +v -0.117151 2.340268 0.659732 +v 0.000000 6.000000 0.627565 +v -0.179890 5.925487 2.136442 +v -0.500000 5.500000 -0.016080 +v -0.429121 5.671118 2.161449 +v -0.480274 5.547625 2.114357 +v -0.500000 5.500000 2.124016 +v -0.423915 5.683683 -0.152559 +v 0.019273 5.946055 2.527040 +v -0.287760 5.818878 2.527040 +v -0.414938 5.511845 2.527040 +v -0.287760 5.204813 2.527040 +v 0.019273 5.077635 2.527040 +v -0.250000 4.101781 0.440713 +v 0.453483 5.511845 2.527040 +v 0.326306 5.818878 2.527040 +v -0.305937 5.774995 2.527040 +v -0.350030 5.355145 2.527040 +v -0.320766 5.284495 2.527040 +v -0.307236 5.336403 2.400000 +v -0.295632 5.308388 2.400000 +v 0.291434 5.833322 2.527040 +v 0.283332 5.187013 2.527040 +v 0.338103 5.233295 2.527040 +v 0.309289 5.341361 2.400000 +v 0.368675 5.307101 2.527040 +v 0.352046 5.266954 2.527040 +v -0.303246 5.326770 2.299464 +v -0.047650 5.105355 2.527040 +v -0.250000 4.905931 0.762372 +v -0.250000 4.914361 0.377399 +v -0.250000 4.788579 0.002054 +v -0.250000 4.696013 0.417826 +v -0.250000 4.609168 0.350851 +v -0.250000 4.568822 -0.067782 +v -0.298062 4.464652 0.269784 +v -0.250000 4.394123 0.045963 +v -0.104880 4.837244 0.734897 +v -0.046049 4.696583 0.678633 +v -0.006951 4.433455 0.535678 +v -0.437121 2.905017 -1.085657 +v -0.447927 2.845390 -1.060958 +v -0.438181 2.903665 -0.997329 +v -0.460508 2.775968 -1.032203 +v -0.454160 2.810996 -1.046712 +v -0.141359 2.854985 -1.064933 +v 0.250000 1.000000 -0.512755 +v -0.500000 0.000000 -0.719755 +v -0.250000 1.000000 -0.353168 +v 0.250000 1.000000 -0.912394 +v -0.500000 0.000000 -1.023838 +v -0.237882 2.780495 -1.034078 +v -0.250000 1.000000 -1.034424 +v -0.453965 2.814699 -0.997020 +v -0.206808 0.943261 -0.495975 +v -0.206808 0.943261 -0.891617 +v 0.308540 3.000000 0.125000 +v 0.500000 2.879200 0.074963 +v 0.500000 3.152224 0.061947 +v -0.353553 5.853553 -0.487427 +v -0.112383 5.953449 -0.750000 +v -0.239789 5.739789 -0.910887 +v 0.375000 5.500000 2.240000 +v 0.265165 5.234835 2.240000 +v -0.000000 5.125000 2.240000 +v -0.265165 5.234835 2.240000 +v -0.375000 5.500000 2.240000 +v -0.265165 5.765165 2.240000 +v -0.000000 5.875000 2.240000 +v -0.434729 5.657577 -0.552405 +v 0.265165 5.765165 2.240000 +v 0.375000 5.500000 -0.260000 +v 0.265165 5.765165 -0.260000 +v 0.000000 5.125000 -0.260000 +v 0.265165 5.234835 -0.260000 +v -0.265165 5.234835 -0.260000 +v -0.375000 5.500000 -0.260000 +v -0.265165 5.765165 -0.260000 +v 0.000000 5.875000 -0.260000 +v 0.250000 4.286113 -0.485555 +v 0.250000 4.531216 -0.387513 +v -0.500000 5.500000 0.327085 +v -0.500000 5.500000 0.748971 +v 0.244522 5.898715 0.595689 +v 0.000000 6.000000 1.520329 +v 0.250000 4.220100 0.030607 +v 0.101789 4.412081 -0.435168 +v 0.000000 6.000000 1.384084 +v -0.500000 5.500000 1.135705 +v -0.500000 5.500000 0.991573 +v -0.444947 5.367091 0.454149 +v -0.479794 5.451220 0.533265 +v -0.404518 5.269486 0.654633 +v 0.291628 5.879205 1.518940 +v -0.500000 5.500000 1.684756 +v -0.500000 5.500000 1.532431 +v -0.403552 5.267155 1.084509 +v 0.000000 6.000000 0.540157 +v -0.390852 5.236492 1.604031 +v -0.500000 1.479257 1.851856 +v -0.500000 1.519205 1.755411 +v -0.500000 1.569501 1.633987 +v 0.000000 5.875000 0.744922 +v -0.265165 5.765165 0.805178 +v -0.265165 5.765165 0.633837 +v -0.375000 5.500000 0.684706 +v 0.250000 2.117095 -0.117095 +v 0.250000 2.322012 -0.322012 +v -0.500000 1.433133 1.723705 +v -0.064632 1.568936 1.635352 +v -0.265165 5.765165 0.977100 +v -0.287144 1.509039 1.779956 +v -0.265165 5.765165 1.102731 +v 0.250000 2.418591 -0.005401 +v -0.046211 2.207144 -0.207144 +v 0.000000 5.875000 1.045270 +v -0.350791 5.558444 0.958491 +v -0.375000 5.500000 1.655340 +v -0.265165 5.765165 1.554705 +v -0.265165 5.765165 1.755584 +v -0.000000 5.875000 2.021457 +v -0.375000 5.500000 0.306500 +v -0.078299 5.842568 1.666237 +v -0.375000 5.500000 1.994211 +v 0.353554 5.146447 1.421638 +v 0.353554 5.146447 1.661390 +v 0.147143 5.060948 1.550736 +v 0.455659 5.392951 1.494021 +vt 0.400957 0.088468 +vt 0.469079 0.071437 +vt 0.469079 0.139559 +vt 0.094411 0.122528 +vt 0.018249 0.139558 +vt 0.018249 0.071438 +vt 0.658668 0.642378 +vt 0.439333 0.710500 +vt 0.318060 0.642378 +vt 0.160908 0.018251 +vt 0.160186 0.088468 +vt 0.094411 0.088468 +vt 0.168499 0.122529 +vt 0.195722 0.122529 +vt 0.060350 0.192746 +vt 0.828219 0.664014 +vt 0.828219 0.685302 +vt 0.804376 0.685302 +vt 0.804376 0.642726 +vt 0.804376 0.621438 +vt 0.828219 0.621438 +vt 0.783088 0.685302 +vt 0.804376 0.706590 +vt 0.828219 0.706590 +vt 0.828219 0.642726 +vt 0.702025 0.333235 +vt 0.723313 0.333235 +vt 0.723313 0.401356 +vt 0.744601 0.311947 +vt 0.744601 0.333235 +vt 0.680737 0.401356 +vt 0.659449 0.401356 +vt 0.659449 0.333235 +vt 0.723313 0.422644 +vt 0.744601 0.401356 +vt 0.680737 0.333235 +vt 0.702025 0.401356 +vt 0.502511 0.909263 +vt 0.504938 0.895447 +vt 0.517319 0.901112 +vt 0.497553 0.785962 +vt 0.490522 0.782412 +vt 0.344447 0.746998 +vt 0.341246 0.858949 +vt 0.341246 0.832880 +vt 0.545611 0.832880 +vt 0.946940 0.092025 +vt 0.946940 0.109603 +vt 0.930217 0.118264 +vt 0.930645 0.096813 +vt 0.044137 0.750250 +vt 0.044137 0.776319 +vt 0.020951 0.769802 +vt 0.248501 0.750250 +vt 0.577027 0.776666 +vt 0.577027 0.746998 +vt 0.585980 0.750706 +vt 0.958150 0.747616 +vt 0.957827 0.757829 +vt 0.938285 0.757211 +vt 0.248501 0.776319 +vt 0.256368 0.779578 +vt 0.256368 0.799129 +vt 0.545611 0.858949 +vt 0.553478 0.836139 +vt 0.256368 0.753509 +vt 0.273664 0.650502 +vt 0.281531 0.653761 +vt 0.281531 0.673313 +vt 0.850036 0.831736 +vt 0.857902 0.834998 +vt 0.857895 0.854549 +vt 0.771947 0.051768 +vt 0.771947 0.021394 +vt 0.781113 0.025191 +vt 0.273664 0.676571 +vt 0.281531 0.679830 +vt 0.281531 0.699382 +vt 0.365262 0.928824 +vt 0.331885 0.942649 +vt 0.318060 0.909272 +vt 0.933009 0.174796 +vt 0.944706 0.164578 +vt 0.952560 0.174796 +vt 0.553817 0.952382 +vt 0.564035 0.952382 +vt 0.564035 0.971934 +vt 0.401760 0.973945 +vt 0.401760 0.954393 +vt 0.411978 0.954393 +vt 0.944068 0.426203 +vt 0.944068 0.436421 +vt 0.924516 0.436421 +vt 0.508824 0.974249 +vt 0.498605 0.974249 +vt 0.498605 0.954698 +vt 0.637022 0.605543 +vt 0.617515 0.604219 +vt 0.625435 0.587650 +vt 0.162101 0.934387 +vt 0.162101 0.944605 +vt 0.142550 0.944605 +vt 0.234985 0.848103 +vt 0.244202 0.838886 +vt 0.247910 0.868819 +vt 0.506154 0.895717 +vt 0.489277 0.897996 +vt 0.645662 0.857734 +vt 0.622478 0.851209 +vt 0.622483 0.838175 +vt 0.533836 0.021394 +vt 0.533836 0.051767 +vt 0.505577 0.039854 +vt 0.489277 0.918177 +vt 0.344447 0.776666 +vt 0.318060 0.769249 +vt 0.318060 0.754415 +vt 0.044137 0.802388 +vt 0.020951 0.795871 +vt 0.318060 0.852432 +vt 0.617225 0.460597 +vt 0.581777 0.460597 +vt 0.584093 0.447107 +vt 0.487197 0.300176 +vt 0.453736 0.299806 +vt 0.462289 0.272359 +vt 0.226972 0.713752 +vt 0.043549 0.713752 +vt 0.729483 0.630321 +vt 0.501015 0.303450 +vt 0.529630 0.302031 +vt 0.507894 0.317571 +vt 0.839737 0.896739 +vt 0.863566 0.910359 +vt 0.837653 0.915294 +vt 0.815623 0.422644 +vt 0.958271 0.815391 +vt 0.815623 0.230485 +vt 0.919494 0.894303 +vt 0.939620 0.908339 +vt 0.931126 0.918223 +vt 0.858361 0.497771 +vt 0.810192 0.545940 +vt 0.102345 0.949425 +vt 0.476163 0.596964 +vt 0.476168 0.605696 +vt 0.451106 0.605710 +vt 0.523041 0.586973 +vt 0.547440 0.586971 +vt 0.543244 0.597104 +vt 0.547436 0.524865 +vt 0.513862 0.573534 +vt 0.409614 0.596780 +vt 0.409609 0.605359 +vt 0.384985 0.605343 +vt 0.380893 0.586854 +vt 0.413724 0.586875 +vt 0.581012 0.524862 +vt 0.442763 0.596911 +vt 0.442757 0.605585 +vt 0.417862 0.605569 +vt 0.321839 0.526230 +vt 0.353193 0.520840 +vt 0.348922 0.585358 +vt 0.509655 0.597021 +vt 0.509647 0.605780 +vt 0.484506 0.605756 +vt 0.446918 0.586896 +vt 0.480334 0.586877 +vt 0.365339 0.539037 +vt 0.374487 0.522087 +vt 0.156766 0.897889 +vt 0.139484 0.856168 +vt 0.181205 0.838886 +vt 0.318060 0.583315 +vt 0.344448 0.594416 +vt 0.380047 0.524194 +vt 0.413095 0.523389 +vt 0.321301 0.592884 +vt 0.343914 0.602481 +vt 0.446445 0.517279 +vt 0.513858 0.516781 +vt 0.520144 0.507793 +vt 0.480066 0.516928 +vt 0.551638 0.597103 +vt 0.576821 0.597101 +vt 0.576821 0.605875 +vt 0.581017 0.586968 +vt 0.502309 0.586898 +vt 0.484515 0.596997 +vt 0.518061 0.597106 +vt 0.543244 0.605878 +vt 0.352322 0.598308 +vt 0.344678 0.594912 +vt 0.383935 0.514120 +vt 0.383860 0.511018 +vt 0.408645 0.510414 +vt 0.323884 0.516336 +vt 0.450542 0.507089 +vt 0.475757 0.506826 +vt 0.813480 0.968780 +vt 0.828649 0.968780 +vt 0.828170 0.972340 +vt 0.484246 0.506711 +vt 0.509590 0.506602 +vt 0.408721 0.513517 +vt 0.551632 0.514732 +vt 0.415288 0.512689 +vt 0.759700 0.953306 +vt 0.717979 0.911585 +vt 0.735261 0.894303 +vt 0.323591 0.515774 +vt 0.344169 0.505065 +vt 0.545851 0.514012 +vt 0.524715 0.500304 +vt 0.484207 0.497881 +vt 0.509552 0.497771 +vt 0.414064 0.509798 +vt 0.437162 0.500025 +vt 0.378974 0.517449 +vt 0.358061 0.514220 +vt 0.360682 0.507519 +vt 0.551632 0.514044 +vt 0.576814 0.514042 +vt 0.450450 0.498303 +vt 0.475665 0.498040 +vt 0.162250 0.602225 +vt 0.184293 0.600530 +vt 0.184884 0.608210 +vt 0.218732 0.594048 +vt 0.250083 0.594109 +vt 0.246145 0.603563 +vt 0.218860 0.528510 +vt 0.250211 0.528571 +vt 0.094344 0.604751 +vt 0.120918 0.604233 +vt 0.120297 0.613438 +vt 0.089934 0.593849 +vt 0.125238 0.593540 +vt 0.281562 0.528632 +vt 0.281437 0.592435 +vt 0.129290 0.603407 +vt 0.153782 0.603481 +vt 0.153757 0.612014 +vt 0.085554 0.604955 +vt 0.058572 0.604665 +vt 0.018249 0.591864 +vt 0.018249 0.518920 +vt 0.054092 0.525664 +vt 0.214243 0.603989 +vt 0.214417 0.608421 +vt 0.190923 0.609348 +vt 0.187387 0.590985 +vt 0.089934 0.518920 +vt 0.639760 0.953306 +vt 0.622478 0.911585 +vt 0.664200 0.894303 +vt 0.054091 0.593849 +vt 0.049067 0.604423 +vt 0.129624 0.529633 +vt 0.157894 0.593638 +vt 0.048590 0.613777 +vt 0.021743 0.612409 +vt 0.167431 0.529225 +vt 0.222798 0.519056 +vt 0.246311 0.519102 +vt 0.182837 0.530371 +vt 0.980000 0.613642 +vt 0.973681 0.620436 +vt 0.965419 0.607394 +vt 0.277945 0.602217 +vt 0.278346 0.610399 +vt 0.254861 0.611550 +vt 0.254460 0.603367 +vt 0.190600 0.601162 +vt 0.222347 0.604340 +vt 0.245117 0.611690 +vt 0.086088 0.611961 +vt 0.059284 0.614004 +vt 0.097201 0.508039 +vt 0.099241 0.497771 +vt 0.128710 0.503626 +vt 0.024580 0.509072 +vt 0.051397 0.514080 +vt 0.047876 0.938643 +vt 0.044508 0.943906 +vt 0.018249 0.927523 +vt 0.056786 0.514080 +vt 0.186778 0.519268 +vt 0.254148 0.519118 +vt 0.277661 0.519164 +vt 0.135875 0.516297 +vt 0.163464 0.517863 +vt 0.876437 0.151028 +vt 0.834716 0.109307 +vt 0.851998 0.092025 +vt 0.027843 0.500293 +vt 0.222814 0.510864 +vt 0.246327 0.510910 +vt 0.213796 0.517871 +vt 0.186292 0.509854 +vt 0.136421 0.506684 +vt 0.164010 0.508251 +vt 0.055143 0.509659 +vt 0.080340 0.500293 +vt 0.254164 0.510925 +vt 0.277677 0.510971 +vt 0.180160 0.525735 +vt 0.171603 0.523815 +vt 0.172272 0.520834 +vt 0.613535 0.392672 +vt 0.589096 0.359843 +vt 0.593583 0.359448 +vt 0.596585 0.357012 +vt 0.619847 0.387949 +vt 0.599330 0.354949 +vt 0.582066 0.367826 +vt 0.585202 0.365566 +vt 0.607332 0.397289 +vt 0.610433 0.394980 +vt 0.585995 0.362151 +vt 0.555755 0.905665 +vt 0.555755 0.902259 +vt 0.584077 0.902259 +vt 0.553817 0.898853 +vt 0.584077 0.898853 +vt 0.553817 0.895447 +vt 0.584077 0.895447 +vt 0.584077 0.915884 +vt 0.553817 0.915884 +vt 0.556697 0.912478 +vt 0.578440 0.362946 +vt 0.576435 0.355877 +vt 0.580429 0.356940 +vt 0.556697 0.909072 +vt 0.584077 0.905665 +vt 0.584077 0.909072 +vt 0.593483 0.349786 +vt 0.592996 0.340362 +vt 0.597846 0.342550 +vt 0.586276 0.352998 +vt 0.589917 0.351476 +vt 0.599696 0.355426 +vt 0.593600 0.350089 +vt 0.585240 0.360681 +vt 0.584203 0.355788 +vt 0.582384 0.362835 +vt 0.592364 0.338579 +vt 0.590371 0.330901 +vt 0.593742 0.329886 +vt 0.576355 0.351266 +vt 0.577270 0.344170 +vt 0.580041 0.344164 +vt 0.584969 0.341689 +vt 0.583357 0.354886 +vt 0.579535 0.353906 +vt 0.589070 0.340750 +vt 0.582250 0.342223 +vt 0.590383 0.330750 +vt 0.591000 0.319261 +vt 0.594882 0.319966 +vt 0.583504 0.330766 +vt 0.579571 0.331086 +vt 0.579353 0.318516 +vt 0.576734 0.341757 +vt 0.573855 0.333787 +vt 0.577406 0.332066 +vt 0.586443 0.330528 +vt 0.582313 0.340895 +vt 0.579505 0.341764 +vt 0.971987 0.662547 +vt 0.968435 0.663880 +vt 0.972350 0.659161 +vt 0.579590 0.331264 +vt 0.591072 0.318857 +vt 0.619036 0.094519 +vt 0.622950 0.095018 +vt 0.579330 0.317361 +vt 0.607293 0.093023 +vt 0.611208 0.093522 +vt 0.968372 0.656934 +vt 0.577245 0.331136 +vt 0.573340 0.331703 +vt 0.571766 0.320662 +vt 0.583244 0.317860 +vt 0.965419 0.658631 +vt 0.575607 0.319758 +vt 0.587158 0.318359 +vt 0.965419 0.662298 +vt 0.514399 0.915940 +vt 0.508984 0.180204 +vt 0.505578 0.181875 +vt 0.505577 0.088266 +vt 0.515796 0.178845 +vt 0.515795 0.088266 +vt 0.519201 0.088266 +vt 0.571501 0.316364 +vt 0.599465 0.092025 +vt 0.603379 0.092524 +vt 0.512390 0.180204 +vt 0.508983 0.088266 +vt 0.615122 0.094020 +vt 0.519202 0.178845 +vt 0.522607 0.088266 +vt 0.575415 0.316863 +vt 0.512389 0.088266 +vt 0.526014 0.181875 +vt 0.522608 0.181875 +vt 0.967051 0.566473 +vt 0.965419 0.550346 +vt 0.973890 0.549489 +vt 0.919494 0.919973 +vt 0.923216 0.230485 +vt 0.941443 0.249540 +vt 0.933717 0.256310 +vt 0.923215 0.257932 +vt 0.870748 0.926350 +vt 0.873626 0.906938 +vt 0.886717 0.422408 +vt 0.968476 0.700378 +vt 0.971646 0.702682 +vt 0.965475 0.701990 +vt 0.971646 0.706088 +vt 0.968550 0.707791 +vt 0.965419 0.706450 +vt 0.263470 0.702640 +vt 0.265928 0.689376 +vt 0.273664 0.702640 +vt 0.264424 0.654014 +vt 0.265082 0.650503 +vt 0.421081 0.954098 +vt 0.421081 0.973501 +vt 0.945854 0.446542 +vt 0.923215 0.446542 +vt 0.452685 0.906504 +vt 0.429564 0.895447 +vt 0.452118 0.895447 +vt 0.637714 0.595349 +vt 0.631735 0.584872 +vt 0.640629 0.582439 +vt 0.162123 0.954127 +vt 0.401760 0.903747 +vt 0.426848 0.913635 +vt 0.618208 0.594024 +vt 0.617515 0.585026 +vt 0.623377 0.585424 +vt 0.713579 0.275449 +vt 0.664709 0.216727 +vt 0.662790 0.196243 +vt 0.933009 0.164578 +vt 0.930217 0.154763 +vt 0.945314 0.154763 +vt 0.452778 0.917599 +vt 0.486649 0.283867 +vt 0.489277 0.974146 +vt 0.952560 0.164578 +vt 0.948274 0.154763 +vt 0.958150 0.767827 +vt 0.938092 0.767192 +vt 0.573037 0.954869 +vt 0.831221 0.018249 +vt 0.858163 0.018249 +vt 0.817612 0.038365 +vt 0.846253 0.039083 +vt 0.852444 0.043265 +vt 0.400957 0.018249 +vt 0.206593 0.088468 +vt 0.826808 0.975449 +vt 0.255150 0.971853 +vt 0.234985 0.965983 +vt 0.255881 0.965983 +vt 0.252192 0.977094 +vt 0.374945 0.520030 +vt 0.366466 0.524366 +vt 0.400957 0.122529 +vt 0.760663 0.159314 +vt 0.787615 0.159314 +vt 0.786472 0.190672 +vt 0.772371 0.092025 +vt 0.798166 0.161946 +vt 0.798218 0.156903 +vt 0.759248 0.190672 +vt 0.750077 0.156832 +vt 0.751656 0.092026 +vt 0.750189 0.162232 +vt 0.384227 0.596762 +vt 0.376300 0.599429 +vt 0.018249 0.884507 +vt 0.018249 0.871473 +vt 0.026514 0.869150 +vt 0.041435 0.891024 +vt 0.059322 0.864955 +vt 0.102986 0.891024 +vt 0.974986 0.028862 +vt 0.961918 0.018249 +vt 0.977712 0.018249 +vt 0.964634 0.035241 +vt 0.026514 0.860761 +vt 0.018249 0.858438 +vt 0.018249 0.845404 +vt 0.271518 0.365278 +vt 0.305339 0.351269 +vt 0.319348 0.385090 +vt 0.044237 0.865876 +vt 0.091431 0.838886 +vt 0.082134 0.852430 +vt 0.066031 0.324961 +vt 0.032191 0.338827 +vt 0.018325 0.304986 +vt 0.149494 0.243254 +vt 0.163503 0.229245 +vt 0.201517 0.433390 +vt 0.080080 0.311019 +vt 0.094129 0.297078 +vt 0.215566 0.419448 +vt 0.168789 0.345253 +vt 0.219262 0.395438 +vt 0.939730 0.361803 +vt 0.939730 0.382513 +vt 0.926494 0.389704 +vt 0.180276 0.301444 +vt 0.162414 0.283408 +vt 0.173420 0.461273 +vt 0.051983 0.338902 +vt 0.187468 0.447331 +vt 0.923215 0.374315 +vt 0.591578 0.436048 +vt 0.928920 0.681194 +vt 0.900693 0.746998 +vt 0.928920 0.497771 +vt 0.714085 0.021408 +vt 0.714043 0.021428 +vt 0.980031 0.607394 +vt 0.047907 0.927523 +vt 0.176013 0.527988 +vt 0.176814 0.526857 +vt 0.257511 0.907882 +vt 0.239158 0.929485 +vt 0.234985 0.906853 +vt 0.261122 0.929485 +vt 0.934067 0.294430 +vt 0.938155 0.312098 +vt 0.923215 0.325305 +vt 0.923215 0.305209 +vt 0.925420 0.039451 +vt 0.909017 0.050857 +vt 0.925103 0.018249 +vt 0.909017 0.029891 +vt 0.228512 0.350623 +vt 0.182176 0.336604 +vt 0.164000 0.312494 +vt 0.121967 0.269880 +vt 0.108010 0.283416 +vt 0.154990 0.331355 +vt 0.172126 0.320826 +vt 0.180732 0.329522 +vt 0.219147 0.368685 +vt 0.244365 0.366470 +vt 0.242891 0.392891 +vt 0.215951 0.361585 +vt 0.545252 0.436048 +vt 0.974213 0.497771 +vt 0.919494 0.975304 +vt 0.318060 0.710500 +vt 0.418618 0.710500 +vt 0.658668 0.710500 +vt 0.060350 0.018251 +vt 0.400957 0.192747 +vt 0.804376 0.664014 +vt 0.783088 0.706590 +vt 0.723313 0.311947 +vt 0.744601 0.422644 +vt 0.567260 0.776666 +vt 0.533204 0.776666 +vt 0.530571 0.786628 +vt 0.527515 0.796382 +vt 0.512476 0.786737 +vt 0.508746 0.795297 +vt 0.500327 0.794810 +vt 0.513747 0.795586 +vt 0.438825 0.777489 +vt 0.486018 0.777489 +vt 0.489536 0.786488 +vt 0.018249 0.755012 +vt 0.585980 0.772957 +vt 0.938608 0.746998 +vt 0.248501 0.802388 +vt 0.553478 0.855690 +vt 0.256368 0.773061 +vt 0.850027 0.857805 +vt 0.781113 0.047971 +vt 0.331885 0.895447 +vt 0.351437 0.895447 +vt 0.365262 0.909272 +vt 0.351437 0.942649 +vt 0.318060 0.928824 +vt 0.553817 0.971934 +vt 0.411978 0.973945 +vt 0.924516 0.426203 +vt 0.508824 0.954698 +vt 0.623619 0.594391 +vt 0.142550 0.934387 +vt 0.266453 0.848103 +vt 0.266453 0.861138 +vt 0.257236 0.870354 +vt 0.234985 0.861138 +vt 0.257236 0.838886 +vt 0.645671 0.831665 +vt 0.506800 0.028909 +vt 0.020951 0.782836 +vt 0.318060 0.839397 +vt 0.746590 0.661431 +vt 0.695166 0.710499 +vt 0.018249 0.650502 +vt 0.695166 0.621438 +vt 0.355846 0.229245 +vt 0.423968 0.229245 +vt 0.475902 0.359080 +vt 0.492089 0.399549 +vt 0.495288 0.341410 +vt 0.453990 0.304301 +vt 0.423968 0.399549 +vt 0.535003 0.307223 +vt 0.709438 0.795167 +vt 0.670648 0.795167 +vt 0.815155 0.746998 +vt 0.863324 0.795167 +vt 0.739066 0.795167 +vt 0.622478 0.746998 +vt 0.862157 0.916550 +vt 0.781653 0.422644 +vt 0.938092 0.804325 +vt 0.781653 0.230485 +vt 0.938092 0.824066 +vt 0.665684 0.497771 +vt 0.084406 0.935763 +vt 0.617515 0.545940 +vt 0.102345 0.927523 +vt 0.451101 0.596978 +vt 0.384991 0.596764 +vt 0.417867 0.596895 +vt 0.367717 0.523953 +vt 0.367435 0.525110 +vt 0.371401 0.524095 +vt 0.376007 0.523935 +vt 0.198487 0.856168 +vt 0.198487 0.880607 +vt 0.181205 0.897889 +vt 0.139484 0.880607 +vt 0.156766 0.838886 +vt 0.320767 0.600949 +vt 0.551639 0.605877 +vt 0.518062 0.605880 +vt 0.347900 0.512235 +vt 0.576815 0.514730 +vt 0.440567 0.508072 +vt 0.759700 0.894303 +vt 0.776982 0.911585 +vt 0.776982 0.936025 +vt 0.735261 0.953306 +vt 0.717979 0.936025 +vt 0.546210 0.513425 +vt 0.379916 0.515041 +vt 0.162840 0.609905 +vt 0.093878 0.611656 +vt 0.129265 0.611941 +vt 0.681481 0.911585 +vt 0.681481 0.936025 +vt 0.664200 0.953306 +vt 0.622478 0.936025 +vt 0.639760 0.894303 +vt 0.022220 0.603055 +vt 0.221790 0.608740 +vt 0.126670 0.513893 +vt 0.083604 0.509072 +vt 0.876437 0.092025 +vt 0.893719 0.109307 +vt 0.893719 0.133747 +vt 0.851998 0.151028 +vt 0.834716 0.133747 +vt 0.053040 0.509659 +vt 0.213309 0.508458 +vt 0.180829 0.522754 +vt 0.616694 0.390314 +vt 0.622950 0.385635 +vt 0.604196 0.399549 +vt 0.584077 0.912478 +vt 0.597427 0.349692 +vt 0.597214 0.348530 +vt 0.597563 0.337451 +vt 0.593888 0.331075 +vt 0.594987 0.319356 +vt 0.526013 0.088266 +vt 0.973890 0.570896 +vt 0.852790 0.422408 +vt 0.880906 0.932281 +vt 0.852790 0.230485 +vt 0.886717 0.230485 +vt 0.882996 0.902728 +vt 0.264072 0.676571 +vt 0.267632 0.663120 +vt 0.646356 0.592473 +vt 0.139484 0.954127 +vt 0.679518 0.172862 +vt 0.679518 0.092025 +vt 0.713579 0.092025 +vt 0.679518 0.275449 +vt 0.659449 0.236759 +vt 0.665904 0.227734 +vt 0.489277 0.954676 +vt 0.950756 0.154763 +vt 0.573037 0.972573 +vt 0.872519 0.032985 +vt 0.181621 0.018249 +vt 0.041435 0.882738 +vt 0.086906 0.864955 +vt 0.041435 0.838886 +vt 0.041435 0.852552 +vt 0.305339 0.399099 +vt 0.285527 0.399099 +vt 0.271518 0.385090 +vt 0.285527 0.351269 +vt 0.319348 0.365278 +vt 0.032374 0.291044 +vt 0.052166 0.291120 +vt 0.066107 0.305169 +vt 0.018249 0.324778 +vt 0.229349 0.405947 +vt 0.257509 0.379287 +vt 0.135837 0.256477 +vt 0.894860 0.497771 +vt 0.901594 0.748001 +vt 0.899823 0.849485 +vt 0.899823 0.747984 +vt 0.714008 0.018249 +vt 0.760070 0.021394 +vt 0.176314 0.528147 +vt 0.177471 0.528996 +vt 0.176490 0.528240 +vt 0.175398 0.528773 +vt 0.209003 0.357628 +vt 0.189764 0.338777 +vt 0.809938 0.831722 +vt 0.935257 0.960747 +vt 0.919494 0.956471 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.447200 -0.894400 +vn 0.000000 -1.000000 0.000000 +vn -0.970100 0.242500 -0.000000 +vn 0.970100 0.242500 0.000000 +vn 1.000000 0.000000 0.000000 +vn -1.000000 0.000000 -0.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 1.000000 -0.000000 +vn -0.698100 0.713500 0.059600 +vn -0.923900 -0.382700 0.000000 +vn -0.382700 -0.923900 -0.000000 +vn 0.600100 -0.444000 0.665400 +vn 0.555300 -0.612200 -0.562900 +vn 0.678600 0.281100 -0.678600 +vn 0.923900 0.382700 0.000000 +vn 0.382700 0.923900 0.000000 +vn 0.923900 -0.382700 0.000000 +vn -0.923900 0.382700 -0.000000 +vn 0.382700 -0.923900 0.000000 +vn -0.382700 0.923900 0.000000 +vn -0.529700 0.776600 -0.341100 +vn 0.281100 -0.678600 -0.678600 +vn 0.268700 0.648700 -0.712000 +vn -0.680000 0.654400 -0.330600 +vn -0.678600 -0.281100 -0.678600 +vn 0.678600 -0.281100 -0.678600 +vn -0.281100 -0.678600 -0.678600 +vn 0.663200 0.742400 0.094900 +vn -0.799100 0.483100 0.357800 +vn 0.000000 -0.707100 -0.707100 +vn -0.581200 0.665600 -0.468100 +vn 0.000000 -0.923900 -0.382700 +vn 0.000000 -0.382700 0.923900 +vn 0.000000 -0.923900 0.382700 +vn 0.000000 -0.382700 -0.923900 +vn 0.000000 0.382700 -0.923900 +vn 0.000000 0.923900 0.382700 +vn 0.000000 0.923900 -0.382700 +vn -0.967700 -0.252200 -0.000000 +vn 0.000000 0.382700 0.923900 +vn 0.000000 0.707100 -0.707100 +vn -0.967700 0.000000 0.252200 +vn -0.019900 0.674100 -0.738400 +vn -0.984000 -0.126100 -0.126100 +vn 0.966200 0.171000 0.193100 +vn 0.953200 0.279400 0.115700 +vn 0.998200 -0.042300 0.042300 +vn -0.238900 0.913700 -0.328800 +vn 0.983600 -0.166700 0.069100 +vn 0.898000 -0.291800 -0.329400 +vn -0.982900 0.000000 -0.184000 +vn -0.285800 0.331200 -0.899200 +vn -0.976500 -0.213000 -0.034000 +vn -0.970300 0.242000 0.000000 +vn -0.794800 0.560700 -0.232200 +vn -0.500000 0.866000 0.000000 +vn -0.216400 -0.976300 0.000000 +vn 0.499800 -0.865700 -0.026700 +vn 0.500000 0.866000 0.000000 +vn -0.500000 -0.866000 0.000000 +vn 0.500000 -0.866000 0.000000 +vn 0.665300 -0.664700 0.339900 +vn -0.037000 -0.729500 0.683000 +vn -0.500000 0.810600 -0.304800 +vn -0.207000 -0.934000 0.291000 +vn 0.477400 0.826900 -0.297200 +vn 0.991500 -0.084000 -0.099200 +vn -0.505800 -0.554200 0.661100 +vn 0.705900 -0.616700 0.348400 +vn -0.484100 0.702500 -0.521600 +vn 0.997300 -0.025200 -0.069400 +vn -0.986200 0.056600 0.155600 +vn 0.608200 0.530000 -0.590900 +vn -0.495600 -0.131700 0.858500 +vn 0.496900 0.258700 -0.828300 +vn 0.491600 -0.327200 0.807000 +vn -0.131700 0.367400 -0.920700 +vn 0.864800 0.310000 -0.395100 +vn -0.975900 -0.215000 -0.037900 +vn 0.246500 0.870000 -0.426900 +vn 0.474800 0.451500 -0.755500 +vn -0.500000 -0.000000 0.866000 +vn 0.500000 0.000000 -0.866000 +vn 0.207100 0.731000 -0.650200 +vn 0.500000 -0.155000 0.852000 +vn -0.125300 0.290400 -0.948700 +vn -0.112200 0.974500 -0.194300 +vn -0.999100 0.041800 0.000000 +vn -0.418300 0.908300 0.000000 +vn -0.680200 0.621800 -0.388200 +vn 0.500000 -0.000000 0.866000 +vn -0.500000 0.000000 -0.866000 +vn -0.421000 -0.388200 0.819800 +vn -0.471600 0.678500 -0.563300 +vn -0.507300 -0.405500 0.760400 +vn 0.000000 0.707100 0.707100 +vn 0.274600 0.475600 -0.835700 +vn 0.152100 -0.263400 -0.952600 +vn 0.698600 0.000000 -0.715500 +vn 0.142900 0.422100 -0.895200 +vn -0.878300 0.363800 -0.310100 +vn 0.790000 0.327200 -0.518500 +vn -0.682100 -0.499100 0.534500 +vn -0.895300 -0.370800 -0.246900 +vn -0.347800 0.839800 -0.416900 +vn -0.818500 0.560800 0.124800 +vn -0.789600 -0.581900 0.195000 +vn 0.240400 -0.435600 0.867500 +vn 0.814600 -0.337400 -0.471800 +vn -0.430800 -0.902200 -0.019800 +vn -0.305500 -0.925000 0.225900 +vn 0.355000 -0.857100 -0.373400 +vn 0.331800 0.801000 -0.498300 +vn -0.367900 -0.888200 -0.275300 +vn -0.147000 0.950900 0.272500 +vn -0.621100 -0.780100 0.075200 +vn -0.722100 -0.422500 0.547800 +vn -0.143500 -0.986900 0.074100 +vn -0.031900 0.739500 -0.672400 +vn -0.165600 -0.986000 -0.017100 +vn -0.977700 0.173000 -0.119100 +vn -0.123300 0.992400 -0.000000 +vn -0.954900 0.296800 -0.000000 +vn -0.845300 0.357000 -0.397500 +vn -0.127400 0.907900 -0.399300 +vn -0.095800 0.914800 0.392400 +vn -0.902600 0.229500 0.364200 +vn 0.756000 0.250500 0.604800 +vn -0.281100 0.678600 -0.678600 +vn 0.522500 0.563000 0.640300 +vn 0.571300 -0.428600 0.700000 +vn -0.678600 0.281100 -0.678600 +vn -0.532500 0.483300 -0.694900 +vn -0.587400 0.488300 0.645400 +vn 0.641800 -0.615300 -0.457800 +vn -0.000000 0.371400 -0.928500 +vn -0.123800 -0.343000 0.931100 +vn -0.001900 0.549600 0.835400 +vn 0.435700 -0.860900 0.262600 +vn 0.363900 0.323600 -0.873400 +vn -0.404600 0.630100 -0.662800 +vn -0.256400 0.019200 0.966400 +vn -0.385800 0.509300 -0.769300 +vn -0.482200 0.353500 0.801600 +vn -0.793800 0.460500 -0.397300 +vn 0.518200 0.387400 -0.762500 +vn 0.402200 0.647400 -0.647400 +vn -0.978100 -0.113500 -0.174300 +vn -0.944600 -0.232100 -0.232100 +vn -0.944600 -0.232100 0.232100 +vn -0.972000 0.000000 -0.234900 +vn 0.898000 0.291800 -0.329400 +vn 0.966200 -0.171000 0.193100 +vn 0.994700 0.000000 0.103100 +vn 0.983600 -0.166700 -0.069100 +vn 0.998200 -0.042300 -0.042300 +vn 0.959500 0.186800 0.210900 +vn -0.976500 -0.034000 -0.213000 +vn -0.982900 -0.184000 -0.000000 +vn -0.794800 0.232200 -0.560700 +vn -0.970300 0.000000 -0.242000 +vn -0.499800 -0.865700 -0.026700 +vn 0.482300 -0.835400 0.263600 +vn -0.494900 -0.756600 0.427400 +vn -0.596400 0.770800 -0.223700 +vn -0.497100 -0.772500 0.395000 +vn 0.456000 0.833000 -0.313200 +vn 0.988100 -0.052500 -0.144300 +vn -0.160400 -0.370900 0.914700 +vn 0.661300 -0.663700 0.349400 +vn -0.468300 0.711700 -0.523600 +vn 0.874200 0.256300 -0.412500 +vn -0.984300 0.113600 0.135300 +vn 0.708900 0.477200 -0.519300 +vn -0.560500 -0.148200 0.814800 +vn 0.483300 0.256200 -0.837100 +vn 0.643000 -0.210200 0.736400 +vn -0.432200 0.374100 -0.820500 +vn 0.958700 0.271800 0.083800 +vn -0.957400 -0.185600 -0.221200 +vn 0.688600 0.357300 -0.631000 +vn 0.494100 -0.153200 0.855800 +vn -0.492800 0.169000 -0.853600 +vn -0.999000 0.043000 0.007600 +vn -0.945000 0.152200 0.289600 +vn 0.000000 -0.371400 0.928500 +vn 0.089900 -0.334500 0.938100 +vn -0.135000 -0.368000 0.920000 +vn -0.717400 -0.411900 0.561900 +vn -0.984000 0.178300 -0.000000 +vn -0.984600 0.174600 -0.009100 +vn -0.982000 0.188900 -0.008900 +vn -0.984000 0.126100 -0.126100 +vn -0.971400 0.227200 -0.069500 +vn -0.975900 0.206300 -0.071300 +s off +f 8/1/1 7/2/1 3/3/1 +f 2/4/2 1/5/2 5/6/2 +f 3/7/3 301/8/3 1/9/3 +f 304/10/4 306/11/4 6/12/4 +f 303/13/5 300/14/5 1/15/5 +f 12/16/6 11/17/6 9/18/6 +f 14/19/7 13/20/7 15/21/7 +f 10/22/8 9/18/8 13/23/8 +f 11/17/3 15/24/3 13/23/3 +f 14/19/9 16/25/9 12/16/9 +f 20/26/8 19/27/8 17/28/8 +f 24/29/6 23/30/6 19/27/6 +f 22/31/1 21/32/1 23/33/1 +f 18/34/7 17/28/7 21/35/7 +f 19/27/3 23/30/3 21/35/3 +f 24/36/9 20/26/9 18/37/9 +f 28/38/10 79/39/10 323/40/10 +f 346/41/11 344/42/11 32/43/11 +f 32/44/12 34/45/12 33/46/12 +f 380/47/13 378/48/13 381/49/13 +f 380/47/14 381/49/14 379/50/14 +f 40/51/15 38/52/15 63/53/15 +f 38/52/16 40/51/16 39/54/16 +f 29/55/1 31/56/1 44/57/1 +f 41/58/17 49/59/17 56/60/17 +f 37/61/1 47/62/1 46/63/1 +f 31/64/1 33/46/1 45/65/1 +f 37/61/1 39/54/1 48/66/1 +f 29/67/1 43/68/1 42/69/1 +f 35/70/1 46/71/1 45/72/1 +f 39/73/1 25/74/1 41/75/1 +f 27/76/1 42/77/1 41/78/1 +f 44/79/1 46/80/1 48/81/1 +f 47/82/18 278/83/18 46/84/18 +f 45/85/12 53/86/12 52/87/12 +f 42/88/19 43/89/19 51/90/19 +f 48/91/16 56/92/16 55/93/16 +f 46/94/20 54/95/20 53/96/20 +f 43/97/11 44/98/11 281/99/11 +f 42/100/21 50/101/21 49/102/21 +f 62/103/8 61/104/8 64/105/8 +f 79/106/22 28/38/22 315/107/22 +f 34/108/23 61/109/23 62/110/23 +f 26/111/24 40/112/24 64/113/24 +f 28/38/25 314/114/25 315/107/25 +f 30/115/26 59/116/26 60/117/26 +f 38/52/27 36/118/27 62/119/27 +f 34/45/28 32/44/28 60/120/28 +f 339/121/29 333/122/29 340/123/29 +f 290/124/30 267/125/30 293/126/30 +f 69/127/6 65/128/6 339/129/6 +f 288/130/7 287/131/7 285/132/7 +f 253/133/7 249/134/7 251/135/7 +f 68/136/31 368/137/31 76/138/31 +f 251/139/32 248/140/32 252/141/32 +f 73/142/6 75/143/6 367/144/6 +f 100/145/33 101/146/33 103/147/33 +f 311/148/6 81/149/6 77/150/6 +f 82/151/34 81/149/34 310/152/34 +f 98/153/34 104/154/34 105/155/34 +f 87/156/6 89/157/6 98/153/6 +f 81/149/35 82/151/35 84/158/35 +f 99/159/35 103/160/35 104/161/35 +f 84/162/33 86/163/33 85/164/33 +f 78/165/36 102/166/36 101/167/36 +f 91/168/6 93/169/6 100/145/6 +f 305/170/36 299/171/36 85/164/36 +f 106/172/6 104/173/6 101/174/6 +f 83/175/6 85/164/6 96/176/6 +f 88/177/37 90/178/37 89/157/37 +f 89/157/6 91/168/6 99/159/6 +f 95/179/38 96/176/38 106/180/38 +f 90/178/39 92/181/39 91/168/39 +f 82/151/40 80/182/40 110/183/40 +f 94/184/41 310/152/41 93/169/41 +f 92/181/38 94/184/38 93/169/38 +f 77/185/39 95/186/39 107/187/39 +f 83/188/6 95/186/6 77/185/6 +f 312/189/6 78/165/6 100/190/6 +f 78/191/37 77/150/37 108/192/37 +f 106/193/42 96/194/42 85/164/42 +f 113/195/34 121/196/34 122/197/34 +f 86/163/43 84/162/43 111/198/43 +f 92/181/7 115/199/7 116/200/7 +f 305/201/44 297/202/44 307/203/44 +f 94/184/7 116/204/7 110/205/7 +f 88/177/7 113/195/7 114/206/7 +f 84/158/7 82/151/7 109/207/7 +f 92/181/45 90/178/45 114/208/45 +f 123/209/7 120/210/7 119/211/7 +f 111/198/38 119/212/38 120/213/38 +f 109/214/37 110/183/37 118/215/37 +f 116/204/36 124/216/36 118/217/36 +f 114/208/35 122/218/35 123/219/35 +f 113/220/41 112/221/41 120/222/41 +f 109/207/39 117/223/39 119/224/39 +f 115/199/33 123/225/33 124/226/33 +f 147/227/33 148/228/33 149/229/33 +f 127/230/6 129/231/6 125/232/6 +f 128/233/34 130/234/34 129/231/34 +f 145/235/34 146/236/34 152/237/34 +f 135/238/6 137/239/6 146/236/6 +f 130/234/35 132/240/35 131/241/35 +f 146/242/35 147/243/35 151/244/35 +f 135/238/46 145/245/46 144/246/46 +f 131/247/33 132/248/33 134/249/33 +f 126/250/36 150/251/36 149/252/36 +f 141/253/47 148/228/47 147/227/47 +f 134/249/36 136/254/36 135/238/36 +f 154/255/6 152/256/6 149/257/6 +f 131/247/48 133/258/48 144/259/48 +f 135/238/37 136/254/37 138/260/37 +f 139/261/6 147/243/6 146/242/6 +f 144/259/38 154/262/38 155/263/38 +f 138/260/39 140/264/39 139/261/39 +f 128/233/7 158/265/7 157/266/7 +f 141/253/41 142/267/41 128/233/41 +f 362/268/49 353/269/49 365/270/49 +f 143/271/39 155/272/39 156/273/39 +f 131/241/50 143/271/50 125/274/50 +f 127/230/51 126/250/51 148/275/51 +f 126/276/37 125/232/37 156/277/37 +f 145/245/41 153/278/41 154/279/41 +f 161/280/34 169/281/34 170/282/34 +f 132/248/52 159/283/52 160/284/52 +f 362/285/53 354/286/53 363/287/53 +f 136/254/54 134/249/54 160/288/54 +f 128/233/7 142/267/7 164/289/7 +f 138/260/55 136/254/55 161/280/55 +f 130/234/7 157/290/7 159/291/7 +f 138/260/56 162/292/56 163/293/56 +f 171/294/7 168/295/7 167/296/7 +f 160/284/38 159/283/38 167/297/38 +f 158/265/37 166/298/37 165/299/37 +f 158/300/36 164/289/36 172/301/36 +f 162/292/35 170/302/35 171/303/35 +f 160/288/41 168/304/41 169/305/41 +f 157/290/39 165/306/39 167/307/39 +f 164/308/33 163/309/33 171/310/33 +f 2/4/9 6/12/9 306/11/9 +f 173/311/57 174/312/57 176/313/57 +f 176/313/7 178/314/7 177/315/7 +f 177/315/58 178/314/58 180/316/58 +f 180/317/59 182/318/59 181/319/59 +f 183/320/60 184/321/60 174/312/60 +f 182/318/6 184/321/6 183/320/6 +f 186/322/57 188/323/57 187/324/57 +f 188/323/7 190/325/7 189/326/7 +f 190/325/61 192/327/61 191/328/61 +f 191/329/62 192/330/62 194/331/62 +f 180/332/63 200/333/63 201/334/63 +f 196/335/60 186/322/60 185/336/60 +f 194/331/6 196/335/6 195/337/6 +f 199/338/64 205/339/64 206/340/64 +f 174/312/65 198/341/65 197/342/65 +f 180/343/66 178/314/66 199/344/66 +f 178/314/7 176/313/7 197/342/7 +f 174/312/67 184/345/67 202/346/67 +f 184/345/68 182/347/68 201/334/68 +f 205/348/69 211/349/69 212/350/69 +f 200/351/70 206/352/70 207/353/70 +f 197/342/71 198/341/71 204/354/71 +f 202/355/72 201/356/72 207/353/72 +f 199/338/73 197/342/73 203/357/73 +f 198/341/74 202/355/74 208/358/74 +f 211/359/75 217/360/75 218/361/75 +f 210/362/76 214/363/76 220/364/76 +f 206/365/77 212/366/77 213/367/77 +f 204/354/78 210/362/78 209/368/78 +f 208/369/79 207/370/79 213/367/79 +f 203/357/80 209/368/80 211/349/80 +f 224/371/81 225/372/81 223/373/81 +f 208/369/82 214/374/82 210/362/82 +f 217/375/83 229/376/83 230/377/83 +f 220/378/84 232/379/84 228/380/84 +f 221/381/85 223/373/85 225/372/85 +f 213/382/86 212/383/86 218/384/86 +f 209/368/87 210/362/87 216/385/87 +f 222/386/88 221/381/88 225/372/88 +f 214/363/6 213/382/6 219/387/6 +f 209/368/89 215/388/89 217/360/89 +f 226/389/90 222/386/90 225/372/90 +f 313/390/91 314/114/91 28/38/91 +f 225/391/92 224/392/92 236/393/92 +f 222/394/93 234/395/93 233/396/93 +f 218/397/92 230/398/92 231/399/92 +f 226/400/6 225/391/6 237/401/6 +f 216/385/93 228/380/93 227/402/93 +f 221/403/7 233/396/7 235/404/7 +f 219/405/6 231/399/6 232/379/6 +f 222/394/84 226/400/84 238/406/84 +f 215/388/7 227/402/7 229/376/7 +f 224/407/83 223/408/83 235/404/83 +f 243/409/7 245/410/7 246/411/7 +f 251/139/94 252/141/94 247/412/94 +f 253/413/95 250/414/95 254/415/95 +f 253/413/96 254/415/96 249/416/96 +f 252/417/97 254/418/97 65/419/97 +f 190/420/98 188/421/98 192/422/98 +f 186/423/99 196/424/99 188/421/99 +f 194/425/100 192/422/100 196/424/100 +f 192/422/101 188/421/101 196/424/101 +f 240/426/21 256/427/21 25/428/21 +f 259/429/19 260/430/19 29/67/19 +f 51/90/102 264/431/102 270/432/102 +f 56/92/103 269/433/103 268/434/103 +f 291/435/104 286/436/104 292/437/104 +f 51/438/105 273/439/105 271/440/105 +f 49/102/106 50/101/106 263/441/106 +f 286/436/107 291/435/107 285/442/107 +f 291/435/108 284/443/108 285/442/108 +f 52/444/105 265/445/105 272/446/105 +f 69/447/109 292/448/109 293/449/109 +f 55/450/110 268/451/110 279/452/110 +f 284/443/111 291/435/111 283/453/111 +f 293/126/112 289/454/112 290/124/112 +f 53/96/113 54/95/113 276/455/113 +f 54/456/110 278/83/110 280/457/110 +f 49/59/114 262/458/114 275/459/114 +f 52/87/115 53/86/115 282/460/115 +f 289/461/116 293/462/116 288/463/116 +f 288/463/117 293/462/117 287/464/117 +f 286/465/118 287/464/118 293/462/118 +f 7/466/4 8/1/4 302/467/4 +f 305/201/119 307/203/119 298/468/119 +f 296/469/120 299/470/120 295/471/120 +f 296/469/121 294/472/121 299/470/121 +f 296/473/122 307/474/122 112/221/122 +f 4/475/9 300/14/9 302/467/9 +f 309/476/123 308/477/123 300/478/123 +f 301/479/124 308/477/124 309/476/124 +f 302/480/125 308/477/125 301/479/125 +f 300/478/126 308/477/126 302/481/126 +f 303/482/127 306/483/127 309/476/127 +f 304/484/128 309/476/128 306/485/128 +f 97/486/3 105/487/3 87/156/3 +f 105/487/129 106/193/129 85/164/129 +f 58/488/130 57/489/130 315/490/130 +f 26/491/21 313/492/21 241/493/21 +f 78/494/131 310/495/131 311/496/131 +f 310/495/132 78/494/132 312/497/132 +f 315/498/133 57/499/133 59/500/133 +f 319/501/1 317/502/1 324/503/1 +f 323/504/19 257/505/19 261/506/19 +f 328/507/8 329/508/8 331/509/8 +f 319/501/12 329/510/12 327/511/12 +f 316/512/16 325/513/16 326/514/16 +f 324/515/17 369/516/17 374/517/17 +f 371/518/134 373/519/134 376/520/134 +f 359/521/11 375/522/11 329/510/11 +f 318/523/20 327/524/20 328/507/20 +f 317/525/18 328/507/18 325/513/18 +f 376/520/135 372/526/135 371/518/135 +f 339/121/136 340/123/136 334/527/136 +f 72/528/137 340/529/137 68/530/137 +f 337/531/17 341/532/17 347/532/17 +f 354/533/138 362/268/138 365/270/138 +f 363/287/139 355/534/139 362/285/139 +f 139/261/38 363/535/38 141/253/38 +f 362/536/7 163/309/7 164/308/7 +f 367/537/140 368/538/140 361/539/140 +f 367/537/141 360/540/141 368/538/141 +f 370/541/142 366/542/142 369/543/142 +f 369/543/143 364/544/143 370/541/143 +f 357/545/144 356/546/144 359/547/144 +f 358/548/145 359/547/145 356/546/145 +f 359/521/19 371/549/19 370/550/19 +f 375/522/19 358/551/19 331/552/19 +f 332/553/21 331/552/21 358/551/21 +f 356/554/21 357/555/21 364/556/21 +f 373/557/19 377/558/19 321/559/19 +f 374/517/21 369/516/21 376/560/21 +f 34/108/20 378/561/20 380/562/20 +f 381/563/18 38/52/18 37/61/18 +f 4/475/1 8/1/1 3/3/1 +f 6/12/2 2/4/2 5/6/2 +f 5/564/3 1/9/3 304/565/3 +f 3/7/3 7/566/3 301/8/3 +f 301/8/3 304/565/3 1/9/3 +f 5/567/4 304/10/4 6/12/4 +f 3/568/5 1/15/5 300/14/5 +f 2/4/5 303/13/5 1/15/5 +f 300/14/5 4/475/5 3/568/5 +f 10/569/6 12/16/6 9/18/6 +f 16/25/7 14/19/7 15/21/7 +f 14/570/8 10/22/8 13/23/8 +f 9/18/3 11/17/3 13/23/3 +f 10/569/9 14/19/9 12/16/9 +f 18/37/8 20/26/8 17/28/8 +f 20/571/6 24/29/6 19/27/6 +f 24/36/1 22/31/1 23/33/1 +f 22/572/7 18/34/7 21/35/7 +f 17/28/3 19/27/3 21/35/3 +f 22/31/9 24/36/9 18/37/9 +f 313/390/146 28/38/146 323/40/146 +f 31/56/11 29/55/11 260/573/11 +f 260/573/11 348/574/11 352/575/11 +f 352/575/11 349/576/11 350/577/11 +f 350/577/11 343/578/11 336/579/11 +f 349/576/11 342/580/11 350/577/11 +f 31/56/11 260/573/11 352/575/11 +f 257/581/11 30/115/11 32/43/11 +f 32/43/11 31/56/11 346/41/11 +f 350/577/11 336/579/11 346/41/11 +f 31/56/11 352/575/11 350/577/11 +f 335/582/11 257/581/11 344/42/11 +f 346/41/11 345/583/11 344/42/11 +f 344/42/11 257/581/11 32/43/11 +f 31/56/11 350/577/11 346/41/11 +f 31/64/12 32/44/12 33/46/12 +f 64/584/147 40/51/147 63/53/147 +f 37/61/16 38/52/16 39/54/16 +f 43/585/1 29/55/1 44/57/1 +f 48/586/17 41/58/17 56/60/17 +f 35/587/1 37/61/1 46/63/1 +f 44/588/1 31/64/1 45/65/1 +f 47/589/1 37/61/1 48/66/1 +f 27/76/1 29/67/1 42/69/1 +f 33/590/1 35/70/1 45/72/1 +f 48/591/1 39/73/1 41/75/1 +f 25/428/1 27/76/1 41/78/1 +f 48/81/1 41/592/1 42/593/1 +f 42/593/1 43/594/1 44/79/1 +f 44/79/1 45/595/1 46/80/1 +f 46/80/1 47/596/1 48/81/1 +f 48/81/1 42/593/1 44/79/1 +f 54/456/18 46/84/18 278/83/18 +f 47/82/18 55/450/18 278/83/18 +f 44/597/12 45/85/12 52/87/12 +f 50/598/19 42/88/19 51/90/19 +f 47/599/16 48/91/16 55/93/16 +f 45/600/20 46/94/20 53/96/20 +f 44/98/11 52/444/11 281/99/11 +f 273/439/11 51/438/11 281/99/11 +f 52/444/11 274/601/11 281/99/11 +f 281/99/11 51/438/11 43/97/11 +f 41/602/21 42/100/21 49/102/21 +f 59/603/8 57/604/8 64/105/8 +f 58/605/8 64/105/8 57/604/8 +f 63/606/8 62/103/8 64/105/8 +f 61/104/8 60/607/8 64/105/8 +f 59/603/8 64/105/8 60/607/8 +f 36/608/23 34/108/23 62/110/23 +f 58/609/148 26/111/148 64/113/148 +f 32/43/26 30/115/26 60/117/26 +f 63/610/27 38/52/27 62/119/27 +f 61/611/28 34/45/28 60/120/28 +f 334/612/6 71/613/6 339/129/6 +f 65/128/6 67/614/6 333/615/6 +f 339/129/6 71/613/6 69/127/6 +f 65/128/6 333/615/6 339/129/6 +f 68/616/7 66/617/7 290/124/7 +f 283/618/7 70/619/7 284/620/7 +f 66/617/7 267/621/7 290/124/7 +f 284/620/7 70/619/7 72/622/7 +f 290/124/149 289/454/149 288/130/149 +f 285/132/7 284/620/7 72/622/7 +f 68/616/7 290/124/7 288/130/7 +f 285/132/7 72/622/7 288/130/7 +f 287/131/7 286/623/7 285/132/7 +f 72/622/7 68/616/7 288/130/7 +f 247/624/7 66/625/7 251/135/7 +f 76/626/7 74/627/7 250/628/7 +f 251/135/7 66/625/7 68/629/7 +f 76/626/7 250/628/7 253/133/7 +f 251/135/7 68/629/7 253/133/7 +f 249/134/7 248/630/7 251/135/7 +f 68/629/7 76/626/7 253/133/7 +f 68/136/31 67/631/31 361/632/31 +f 75/633/31 76/138/31 360/634/31 +f 368/137/31 360/634/31 76/138/31 +f 68/136/31 361/632/31 368/137/31 +f 65/635/6 73/142/6 367/144/6 +f 361/636/6 67/637/6 65/635/6 +f 75/143/6 360/638/6 367/144/6 +f 367/144/6 361/636/6 65/635/6 +f 99/639/33 100/145/33 103/147/33 +f 78/191/6 311/148/6 77/150/6 +f 311/148/34 310/152/34 81/149/34 +f 80/182/34 82/151/34 310/152/34 +f 97/640/34 98/153/34 105/155/34 +f 97/640/6 87/156/6 98/153/6 +f 83/188/35 81/149/35 84/158/35 +f 98/641/35 99/159/35 104/161/35 +f 83/175/33 84/162/33 85/164/33 +f 100/190/36 78/165/36 101/167/36 +f 99/639/6 91/168/6 100/145/6 +f 87/156/36 85/164/36 299/171/36 +f 86/163/36 297/642/36 305/170/36 +f 305/170/36 298/643/36 295/644/36 +f 299/171/36 294/645/36 88/177/36 +f 305/170/36 295/644/36 299/171/36 +f 85/164/36 86/163/36 305/170/36 +f 299/171/36 88/177/36 87/156/36 +f 101/174/6 102/646/6 108/647/6 +f 108/647/6 107/648/6 106/172/6 +f 106/172/6 105/649/6 104/173/6 +f 104/173/6 103/650/6 101/174/6 +f 101/174/6 108/647/6 106/172/6 +f 95/179/6 83/175/6 96/176/6 +f 87/156/37 88/177/37 89/157/37 +f 98/641/6 89/157/6 99/159/6 +f 107/651/38 95/179/38 106/180/38 +f 89/157/39 90/178/39 91/168/39 +f 109/214/150 82/151/150 110/183/150 +f 312/189/41 93/169/41 310/152/41 +f 94/184/41 80/182/41 310/152/41 +f 91/168/38 92/181/38 93/169/38 +f 108/652/39 77/185/39 107/187/39 +f 81/149/6 83/188/6 77/185/6 +f 93/169/6 312/189/6 100/190/6 +f 102/653/37 78/191/37 108/192/37 +f 114/206/34 113/195/34 122/197/34 +f 112/654/151 86/163/151 111/198/151 +f 94/184/7 92/181/7 116/200/7 +f 80/182/7 94/184/7 110/205/7 +f 90/178/7 88/177/7 114/206/7 +f 111/655/7 84/158/7 109/207/7 +f 115/656/152 92/181/152 114/208/152 +f 119/211/7 117/657/7 118/658/7 +f 118/658/7 124/659/7 119/211/7 +f 123/209/7 122/660/7 121/661/7 +f 121/661/7 120/210/7 123/209/7 +f 119/211/7 124/659/7 123/209/7 +f 112/654/38 111/198/38 120/213/38 +f 117/662/37 109/214/37 118/215/37 +f 110/205/36 116/204/36 118/217/36 +f 115/656/35 114/208/35 123/219/35 +f 121/663/41 113/220/41 120/222/41 +f 111/655/39 109/207/39 119/224/39 +f 116/200/33 115/199/33 124/226/33 +f 151/664/33 147/227/33 149/229/33 +f 126/276/153 127/230/153 125/232/153 +f 127/230/34 128/233/34 129/231/34 +f 153/665/34 145/235/34 152/237/34 +f 145/235/154 135/238/154 146/236/154 +f 129/231/35 130/234/35 131/241/35 +f 152/666/35 146/242/35 151/244/35 +f 133/258/6 135/238/6 144/246/6 +f 133/258/33 131/247/33 134/249/33 +f 148/275/36 126/250/36 149/252/36 +f 139/261/155 141/253/155 147/227/155 +f 133/258/36 134/249/36 135/238/36 +f 149/257/6 150/667/6 156/668/6 +f 156/668/6 155/669/6 154/255/6 +f 154/255/6 153/670/6 152/256/6 +f 152/256/6 151/671/6 149/257/6 +f 149/257/6 156/668/6 154/255/6 +f 143/672/156 131/247/156 144/259/156 +f 137/239/37 135/238/37 138/260/37 +f 137/239/6 139/261/6 146/242/6 +f 143/672/38 144/259/38 155/263/38 +f 137/239/39 138/260/39 139/261/39 +f 130/234/7 128/233/7 157/266/7 +f 127/230/41 141/253/41 128/233/41 +f 125/274/39 143/271/39 156/273/39 +f 129/231/157 131/241/157 125/274/157 +f 141/253/158 127/230/158 148/275/158 +f 150/673/37 126/276/37 156/277/37 +f 144/246/41 145/245/41 154/279/41 +f 162/674/34 161/280/34 170/282/34 +f 134/249/159 132/248/159 160/284/159 +f 161/675/160 136/254/160 160/288/160 +f 158/300/7 128/233/7 164/289/7 +f 162/674/161 138/260/161 161/280/161 +f 132/240/7 130/234/7 159/291/7 +f 140/264/162 138/260/162 163/293/162 +f 167/296/7 165/676/7 166/677/7 +f 166/677/7 172/678/7 167/296/7 +f 171/294/7 170/679/7 169/680/7 +f 169/680/7 168/295/7 171/294/7 +f 167/296/7 172/678/7 171/294/7 +f 168/681/38 160/284/38 167/297/38 +f 157/266/37 158/265/37 165/299/37 +f 166/682/36 158/300/36 172/301/36 +f 163/293/35 162/292/35 171/303/35 +f 161/675/41 160/288/41 169/305/41 +f 159/291/39 157/290/39 167/307/39 +f 172/683/33 164/308/33 171/310/33 +f 303/13/9 2/4/9 306/11/9 +f 175/684/57 173/311/57 176/313/57 +f 175/684/7 176/313/7 177/315/7 +f 179/685/163 177/315/163 180/316/163 +f 179/686/59 180/317/59 181/319/59 +f 173/311/60 183/320/60 174/312/60 +f 181/319/6 182/318/6 183/320/6 +f 185/336/57 186/322/57 187/324/57 +f 187/324/7 188/323/7 189/326/7 +f 189/326/61 190/325/61 191/328/61 +f 193/687/62 191/329/62 194/331/62 +f 182/347/164 180/332/164 201/334/164 +f 195/337/60 196/335/60 185/336/60 +f 193/687/6 194/331/6 195/337/6 +f 200/688/165 199/338/165 206/340/165 +f 176/313/166 174/312/166 197/342/166 +f 200/689/167 180/343/167 199/344/167 +f 199/344/7 178/314/7 197/342/7 +f 198/341/168 174/312/168 202/346/168 +f 202/346/169 184/345/169 201/334/169 +f 206/690/170 205/348/170 212/350/170 +f 201/356/171 200/351/171 207/353/171 +f 203/357/172 197/342/172 204/354/172 +f 208/358/173 202/355/173 207/353/173 +f 205/339/174 199/338/174 203/357/174 +f 204/354/175 198/341/175 208/358/175 +f 212/691/176 211/359/176 218/361/176 +f 216/385/177 210/362/177 220/364/177 +f 207/370/178 206/365/178 213/367/178 +f 203/357/179 204/354/179 209/368/179 +f 214/374/180 208/369/180 213/367/180 +f 205/348/181 203/357/181 211/349/181 +f 204/354/182 208/369/182 210/362/182 +f 218/692/83 217/375/83 230/377/83 +f 216/385/84 220/378/84 228/380/84 +f 219/387/183 213/382/183 218/384/183 +f 215/388/184 209/368/184 216/385/184 +f 220/364/6 214/363/6 219/387/6 +f 211/359/185 209/368/185 217/360/185 +f 237/401/92 225/391/92 236/393/92 +f 221/403/93 222/394/93 233/396/93 +f 219/405/92 218/397/92 231/399/92 +f 238/406/6 226/400/6 237/401/6 +f 215/388/93 216/385/93 227/402/93 +f 223/408/7 221/403/7 235/404/7 +f 220/378/6 219/405/6 232/379/6 +f 234/395/84 222/394/84 238/406/84 +f 217/375/7 215/388/7 229/376/7 +f 236/693/83 224/407/83 235/404/83 +f 244/694/186 243/409/186 246/411/186 +f 65/419/97 66/695/97 252/417/97 +f 252/417/97 248/630/97 254/418/97 +f 66/695/97 247/696/97 252/417/97 +f 74/697/97 73/698/97 250/699/97 +f 254/418/97 250/699/97 73/698/97 +f 248/630/97 249/134/97 254/418/97 +f 73/698/97 65/419/97 254/418/97 +f 27/76/21 25/428/21 256/427/21 +f 256/427/21 239/700/21 27/76/21 +f 29/67/19 27/76/19 258/701/19 +f 258/701/19 259/429/19 29/67/19 +f 27/76/19 239/700/19 258/701/19 +f 50/598/102 51/90/102 270/432/102 +f 55/93/103 56/92/103 268/434/103 +f 264/702/105 51/438/105 271/440/105 +f 262/703/106 49/102/106 263/441/106 +f 274/601/105 52/444/105 272/446/105 +f 267/704/187 66/705/187 65/706/187 +f 69/447/187 70/707/187 283/708/187 +f 293/449/188 267/704/188 65/706/188 +f 69/447/187 283/708/187 291/709/187 +f 293/449/189 65/706/189 69/447/189 +f 69/447/187 291/709/187 292/448/187 +f 278/83/110 55/450/110 279/452/110 +f 266/710/113 53/96/113 276/455/113 +f 277/711/110 54/456/110 280/457/110 +f 56/60/114 49/59/114 275/459/114 +f 265/712/115 52/87/115 282/460/115 +f 292/713/190 286/465/190 293/462/190 +f 301/714/4 7/466/4 302/467/4 +f 113/220/191 88/177/191 294/645/191 +f 296/473/192 295/644/192 307/474/192 +f 113/220/193 294/645/193 296/473/193 +f 86/163/194 112/221/194 297/642/194 +f 307/474/195 297/642/195 112/221/195 +f 295/644/192 298/643/192 307/474/192 +f 112/221/196 113/220/196 296/473/196 +f 8/1/9 4/475/9 302/467/9 +f 303/482/123 309/476/123 300/478/123 +f 304/484/124 301/479/124 309/476/124 +f 87/156/129 105/487/129 85/164/129 +f 315/490/130 314/715/130 58/488/130 +f 26/491/130 58/488/130 314/715/130 +f 242/716/21 241/493/21 313/492/21 +f 26/491/21 314/715/21 313/492/21 +f 59/500/133 30/717/133 79/718/133 +f 79/718/133 315/498/133 59/500/133 +f 324/503/1 322/719/1 321/720/1 +f 321/720/1 320/721/1 319/501/1 +f 319/501/1 318/722/1 317/502/1 +f 317/502/1 316/723/1 324/503/1 +f 324/503/1 321/720/1 319/501/1 +f 261/506/19 242/716/19 313/492/19 +f 323/504/19 79/718/19 30/717/19 +f 261/506/19 313/492/19 323/504/19 +f 30/717/19 257/505/19 323/504/19 +f 331/509/8 332/724/8 326/725/8 +f 326/725/8 325/726/8 328/507/8 +f 328/507/8 327/524/8 329/508/8 +f 329/508/8 330/727/8 331/509/8 +f 331/509/8 326/725/8 328/507/8 +f 318/722/12 319/501/12 327/511/12 +f 324/515/16 316/512/16 326/514/16 +f 374/517/17 322/728/17 324/515/17 +f 324/515/17 326/514/17 369/516/17 +f 356/554/17 369/516/17 326/514/17 +f 326/514/17 332/553/17 356/554/17 +f 329/510/11 319/501/11 359/521/11 +f 377/558/11 371/549/11 319/501/11 +f 319/501/11 320/729/11 377/558/11 +f 375/522/11 330/730/11 329/510/11 +f 319/501/11 371/549/11 359/521/11 +f 317/525/20 318/523/20 328/507/20 +f 316/512/18 317/525/18 325/513/18 +f 67/731/137 68/530/137 333/732/137 +f 72/528/137 71/733/137 334/734/137 +f 340/529/137 333/732/137 68/530/137 +f 72/528/137 334/734/137 340/529/137 +f 40/112/17 26/111/17 241/735/17 +f 240/736/17 25/74/17 39/73/17 +f 40/112/17 241/735/17 337/531/17 +f 338/532/17 240/736/17 347/532/17 +f 241/735/17 351/531/17 337/531/17 +f 347/532/17 240/736/17 39/73/17 +f 39/73/17 40/112/17 347/532/17 +f 337/531/17 255/531/17 341/532/17 +f 347/532/17 40/112/17 337/531/17 +f 139/261/38 140/264/38 363/535/38 +f 142/267/38 141/253/38 365/737/38 +f 365/737/38 353/738/38 142/267/38 +f 363/535/38 354/739/38 365/737/38 +f 140/264/38 355/740/38 363/535/38 +f 365/737/38 141/253/38 363/535/38 +f 164/308/7 142/267/7 353/738/7 +f 362/536/7 355/740/7 163/309/7 +f 164/308/7 353/738/7 362/536/7 +f 140/264/7 163/309/7 355/740/7 +f 371/549/19 372/741/19 366/742/19 +f 364/556/19 357/555/19 370/550/19 +f 371/549/19 366/742/19 370/550/19 +f 370/550/19 357/555/19 359/521/19 +f 331/552/19 330/730/19 375/522/19 +f 375/522/19 359/521/19 358/551/19 +f 356/554/21 332/553/21 358/551/21 +f 369/516/21 356/554/21 364/556/21 +f 320/729/19 321/559/19 377/558/19 +f 373/557/19 371/549/19 377/558/19 +f 373/557/21 321/559/21 374/517/21 +f 369/516/21 366/742/21 372/741/21 +f 321/559/21 322/728/21 374/517/21 +f 369/516/21 372/741/21 376/560/21 +f 376/560/21 373/557/21 374/517/21 +f 33/590/20 34/108/20 380/562/20 +f 379/743/20 35/70/20 33/590/20 +f 36/608/20 378/561/20 34/108/20 +f 380/562/20 379/743/20 33/590/20 +f 37/61/18 35/587/18 379/744/18 +f 381/563/18 378/745/18 38/52/18 +f 37/61/18 379/744/18 381/563/18 +f 36/118/18 38/52/18 378/745/18 diff --git a/assets/hbm/models/sphere_iuv.obj b/assets/hbm/models/sphere_iuv.obj new file mode 100644 index 000000000..74d6a7e5b --- /dev/null +++ b/assets/hbm/models/sphere_iuv.obj @@ -0,0 +1,247 @@ +# Blender v2.76 (sub 0) OBJ File: 'sphere_iuv.blend' +# www.blender.org +o Icosphere +v 0.000000 -0.500000 0.000000 +v 0.361804 -0.223610 0.262863 +v -0.138194 -0.223610 0.425325 +v -0.447213 -0.223608 0.000000 +v -0.138194 -0.223610 -0.425325 +v 0.361804 -0.223610 -0.262863 +v 0.138194 0.223610 0.425325 +v -0.361804 0.223610 0.262863 +v -0.361804 0.223610 -0.262863 +v 0.138194 0.223610 -0.425325 +v 0.447213 0.223608 0.000000 +v 0.000000 0.500000 0.000000 +v -0.081228 -0.425327 0.249998 +v 0.212661 -0.425327 0.154506 +v 0.131434 -0.262869 0.404506 +v 0.425324 -0.262868 0.000000 +v 0.212661 -0.425327 -0.154506 +v -0.262865 -0.425326 0.000000 +v -0.344095 -0.262868 0.249998 +v -0.081228 -0.425327 -0.249998 +v -0.344095 -0.262868 -0.249998 +v 0.131434 -0.262869 -0.404506 +v 0.475529 0.000000 0.154506 +v 0.475529 0.000000 -0.154506 +v 0.000000 0.000000 0.500000 +v 0.293893 0.000000 0.404508 +v -0.475529 0.000000 0.154506 +v -0.293893 0.000000 0.404508 +v -0.293893 0.000000 -0.404508 +v -0.475529 0.000000 -0.154506 +v 0.293893 0.000000 -0.404508 +v 0.000000 0.000000 -0.500000 +v 0.344095 0.262868 0.249998 +v -0.131434 0.262869 0.404506 +v -0.425324 0.262868 0.000000 +v -0.131434 0.262869 -0.404506 +v 0.344095 0.262868 -0.249998 +v 0.081228 0.425327 0.249998 +v 0.262865 0.425326 0.000000 +v -0.212661 0.425327 0.154506 +v -0.212661 0.425327 -0.154506 +v 0.081228 0.425327 -0.249998 +vt 0.932631 0.000097 +vt 0.000097 0.360641 +vt 0.932631 0.999904 +vt 0.000097 0.999903 +vt 0.932620 0.639362 +vt 0.000097 0.000097 +vt 0.999904 0.000097 +vt 0.639366 0.932625 +vt 0.999904 0.932624 +vt 0.639366 0.000097 +vt 0.000097 0.932624 +vt 0.500000 0.729345 +vt 0.360643 0.932653 +vt 0.360629 0.932645 +vt 0.000085 0.499986 +vt 0.729344 0.999915 +vt 0.729344 0.000085 +vt 0.500007 0.000085 +vt 0.000085 0.729356 +vt 0.999915 0.729356 +vt 0.500000 0.729360 +vt 0.932617 0.639349 +vt 0.932634 0.360652 +vt 0.000097 0.639362 +vt 0.865959 0.499989 +vt 0.865950 0.000093 +vt 0.865950 0.999907 +vt 0.360647 0.000097 +vt 0.000093 0.865964 +vt 0.999907 0.865964 +vt 0.865945 0.999907 +vt 0.865946 0.000093 +vt 0.729345 0.500014 +vt 0.932653 0.999903 +vt 0.932653 0.000097 +vt 0.499993 0.865968 +vt 0.639349 0.932634 +vt 0.932624 0.360645 +vt 0.999915 0.729347 +vt 0.000085 0.729347 +vt 0.360651 0.932631 +vn -0.102400 0.943500 -0.315100 +vn -0.700200 0.661700 -0.268000 +vn 0.268000 0.943500 -0.194700 +vn 0.268000 0.943500 0.194700 +vn -0.102400 0.943500 0.315100 +vn -0.905000 0.330400 -0.268000 +vn -0.024700 0.330400 -0.943500 +vn 0.889700 0.330400 -0.315100 +vn 0.574600 0.330400 0.748800 +vn -0.534600 0.330400 0.777900 +vn -0.802600 0.125600 -0.583100 +vn 0.306600 0.125600 -0.943500 +vn 0.992100 0.125600 0.000000 +vn 0.306600 0.125600 0.943500 +vn -0.802600 0.125600 0.583100 +vn -0.408900 -0.661700 -0.628400 +vn 0.471300 -0.661700 -0.583100 +vn 0.700200 -0.661700 0.268000 +vn -0.038500 -0.661700 0.748800 +vn -0.724000 -0.661700 0.194700 +vn -0.268000 -0.943500 0.194700 +vn -0.491100 -0.794700 0.356800 +vn -0.408900 -0.661700 0.628400 +vn 0.102400 -0.943500 0.315100 +vn 0.187600 -0.794700 0.577300 +vn 0.471300 -0.661700 0.583100 +vn 0.331300 -0.943500 0.000000 +vn 0.607100 -0.794700 0.000000 +vn 0.700200 -0.661700 -0.268000 +vn 0.102400 -0.943500 -0.315100 +vn 0.187600 -0.794700 -0.577300 +vn -0.038500 -0.661700 -0.748800 +vn -0.268000 -0.943500 -0.194700 +vn -0.491100 -0.794700 -0.356800 +vn -0.724000 -0.661700 -0.194700 +vn -0.889700 -0.330400 0.315100 +vn -0.794700 -0.187600 0.577300 +vn -0.574600 -0.330400 0.748800 +vn 0.024700 -0.330400 0.943500 +vn 0.303500 -0.187600 0.934200 +vn 0.534600 -0.330400 0.777900 +vn 0.905000 -0.330400 0.268000 +vn 0.982200 -0.187600 0.000000 +vn 0.905000 -0.330400 -0.268000 +vn 0.534600 -0.330400 -0.777900 +vn 0.303500 -0.187600 -0.934200 +vn 0.024700 -0.330400 -0.943500 +vn -0.574600 -0.330400 -0.748800 +vn -0.794700 -0.187600 -0.577300 +vn -0.889700 -0.330400 -0.315100 +vn -0.306600 -0.125600 0.943500 +vn -0.303500 0.187600 0.934200 +vn -0.024700 0.330400 0.943500 +vn 0.802600 -0.125600 0.583100 +vn 0.794700 0.187600 0.577300 +vn 0.889700 0.330400 0.315100 +vn 0.802600 -0.125600 -0.583100 +vn 0.794700 0.187600 -0.577300 +vn 0.574600 0.330400 -0.748800 +vn -0.306600 -0.125600 -0.943500 +vn -0.303500 0.187600 -0.934200 +vn -0.534600 0.330400 -0.777900 +vn -0.992100 -0.125600 0.000000 +vn -0.982200 0.187600 0.000000 +vn -0.905000 0.330400 0.268000 +vn -0.471300 0.661700 0.583100 +vn -0.187600 0.794700 0.577300 +vn 0.038500 0.661700 0.748800 +vn 0.408900 0.661700 0.628400 +vn 0.491100 0.794700 0.356800 +vn 0.724000 0.661700 0.194700 +vn 0.724000 0.661700 -0.194700 +vn 0.491100 0.794700 -0.356800 +vn 0.408900 0.661700 -0.628400 +vn -0.700200 0.661700 0.268000 +vn -0.607100 0.794700 0.000000 +vn -0.331300 0.943500 0.000000 +vn 0.038500 0.661700 -0.748800 +vn -0.187600 0.794700 -0.577300 +vn -0.471300 0.661700 -0.583100 +s off +f 1/1/1 13/2/1 14/3/1 +f 2/4/2 16/5/2 14/6/2 +f 1/7/3 18/6/3 13/8/3 +f 1/9/4 20/10/4 18/11/4 +f 1/12/5 17/7/5 20/6/5 +f 2/6/6 23/13/6 16/7/6 +f 3/6/7 25/14/7 15/7/7 +f 4/6/8 27/14/8 19/7/8 +f 5/4/9 29/5/9 21/6/9 +f 6/15/10 31/16/10 22/17/10 +f 2/7/11 26/6/11 23/8/11 +f 3/18/12 28/19/12 25/20/12 +f 4/21/13 30/7/13 27/6/13 +f 5/4/14 32/22/14 29/6/14 +f 6/6/15 24/4/15 31/23/15 +f 7/6/16 38/14/16 33/7/16 +f 8/4/17 40/5/17 34/6/17 +f 9/3/18 41/1/18 35/24/18 +f 10/9/19 42/10/19 36/11/19 +f 11/18/20 39/19/20 37/20/20 +f 39/7/21 12/6/21 42/14/21 +f 39/6/22 42/4/22 37/25/22 +f 37/7/23 42/6/23 10/12/23 +f 42/3/24 12/1/24 41/2/24 +f 42/25/25 41/6/25 36/4/25 +f 36/7/26 41/6/26 9/12/26 +f 41/20/27 12/18/27 40/19/27 +f 41/26/28 40/15/28 35/27/28 +f 35/9/29 40/28/29 8/11/29 +f 40/6/30 12/12/30 38/7/30 +f 40/29/31 38/30/31 34/18/31 +f 34/6/32 38/8/32 7/7/32 +f 38/28/33 12/11/33 39/9/33 +f 38/15/34 39/27/34 33/26/34 +f 33/2/35 39/3/35 11/1/35 +f 24/7/36 11/6/36 37/14/36 +f 24/6/37 37/4/37 31/25/37 +f 31/10/38 37/11/38 10/9/38 +f 32/8/39 10/7/39 36/6/39 +f 32/31/40 36/32/40 29/15/40 +f 29/6/41 36/4/41 9/33/41 +f 30/7/42 9/6/42 35/14/42 +f 30/30/43 35/18/43 27/29/43 +f 27/2/44 35/34/44 8/35/44 +f 28/17/45 8/15/45 34/16/45 +f 28/6/46 34/36/46 25/7/46 +f 25/10/47 34/11/47 7/9/47 +f 26/6/48 7/4/48 33/5/48 +f 26/6/49 33/36/49 23/7/49 +f 23/10/50 33/11/50 11/9/50 +f 31/20/51 10/18/51 32/19/51 +f 31/7/52 32/6/52 22/36/52 +f 22/9/53 32/28/53 5/11/53 +f 29/37/54 9/7/54 30/6/54 +f 29/6/55 30/36/55 21/7/55 +f 21/10/56 30/11/56 4/9/56 +f 27/38/57 8/6/57 28/4/57 +f 27/6/58 28/4/58 19/25/58 +f 19/10/59 28/11/59 3/9/59 +f 25/6/60 7/4/60 26/22/60 +f 25/15/61 26/27/61 15/26/61 +f 15/6/62 26/4/62 2/33/62 +f 23/6/63 11/4/63 24/22/63 +f 23/29/64 24/30/64 16/18/64 +f 16/2/65 24/3/65 6/1/65 +f 17/6/66 6/4/66 22/5/66 +f 17/30/67 22/18/67 20/29/67 +f 20/14/68 22/7/68 5/6/68 +f 20/39/69 5/18/69 21/40/69 +f 20/26/70 21/15/70 18/27/70 +f 18/41/71 21/7/71 4/6/71 +f 18/37/72 4/7/72 19/6/72 +f 18/6/73 19/4/73 13/25/73 +f 13/7/74 19/6/74 3/12/74 +f 16/11/75 6/9/75 17/10/75 +f 16/4/76 17/25/76 14/6/76 +f 14/19/77 17/20/77 1/18/77 +f 13/28/78 3/11/78 15/9/78 +f 13/6/79 15/4/79 14/25/79 +f 14/7/80 15/6/80 2/12/80 diff --git a/assets/hbm/models/sphere_ruv.obj b/assets/hbm/models/sphere_ruv.obj new file mode 100644 index 000000000..733491758 --- /dev/null +++ b/assets/hbm/models/sphere_ruv.obj @@ -0,0 +1,247 @@ +# Blender v2.76 (sub 0) OBJ File: 'sphere_ruv.blend' +# www.blender.org +o Icosphere +v 0.000000 -0.500000 0.000000 +v 0.361804 -0.223610 0.262863 +v -0.138194 -0.223610 0.425325 +v -0.447213 -0.223608 0.000000 +v -0.138194 -0.223610 -0.425325 +v 0.361804 -0.223610 -0.262863 +v 0.138194 0.223610 0.425325 +v -0.361804 0.223610 0.262863 +v -0.361804 0.223610 -0.262863 +v 0.138194 0.223610 -0.425325 +v 0.447213 0.223608 0.000000 +v 0.000000 0.500000 0.000000 +v -0.081228 -0.425327 0.249998 +v 0.212661 -0.425327 0.154506 +v 0.131434 -0.262869 0.404506 +v 0.425324 -0.262868 0.000000 +v 0.212661 -0.425327 -0.154506 +v -0.262865 -0.425326 0.000000 +v -0.344095 -0.262868 0.249998 +v -0.081228 -0.425327 -0.249998 +v -0.344095 -0.262868 -0.249998 +v 0.131434 -0.262869 -0.404506 +v 0.475529 0.000000 0.154506 +v 0.475529 0.000000 -0.154506 +v 0.000000 0.000000 0.500000 +v 0.293893 0.000000 0.404508 +v -0.475529 0.000000 0.154506 +v -0.293893 0.000000 0.404508 +v -0.293893 0.000000 -0.404508 +v -0.475529 0.000000 -0.154506 +v 0.293893 0.000000 -0.404508 +v 0.000000 0.000000 -0.500000 +v 0.344095 0.262868 0.249998 +v -0.131434 0.262869 0.404506 +v -0.425324 0.262868 0.000000 +v -0.131434 0.262869 -0.404506 +v 0.344095 0.262868 -0.249998 +v 0.081228 0.425327 0.249998 +v 0.262865 0.425326 0.000000 +v -0.212661 0.425327 0.154506 +v -0.212661 0.425327 -0.154506 +v 0.081228 0.425327 -0.249998 +vt 0.932631 0.000097 +vt 0.932631 0.999904 +vt 0.000097 0.360641 +vt 0.000097 0.999903 +vt 0.000097 0.000097 +vt 0.932620 0.639362 +vt 0.999904 0.000097 +vt 0.639366 0.932625 +vt 0.999904 0.932624 +vt 0.000097 0.932624 +vt 0.639366 0.000097 +vt 0.500000 0.729345 +vt 0.360643 0.932653 +vt 0.360629 0.932645 +vt 0.000085 0.499986 +vt 0.729344 0.000085 +vt 0.729344 0.999915 +vt 0.500007 0.000085 +vt 0.999915 0.729356 +vt 0.000085 0.729356 +vt 0.500000 0.729360 +vt 0.932617 0.639349 +vt 0.932634 0.360652 +vt 0.000097 0.639362 +vt 0.865959 0.499989 +vt 0.865950 0.000093 +vt 0.865950 0.999907 +vt 0.360647 0.000097 +vt 0.000093 0.865964 +vt 0.999907 0.865964 +vt 0.865945 0.999907 +vt 0.865946 0.000093 +vt 0.729345 0.500014 +vt 0.932653 0.000097 +vt 0.932653 0.999903 +vt 0.499993 0.865968 +vt 0.639349 0.932634 +vt 0.932624 0.360645 +vt 0.999915 0.729347 +vt 0.000085 0.729347 +vt 0.360651 0.932631 +vn 0.102400 -0.943500 0.315100 +vn 0.700200 -0.661700 0.268000 +vn -0.268000 -0.943500 0.194700 +vn -0.268000 -0.943500 -0.194700 +vn 0.102400 -0.943500 -0.315100 +vn 0.905000 -0.330400 0.268000 +vn 0.024700 -0.330400 0.943500 +vn -0.889700 -0.330400 0.315100 +vn -0.574600 -0.330400 -0.748800 +vn 0.534600 -0.330400 -0.777900 +vn 0.802600 -0.125600 0.583100 +vn -0.306600 -0.125600 0.943500 +vn -0.992100 -0.125600 0.000000 +vn -0.306600 -0.125600 -0.943500 +vn 0.802600 -0.125600 -0.583100 +vn 0.408900 0.661700 0.628400 +vn -0.471300 0.661700 0.583100 +vn -0.700200 0.661700 -0.268000 +vn 0.038500 0.661700 -0.748800 +vn 0.724000 0.661700 -0.194700 +vn 0.268000 0.943500 -0.194700 +vn 0.491100 0.794700 -0.356800 +vn 0.408900 0.661700 -0.628400 +vn -0.102400 0.943500 -0.315100 +vn -0.187600 0.794700 -0.577300 +vn -0.471300 0.661700 -0.583100 +vn -0.331300 0.943500 0.000000 +vn -0.607100 0.794700 0.000000 +vn -0.700200 0.661700 0.268000 +vn -0.102400 0.943500 0.315100 +vn -0.187600 0.794700 0.577300 +vn 0.038500 0.661700 0.748800 +vn 0.268000 0.943500 0.194700 +vn 0.491100 0.794700 0.356800 +vn 0.724000 0.661700 0.194700 +vn 0.889700 0.330400 -0.315100 +vn 0.794700 0.187600 -0.577300 +vn 0.574600 0.330400 -0.748800 +vn -0.024700 0.330400 -0.943500 +vn -0.303500 0.187600 -0.934200 +vn -0.534600 0.330400 -0.777900 +vn -0.905000 0.330400 -0.268000 +vn -0.982200 0.187600 0.000000 +vn -0.905000 0.330400 0.268000 +vn -0.534600 0.330400 0.777900 +vn -0.303500 0.187600 0.934200 +vn -0.024700 0.330400 0.943500 +vn 0.574600 0.330400 0.748800 +vn 0.794700 0.187600 0.577300 +vn 0.889700 0.330400 0.315100 +vn 0.306600 0.125600 -0.943500 +vn 0.303500 -0.187600 -0.934200 +vn 0.024700 -0.330400 -0.943500 +vn -0.802600 0.125600 -0.583100 +vn -0.794700 -0.187600 -0.577300 +vn -0.889700 -0.330400 -0.315100 +vn -0.802600 0.125600 0.583100 +vn -0.794700 -0.187600 0.577300 +vn -0.574600 -0.330400 0.748800 +vn 0.306600 0.125600 0.943500 +vn 0.303500 -0.187600 0.934200 +vn 0.534600 -0.330400 0.777900 +vn 0.992100 0.125600 0.000000 +vn 0.982200 -0.187600 0.000000 +vn 0.905000 -0.330400 -0.268000 +vn 0.471300 -0.661700 -0.583100 +vn 0.187600 -0.794700 -0.577300 +vn -0.038500 -0.661700 -0.748800 +vn -0.408900 -0.661700 -0.628400 +vn -0.491100 -0.794700 -0.356800 +vn -0.724000 -0.661700 -0.194700 +vn -0.724000 -0.661700 0.194700 +vn -0.491100 -0.794700 0.356800 +vn -0.408900 -0.661700 0.628400 +vn 0.700200 -0.661700 -0.268000 +vn 0.607100 -0.794700 0.000000 +vn 0.331300 -0.943500 0.000000 +vn -0.038500 -0.661700 0.748800 +vn 0.187600 -0.794700 0.577300 +vn 0.471300 -0.661700 0.583100 +s off +f 1/1/1 14/2/1 13/3/1 +f 2/4/2 14/5/2 16/6/2 +f 1/7/3 13/8/3 18/5/3 +f 1/9/4 18/10/4 20/11/4 +f 1/12/5 20/5/5 17/7/5 +f 2/5/6 16/7/6 23/13/6 +f 3/5/7 15/7/7 25/14/7 +f 4/5/8 19/7/8 27/14/8 +f 5/4/9 21/5/9 29/6/9 +f 6/15/10 22/16/10 31/17/10 +f 2/7/11 23/8/11 26/5/11 +f 3/18/12 25/19/12 28/20/12 +f 4/21/13 27/5/13 30/7/13 +f 5/4/14 29/5/14 32/22/14 +f 6/5/15 31/23/15 24/4/15 +f 7/5/16 33/7/16 38/14/16 +f 8/4/17 34/5/17 40/6/17 +f 9/2/18 35/24/18 41/1/18 +f 10/9/19 36/10/19 42/11/19 +f 11/18/20 37/19/20 39/20/20 +f 39/7/21 42/14/21 12/5/21 +f 39/5/22 37/25/22 42/4/22 +f 37/7/23 10/12/23 42/5/23 +f 42/2/24 41/3/24 12/1/24 +f 42/25/25 36/4/25 41/5/25 +f 36/7/26 9/12/26 41/5/26 +f 41/19/27 40/20/27 12/18/27 +f 41/26/28 35/27/28 40/15/28 +f 35/9/29 8/10/29 40/28/29 +f 40/5/30 38/7/30 12/12/30 +f 40/29/31 34/18/31 38/30/31 +f 34/5/32 7/7/32 38/8/32 +f 38/28/33 39/9/33 12/10/33 +f 38/15/34 33/26/34 39/27/34 +f 33/3/35 11/1/35 39/2/35 +f 24/7/36 37/14/36 11/5/36 +f 24/5/37 31/25/37 37/4/37 +f 31/11/38 10/9/38 37/10/38 +f 32/8/39 36/5/39 10/7/39 +f 32/31/40 29/15/40 36/32/40 +f 29/5/41 9/33/41 36/4/41 +f 30/7/42 35/14/42 9/5/42 +f 30/30/43 27/29/43 35/18/43 +f 27/3/44 8/34/44 35/35/44 +f 28/16/45 34/17/45 8/15/45 +f 28/5/46 25/7/46 34/36/46 +f 25/11/47 7/9/47 34/10/47 +f 26/5/48 33/6/48 7/4/48 +f 26/5/49 23/7/49 33/36/49 +f 23/11/50 11/9/50 33/10/50 +f 31/19/51 32/20/51 10/18/51 +f 31/7/52 22/36/52 32/5/52 +f 22/9/53 5/10/53 32/28/53 +f 29/37/54 30/5/54 9/7/54 +f 29/5/55 21/7/55 30/36/55 +f 21/11/56 4/9/56 30/10/56 +f 27/38/57 28/4/57 8/5/57 +f 27/5/58 19/25/58 28/4/58 +f 19/11/59 3/9/59 28/10/59 +f 25/5/60 26/22/60 7/4/60 +f 25/15/61 15/26/61 26/27/61 +f 15/5/62 2/33/62 26/4/62 +f 23/5/63 24/22/63 11/4/63 +f 23/29/64 16/18/64 24/30/64 +f 16/3/65 6/1/65 24/2/65 +f 17/5/66 22/6/66 6/4/66 +f 17/30/67 20/29/67 22/18/67 +f 20/14/68 5/5/68 22/7/68 +f 20/39/69 21/40/69 5/18/69 +f 20/26/70 18/27/70 21/15/70 +f 18/41/71 4/5/71 21/7/71 +f 18/37/72 19/5/72 4/7/72 +f 18/5/73 13/25/73 19/4/73 +f 13/7/74 3/12/74 19/5/74 +f 16/10/75 17/11/75 6/9/75 +f 16/4/76 14/5/76 17/25/76 +f 14/20/77 1/18/77 17/19/77 +f 13/28/78 15/9/78 3/10/78 +f 13/5/79 14/25/79 15/4/79 +f 14/7/80 2/12/80 15/5/80 diff --git a/assets/hbm/textures/gui/gui_ams_base.png b/assets/hbm/textures/gui/gui_ams_base.png index 2c1039e143c9d2f1d1c1599db08b464dadae82f3..2de3c50f66d423957154c2d66239bc53481c8a5c 100644 GIT binary patch literal 6227 zcmb_hXH-*Lw>=2~A|((7L8QbGq=_K+iWD(H2^|6HC?PZj6aneQBw#~8nkZ2~kY1!; z0qMO+6O|^?L24)>ASL7-?)|=3#&|#8kC$;qae9h~$S}%T$AH>u@zCLZYdV};7s#|mj}JfP0hW@SYo|pNmZur)uh6!Nd?NZ3G*A= zcC3+p8*PmCK{v+E_$4Ob&ynj?nvY0$&A2&Ha?L2i%OiHpPld)znVMaqsN5>I>sQA5Qka15qAd!EQzKVyTH10D3kr1M3 zcx^ouYkOj&9O?ukum7CwL>D}W{>s6^bkYAOOqNg$7y7W@!v)k3xRMzvm+`1TnBiqe z%Et5Dx2jON2o)r7%Ji}}%rM^F_H_ynt&@g<%1QN#a4}QjB3ElYKCSLOr!=)=h+A;f zP3kQeE>y@N3b1?Z{{w(az639j6I_A9dk@&-W&lNIRJz}kpiK&fwO$f9)sp5Th7tuX zN8sr?xYLj$#lm8N5Go9lZt?jvamoo$&}QCayT z9RfPsG-;@-;vA)nO?o%poBT$V2?)9uB-O{0pAN&i8jPKp-~4N{kRH(=3|u60P}ZQT!u7~TwAr3d*u+F52>y;ZRx&`W*_eYrVr&e+WrV7f;WleROgJX(a&uGeeOq1u`} z@-3SM0%{1eiQ@(WfeZ6kyK|r16`QlpwK?`c-nsM@DyP~!j<@-247&{}wjfa4f|L#wq?s z!fj&&P=O2{oph^NO?T-@ZXrnR8GOSKe+c4k9Q~9ki8~81{Lt9>%Lp5>QOJM>UE1Hg z|ES$gwqF|d1p|4p%<`w)*C;zzNGRL1iR}o1lB-0D#sqe(V3QAAYsIfK4tA5Pw?8jJ z;?6@Slz~|F#2S-Lk?r0K*rf5%>TSj^hN>S&v^X>yXSqfwDf zw&^HEpxhWo9`9+})`@^J%tZrIlkIMN_;1quD_PzoRPWvTFawBJgCNCv=w{(E5@5!$ zN5Ga-;eq(kIj$;cRAg@r0%U^~m8mEkP2=@W#=6K*;=BP<3%ChJaEF$v75E4bG>|pL zj)2;Bv}Q|ulCC;sB-H*@DI=mSWak72%e9ftaQ&^Y>kD%XUkitnbSb$kz_&yBGL`>` zppcM%c~R@MM`Pdm9amR>*Vh=R!mzYUK{AUNZ}3Mcz$k4jO*5)`yX3ex^)=I)N}XOn z%^MGN5yE*nBbU*fzh@AFtQX*5d0@zDSd41_6=TD!5RL;0wv2T)ItsCfgWb5E$MQhU zY4*5j>mM1XQ(Wfw;K-sEm_Y4SEV*a<+O=b!)P8l!$umo~*kyhjS|Mn|_2 zly{?+0#(EPG1q^*rgU2U>P$^ddG(xvPCWTcAJBw2W{2>SGw;X?@XgrrPob@TpKQc{wfQLwa1T^37YVCczo&p>SIIJ3xQbS6_9z4o;? zz!Le(NXzm_c4}>vzGxjv2OdK14eLNhw-Mxb4X7L8F(jVfdmSB5<5?$k>N%QE=xvpb zdFRW-E6s7SsS(yQ5~Rydp+v7e(k+|OB%Yh`<(Kf9d*L8 z*QeZnX7G_V8r4a#+=~jIzka`AYkfXO9BSGNai}#R^Jm-}%UrB2q4mfrDk(LLjS>3d zCu0T<^MOU6QSw^{A>6Pq*V)@9y&+**xXg`k`aT|wh8%;J#z!7ZJ8nS|qcnWY4w9lY zC~hOgheh-)h8QjJ=!G-Ucnccs_0C?Fm##Sjfsxd>f6pC+EGtpM#2|xekEil_Anmy` z_Btwf(JzNk8FHr{D*67YXgR|*U#U-)_E)zWg)FH7*0x~5=sK7d{&C%R&v!7{e>DRS z96y3vB#JrxHKA&5N;Tx7q>FzfSnc)Z1TK01#iu6N|xPMEP!w{4zjcKxvw>U>_)95X$lu$phXg_ zMK6IkM$cF^{6pc!l8Rjgowah$EP%H_+5crX(O6_zzR5zOV_SQ2nxo2A}26Txf&V>1FCl5--x#YuA&#Y_G9{Yae?dg4+tQv<= zPWbhMB}PP%6Uq}-^sb%<6((;6V~h1htQh>BwQex?;)#BQmWFOJ_I|I>4-O=J5{hDL z0LO6PBLS(UAf+4f>MD{qI5xDC*I+~sxhU+2Ec79+SOc!qxC*PxitSMuPqFx~!BdjlTrO3e) z_VK}y7s2{@@VJ+`n!u~G=ey*jJOQa(C>IM8O`6@57_zaaZ7-Wd7k}Di8XUhlACG5N zld?v(`yl1IcOX}!p!sS)!fSs%{$6rG7yH7$KxEe<&Gtd8%**B4`BB0*5AWGERpS+1Z1d{j^KB}I8(Tu zFDd0RZ*V4W1*e4rK0b8-;(!cJSB1$xtoNGZDmBlMhPL!GNrVG}f`U8)3t`{c<@h;@ z%FE*yol8lvg37n=17DIv;N|8qba9ziq7)CMSW4^d7rEYmc6HFs=g_`Rmbq=?xSEn! ze<9p=R~#$YytD`LP0Y`?2iBR5mYtWBKgx|Rx{E=vk0gp{xyf3CFf4=R0}0WxWKBs; zdtJhZdIopM`StvvYfthmAzTc@{0G3%k{$q5ibBA9wf=0HDt`j`znMH}~?dNDSeiWpknrwng}i3X|yry+xAX99nJa9F@u+|e?XJ4YQ$&3Sat09(Cv zNhEh!T3lcNll zz*0s!zQY;_hY@MI&!o~aKKhl7ninW*Z+#vm#~PL(QkKOULUal~`++qbt&1_7k@Ebzsg4*4Y+;Vtvp+5ye8HyASiD)o(9iQ!%afUVoo!VQJ|f z7k0A!A|oRyPkT?izJNVgC;N)_4$}_q&x{iYiTDHBGDl8xc8v$`K*qnx9cV_Oo=O@aBzSU`ceeBrEq#e$!Vs67B)E!z6~&;L_&WVt*d`to})m zR+S9u%09HsgDn}6ew;FKvBypBMY+eF4v6~bV&LyJ+YEKoM?&RpluVDTgcU6P;z>i) zAAR=52-L!*I&R4N{TCj}ht(&fn%<@`$H${2)Gh`{nfndPEj~fc4yhp}PFgODl`@7F z_d`x&xc@>I2*MuScIM3j%K@c9|Qt%ul!1*_8B;OdS^vm$F?|Wv8>5;adCp@zvd3@2RG=;D=RK}Z?gnO@oJJl zbHGP56d%W&1w>yXR>65TiQH^}BxhL|E{5w!1~_P&0Oz4UB!YuNWudsf9xg*bOZ%KP zOwXM}f#P%`a?r%E4JIDo+C7#B5U)$OWsf{h6ajbiY->Mfbw$)(N}0Xh7Y_Q0|LUV@*gK933bhReqHjeCeZ~(Mncj0W}Cm$%IHR7E}^i=L-0=lP7tPV zy3OYWIKR4_KXaU2@AR=7*4F-$6;J=M)9N7zesA!$27fpculv`C>*{KF3-p-=Q^As* zy*<;$j^Ok<|MQM!_743^Hs=$e+K$Z5khG6y=|xWR^YjlLc*I3Z)G8H0=EKH z;i$d^uLxBez6c<+|AviClecw6LAXy9ZPe%Xd#mhzmw7Mc!!Uu70O9t#sF82h#3~X* z>2R=H-lv+)(R zwHj5U8hQOcOV&=FJUKKx+~D%QF$#MyFVp^^qGIiCOTL-3Xzw61GsU9U<^AP+vki^j zygcdN1~B3;J2T?l6ME;yZd8xZ0yf;f^!$BYx0f;=^sXjw+puu3*y2o4Y3YLwhmg)r z-Ri(?1Q-@RKE5#}kbFbmzBPh;Nx0w^anXja3&NeZ;8O+C5hUfIU!W~{TKCOkAc%*~ z=9_^)We+Zah*gjom%z0>15r9uM}(U=V$uoZ0-?PIH22}d)BJoHFkt)p8@*$p(q<20@@$z<7J3R2VoV zAa@^&U4n3@a{uRm_df%We-98+RT+XS-dK6S?|f=q;SxxR?5@s zZuw@N*RNjB>tCB_U;?@8hNyl2{!!GW-FDrIR{^zW57)v!epT=tYjo65815l8v=03# z-iGvaCn&PJTi;ED4hk8JV2$c;JKr}JF9u!SPbeaMe0=1Dqn=%4gv-{-rJ=b`owi>j zkp`Gh>P+B7Tx{Tq2AJA4-vLEZawF&7CJ{}ESUW7;OS#1We7}XQ)hc1$o(_MQaL7Z` z;Ni%1TC-SI3n`$@L++K{Czto1?v|fR=mzSm#Oti`i;9bb7rerjmTtc@llD>;vIm)% z1?C04(cazw;Gt9fSNi@tR$M5{zXvEF0%{P{fc?~ebLt1Er2m0G@*mveQ$gS}n*x9x zA`JH~v(L#-WeH46pi;`p%Z&;Ljq>_0iXRKy7_SL@5+2SD$`DMSpbJ}c=RM429^(J9 za8^&yyJk|rq)7w)H%Q#l;pHCEJ}4Mj!3*m_NfjYr?!I1ltM|O# z?T+W-X94rPtT=8n=F=QQ4*}g_tIl=aE6S$~Kij3#PJ^Y?(s#B@DwDkBXW^^dMy^Zz{?t z`=FT~45APoYeAHkOi`6*mI_ zB#&E}p8)^{4PiiB4CXtA%B2LQ*M!CO>-jl zZMu!H*|}ri8fuf&+sTQ)I^!f4kh9lK6KKJD+FRDPN$C}2AMEKy+JvtGB?)<{aIfL5 zUz_g+kD3iP?6^{`ge+2=o1ahSO%@hAx(rE67^Pa6lnQut#Zdb&T2}{xo7>Wu>sOp> zR^O|dDxmHnlT}*ZKj2_6A%b}&6iV3C1pP+N5JrDiR?=f*LYD>mV%It|E9F|&vcs6o z%;dq<{;7pgvyqg`y{;$lc`X9Bfr=j)ZU)TRxA{#N%*?OOH1hiV=+}YVi0G%7Sj%NA zD~kCzk9Wex#>R=p61ed%*SXRXn>|C-+*ZOJmk*b6w9E`m!2fl^$@sWj*No)C*x;C$ zog<;(^R34z?WW78uv%Ka3(jMs3aA!=GiAZ@xhA}x40QJcHM29vq=8k>unMbEHEPAK z>k&X-i6?_)p#&UWIy2LH%AsfmJzNkhlcEArO1_!^HUQ05vBVgw8*V(^RfG8lm z)SQ<500+8b5qr_lly;vQt`4leK#N{5Q0|9>B`knUBzWejD{dtX5_`Gd)|THl-G=Eo zVKefF(CwkUegu?gU{{6!J?n~Sb9`{%yjPQ_1NWpKKJGy zt`)gn%?pB0G=&8CRV*epkhD`5w)2_85+l!1=~TuWdcuXX?AC(S+0!-@)ZP62-NH+i zMVjzgAm+U#lNR9Cd$Iks)1iR?^=0n59O~{|lqR>GqPo~s<+Y9eN1v@i6p(jz{BAnl zy{*S=eJWd{d-VLU^ym?n+M^Y@*fvC&or2!BbE>eHDreb)BI^6rmBSi+dGkcyAZhg2 zF{***Y=j?y%it+F4Arh$1PoGkyD|SJCvyy^qF_UmgOiW0 z*-NuNxyB@BlHt$yFs)*0kCx?nak(Dv2wj72mrhBezdmP$$@PU%iHaiHyO%MT-d0uR zHSCkoDd;7?BwLY3l_lVJuLE*D_{L=a_Q2FtZ^5zNfXd^0n2CL)YMu@$d(*+R zQV>s}F<6Vd!A1kI6mDcli<{@~Gww^2_44FGgQfSpFgqR=5OK)eG?}l$ zBt3d#m{PYA_rix!yYYyjwMWZyvC=9g=^MFLZ)q#lu4=rJV@z5!f%0t9M8&KsrtJy1 zeHigf?8BIMz$qfYRN{xd1@-k2sZKM}H#6GjiALhhw{W``AAWrjLwEC9XpA+dR7S2F z?>aUzM!u2v9_`K}g1RlZvxXlsdWuD@G^dLgBV&x!=$UW95fy7c9zYIV_z6=Z$x|c2 z_mA>gZhWtGdS7m@Z9r~DZ2EfLlHy$*6DndHHX7+_RHc7?I~&XxXYfN~ay70oHa^a& z0~xuTRhNO>`^b)w*;&0F&3a;wAYp}4_MFDC8?ue0YklnB_AG6w9Pl`Z+x`;huw5gc zDmZ~BDX3yGWoPj2XM43Xr})nsIbg6fiDSoqy2T4-p&fs?nA5xMCQ$-RCEZ7ASFGCA zEV~S>9TMtV3ZB+eC(CSX%Qd8NYx0?s7mZmE6pr&vzM2F}Dzbi7fu~17Nxr@#HmEi&ib( z)8PAVo~SVw3F=~LkJWt~1E%GSHGSbrHk5kVxN~8Rt&z(@P8HG@E=7=h-2U$6MQhgc z)S<-RJ8#XGYMHo}^{4v(%AyWYv?m`m3?IRDW%mVC4$iMcAQVM14-1oeq>xMO*0AM2 z=vywaxl{d#VdaNwJ?mUsg*EL>196t>xBmH=V^&6J32d-K+-QK1I-8hoFDLiE&*4`4 zjZu!s?9dU@P7^)So$-o51dq~&68S;6`b_Hqm&^x~ZN?-C_uM41dgm9Bpw3?&wI@r` zM-8DEY4kuf@{Wy>s(s81o{H*LGr9EAUcXC~11f6|qonf$GVXqu7Y;>7e%2)@igcu} zu%qgvLbBQ%&el4Y9E}Wbg0D zoHS{Tr_KW9(6GRW`IP}ZIhfZ^Ifcw`~mhPoqx+mG(CCmgnf- zCRw`|jV0Xasu{bcHy^6+-fk?G!b7`5ETg~%BOm3orubZ~Wiol4zYvk6^%U7r?>r7; z!&+%aSym9~uT&IYx=Pai&TwBsVxbn?utM*Bz zxB%?EfcoC$LPi(5H1VFz_|#;tI8EQHzQvK%fa^n=f64y-s^fh_?G+yuA_`RaS%faD zw1!Toe!e#y5@wJWuoNgX;YEqOKx(s;9T9&i?Q%pot@2maglnHF<_=u^EK;JqAQv}m zlPDL*C`%HBLPd`Q%`KYc;@I2!MHaPR!QC|qHW1(C;RLxFIzsFwVdb z_TzEHnG8`k)U$oXqTer03P70xj1OTtZsGorrKV^wu4N(f%Ei5H*BGStQTROB&8#0k zu9R3PgowGHmVJG0|BFcjBT;C_8C7};zezp<>45Dn2OJLP&v{oJwb=81oPeN+;kfkH zv9FQzu)e6xz1y_$XggbU#i+uoL#D4Q!_z-BfG=c!m&V=9t&hiSM4X5gw=34rorl)`z%e{cTmkRv$9BQD8!w%E3*v zXg$_&H8?W`d!`AT*q|_4F0Lod&9{~T<;Iz;1vOJCqz6>@3{3mz)*@NwsjiGWTOKH; zd|rk(&4@mvZ(FigZm==KD?T{Kg>a~T8?r;R zg%a+wo_RmZ&HHL#oFn?5O6e(!6q3Afn%I|pR=mcBDePPeE~K{!6;tkT-3 zCq|`A&kRt?_A&2XK3_336|W*iI*)2@40b+6UVUBANfBhXl`9M%a3y}R-QN;;4GWKF z10MXFubN?j4wcclHZzEA4~?AT*(W9&?07&D`k1}i!$i#lu^7NE`P(~~AX0H(x(>DA zY>aKLsdb^aUSn&-@=bkV5&_TpP1qtPI!Umr*<3?BE7~p8Sb2MBAdcw0eA7gjB$FVL zznR*;!&PTu?x)_K@N)6C_bD4P8hU)A)ObEfkAQje*ut&#<-p6!DQ{obX#9ov!K64v!tN^PSHZhTx5YPu~x=mFDBub zl%^mp&S2altF`syp~Hu>K5eHq`ycf@Z_qOJFN!q|tPue9+Ufto%3Y-Ahw$hdqY6LHN#purMtW_s`lcIYVVug5JJ3DM58Pe2Ub6J)JSvgz z-D4Am&wH$HZaz9Qa|U7t3ucqYtL=432NYUjLqbN%)b%eybeT^v^53Ly|F}(#2yp+X z|BrSKy5X}Ssg?gfQ3KxMuf)c^5N`?357aw*1>)&!qmg)ci diff --git a/assets/hbm/textures/items/ams_catalyst_aluminium.png b/assets/hbm/textures/items/ams_catalyst_aluminium.png new file mode 100644 index 0000000000000000000000000000000000000000..c18d28c9182419965ce496c3fc1cd88d39ca31cc GIT binary patch literal 282 zcmV+#0p zk0hlON+|$x&Regb^a^hKBF4DI1PCDzLfGn*5;4Zg;FO@85<*}cM~pFu2*WU3Uh8(* zeZd&RvMepibpoXn&N)N`0OuTVJ>1Hm@B3*eS7x3I)=dArR$##@ErwtF*dG+_O#3-IXyGa*gTBY%i|%F@#$L~7WmEoiFFM0$ zk}P)zhZ2)RkKs`svC|?9C9&Px# literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_blank.png b/assets/hbm/textures/items/ams_catalyst_blank.png new file mode 100644 index 0000000000000000000000000000000000000000..47cc979e3aefb31724f97deb6a572b330348b30e GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf_AWW_g~LjqzYt~NFTXAT@V@Zl-96AxQLlEHzNGnL@%s{Pu{=J!NKi6B nU-6+aM|{vR?v9f_BFqeb`GP}JR$LJQ`jWxZ)z4*}Q$iB}UKw*Q literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_cerium.png b/assets/hbm/textures/items/ams_catalyst_cerium.png new file mode 100644 index 0000000000000000000000000000000000000000..4809440000abb315c69d62efc927751b3e11e022 GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfxQ3lz=sC$S#peJ6PeZpyX2E-r<=p=`!&J2Ax2&@2c< zEOesD#vlZLx1T?M|Ln}dU$I!1EY@Y0Wbm~RaLxgc=lPRAZX$i1XcVd{07X%JH5z>u zr)gR%Fqo0|9)JUsW-_7y5kW)%2q9FQ!MHd9kYyRFTD7oR&H&h*u2l=obWsAkWwo3! zpCnAj2>{#uxlPKjm3?74PPp9eU6S?$B2vYMXA2?{#g7cU_q7MJ*v2{MP}TQ1+Y*Ej qqMPh&6zcW zd-JC4gZUi`Iv33BitJHk`td97#b+ad`^slr@)w_bWf^zkrJDRUtA(#tdn`O~*~L@Y zRfcEBx?c>hc0FY|6e-K_WNFant?iFZSsuvQPibAWRXJjoY{w}(?wgkBey^w0ibb88 z%*t|5OR;`wu;Mo!hsu4&`A|xB=?!MBN+m##WK?YA(KbLh*2~7aigL3u& literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_euphemium.png b/assets/hbm/textures/items/ams_catalyst_euphemium.png new file mode 100644 index 0000000000000000000000000000000000000000..9070ad6785b1f98cbc906dac3580c8590a704c4d GIT binary patch literal 297 zcmV+^0oMMBP)b>!3`L)VjMN%H9#g z1Sqm}%OC+=tvwkM2~r#j1=_rg#OJ3#Qt(WSF=u1UxumJ)3IVj%066CW==*-6uS$hV zDFDWCoHeS_;-+b`f_sADFbvUTc`p(XL<9iuearQpu=v%0+(jnf}ZL?&fJ3v&^IH00000NkvXXu0mjf DR_J=z literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_lithium.png b/assets/hbm/textures/items/ams_catalyst_lithium.png new file mode 100644 index 0000000000000000000000000000000000000000..491b130b6e4ae7ddc20d1f618819fc699a5bfc76 GIT binary patch literal 297 zcmV+^0oMMBP)@i+pXXJZVi8lH0j vfU*Dip#0fC<5a&}q!cK%%1M3lnZDKov?OVf9cK0Z00000NkvXXu0mjfSnzob literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_niobium.png b/assets/hbm/textures/items/ams_catalyst_niobium.png new file mode 100644 index 0000000000000000000000000000000000000000..401d13bddd5c9af30dca439ee3f38bedc2e2964c GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfYYvW<i_49VsahOhYX&selF{r5}E)j-*G7b literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_strontium.png b/assets/hbm/textures/items/ams_catalyst_strontium.png new file mode 100644 index 0000000000000000000000000000000000000000..802ccd3d29c61aa95d8eb454634ad78a4f21e1ac GIT binary patch literal 312 zcmV-80muG{P)wdFQzQ#G?OA%HOk0Pj5jhwn>N zKT8R<)&Mk3Gio&Ni}O4m2m~>*)=H`slQ~Z)rBF%%5JKp3g5-pke&C$z#st{xuWa_$ zF81EzoEtajcPXlx`^TEM&yu35qs~bK;eDBLJ6}>I@ebf|=F@IPQ5|>%PP-L~c)5{* zwRW(uAvx6okK&ET&JBh9VaVC0o|~k^I#DifmajWXs|~Z^~pD zkLpn5MzU-Qp|?G8@7{5o;6HJ+#G@syaW+ef0M0c4sEz=9-RJ!6+M+Qg7iNs5(B^UZ zaM%IR_kGoF5b%7 literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/ams_catalyst_tungsten.png b/assets/hbm/textures/items/ams_catalyst_tungsten.png new file mode 100644 index 0000000000000000000000000000000000000000..328313c2b66a6f1c8ca238c85a6abc1340df22ad GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfw^&NfSQu+i+w zIeLHE+XM4o+N+;b684Ck#$fS$();e11^2p&{Z?~2IUn7(?zP2Z4$(Ke^o|@8RZ!~S zV7T}DLGYF3I_+(SY}vUR)^F#%ep~IvwWuD$%*MoN%hqaGY8%`$YTopUn5w cEt_A-9Dh8bP$zp$3eal|p00i_>zopr02UB)761SM literal 0 HcmV?d00001 diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index a7bae9c51..34e0981dc 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -444,6 +444,10 @@ public class ModBlocks { public static Block dummy_port_pumpjack; public static Block dummy_block_turbofan; public static Block dummy_port_turbofan; + public static Block dummy_block_ams_limiter; + public static Block dummy_port_ams_limiter; + public static Block dummy_block_ams_emitter; + public static Block dummy_port_ams_emitter; private static void initializeBlock() { @@ -693,9 +697,9 @@ public class ModBlocks { fwatz_core = new FWatzCore(Material.iron).setBlockName("fwatz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":fwatz_core"); fwatz_plasma = new BlockPlasma(Material.iron).setBlockName("fwatz_plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":fwatz_plasma"); - ams_base = new BlockAMSBase(Material.iron).setBlockName("ams_base").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_base"); - ams_emitter = new BlockAMSEmitter(Material.iron).setBlockName("ams_emitter").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_emitter"); - ams_limiter = new BlockAMSLimiter(Material.iron).setBlockName("ams_limiter").setHardness(5.0F).setResistance(100.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":ams_limiter"); + ams_base = new BlockAMSBase(Material.iron).setBlockName("ams_base").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_base"); + ams_emitter = new BlockAMSEmitter(Material.iron).setBlockName("ams_emitter").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_emitter"); + ams_limiter = new BlockAMSLimiter(Material.iron).setBlockName("ams_limiter").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":ams_limiter"); machine_converter_he_rf = new BlockConverterHeRf(Material.iron).setBlockName("machine_converter_he_rf").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_converter_he_rf"); machine_converter_rf_he = new BlockConverterRfHe(Material.iron).setBlockName("machine_converter_rf_he").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_converter_rf_he"); @@ -786,6 +790,10 @@ public class ModBlocks { dummy_port_pumpjack = new DummyBlockPumpjack(Material.iron).setBlockName("dummy_port_pumpjack").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium"); dummy_block_turbofan = new DummyBlockTurbofan(Material.iron).setBlockName("dummy_block_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); dummy_port_turbofan = new DummyBlockTurbofan(Material.iron).setBlockName("dummy_port_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_block_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_block_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_port_ams_limiter = new DummyBlockAMSLimiter(Material.iron).setBlockName("dummy_port_ams_limiter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_block_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_block_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); + dummy_port_ams_emitter = new DummyBlockAMSEmitter(Material.iron).setBlockName("dummy_port_ams_emitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel"); } private static void registerBlock() { @@ -1119,6 +1127,10 @@ public class ModBlocks { GameRegistry.registerBlock(dummy_port_pumpjack, dummy_port_pumpjack.getUnlocalizedName()); GameRegistry.registerBlock(dummy_block_turbofan, dummy_block_turbofan.getUnlocalizedName()); GameRegistry.registerBlock(dummy_port_turbofan, dummy_port_turbofan.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_block_ams_limiter, dummy_block_ams_limiter.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_port_ams_limiter, dummy_port_ams_limiter.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_block_ams_emitter, dummy_block_ams_emitter.getUnlocalizedName()); + GameRegistry.registerBlock(dummy_port_ams_emitter, dummy_port_ams_emitter.getUnlocalizedName()); //Other Technical Blocks GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName()); diff --git a/com/hbm/blocks/machine/BlockAMSBase.java b/com/hbm/blocks/machine/BlockAMSBase.java index ebe132d7a..baf5ff944 100644 --- a/com/hbm/blocks/machine/BlockAMSBase.java +++ b/com/hbm/blocks/machine/BlockAMSBase.java @@ -1,9 +1,14 @@ package com.hbm.blocks.machine; +import com.hbm.blocks.ModBlocks; +import com.hbm.main.MainRegistry; import com.hbm.tileentity.machine.TileEntityAMSBase; +import com.hbm.tileentity.machine.TileEntityAMSEmitter; +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -18,6 +23,24 @@ public class BlockAMSBase extends BlockContainer { return new TileEntityAMSBase(); } + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntityAMSBase entity = (TileEntityAMSBase) world.getTileEntity(x, y, z); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_base, world, x, y, z); + } + return true; + } else { + return false; + } + } + @Override public int getRenderType(){ return -1; diff --git a/com/hbm/blocks/machine/BlockAMSEmitter.java b/com/hbm/blocks/machine/BlockAMSEmitter.java index 6d1ffe3b4..3876651c4 100644 --- a/com/hbm/blocks/machine/BlockAMSEmitter.java +++ b/com/hbm/blocks/machine/BlockAMSEmitter.java @@ -1,13 +1,23 @@ package com.hbm.blocks.machine; +import com.hbm.blocks.ModBlocks; +import com.hbm.handler.MultiblockHandler; +import com.hbm.interfaces.IMultiblock; +import com.hbm.main.MainRegistry; import com.hbm.tileentity.machine.TileEntityAMSEmitter; +import com.hbm.tileentity.machine.TileEntityAMSLimiter; +import com.hbm.tileentity.machine.TileEntityDummy; +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -public class BlockAMSEmitter extends BlockContainer { +public class BlockAMSEmitter extends BlockContainer implements IMultiblock { public BlockAMSEmitter(Material p_i45386_1_) { super(p_i45386_1_); @@ -32,5 +42,76 @@ public class BlockAMSEmitter extends BlockContainer { public boolean renderAsNormalBlock() { return false; } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntityAMSEmitter entity = (TileEntityAMSEmitter) world.getTileEntity(x, y, z); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_emitter, world, x, y, z); + } + return true; + } else { + return false; + } + } + + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { + + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSEmitterDimension)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSEmitterDimension, ModBlocks.dummy_block_ams_emitter); + + DummyBlockAMSEmitter.safeBreak = true; + world.setBlock(x, y + 5, z, ModBlocks.dummy_port_ams_emitter); + TileEntity te = world.getTileEntity(x, y + 5, z); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x, y + 5, z - 1, ModBlocks.dummy_port_ams_emitter); + TileEntity te2 = world.getTileEntity(x, y + 5, z - 1); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x + 1, y + 5, z, ModBlocks.dummy_port_ams_emitter); + TileEntity te3 = world.getTileEntity(x + 1, y + 5, z); + if(te3 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te3; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 1, y + 5, z, ModBlocks.dummy_port_ams_emitter); + TileEntity te4 = world.getTileEntity(x - 1, y + 5, z); + if(te4 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te4; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x, y + 5, z + 1, ModBlocks.dummy_port_ams_emitter); + TileEntity te5 = world.getTileEntity(x, y + 5, z + 1); + if(te5 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te5; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockAMSEmitter.safeBreak = false; + + } else + world.func_147480_a(x, y, z, true); + } } diff --git a/com/hbm/blocks/machine/BlockAMSLimiter.java b/com/hbm/blocks/machine/BlockAMSLimiter.java index ed6e61745..320b942f1 100644 --- a/com/hbm/blocks/machine/BlockAMSLimiter.java +++ b/com/hbm/blocks/machine/BlockAMSLimiter.java @@ -2,6 +2,7 @@ package com.hbm.blocks.machine; import com.hbm.blocks.ModBlocks; import com.hbm.handler.MultiblockHandler; +import com.hbm.interfaces.IMultiblock; import com.hbm.main.MainRegistry; import com.hbm.tileentity.machine.TileEntityAMSLimiter; import com.hbm.tileentity.machine.TileEntityConverterHeRf; @@ -17,7 +18,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.World; -public class BlockAMSLimiter extends BlockContainer { +public class BlockAMSLimiter extends BlockContainer implements IMultiblock { public BlockAMSLimiter(Material p_i45386_1_) { super(p_i45386_1_); @@ -67,15 +68,119 @@ public class BlockAMSLimiter extends BlockContainer { if (i == 0) { world.setBlockMetadataWithNotify(x, y, z, 5, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionEast)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionEast, ModBlocks.dummy_block_ams_limiter); + + // + DummyBlockAMSLimiter.safeBreak = true; + world.setBlock(x + 2, y, z, ModBlocks.dummy_port_ams_limiter); + TileEntity te = world.getTileEntity(x + 2, y, z); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 2, y, z, ModBlocks.dummy_port_ams_limiter); + TileEntity te2 = world.getTileEntity(x - 2, y, z); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockAMSLimiter.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); } if (i == 1) { world.setBlockMetadataWithNotify(x, y, z, 3, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionSouth)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionSouth, ModBlocks.dummy_block_ams_limiter); + + // + DummyBlockAMSLimiter.safeBreak = true; + world.setBlock(x, y, z + 2, ModBlocks.dummy_port_ams_limiter); + TileEntity te = world.getTileEntity(x, y, z + 2); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x, y, z - 2, ModBlocks.dummy_port_ams_limiter); + TileEntity te2 = world.getTileEntity(x, y, z - 2); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockAMSLimiter.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); } if (i == 2) { world.setBlockMetadataWithNotify(x, y, z, 4, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionWest)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionWest, ModBlocks.dummy_block_ams_limiter); + + // + DummyBlockAMSLimiter.safeBreak = true; + world.setBlock(x + 2, y, z, ModBlocks.dummy_port_ams_limiter); + TileEntity te = world.getTileEntity(x + 2, y, z); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x - 2, y, z, ModBlocks.dummy_port_ams_limiter); + TileEntity te2 = world.getTileEntity(x - 2, y, z); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockAMSLimiter.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); } if (i == 3) { world.setBlockMetadataWithNotify(x, y, z, 2, 2); + if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.AMSLimiterDimensionNorth)) { + MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.AMSLimiterDimensionNorth, ModBlocks.dummy_block_ams_limiter); + + // + DummyBlockAMSLimiter.safeBreak = true; + world.setBlock(x, y, z + 2, ModBlocks.dummy_port_ams_limiter); + TileEntity te = world.getTileEntity(x, y, z + 2); + if(te instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + world.setBlock(x, y, z - 2, ModBlocks.dummy_port_ams_limiter); + TileEntity te2 = world.getTileEntity(x, y, z - 2); + if(te2 instanceof TileEntityDummy) { + TileEntityDummy dummy = (TileEntityDummy)te2; + dummy.targetX = x; + dummy.targetY = y; + dummy.targetZ = z; + } + DummyBlockAMSLimiter.safeBreak = false; + // + + } else + world.func_147480_a(x, y, z, true); } } diff --git a/com/hbm/blocks/machine/DummyBlockAMSEmitter.java b/com/hbm/blocks/machine/DummyBlockAMSEmitter.java new file mode 100644 index 000000000..e4b40fa78 --- /dev/null +++ b/com/hbm/blocks/machine/DummyBlockAMSEmitter.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.machine.TileEntityAMSEmitter; +import com.hbm.tileentity.machine.TileEntityDummy; +import com.hbm.tileentity.machine.TileEntityMachineTurbofan; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class DummyBlockAMSEmitter extends BlockContainer implements IDummy { + + public static boolean safeBreak = false; + + public DummyBlockAMSEmitter(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityDummy(); + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int i) + { + if(!safeBreak) { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + //world.getBlock(a, b, c).breakBlock(world, a, b, c, block, i); + if(!world.isRemote) + world.func_147480_a(a, b, c, true); + } + } + world.removeTileEntity(x, y, z); + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public Item getItem(World world, int x, int y, int z) + { + return Item.getItemFromBlock(ModBlocks.ams_emitter); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + TileEntityAMSEmitter entity = (TileEntityAMSEmitter) world.getTileEntity(a, b, c); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_emitter, world, a, b, c); + } + } + return true; + } else { + return false; + } + } +} diff --git a/com/hbm/blocks/machine/DummyBlockAMSLimiter.java b/com/hbm/blocks/machine/DummyBlockAMSLimiter.java new file mode 100644 index 000000000..0273d909e --- /dev/null +++ b/com/hbm/blocks/machine/DummyBlockAMSLimiter.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.machine.TileEntityAMSLimiter; +import com.hbm.tileentity.machine.TileEntityDummy; +import com.hbm.tileentity.machine.TileEntityMachineTurbofan; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class DummyBlockAMSLimiter extends BlockContainer implements IDummy { + + public static boolean safeBreak = false; + + public DummyBlockAMSLimiter(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityDummy(); + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int i) + { + if(!safeBreak) { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + //world.getBlock(a, b, c).breakBlock(world, a, b, c, block, i); + if(!world.isRemote) + world.func_147480_a(a, b, c, true); + } + } + world.removeTileEntity(x, y, z); + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public Item getItem(World world, int x, int y, int z) + { + return Item.getItemFromBlock(ModBlocks.ams_limiter); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntity te = world.getTileEntity(x, y, z); + if(te != null && te instanceof TileEntityDummy) { + int a = ((TileEntityDummy)te).targetX; + int b = ((TileEntityDummy)te).targetY; + int c = ((TileEntityDummy)te).targetZ; + + TileEntityAMSLimiter entity = (TileEntityAMSLimiter) world.getTileEntity(a, b, c); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_ams_limiter, world, a, b, c); + } + } + return true; + } else { + return false; + } + } +} diff --git a/com/hbm/blocks/machine/MachineIGenerator.java b/com/hbm/blocks/machine/MachineIGenerator.java index 987bf0a88..ea35f3a1b 100644 --- a/com/hbm/blocks/machine/MachineIGenerator.java +++ b/com/hbm/blocks/machine/MachineIGenerator.java @@ -171,33 +171,4 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock { world.func_147480_a(x, y, z, true); } } - - @Override - public boolean canPlaceBlockAt(World world, int x, int y, int z) - { - return true; - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block block, int i) - { - /*MultiblockHandler.EnumDirection dir = MultiblockHandler.IntToEnum(world.getBlockMetadata(x, y, z)); - - switch(dir) { - case North: - MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionNorth); - break; - case East: - MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionEast); - break; - case West: - MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionWest); - break; - case South: - MultiblockHandler.removeAll(world, x, y, z, MultiblockHandler.iGenDimensionSouth); - break; - default: break; - }*/ - world.removeTileEntity(x, y, z); - } } diff --git a/com/hbm/entity/grenade/EntityGrenadePulse.java b/com/hbm/entity/grenade/EntityGrenadePulse.java index ba95dce93..7475cdaff 100644 --- a/com/hbm/entity/grenade/EntityGrenadePulse.java +++ b/com/hbm/entity/grenade/EntityGrenadePulse.java @@ -1,6 +1,7 @@ package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionLarge; import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; @@ -26,6 +27,7 @@ public class EntityGrenadePulse extends EntityGrenadeBase { this.setDead(); ExplosionChaos.pulse(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 7); this.worldObj.playSoundEffect((int)this.posX, (int)this.posY, (int)this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); + ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 24, 2); } } } diff --git a/com/hbm/explosion/ExplosionLarge.java b/com/hbm/explosion/ExplosionLarge.java index a642eea4a..60b1fb8f8 100644 --- a/com/hbm/explosion/ExplosionLarge.java +++ b/com/hbm/explosion/ExplosionLarge.java @@ -3,11 +3,13 @@ package com.hbm.explosion; import java.util.Random; import com.hbm.entity.particle.EntityDSmokeFX; +import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.entity.projectile.EntityOilSpill; import com.hbm.entity.projectile.EntityRubble; import com.hbm.entity.projectile.EntityShrapnel; import net.minecraft.entity.Entity; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class ExplosionLarge { @@ -27,6 +29,36 @@ public class ExplosionLarge { world.spawnEntityInWorld(fx); } } + + public static void spawnShock(World world, double x, double y, double z, int count, double strength) { + + Vec3 vec = Vec3.createVectorHelper(strength, 0, 0); + + for(int i = 0; i < count; i++) { + EntityDSmokeFX fx = new EntityDSmokeFX(world, x, y, z, 0.0, 0.0, 0.0); + fx.motionY = 0; + fx.motionX = vec.xCoord; + fx.motionZ = vec.zCoord; + world.spawnEntityInWorld(fx); + + vec.rotateAroundY(360 / count); + } + } + + public static void spawnBurst(World world, double x, double y, double z, int count, double strength) { + + Vec3 vec = Vec3.createVectorHelper(strength, 0, 0); + + for(int i = 0; i < count; i++) { + EntityGasFlameFX fx = new EntityGasFlameFX(world, x, y, z, 0.0, 0.0, 0.0); + fx.motionY = 0; + fx.motionX = vec.xCoord; + fx.motionZ = vec.zCoord; + world.spawnEntityInWorld(fx); + + vec.rotateAroundY(360 / count); + } + } public static void spawnRubble(World world, double x, double y, double z, int count) { diff --git a/com/hbm/handler/GUIHandler.java b/com/hbm/handler/GUIHandler.java index 9c9cedfa3..9e7f93239 100644 --- a/com/hbm/handler/GUIHandler.java +++ b/com/hbm/handler/GUIHandler.java @@ -16,6 +16,8 @@ import com.hbm.tileentity.bomb.TileEntityNukeMike; import com.hbm.tileentity.bomb.TileEntityNukePrototype; import com.hbm.tileentity.bomb.TileEntityNukeTsar; import com.hbm.tileentity.bomb.TileEntityTestNuke; +import com.hbm.tileentity.machine.TileEntityAMSBase; +import com.hbm.tileentity.machine.TileEntityAMSEmitter; import com.hbm.tileentity.machine.TileEntityAMSLimiter; import com.hbm.tileentity.machine.TileEntityConverterHeRf; import com.hbm.tileentity.machine.TileEntityConverterRfHe; @@ -96,6 +98,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeGadget(player.inventory, (TileEntityNukeGadget) entity); } + return null; } case ModBlocks.guiID_nuke_boy: @@ -104,6 +107,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeBoy(player.inventory, (TileEntityNukeBoy) entity); } + return null; } case ModBlocks.guiID_centrifuge: @@ -112,6 +116,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerCentrifuge(player.inventory, (TileEntityMachineCentrifuge) entity); } + return null; } case ModBlocks.guiID_nuke_man: @@ -120,6 +125,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeMan(player.inventory, (TileEntityNukeMan) entity); } + return null; } case ModBlocks.guiID_uf6_tank: @@ -128,6 +134,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerUF6Tank(player.inventory, (TileEntityMachineUF6Tank) entity); } + return null; } case ModBlocks.guiID_puf6_tank: @@ -136,6 +143,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerPuF6Tank(player.inventory, (TileEntityMachinePuF6Tank) entity); } + return null; } case ModBlocks.guiID_reactor: @@ -144,6 +152,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerReactor(player.inventory, (TileEntityMachineReactor) entity); } + return null; } case ModBlocks.guiID_bomb_multi: @@ -152,6 +161,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerBombMulti(player.inventory, (TileEntityBombMulti) entity); } + return null; } case ModBlocks.guiID_nuke_mike: @@ -160,6 +170,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeMike(player.inventory, (TileEntityNukeMike) entity); } + return null; } case ModBlocks.guiID_nuke_tsar: @@ -168,6 +179,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeTsar(player.inventory, (TileEntityNukeTsar) entity); } + return null; } case ModBlocks.guiID_nuke_furnace: @@ -176,6 +188,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeFurnace(player.inventory, (TileEntityNukeFurnace) entity); } + return null; } case ModBlocks.guiID_rtg_furnace: @@ -184,6 +197,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerRtgFurnace(player.inventory, (TileEntityRtgFurnace) entity); } + return null; } case ModBlocks.guiID_machine_generator: @@ -192,6 +206,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerGenerator(player.inventory, (TileEntityMachineGenerator) entity); } + return null; } case ModBlocks.guiID_electric_furnace: @@ -200,6 +215,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerElectricFurnace(player.inventory, (TileEntityMachineElectricFurnace) entity); } + return null; } case ModBlocks.guiID_nuke_fleija: @@ -208,6 +224,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeFleija(player.inventory, (TileEntityNukeFleija) entity); } + return null; } case ModBlocks.guiID_machine_deuterium: @@ -216,6 +233,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineDeuterium(player.inventory, (TileEntityMachineDeuterium) entity); } + return null; } case ModBlocks.guiID_machine_battery: @@ -224,6 +242,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineBattery(player.inventory, (TileEntityMachineBattery) entity); } + return null; } case ModBlocks.guiID_machine_coal: @@ -232,6 +251,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineCoal(player.inventory, (TileEntityMachineCoal) entity); } + return null; } case ModBlocks.guiID_nuke_prototype: @@ -240,6 +260,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukePrototype(player.inventory, (TileEntityNukePrototype) entity); } + return null; } case ModBlocks.guiID_launch_pad: @@ -248,6 +269,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerLaunchPadTier1(player.inventory, (TileEntityLaunchPad) entity); } + return null; } case ModBlocks.guiID_factory_titanium: @@ -256,6 +278,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerCoreTitanium(player.inventory, (TileEntityCoreTitanium) entity); } + return null; } case ModBlocks.guiID_factory_advanced: @@ -264,6 +287,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerCoreAdvanced(player.inventory, (TileEntityCoreAdvanced) entity); } + return null; } case ModBlocks.guiID_reactor_multiblock: @@ -272,6 +296,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerReactorMultiblock(player.inventory, (TileEntityReactorMultiblock) entity); } + return null; } case ModBlocks.guiID_fusion_multiblock: @@ -280,6 +305,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerFusionMultiblock(player.inventory, (TileEntityFusionMultiblock) entity); } + return null; } case ModBlocks.guiID_converter_he_rf: @@ -288,6 +314,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerConverterHeRf(player.inventory, (TileEntityConverterHeRf) entity); } + return null; } case ModBlocks.guiID_converter_rf_he: @@ -296,6 +323,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity); } + return null; } case ModBlocks.guiID_schrabidium_transmutator: @@ -304,6 +332,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity); } + return null; } case ModBlocks.guiID_machine_diesel: @@ -312,6 +341,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity); } + return null; } case ModBlocks.guiID_watz_multiblock: @@ -320,6 +350,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerWatzCore(player.inventory, (TileEntityWatzCore) entity); } + return null; } case ModBlocks.guiID_machine_shredder: @@ -328,6 +359,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineShredder(player.inventory, (TileEntityMachineShredder) entity); } + return null; } case ModBlocks.guiID_combine_factory: @@ -336,6 +368,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineCMBFactory(player.inventory, (TileEntityMachineCMBFactory) entity); } + return null; } case ModBlocks.guiID_fwatz_multiblock: @@ -344,6 +377,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerFWatzCore(player.inventory, (TileEntityFWatzCore) entity); } + return null; } case ModBlocks.guiID_machine_teleporter: @@ -352,6 +386,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity); } + return null; } case ModBlocks.guiID_nuke_custom: @@ -360,6 +395,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerNukeCustom(player.inventory, (TileEntityNukeCustom) entity); } + return null; } case ModBlocks.guiID_machine_reix_mainframe: @@ -368,6 +404,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerReiXMainframe(player.inventory, (TileEntityReiXMainframe) entity); } + return null; } case ModBlocks.guiID_machine_industrial_generator: @@ -376,6 +413,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerIGenerator(player.inventory, (TileEntityMachineIGenerator) entity); } + return null; } case ModBlocks.guiID_machine_rtg: @@ -384,6 +422,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineRTG(player.inventory, (TileEntityMachineRTG) entity); } + return null; } case ModBlocks.guiID_machine_cyclotron: @@ -392,6 +431,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineCyclotron(player.inventory, (TileEntityMachineCyclotron) entity); } + return null; } case ModBlocks.guiID_machine_well: @@ -400,6 +440,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineOilWell(player.inventory, (TileEntityMachineOilWell) entity); } + return null; } case ModBlocks.guiID_machine_refinery: @@ -408,6 +449,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineRefinery(player.inventory, (TileEntityMachineRefinery) entity); } + return null; } case ModBlocks.guiID_machine_flare: @@ -416,6 +458,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineGasFlare(player.inventory, (TileEntityMachineGasFlare) entity); } + return null; } case ModBlocks.guiID_machine_drill: @@ -424,6 +467,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineMiningDrill(player.inventory, (TileEntityMachineMiningDrill) entity); } + return null; } case ModBlocks.guiID_machine_assembler: @@ -432,6 +476,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineAssembler(player.inventory, (TileEntityMachineAssembler) entity); } + return null; } case ModBlocks.guiID_machine_chemplant: @@ -440,6 +485,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity); } + return null; } case ModBlocks.guiID_machine_fluidtank: @@ -448,6 +494,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineFluidTank(player.inventory, (TileEntityMachineFluidTank) entity); } + return null; } case ModBlocks.guiID_machine_pumpjack: @@ -456,6 +503,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachinePumpjack(player.inventory, (TileEntityMachinePumpjack) entity); } + return null; } case ModBlocks.guiID_machine_turbofan: @@ -464,6 +512,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachineTurbofan(player.inventory, (TileEntityMachineTurbofan) entity); } + return null; } case ModBlocks.guiID_crate_iron: @@ -472,6 +521,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerCrateIron(player.inventory, (TileEntityCrateIron) entity); } + return null; } case ModBlocks.guiID_crate_steel: @@ -480,6 +530,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerCrateSteel(player.inventory, (TileEntityCrateSteel) entity); } + return null; } case ModBlocks.guiID_machine_press: @@ -488,6 +539,7 @@ public class GUIHandler implements IGuiHandler { { return new ContainerMachinePress(player.inventory, (TileEntityMachinePress) entity); } + return null; } case ModBlocks.guiID_ams_limiter: @@ -496,6 +548,25 @@ public class GUIHandler implements IGuiHandler { { return new ContainerAMSLimiter(player.inventory, (TileEntityAMSLimiter) entity); } + return null; + } + + case ModBlocks.guiID_ams_emitter: + { + if(entity instanceof TileEntityAMSEmitter) + { + return new ContainerAMSEmitter(player.inventory, (TileEntityAMSEmitter) entity); + } + return null; + } + + case ModBlocks.guiID_ams_base: + { + if(entity instanceof TileEntityAMSBase) + { + return new ContainerAMSBase(player.inventory, (TileEntityAMSBase) entity); + } + return null; } } return null; @@ -532,6 +603,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeGadget(player.inventory, (TileEntityNukeGadget) entity); } + return null; } case ModBlocks.guiID_nuke_boy: @@ -540,6 +612,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeBoy(player.inventory, (TileEntityNukeBoy) entity); } + return null; } case ModBlocks.guiID_centrifuge: @@ -548,6 +621,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineCentrifuge(player.inventory, (TileEntityMachineCentrifuge) entity); } + return null; } case ModBlocks.guiID_nuke_man: @@ -556,6 +630,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeMan(player.inventory, (TileEntityNukeMan) entity); } + return null; } case ModBlocks.guiID_uf6_tank: @@ -564,6 +639,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineUF6Tank(player.inventory, (TileEntityMachineUF6Tank) entity); } + return null; } case ModBlocks.guiID_puf6_tank: @@ -572,6 +648,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachinePuF6Tank(player.inventory, (TileEntityMachinePuF6Tank) entity); } + return null; } case ModBlocks.guiID_reactor: @@ -580,6 +657,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineReactor(player.inventory, (TileEntityMachineReactor) entity); } + return null; } case ModBlocks.guiID_bomb_multi: @@ -588,6 +666,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIBombMulti(player.inventory, (TileEntityBombMulti) entity); } + return null; } case ModBlocks.guiID_nuke_mike: @@ -596,6 +675,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeMike(player.inventory, (TileEntityNukeMike) entity); } + return null; } case ModBlocks.guiID_nuke_tsar: @@ -604,6 +684,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeTsar(player.inventory, (TileEntityNukeTsar) entity); } + return null; } case ModBlocks.guiID_nuke_furnace: @@ -612,6 +693,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeFurnace(player.inventory, (TileEntityNukeFurnace) entity); } + return null; } case ModBlocks.guiID_rtg_furnace: @@ -620,6 +702,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIRtgFurnace(player.inventory, (TileEntityRtgFurnace) entity); } + return null; } case ModBlocks.guiID_machine_generator: @@ -628,6 +711,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineGenerator(player.inventory, (TileEntityMachineGenerator) entity); } + return null; } case ModBlocks.guiID_electric_furnace: @@ -636,6 +720,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineElectricFurnace(player.inventory, (TileEntityMachineElectricFurnace) entity); } + return null; } case ModBlocks.guiID_nuke_fleija: @@ -644,6 +729,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeFleija(player.inventory, (TileEntityNukeFleija) entity); } + return null; } case ModBlocks.guiID_machine_deuterium: @@ -652,6 +738,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineDeuterium(player.inventory, (TileEntityMachineDeuterium) entity); } + return null; } case ModBlocks.guiID_machine_battery: @@ -660,6 +747,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineBattery(player.inventory, (TileEntityMachineBattery) entity); } + return null; } case ModBlocks.guiID_machine_coal: @@ -668,6 +756,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineCoal(player.inventory, (TileEntityMachineCoal) entity); } + return null; } case ModBlocks.guiID_nuke_prototype: @@ -676,6 +765,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukePrototype(player.inventory, (TileEntityNukePrototype) entity); } + return null; } case ModBlocks.guiID_launch_pad: @@ -684,6 +774,7 @@ public class GUIHandler implements IGuiHandler { { return new GUILaunchPadTier1(player.inventory, (TileEntityLaunchPad) entity); } + return null; } case ModBlocks.guiID_factory_titanium: @@ -692,6 +783,7 @@ public class GUIHandler implements IGuiHandler { { return new GUICoreTitanium(player.inventory, (TileEntityCoreTitanium) entity); } + return null; } case ModBlocks.guiID_factory_advanced: @@ -700,6 +792,7 @@ public class GUIHandler implements IGuiHandler { { return new GUICoreAdvanced(player.inventory, (TileEntityCoreAdvanced) entity); } + return null; } case ModBlocks.guiID_reactor_multiblock: @@ -708,6 +801,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIReactorMultiblock(player.inventory, (TileEntityReactorMultiblock) entity); } + return null; } case ModBlocks.guiID_fusion_multiblock: @@ -716,6 +810,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIFusionMultiblock(player.inventory, (TileEntityFusionMultiblock) entity); } + return null; } case ModBlocks.guiID_converter_he_rf: @@ -724,6 +819,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIConverterHeRf(player.inventory, (TileEntityConverterHeRf) entity); } + return null; } case ModBlocks.guiID_converter_rf_he: @@ -732,6 +828,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity); } + return null; } case ModBlocks.guiID_schrabidium_transmutator: @@ -740,6 +837,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity); } + return null; } case ModBlocks.guiID_machine_diesel: @@ -748,6 +846,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity); } + return null; } case ModBlocks.guiID_watz_multiblock: @@ -756,6 +855,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIWatzCore(player.inventory, (TileEntityWatzCore) entity); } + return null; } case ModBlocks.guiID_machine_shredder: @@ -764,6 +864,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineShredder(player.inventory, (TileEntityMachineShredder) entity); } + return null; } case ModBlocks.guiID_combine_factory: @@ -772,6 +873,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineCMBFactory(player.inventory, (TileEntityMachineCMBFactory) entity); } + return null; } case ModBlocks.guiID_fwatz_multiblock: @@ -780,6 +882,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIFWatzCore(player.inventory, (TileEntityFWatzCore) entity); } + return null; } case ModBlocks.guiID_machine_teleporter: @@ -788,6 +891,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity); } + return null; } case ModBlocks.guiID_nuke_custom: @@ -796,6 +900,7 @@ public class GUIHandler implements IGuiHandler { { return new GUINukeCustom(player.inventory, (TileEntityNukeCustom) entity); } + return null; } case ModBlocks.guiID_machine_reix_mainframe: @@ -804,6 +909,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIReiXMainframe(player.inventory, (TileEntityReiXMainframe) entity); } + return null; } case ModBlocks.guiID_machine_industrial_generator: @@ -812,6 +918,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIIGenerator(player.inventory, (TileEntityMachineIGenerator) entity); } + return null; } case ModBlocks.guiID_machine_rtg: @@ -820,6 +927,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineRTG(player.inventory, (TileEntityMachineRTG) entity); } + return null; } case ModBlocks.guiID_machine_cyclotron: @@ -828,6 +936,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineCyclotron(player.inventory, (TileEntityMachineCyclotron) entity); } + return null; } case ModBlocks.guiID_machine_well: @@ -836,6 +945,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineOilWell(player.inventory, (TileEntityMachineOilWell) entity); } + return null; } case ModBlocks.guiID_machine_refinery: @@ -844,6 +954,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineRefinery(player.inventory, (TileEntityMachineRefinery) entity); } + return null; } case ModBlocks.guiID_machine_flare: @@ -852,6 +963,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineGasFlare(player.inventory, (TileEntityMachineGasFlare) entity); } + return null; } case ModBlocks.guiID_machine_drill: @@ -860,6 +972,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineMiningDrill(player.inventory, (TileEntityMachineMiningDrill) entity); } + return null; } case ModBlocks.guiID_machine_assembler: @@ -868,6 +981,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineAssembler(player.inventory, (TileEntityMachineAssembler) entity); } + return null; } case ModBlocks.guiID_machine_chemplant: @@ -876,6 +990,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity); } + return null; } case ModBlocks.guiID_machine_fluidtank: @@ -884,6 +999,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineFluidTank(player.inventory, (TileEntityMachineFluidTank) entity); } + return null; } case ModBlocks.guiID_machine_pumpjack: @@ -892,6 +1008,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachinePumpjack(player.inventory, (TileEntityMachinePumpjack) entity); } + return null; } case ModBlocks.guiID_machine_turbofan: @@ -900,6 +1017,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachineTurbofan(player.inventory, (TileEntityMachineTurbofan) entity); } + return null; } case ModBlocks.guiID_crate_iron: @@ -908,6 +1026,7 @@ public class GUIHandler implements IGuiHandler { { return new GUICrateIron(player.inventory, (TileEntityCrateIron) entity); } + return null; } case ModBlocks.guiID_crate_steel: @@ -916,6 +1035,7 @@ public class GUIHandler implements IGuiHandler { { return new GUICrateSteel(player.inventory, (TileEntityCrateSteel) entity); } + return null; } case ModBlocks.guiID_machine_press: @@ -924,6 +1044,7 @@ public class GUIHandler implements IGuiHandler { { return new GUIMachinePress(player.inventory, (TileEntityMachinePress) entity); } + return null; } case ModBlocks.guiID_ams_limiter: @@ -932,6 +1053,25 @@ public class GUIHandler implements IGuiHandler { { return new GUIAMSLimiter(player.inventory, (TileEntityAMSLimiter) entity); } + return null; + } + + case ModBlocks.guiID_ams_emitter: + { + if(entity instanceof TileEntityAMSEmitter) + { + return new GUIAMSEmitter(player.inventory, (TileEntityAMSEmitter) entity); + } + return null; + } + + case ModBlocks.guiID_ams_base: + { + if(entity instanceof TileEntityAMSBase) + { + return new GUIAMSBase(player.inventory, (TileEntityAMSBase) entity); + } + return null; } } } else { diff --git a/com/hbm/handler/MultiblockHandler.java b/com/hbm/handler/MultiblockHandler.java index 36d435379..e44a35436 100644 --- a/com/hbm/handler/MultiblockHandler.java +++ b/com/hbm/handler/MultiblockHandler.java @@ -67,6 +67,11 @@ public class MultiblockHandler { public static final int[] turbofanDimensionEast = new int[] { 4, 4, 2, 0, 1, 1 }; public static final int[] turbofanDimensionSouth = new int[] { 1, 1, 2, 0, 4, 4 }; public static final int[] turbofanDimensionWest = new int[] { 4, 4, 2, 0, 1, 1 }; + public static final int[] AMSLimiterDimensionNorth = new int[] { 0, 0, 5, 0, 2, 2 }; + public static final int[] AMSLimiterDimensionEast = new int[] { 2, 2, 5, 0, 0, 0 }; + public static final int[] AMSLimiterDimensionSouth = new int[] { 0, 0, 5, 0, 2, 2 }; + public static final int[] AMSLimiterDimensionWest = new int[] { 2, 2, 5, 0, 0, 0 }; + public static final int[] AMSEmitterDimension = new int[] { 2, 2, 5, 0, 2, 2, }; //Approved! public static boolean checkSpace(World world, int x, int y, int z, int[] i) { diff --git a/com/hbm/inventory/container/ContainerAMSBase.java b/com/hbm/inventory/container/ContainerAMSBase.java new file mode 100644 index 000000000..1e265a2ed --- /dev/null +++ b/com/hbm/inventory/container/ContainerAMSBase.java @@ -0,0 +1,168 @@ +package com.hbm.inventory.container; + +import com.hbm.tileentity.machine.TileEntityAMSBase; +import com.hbm.tileentity.machine.TileEntityAMSEmitter; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerAMSBase extends Container { + +private TileEntityAMSBase amsBase; + + private int heat; + private int field; + private int efficiency; + private int warning; + private int mode; + + public ContainerAMSBase(InventoryPlayer invPlayer, TileEntityAMSBase tedf) { + field = 0; + efficiency = 0; + amsBase = tedf; + + //Cool 1 In + this.addSlotToContainer(new Slot(tedf, 0, 8, 18)); + //Cool 1 Out + this.addSlotToContainer(new Slot(tedf, 1, 8, 54)); + //Cool 2 In + this.addSlotToContainer(new Slot(tedf, 2, 152, 18)); + //Cool 2 Out + this.addSlotToContainer(new Slot(tedf, 3, 152, 54)); + //Fuel 1 In + this.addSlotToContainer(new Slot(tedf, 4, 8, 72)); + //Fuel 1 Out + this.addSlotToContainer(new Slot(tedf, 5, 8, 108)); + //Fuel 2 In + this.addSlotToContainer(new Slot(tedf, 6, 152, 72)); + //Fuel 2 Out + this.addSlotToContainer(new Slot(tedf, 7, 152, 108)); + //Moderator + this.addSlotToContainer(new Slot(tedf, 8, 80, 45)); + this.addSlotToContainer(new Slot(tedf, 9, 62, 63)); + this.addSlotToContainer(new Slot(tedf, 10, 98, 63)); + this.addSlotToContainer(new Slot(tedf, 11, 80, 81)); + //Core + this.addSlotToContainer(new Slot(tedf, 12, 80, 63)); + + for(int i = 0; i < 3; i++) + { + for(int j = 0; j < 9; j++) + { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56)); + } + } + + for(int i = 0; i < 9; i++) + { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) + { + ItemStack var3 = null; + Slot var4 = (Slot) this.inventorySlots.get(par2); + + if (var4 != null && var4.getHasStack()) + { + ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 <= 3) { + if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true)) + { + return null; + } + } + else + return null; + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack) null); + } + else + { + var4.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return amsBase.isUseableByPlayer(player); + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int i = 0; i < this.crafters.size(); i++) + { + ICrafting par1 = (ICrafting)this.crafters.get(i); + + if(this.heat != this.amsBase.heat) + { + par1.sendProgressBarUpdate(this, 0, this.amsBase.heat); + } + + if(this.efficiency != this.amsBase.efficiency) + { + par1.sendProgressBarUpdate(this, 1, this.amsBase.efficiency); + } + + if(this.warning != this.amsBase.warning) + { + par1.sendProgressBarUpdate(this, 2, this.amsBase.warning); + } + + if(this.field != this.amsBase.field) + { + par1.sendProgressBarUpdate(this, 3, this.amsBase.field); + } + + if(this.mode != this.amsBase.mode) + { + par1.sendProgressBarUpdate(this, 4, this.amsBase.mode); + } + } + + this.heat = this.amsBase.heat; + this.field = this.amsBase.field; + this.efficiency = this.amsBase.efficiency; + this.warning = this.amsBase.warning; + this.mode = this.amsBase.mode; + } + + @Override + public void updateProgressBar(int i, int j) { + if(i == 0) + { + amsBase.heat = j; + } + if(i == 1) + { + amsBase.efficiency = j; + } + if(i == 2) + { + amsBase.warning = j; + } + if(i == 3) + { + amsBase.field = j; + } + if(i == 4) + { + amsBase.mode = j; + } + } +} diff --git a/com/hbm/inventory/container/ContainerAMSEmitter.java b/com/hbm/inventory/container/ContainerAMSEmitter.java new file mode 100644 index 000000000..b599c33d7 --- /dev/null +++ b/com/hbm/inventory/container/ContainerAMSEmitter.java @@ -0,0 +1,130 @@ +package com.hbm.inventory.container; + +import com.hbm.tileentity.machine.TileEntityAMSEmitter; +import com.hbm.tileentity.machine.TileEntityAMSLimiter; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerAMSEmitter extends Container { + +private TileEntityAMSEmitter amsEmitter; + + private int heat; + private int efficiency; + private int warning; + + public ContainerAMSEmitter(InventoryPlayer invPlayer, TileEntityAMSEmitter tedf) { + efficiency = 0; + amsEmitter = tedf; + + //Fluid In + this.addSlotToContainer(new Slot(tedf, 0, 44, 17)); + //Fluid Out + this.addSlotToContainer(new Slot(tedf, 1, 44, 53)); + //Focus + this.addSlotToContainer(new Slot(tedf, 2, 80, 53)); + //Battery + this.addSlotToContainer(new Slot(tedf, 3, 116, 53)); + + for(int i = 0; i < 3; i++) + { + for(int j = 0; j < 9; j++) + { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) + { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) + { + ItemStack var3 = null; + Slot var4 = (Slot) this.inventorySlots.get(par2); + + if (var4 != null && var4.getHasStack()) + { + ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if (par2 <= 3) { + if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true)) + { + return null; + } + } + else + return null; + + if (var5.stackSize == 0) + { + var4.putStack((ItemStack) null); + } + else + { + var4.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return amsEmitter.isUseableByPlayer(player); + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int i = 0; i < this.crafters.size(); i++) + { + ICrafting par1 = (ICrafting)this.crafters.get(i); + + if(this.heat != this.amsEmitter.heat) + { + par1.sendProgressBarUpdate(this, 0, this.amsEmitter.heat); + } + + if(this.efficiency != this.amsEmitter.efficiency) + { + par1.sendProgressBarUpdate(this, 1, this.amsEmitter.efficiency); + } + + if(this.warning != this.amsEmitter.warning) + { + par1.sendProgressBarUpdate(this, 2, this.amsEmitter.warning); + } + } + + this.heat = this.amsEmitter.heat; + this.efficiency = this.amsEmitter.efficiency; + this.warning = this.amsEmitter.warning; + } + + @Override + public void updateProgressBar(int i, int j) { + if(i == 0) + { + amsEmitter.heat = j; + } + if(i == 1) + { + amsEmitter.efficiency = j; + } + if(i == 2) + { + amsEmitter.warning = j; + } + } +} diff --git a/com/hbm/inventory/container/ContainerAMSLimiter.java b/com/hbm/inventory/container/ContainerAMSLimiter.java index 0d42cbc8e..501c4d3a8 100644 --- a/com/hbm/inventory/container/ContainerAMSLimiter.java +++ b/com/hbm/inventory/container/ContainerAMSLimiter.java @@ -21,7 +21,7 @@ private TileEntityAMSLimiter amsLmiter; private int mode; public ContainerAMSLimiter(InventoryPlayer invPlayer, TileEntityAMSLimiter tedf) { - + efficiency = 0; amsLmiter = tedf; //Fluid In diff --git a/com/hbm/inventory/container/ContainerCentrifuge.java b/com/hbm/inventory/container/ContainerCentrifuge.java index 247c3ebf5..66ef6f99a 100644 --- a/com/hbm/inventory/container/ContainerCentrifuge.java +++ b/com/hbm/inventory/container/ContainerCentrifuge.java @@ -17,6 +17,8 @@ public class ContainerCentrifuge extends Container { private int dualPower; public ContainerCentrifuge(InventoryPlayer invPlayer, TileEntityMachineCentrifuge tedf) { + dualCookTime = 0; + dualPower = 0; diFurnace = tedf; diff --git a/com/hbm/inventory/container/ContainerMachineAssembler.java b/com/hbm/inventory/container/ContainerMachineAssembler.java index 6c49ebaae..23f4cc186 100644 --- a/com/hbm/inventory/container/ContainerMachineAssembler.java +++ b/com/hbm/inventory/container/ContainerMachineAssembler.java @@ -18,7 +18,7 @@ private TileEntityMachineAssembler nukeBoy; private int maxProgress; public ContainerMachineAssembler(InventoryPlayer invPlayer, TileEntityMachineAssembler tedf) { - + progress = 0; nukeBoy = tedf; //Battery diff --git a/com/hbm/inventory/container/ContainerMachineChemplant.java b/com/hbm/inventory/container/ContainerMachineChemplant.java index d31575cf3..c31c57bae 100644 --- a/com/hbm/inventory/container/ContainerMachineChemplant.java +++ b/com/hbm/inventory/container/ContainerMachineChemplant.java @@ -19,7 +19,7 @@ private TileEntityMachineChemplant nukeBoy; private int maxProgress; public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) { - + progress = 0; nukeBoy = tedf; //Battery diff --git a/com/hbm/inventory/gui/GUIAMSBase.java b/com/hbm/inventory/gui/GUIAMSBase.java new file mode 100644 index 000000000..93dbcda40 --- /dev/null +++ b/com/hbm/inventory/gui/GUIAMSBase.java @@ -0,0 +1,97 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.FluidTank; +import com.hbm.inventory.container.ContainerAMSBase; +import com.hbm.inventory.container.ContainerMachinePumpjack; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityAMSBase; +import com.hbm.tileentity.machine.TileEntityMachinePumpjack; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIAMSBase extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_ams_base.png"); + private TileEntityAMSBase base; + + public GUIAMSBase(InventoryPlayer invPlayer, TileEntityAMSBase tedf) { + super(new ContainerAMSBase(invPlayer, tedf)); + base = tedf; + + this.xSize = 176; + this.ySize = 222; + } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + base.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 70 - 52, 16, 52); + base.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 70 - 52, 16, 52); + base.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 124 - 52, 16, 52); + base.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 124 - 52, 16, 52); + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 124 - 104, 7, 104, base.power, base.maxPower); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 124 - 104, 7, 104, new String[] { "Restriction Field:", base.field + "%" }); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 53, guiTop + 124 - 104, 7, 104, new String[] { "Efficiency:", base.efficiency + "%" }); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 125, guiTop + 124 - 104, 7, 104, new String[] { "Heat:", base.heat + "/" + base.maxHeat }); + } + + @Override + protected void drawGuiContainerForegroundLayer( int i, int j) { + String name = this.base.hasCustomInventoryName() ? this.base.getInventoryName() : I18n.format(this.base.getInventoryName()); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + int i = (int)base.getPowerScaled(104); + drawTexturedModalRect(guiLeft + 116, guiTop + 124 - i, 206, 106 - i, 7, i); + + int j = base.getFieldScaled(104); + drawTexturedModalRect(guiLeft + 44, guiTop + 124 - j, 192, 106 - j, 7, j); + + int k = base.getEfficiencyScaled(104); + drawTexturedModalRect(guiLeft + 53, guiTop + 124 - k, 199, 106 - k, 7, k); + + int l = base.getHeatScaled(104); + drawTexturedModalRect(guiLeft + 125, guiTop + 124 - l, 213, 106 - l, 7, l); + + int m = base.mode; + if(m > 0) + drawTexturedModalRect(guiLeft + 80, guiTop + 108, 176, 32 + 16 * m, 16, 16); + + int n = base.warning; + if(n > 0) + drawTexturedModalRect(guiLeft + 80, guiTop + 18, 176, 32 + 16 * n, 16, 16); + + if(base.color > -1) { + GL11.glColor3ub((byte)((base.color & 0xFF0000) >> 16), (byte)((base.color & 0x00FF00) >> 8), (byte)((base.color & 0x0000FF) >> 0)); + drawTexturedModalRect(guiLeft + 61, guiTop + 44, 176, 160, 54, 54); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + drawTexturedModalRect(guiLeft + 61, guiTop + 44, 176, 106, 54, 54); + } + + Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[0].getSheet()); + base.tanks[0].renderTank(this, guiLeft + 26, guiTop + 70, base.tanks[0].getTankType().textureX() * FluidTank.x, base.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52); + + Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[1].getSheet()); + base.tanks[1].renderTank(this, guiLeft + 134, guiTop + 70, base.tanks[1].getTankType().textureX() * FluidTank.x, base.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52); + + Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[2].getSheet()); + base.tanks[2].renderTank(this, guiLeft + 26, guiTop + 124, base.tanks[2].getTankType().textureX() * FluidTank.x, base.tanks[2].getTankType().textureY() * FluidTank.y, 16, 52); + + Minecraft.getMinecraft().getTextureManager().bindTexture(base.tanks[3].getSheet()); + base.tanks[3].renderTank(this, guiLeft + 134, guiTop + 124, base.tanks[3].getTankType().textureX() * FluidTank.x, base.tanks[3].getTankType().textureY() * FluidTank.y, 16, 52); + } +} diff --git a/com/hbm/inventory/gui/GUIAMSEmitter.java b/com/hbm/inventory/gui/GUIAMSEmitter.java new file mode 100644 index 000000000..b3b81e78a --- /dev/null +++ b/com/hbm/inventory/gui/GUIAMSEmitter.java @@ -0,0 +1,71 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.FluidTank; +import com.hbm.inventory.container.ContainerAMSEmitter; +import com.hbm.inventory.container.ContainerAMSLimiter; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityAMSEmitter; +import com.hbm.tileentity.machine.TileEntityAMSLimiter; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIAMSEmitter extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_ams_emitter.png"); + private TileEntityAMSEmitter emitter; + + public GUIAMSEmitter(InventoryPlayer invPlayer, TileEntityAMSEmitter tedf) { + super(new ContainerAMSEmitter(invPlayer, tedf)); + emitter = tedf; + + this.xSize = 176; + this.ySize = 166; + } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + emitter.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 69 - 52, 16, 52); + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 69 - 52, 16, 52, emitter.power, emitter.maxPower); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, new String[] { "Power:", emitter.efficiency + "%" }); + this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52, new String[] { "Heat:", emitter.heat + "/" + emitter.maxHeat }); + } + + @Override + protected void drawGuiContainerForegroundLayer( int i, int j) { + String name = this.emitter.hasCustomInventoryName() ? this.emitter.getInventoryName() : I18n.format(this.emitter.getInventoryName()); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + int i = (int) emitter.getPowerScaled(52); + drawTexturedModalRect(guiLeft + 134, guiTop + 69 - i, 192, 52 - i, 16, i); + + int j = emitter.getEfficiencyScaled(52); + drawTexturedModalRect(guiLeft + 152, guiTop + 69 - j, 208, 52 - j, 16, j); + + int k = emitter.getHeatScaled(52); + drawTexturedModalRect(guiLeft + 8, guiTop + 69 - k, 176, 52 - k, 16, k); + + int m = emitter.warning; + if(m > 0) + drawTexturedModalRect(guiLeft + 80, guiTop + 17, 176, 36 + 16 * m, 16, 16); + + Minecraft.getMinecraft().getTextureManager().bindTexture(emitter.tank.getSheet()); + + emitter.tank.renderTank(this, guiLeft + 26, guiTop + 69, emitter.tank.getTankType().textureX() * FluidTank.x, emitter.tank.getTankType().textureY() * FluidTank.y, 16, 52); + } +} diff --git a/com/hbm/inventory/gui/GUIAMSLimiter.java b/com/hbm/inventory/gui/GUIAMSLimiter.java index 924c82bde..a2b77a307 100644 --- a/com/hbm/inventory/gui/GUIAMSLimiter.java +++ b/com/hbm/inventory/gui/GUIAMSLimiter.java @@ -61,6 +61,14 @@ public class GUIAMSLimiter extends GuiInfoContainer { int k = limiter.getHeatScaled(52); drawTexturedModalRect(guiLeft + 8, guiTop + 69 - k, 176, 52 - k, 16, k); + int l = limiter.mode; + if(l > 0) + drawTexturedModalRect(guiLeft + 98, guiTop + 17, 176, 84 + 16 * l, 16, 16); + + int m = limiter.warning; + if(m > 0) + drawTexturedModalRect(guiLeft + 80, guiTop + 17, 176, 36 + 16 * m, 16, 16); + Minecraft.getMinecraft().getTextureManager().bindTexture(limiter.tank.getSheet()); limiter.tank.renderTank(this, guiLeft + 26, guiTop + 69, limiter.tank.getTankType().textureX() * FluidTank.x, limiter.tank.getTankType().textureY() * FluidTank.y, 16, 52); diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index c242a9fec..aa19b43b7 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -375,6 +375,21 @@ public class ModItems { public static Item crystal_energy; public static Item pellet_coolant; + + public static Item ams_catalyst_blank; + public static Item ams_catalyst_aluminium; + public static Item ams_catalyst_beryllium; + public static Item ams_catalyst_caesium; + public static Item ams_catalyst_cerium; + public static Item ams_catalyst_cobalt; + public static Item ams_catalyst_copper; + public static Item ams_catalyst_euphemium; + public static Item ams_catalyst_iron; + public static Item ams_catalyst_lithium; + public static Item ams_catalyst_niobium; + public static Item ams_catalyst_strontium; + public static Item ams_catalyst_thorium; + public static Item ams_catalyst_tungsten; public static Item cell_empty; public static Item cell_uf6; @@ -753,6 +768,10 @@ public class ModItems { public static Item factory_core_titanium; public static Item factory_core_advanced; + public static Item ams_focus_blank; + public static Item ams_focus_limiter; + public static Item ams_focus_booster; + public static Item upgrade_template; public static Item upgrade_speed_1; public static Item upgrade_speed_2; @@ -1353,6 +1372,21 @@ public class ModItems { crystal_energy = new ItemCustomLore().setUnlocalizedName("crystal_energy").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":crystal_energy"); pellet_coolant = new ItemCustomLore().setUnlocalizedName("pellet_coolant").setMaxDamage(41400).setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_coolant"); + ams_catalyst_blank = new Item().setUnlocalizedName("ams_catalyst_blank").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_blank"); + ams_catalyst_aluminium = new ItemCatalyst(0xCCCCCC).setUnlocalizedName("ams_catalyst_aluminium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_aluminium"); + ams_catalyst_beryllium = new ItemCatalyst(0x97978B).setUnlocalizedName("ams_catalyst_beryllium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_beryllium"); + ams_catalyst_caesium = new ItemCatalyst(0x6400FF).setUnlocalizedName("ams_catalyst_caesium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_caesium"); + ams_catalyst_cerium = new ItemCatalyst(0x1D3FFF).setUnlocalizedName("ams_catalyst_cerium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_cerium"); + ams_catalyst_cobalt = new ItemCatalyst(0x789BBE).setUnlocalizedName("ams_catalyst_cobalt").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_cobalt"); + ams_catalyst_copper = new ItemCatalyst(0xAADE29).setUnlocalizedName("ams_catalyst_copper").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_copper"); + ams_catalyst_euphemium = new ItemCatalyst(0xFF9CD2).setUnlocalizedName("ams_catalyst_euphemium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_euphemium"); + ams_catalyst_iron = new ItemCatalyst(0xFF7E22).setUnlocalizedName("ams_catalyst_iron").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_iron"); + ams_catalyst_lithium = new ItemCatalyst(0xFF2727).setUnlocalizedName("ams_catalyst_lithium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_lithium"); + ams_catalyst_niobium = new ItemCatalyst(0x3BF1B6).setUnlocalizedName("ams_catalyst_niobium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_niobium"); + ams_catalyst_strontium = new ItemCatalyst(0xDD0D35).setUnlocalizedName("ams_catalyst_strontium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_strontium"); + ams_catalyst_thorium = new ItemCatalyst(0x653B22).setUnlocalizedName("ams_catalyst_thorium").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_thorium"); + ams_catalyst_tungsten = new ItemCatalyst(0xF5FF48).setUnlocalizedName("ams_catalyst_tungsten").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ams_catalyst_tungsten"); + cell_empty = new ItemCell().setUnlocalizedName("cell_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":cell_empty"); cell_uf6 = new Item().setUnlocalizedName("cell_uf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_uf6"); cell_puf6 = new Item().setUnlocalizedName("cell_puf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_puf6"); @@ -1753,6 +1787,10 @@ public class ModItems { factory_core_titanium = new ItemBattery(70400).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_titanium"); factory_core_advanced = new ItemBattery(41600).setUnlocalizedName("factory_core_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_advanced"); + ams_focus_blank = new ItemCustomLore().setUnlocalizedName("ams_focus_blank").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_blank"); + ams_focus_limiter = new ItemCustomLore().setUnlocalizedName("ams_focus_limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_limiter"); + ams_focus_booster = new ItemCustomLore().setUnlocalizedName("ams_focus_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ams_focus_booster"); + upgrade_template = new ItemCustomLore().setUnlocalizedName("upgrade_template").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":upgrade_template"); upgrade_speed_1 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_1").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":upgrade_speed_1"); upgrade_speed_2 = new ItemCustomLore().setUnlocalizedName("upgrade_speed_2").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":upgrade_speed_2"); @@ -2566,6 +2604,22 @@ public class ModItems { GameRegistry.registerItem(part_copper, part_copper.getUnlocalizedName()); GameRegistry.registerItem(part_plutonium, part_plutonium.getUnlocalizedName()); + //AMS Catalysts + GameRegistry.registerItem(ams_catalyst_blank, ams_catalyst_blank.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_aluminium, ams_catalyst_aluminium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_beryllium, ams_catalyst_beryllium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_caesium, ams_catalyst_caesium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_cerium, ams_catalyst_cerium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_cobalt, ams_catalyst_cobalt.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_copper, ams_catalyst_copper.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_euphemium, ams_catalyst_euphemium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_iron, ams_catalyst_iron.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_lithium, ams_catalyst_lithium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_niobium, ams_catalyst_niobium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_strontium, ams_catalyst_strontium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_thorium, ams_catalyst_thorium.getUnlocalizedName()); + GameRegistry.registerItem(ams_catalyst_tungsten, ams_catalyst_tungsten.getUnlocalizedName()); + //Shredder Blades GameRegistry.registerItem(blades_aluminium, blades_aluminium.getUnlocalizedName()); GameRegistry.registerItem(blades_gold, blades_gold.getUnlocalizedName()); @@ -2580,6 +2634,11 @@ public class ModItems { GameRegistry.registerItem(thermo_element, thermo_element.getUnlocalizedName()); GameRegistry.registerItem(limiter, limiter.getUnlocalizedName()); + //AMS Components + GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName()); + GameRegistry.registerItem(ams_focus_limiter, ams_focus_limiter.getUnlocalizedName()); + GameRegistry.registerItem(ams_focus_booster, ams_focus_booster.getUnlocalizedName()); + //Fuel Rods GameRegistry.registerItem(rod_empty, rod_empty.getUnlocalizedName()); GameRegistry.registerItem(rod_dual_empty, rod_dual_empty.getUnlocalizedName()); diff --git a/com/hbm/items/special/ItemCatalyst.java b/com/hbm/items/special/ItemCatalyst.java new file mode 100644 index 000000000..9d92e602f --- /dev/null +++ b/com/hbm/items/special/ItemCatalyst.java @@ -0,0 +1,17 @@ +package com.hbm.items.special; + +import net.minecraft.item.Item; + +public class ItemCatalyst extends Item { + + int color; + + public ItemCatalyst(int color) { + this.color = color; + } + + public int getColor() { + return this.color; + } + +} diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index b9d5ff1a4..9cec1365a 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -841,6 +841,16 @@ public class Library { { tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); } + //AMS Limiter + if(block == ModBlocks.dummy_port_ams_limiter) + { + tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); + } + //AMS Emitter + if(block == ModBlocks.dummy_port_ams_emitter) + { + tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); + } if(tileentity instanceof IConductor) { @@ -1035,6 +1045,16 @@ public class Library { { tileentity = worldObj.getTileEntity(x - 9, y + 11, z); } + //AMS Limiter + if(block == ModBlocks.dummy_port_ams_limiter) + { + tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); + } + //AMS Limiter + if(block == ModBlocks.dummy_port_ams_emitter) + { + tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ); + } if(tileentity == that) tileentity = null; diff --git a/com/hbm/main/ResourceManager.java b/com/hbm/main/ResourceManager.java index ca2c638ea..6dbf8a2a1 100644 --- a/com/hbm/main/ResourceManager.java +++ b/com/hbm/main/ResourceManager.java @@ -37,6 +37,11 @@ public class ResourceManager { public static final IModelCustom ams_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_base.obj")); public static final IModelCustom ams_emitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_emitter.obj")); public static final IModelCustom ams_limiter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_limiter.obj")); + public static final IModelCustom ams_limiter_destroyed = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/ams_limiter_destroyed.obj")); + + //Sphere + public static final IModelCustom sphere_ruv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_ruv.obj")); + public static final IModelCustom sphere_iuv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_iuv.obj")); ////Textures TEs diff --git a/com/hbm/packet/AuxGaugePacket.java b/com/hbm/packet/AuxGaugePacket.java index 55ddc2922..8bf083a86 100644 --- a/com/hbm/packet/AuxGaugePacket.java +++ b/com/hbm/packet/AuxGaugePacket.java @@ -2,6 +2,9 @@ package com.hbm.packet; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; +import com.hbm.tileentity.machine.TileEntityAMSBase; +import com.hbm.tileentity.machine.TileEntityAMSEmitter; +import com.hbm.tileentity.machine.TileEntityAMSLimiter; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; @@ -60,8 +63,21 @@ public class AuxGaugePacket implements IMessage { try { TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z); - if (true) { + if (te instanceof TileEntityAMSLimiter) { + TileEntityAMSLimiter limiter = (TileEntityAMSLimiter)te; + limiter.locked = m.value == 1; + } + if (te instanceof TileEntityAMSEmitter) { + TileEntityAMSEmitter emitter = (TileEntityAMSEmitter)te; + emitter.locked = m.value == 1; + } + if (te instanceof TileEntityAMSBase) { + TileEntityAMSBase base = (TileEntityAMSBase)te; + if(m.id == 0) + base.locked = m.value == 1; + else if(m.id == 1) + base.color = m.value; } } catch (Exception x) { } diff --git a/com/hbm/render/tileentity/RenderAMSBase.java b/com/hbm/render/tileentity/RenderAMSBase.java index b67df8808..a55f6cdda 100644 --- a/com/hbm/render/tileentity/RenderAMSBase.java +++ b/com/hbm/render/tileentity/RenderAMSBase.java @@ -1,15 +1,22 @@ package com.hbm.render.tileentity; +import java.util.Random; + import org.lwjgl.opengl.GL11; +import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; +import com.hbm.tileentity.machine.TileEntityAMSBase; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class RenderAMSBase extends TileEntitySpecialRenderer { public RenderAMSBase() { } + Random rand = new Random(); @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) @@ -25,5 +32,183 @@ public class RenderAMSBase extends TileEntitySpecialRenderer { ResourceManager.ams_base.renderAll(); GL11.glPopMatrix(); + + renderTileEntityAt2(tileEntity, x, y, z, f); + } + + public void renderTileEntityAt3(TileEntity tileEntity, double x, double y, double z, float f) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 5.5, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glScalef(2.5F, 2.5F, 2.5F); + + GL11.glColor3ub((byte)((((TileEntityAMSBase)tileEntity).color & 0xFF0000) >> 16), (byte)((((TileEntityAMSBase)tileEntity).color & 0x00FF00) >> 8), (byte)((((TileEntityAMSBase)tileEntity).color & 0x0000FF) >> 0)); + + GL11.glDisable(GL11.GL_TEXTURE_2D); + + int rot = (int) ((System.nanoTime()/100000000)%360) * 3; + + GL11.glRotatef(rot, 0F, 1F, 0F); + GL11.glScalef(0.5F, 0.5F, 0.5F); + ResourceManager.sphere_ruv.renderAll(); + GL11.glScalef(1/0.5F, 1/0.5F, 1/0.5F); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + + GL11.glRotatef(-rot * 2, 0F, 1F, 0F); + GL11.glScalef(0.6F, 0.6F, 0.6F); + ResourceManager.sphere_ruv.renderAll(); + GL11.glScalef(1/0.6F, 1/0.6F, 1/0.6F); + + GL11.glRotatef(rot * 2, 0F, 1F, 0F); + GL11.glScalef(0.7F, 0.7F, 0.7F); + ResourceManager.sphere_ruv.renderAll(); + GL11.glScalef(1/0.7F, 1/0.7F, 1/0.7F); + + GL11.glRotatef(-rot * 2, 0F, 1F, 0F); + GL11.glScalef(0.8F, 0.8F, 0.8F); + ResourceManager.sphere_ruv.renderAll(); + GL11.glScalef(1/0.8F, 1/0.8F, 1/0.8F); + + GL11.glRotatef(rot * 2, 0F, 1F, 0F); + GL11.glScalef(0.9F, 0.9F, 0.9F); + ResourceManager.sphere_ruv.renderAll(); + GL11.glScalef(1/0.9F, 1/0.9F, 1/0.9F); + + GL11.glRotatef(-rot * 2, 0F, 1F, 0F); + ResourceManager.sphere_ruv.renderAll(); + + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + GL11.glPopMatrix(); + + renderTileEntityAt4(tileEntity, x, y, z, f); + } + + public void renderTileEntityAt2(TileEntity tileEntity, double x, double y, double z, float f) + { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y + 5.5, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glRotatef(180, 0F, 1F, 0F); + GL11.glScalef(2.5F, 2.5F, 2.5F); + + int rot = (int) ((System.nanoTime()/100000000)%360) * 3; + + bindTexture(new ResourceLocation(RefStrings.MODID, "textures/models/EMPBlast.png")); + + GL11.glRotatef(rot, 0F, 1F, 0F); + GL11.glScalef(1.1F, 1.1F, 1.1F); + ResourceManager.sphere_iuv.renderAll(); + GL11.glScalef(1/1.1F, 1/1.1F, 1/1.1F); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glPopMatrix(); + + renderTileEntityAt3(tileEntity, x, y, z, f); + } + + public void renderTileEntityAt4(TileEntity tileEntity, double x, double y, double z, float f) + { + float radius = 0.04F; + int distance = 1; + int layers = 3; + Tessellator tessellator = Tessellator.instance; + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + GL11.glTranslatef((float) x + 0.5F, (float) y + 2, (float) z + 0.5F); + + double lastPosX = 0; + double lastPosZ = 0; + + for(int i = 7; i > 0; i -= distance) { + + double posX = rand.nextDouble() - 0.5; + double posZ = rand.nextDouble() - 0.5; + + for(int j = 1; j <= layers; j++) { + + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 0.5F, 0, 1f); + tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ + (radius * j)); + tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ - (radius * j)); + tessellator.addVertex(posX + (radius * j), i - distance, posZ - (radius * j)); + tessellator.addVertex(posX + (radius * j), i - distance, posZ + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 0.5F, 0, 1f); + tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ + (radius * j)); + tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ - (radius * j)); + tessellator.addVertex(posX - (radius * j), i - distance, posZ - (radius * j)); + tessellator.addVertex(posX - (radius * j), i - distance, posZ + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 0.5F, 0, 1f); + tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ + (radius * j)); + tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ + (radius * j)); + tessellator.addVertex(posX - (radius * j), i - distance, posZ + (radius * j)); + tessellator.addVertex(posX + (radius * j), i - distance, posZ + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 0.5F, 0, 1f); + tessellator.addVertex(lastPosX + (radius * j), i, lastPosZ - (radius * j)); + tessellator.addVertex(lastPosX - (radius * j), i, lastPosZ - (radius * j)); + tessellator.addVertex(posX - (radius * j), i - distance, posZ - (radius * j)); + tessellator.addVertex(posX + (radius * j), i - distance, posZ - (radius * j)); + tessellator.draw(); + } + + lastPosX = posX; + lastPosZ = posZ; + } + + for(int j = 1; j <= 2; j++) { + + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 1, 0, 1f); + tessellator.addVertex(0 + (radius * j), 7, 0 + (radius * j)); + tessellator.addVertex(0 + (radius * j), 7, 0 - (radius * j)); + tessellator.addVertex(0 + (radius * j), 0, 0 - (radius * j)); + tessellator.addVertex(0 + (radius * j), 0, 0 + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 1, 0, 1f); + tessellator.addVertex(0 - (radius * j), 7, 0 + (radius * j)); + tessellator.addVertex(0 - (radius * j), 7, 0 - (radius * j)); + tessellator.addVertex(0 - (radius * j), 0, 0 - (radius * j)); + tessellator.addVertex(0 - (radius * j), 0, 0 + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 1, 0, 1f); + tessellator.addVertex(0 + (radius * j), 7, 0 + (radius * j)); + tessellator.addVertex(0 - (radius * j), 7, 0 + (radius * j)); + tessellator.addVertex(0 - (radius * j), 0, 0 + (radius * j)); + tessellator.addVertex(0 + (radius * j), 0, 0 + (radius * j)); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(1, 1, 0, 1f); + tessellator.addVertex(0 + (radius * j), 7, 0 - (radius * j)); + tessellator.addVertex(0 - (radius * j), 7, 0 - (radius * j)); + tessellator.addVertex(0 - (radius * j), 0, 0 - (radius * j)); + tessellator.addVertex(0 + (radius * j), 0, 0 - (radius * j)); + tessellator.draw(); + } + + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPopMatrix(); } } diff --git a/com/hbm/render/tileentity/RenderAMSLimiter.java b/com/hbm/render/tileentity/RenderAMSLimiter.java index a01cb4bbe..61b82a726 100644 --- a/com/hbm/render/tileentity/RenderAMSLimiter.java +++ b/com/hbm/render/tileentity/RenderAMSLimiter.java @@ -3,6 +3,7 @@ package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.main.ResourceManager; +import com.hbm.tileentity.machine.TileEntityAMSLimiter; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; @@ -32,9 +33,12 @@ public class RenderAMSLimiter extends TileEntitySpecialRenderer { GL11.glRotatef(0, 0F, 1F, 0F); break; } - bindTexture(ResourceManager.ams_limiter_tex); + bindTexture(ResourceManager.universal); - ResourceManager.ams_limiter.renderAll(); + if(((TileEntityAMSLimiter)tileEntity).locked) + ResourceManager.ams_limiter_destroyed.renderAll(); + else + ResourceManager.ams_limiter.renderAll(); GL11.glPopMatrix(); } diff --git a/com/hbm/tileentity/machine/TileEntityAMSBase.java b/com/hbm/tileentity/machine/TileEntityAMSBase.java index 6b7b40e43..23a47c37c 100644 --- a/com/hbm/tileentity/machine/TileEntityAMSBase.java +++ b/com/hbm/tileentity/machine/TileEntityAMSBase.java @@ -1,11 +1,455 @@ package com.hbm.tileentity.machine; +import java.util.ArrayList; +import java.util.List; + +import com.hbm.blocks.ModBlocks; +import com.hbm.entity.particle.EntityGasFlameFX; +import com.hbm.explosion.ExplosionLarge; +import com.hbm.handler.FluidTypeHandler.FluidType; +import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IFluidAcceptor; +import com.hbm.interfaces.IFluidContainer; +import com.hbm.interfaces.ISource; +import com.hbm.inventory.FluidTank; +import com.hbm.items.ModItems; +import com.hbm.items.special.ItemCatalyst; +import com.hbm.lib.Library; +import com.hbm.packet.AuxElectricityPacket; +import com.hbm.packet.AuxGaugePacket; +import com.hbm.packet.PacketDispatcher; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import scala.util.Random; -public class TileEntityAMSBase extends TileEntity { +public class TileEntityAMSBase extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor { + + private ItemStack slots[]; + + public long power = 0; + public static final long maxPower = 1000000; + public int field = 0; + public static final int maxField = 100; + public int efficiency = 0; + public static final int maxEfficiency = 100; + public int heat = 0; + public static final int maxHeat = 5000; + public int age = 0; + public int warning = 0; + public int mode = 0; + public boolean locked = false; + public FluidTank[] tanks; + public List list = new ArrayList(); + public int color = -1; + + Random rand = new Random(); + + private static final int[] slots_top = new int[] { 0 }; + private static final int[] slots_bottom = new int[] { 0 }; + private static final int[] slots_side = new int[] { 0 }; + + private String customName; + + public TileEntityAMSBase() { + slots = new ItemStack[13]; + tanks = new FluidTank[4]; + tanks[0] = new FluidTank(FluidType.WATER, 64000, 0); + tanks[1] = new FluidTank(FluidType.COOLANT, 64000, 1); + tanks[2] = new FluidTank(FluidType.DEUTERIUM, 64000, 2); + tanks[3] = new FluidTank(FluidType.TRITIUM, 64000, 3); + } + + @Override + public int getSizeInventory() { + return slots.length; + } + + @Override + public ItemStack getStackInSlot(int i) { + return slots[i]; + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + if(slots[i] != null) + { + ItemStack itemStack = slots[i]; + slots[i] = null; + return itemStack; + } else { + return null; + } + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemStack) { + slots[i] = itemStack; + if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) + { + itemStack.stackSize = getInventoryStackLimit(); + } + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.amsBase"; + } + + @Override + public boolean hasCustomInventoryName() { + return this.customName != null && this.customName.length() > 0; + } + + public void setCustomName(String name) { + this.customName = name; + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) + { + return false; + }else{ + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=128; + } + } + + @Override + public void openInventory() {} + @Override + public void closeInventory() {} + + @Override + public boolean isItemValidForSlot(int i, ItemStack stack) { + + return false; + } + + @Override + public ItemStack decrStackSize(int i, int j) { + if(slots[i] != null) + { + if(slots[i].stackSize <= j) + { + ItemStack itemStack = slots[i]; + slots[i] = null; + return itemStack; + } + ItemStack itemStack1 = slots[i].splitStack(j); + if (slots[i].stackSize == 0) + { + slots[i] = null; + } + + return itemStack1; + } else { + return null; + } + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + NBTTagList list = nbt.getTagList("items", 10); + + power = nbt.getLong("power"); + tanks[0].readFromNBT(nbt, "coolant1"); + tanks[1].readFromNBT(nbt, "coolant2"); + tanks[2].readFromNBT(nbt, "fuel1"); + tanks[3].readFromNBT(nbt, "fuel2"); + field = nbt.getInteger("field"); + efficiency = nbt.getInteger("efficiency"); + heat = nbt.getInteger("heat"); + locked = nbt.getBoolean("locked"); + slots = new ItemStack[getSizeInventory()]; + + for(int i = 0; i < list.tagCount(); i++) + { + NBTTagCompound nbt1 = list.getCompoundTagAt(i); + byte b0 = nbt1.getByte("slot"); + if(b0 >= 0 && b0 < slots.length) + { + slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); + } + } + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setLong("power", power); + tanks[0].writeToNBT(nbt, "coolant1"); + tanks[1].writeToNBT(nbt, "coolant2"); + tanks[2].writeToNBT(nbt, "fuel1"); + tanks[3].writeToNBT(nbt, "fuel2"); + nbt.setInteger("field", field); + nbt.setInteger("efficiency", efficiency); + nbt.setInteger("heat", heat); + nbt.setBoolean("locked", locked); + NBTTagList list = new NBTTagList(); + + for(int i = 0; i < slots.length; i++) + { + if(slots[i] != null) + { + NBTTagCompound nbt1 = new NBTTagCompound(); + nbt1.setByte("slot", (byte)i); + slots[i].writeToNBT(nbt1); + list.appendTag(nbt1); + } + } + nbt.setTag("items", list); + } + + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) + { + return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemStack, int j) { + return this.isItemValidForSlot(i, itemStack); + } + + @Override + public boolean canExtractItem(int i, ItemStack itemStack, int j) { + return false; + } + + @Override + public void updateEntity() { + + if (!worldObj.isRemote) { + + if(!locked) { + + tanks[0].setType(0, 1, slots); + tanks[1].setType(2, 3, slots); + tanks[2].setType(4, 5, slots); + tanks[3].setType(6, 7, slots); + + for(int i = 0; i < 4; i++) + tanks[i].updateTank(xCoord, yCoord, zCoord); + + int f1 = 0, f2 = 0, f3 = 0, f4 = 0; + + if(worldObj.getTileEntity(xCoord + 6, yCoord, zCoord) instanceof TileEntityAMSLimiter) { + TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord + 6, yCoord, zCoord); + if(!te.locked && worldObj.getBlockMetadata(xCoord + 6, yCoord, zCoord) == 4) + f1 = te.efficiency; + } + if(worldObj.getTileEntity(xCoord - 6, yCoord, zCoord) instanceof TileEntityAMSLimiter) { + TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord - 6, yCoord, zCoord); + if(!te.locked && worldObj.getBlockMetadata(xCoord - 6, yCoord, zCoord) == 5) + f2 = te.efficiency; + } + if(worldObj.getTileEntity(xCoord, yCoord, zCoord + 6) instanceof TileEntityAMSLimiter) { + TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord, yCoord, zCoord + 6); + if(!te.locked && worldObj.getBlockMetadata(xCoord, yCoord, zCoord + 6) == 2) + f3 = te.efficiency; + } + if(worldObj.getTileEntity(xCoord, yCoord, zCoord - 6) instanceof TileEntityAMSLimiter) { + TileEntityAMSLimiter te = (TileEntityAMSLimiter)worldObj.getTileEntity(xCoord, yCoord, zCoord - 6); + if(!te.locked && worldObj.getBlockMetadata(xCoord, yCoord, zCoord - 6) == 3) + f4 = te.efficiency; + } + + this.field = Math.round(calcField(f1, f2, f3, f4)); + + if(worldObj.getTileEntity(xCoord, yCoord + 9, zCoord) instanceof TileEntityAMSEmitter) { + TileEntityAMSEmitter te = (TileEntityAMSEmitter)worldObj.getTileEntity(xCoord, yCoord + 9, zCoord); + this.efficiency = te.efficiency; + } + + this.color = -1; + + if(slots[8] != null && slots[9] != null && slots[10] != null && slots[11] != null && + slots[8].getItem() instanceof ItemCatalyst && slots[9].getItem() instanceof ItemCatalyst && + slots[10].getItem() instanceof ItemCatalyst && slots[11].getItem() instanceof ItemCatalyst) { + int a = ((ItemCatalyst)slots[8].getItem()).getColor(); + int b = ((ItemCatalyst)slots[9].getItem()).getColor(); + int c = ((ItemCatalyst)slots[10].getItem()).getColor(); + int d = ((ItemCatalyst)slots[11].getItem()).getColor(); + + int e = this.calcAvgHex(a, b); + int f = this.calcAvgHex(c, d); + + int g = this.calcAvgHex(e, f); + + this.color = g; + } + + } else { + field = 0; + efficiency = 0; + power = 0; + warning = 3; + } + + PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, color, 1)); + } + } + + private float gauss(float a, float x) { + + //Greater values -> less difference of temperate impact + double amplifier = 0.10; + + return (float) ( (1/Math.sqrt(a * Math.PI)) * Math.pow(Math.E, -1 * Math.pow(x, 2)/amplifier) ); + } + + private float calcEffect(float a, float x) { + return (float) (gauss( 1 / a, x / maxHeat) * Math.sqrt(Math.PI * 2) / (Math.sqrt(2) * Math.sqrt(maxPower))); + } + + private float calcField(int a, int b, int c, int d) { + return (float)Math.sqrt((Math.pow(a, 2) + Math.pow(b, 2) + Math.pow(c, 2) + Math.pow(d, 2)) / 4); + } + + private int calcAvgHex(int h1, int h2) { + + int r1 = ((h1 & 0xFF0000) >> 16); + int g1 = ((h1 & 0x00FF00) >> 8); + int b1 = ((h1 & 0x0000FF) >> 0); + + int r2 = ((h2 & 0xFF0000) >> 16); + int g2 = ((h2 & 0x00FF00) >> 8); + int b2 = ((h2 & 0x0000FF) >> 0); + + int r = (((r1 + r2) / 2) << 16); + int g = (((g1 + g2) / 2) << 8); + int b = (((b1 + b2) / 2) << 0); + + return r | g | b; + } + + public long getPowerScaled(long i) { + return (power * i) / maxPower; + } + + public int getEfficiencyScaled(int i) { + return (efficiency * i) / maxEfficiency; + } + + public int getFieldScaled(int i) { + return (field * i) / maxField; + } + + public int getHeatScaled(int i) { + return (heat * i) / maxHeat; + } + + @Override + public int getMaxAFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getMaxFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getMaxFill(); + else if(type.name().equals(tanks[2].getTankType().name())) + return tanks[2].getMaxFill(); + else if(type.name().equals(tanks[3].getTankType().name())) + return tanks[3].getMaxFill(); + else + return 0; + } + + @Override + public void setAFluidFill(int i, FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + tanks[0].setFill(i); + else if(type.name().equals(tanks[1].getTankType().name())) + tanks[1].setFill(i); + else if(type.name().equals(tanks[2].getTankType().name())) + tanks[2].setFill(i); + else if(type.name().equals(tanks[3].getTankType().name())) + tanks[3].setFill(i); + } + + @Override + public int getAFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getFill(); + else if(type.name().equals(tanks[2].getTankType().name())) + return tanks[2].getFill(); + else if(type.name().equals(tanks[3].getTankType().name())) + return tanks[3].getFill(); + else + return 0; + } + + @Override + public void setFillstate(int fill, int index) { + if(index < 4 && tanks[index] != null) + tanks[index].setFill(fill); + } + + @Override + public void setType(FluidType type, int index) { + if(index < 4 && tanks[index] != null) + tanks[index].setTankType(type); + } + + @Override + public void ffgeua(int x, int y, int z, boolean newTact) { + + Library.ffgeua(x, y, z, newTact, this, worldObj); + } + + @Override + public void ffgeuaInit() { + ffgeua(this.xCoord - 2, this.yCoord, this.zCoord, getTact()); + ffgeua(this.xCoord + 2, this.yCoord, this.zCoord, getTact()); + ffgeua(this.xCoord, this.yCoord, this.zCoord - 2, getTact()); + ffgeua(this.xCoord, this.yCoord, this.zCoord + 2, getTact()); + } + + @Override + public boolean getTact() { + if(age >= 0 && age < 10) + { + return true; + } + + return false; + } + + @Override + public long getSPower() { + return power; + } + + @Override + public void setSPower(long i) { + this.power = i; + } + + @Override + public List getList() { + return list; + } + + @Override + public void clearList() { + this.list.clear(); + } @Override public AxisAlignedBB getRenderBoundingBox() { @@ -18,5 +462,4 @@ public class TileEntityAMSBase extends TileEntity { { return 65536.0D; } - } diff --git a/com/hbm/tileentity/machine/TileEntityAMSEmitter.java b/com/hbm/tileentity/machine/TileEntityAMSEmitter.java index 3ecce4b79..b866864ea 100644 --- a/com/hbm/tileentity/machine/TileEntityAMSEmitter.java +++ b/com/hbm/tileentity/machine/TileEntityAMSEmitter.java @@ -1,11 +1,394 @@ package com.hbm.tileentity.machine; +import com.hbm.entity.particle.EntityGasFlameFX; +import com.hbm.explosion.ExplosionLarge; +import com.hbm.handler.FluidTypeHandler.FluidType; +import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IFluidAcceptor; +import com.hbm.interfaces.IFluidContainer; +import com.hbm.inventory.FluidTank; +import com.hbm.items.ModItems; +import com.hbm.lib.Library; +import com.hbm.packet.AuxElectricityPacket; +import com.hbm.packet.AuxGaugePacket; +import com.hbm.packet.PacketDispatcher; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import scala.util.Random; -public class TileEntityAMSEmitter extends TileEntity { +public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor { + + private ItemStack slots[]; + + public long power = 0; + public static final long maxPower = 1000000; + public int efficiency = 0; + public static final int maxEfficiency = 100; + public int heat = 0; + public static final int maxHeat = 2500; + public int age = 0; + public int warning = 0; + public boolean locked = false; + public FluidTank tank; + + Random rand = new Random(); + + private static final int[] slots_top = new int[] { 0 }; + private static final int[] slots_bottom = new int[] { 0 }; + private static final int[] slots_side = new int[] { 0 }; + + private String customName; + + public TileEntityAMSEmitter() { + slots = new ItemStack[4]; + tank = new FluidTank(FluidType.COOLANT, 16000, 0); + } + + @Override + public int getSizeInventory() { + return slots.length; + } + + @Override + public ItemStack getStackInSlot(int i) { + return slots[i]; + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + if(slots[i] != null) + { + ItemStack itemStack = slots[i]; + slots[i] = null; + return itemStack; + } else { + return null; + } + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemStack) { + slots[i] = itemStack; + if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) + { + itemStack.stackSize = getInventoryStackLimit(); + } + } + + @Override + public String getInventoryName() { + return this.hasCustomInventoryName() ? this.customName : "container.amsEmitter"; + } + + @Override + public boolean hasCustomInventoryName() { + return this.customName != null && this.customName.length() > 0; + } + + public void setCustomName(String name) { + this.customName = name; + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) + { + return false; + }else{ + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=128; + } + } + + @Override + public void openInventory() {} + @Override + public void closeInventory() {} + + @Override + public boolean isItemValidForSlot(int i, ItemStack stack) { + + return false; + } + + @Override + public ItemStack decrStackSize(int i, int j) { + if(slots[i] != null) + { + if(slots[i].stackSize <= j) + { + ItemStack itemStack = slots[i]; + slots[i] = null; + return itemStack; + } + ItemStack itemStack1 = slots[i].splitStack(j); + if (slots[i].stackSize == 0) + { + slots[i] = null; + } + + return itemStack1; + } else { + return null; + } + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + NBTTagList list = nbt.getTagList("items", 10); + + power = nbt.getLong("power"); + tank.readFromNBT(nbt, "coolant"); + efficiency = nbt.getInteger("efficiency"); + heat = nbt.getInteger("heat"); + locked = nbt.getBoolean("locked"); + slots = new ItemStack[getSizeInventory()]; + + for(int i = 0; i < list.tagCount(); i++) + { + NBTTagCompound nbt1 = list.getCompoundTagAt(i); + byte b0 = nbt1.getByte("slot"); + if(b0 >= 0 && b0 < slots.length) + { + slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); + } + } + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setLong("power", power); + tank.writeToNBT(nbt, "coolant"); + nbt.setInteger("efficiency", efficiency); + nbt.setInteger("heat", heat); + nbt.setBoolean("locked", locked); + NBTTagList list = new NBTTagList(); + + for(int i = 0; i < slots.length; i++) + { + if(slots[i] != null) + { + NBTTagCompound nbt1 = new NBTTagCompound(); + nbt1.setByte("slot", (byte)i); + slots[i].writeToNBT(nbt1); + list.appendTag(nbt1); + } + } + nbt.setTag("items", list); + } + + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) + { + return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + } + + @Override + public boolean canInsertItem(int i, ItemStack itemStack, int j) { + return this.isItemValidForSlot(i, itemStack); + } + + @Override + public boolean canExtractItem(int i, ItemStack itemStack, int j) { + return false; + } + + @Override + public void updateEntity() { + + if (!worldObj.isRemote) { + + if(!locked) { + + tank.setType(0, 1, slots); + tank.updateTank(xCoord, yCoord, zCoord); + + if(power > 0) { + //" - (maxHeat / 2)" offsets center to 50% instead of 0% + efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100); + power -= Math.ceil(power * 0.025); + warning = 0; + } else { + efficiency = 0; + warning = 1; + } + + if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) { + + if(tank.getFill() >= 15) { + if(heat > 0) + tank.setFill(tank.getFill() - 15); + + if(heat <= maxHeat / 2) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 10; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 10; i++) + if(heat > maxHeat / 2) + heat--; + } else { + heat += efficiency; + } + } else if(tank.getTankType().name().equals(FluidType.COOLANT.name())) { + + if(tank.getFill() >= 15) { + if(heat > 0) + tank.setFill(tank.getFill() - 15); + + if(heat <= maxHeat / 4) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 5; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 5; i++) + if(heat > maxHeat / 4) + heat--; + } else { + heat += efficiency; + } + } else if(tank.getTankType().name().equals(FluidType.WATER.name())) { + + if(tank.getFill() >= 45) { + if(heat > 0) + tank.setFill(tank.getFill() - 45); + + if(heat <= maxHeat * 0.85) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 2; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 2; i++) + if(heat > maxHeat * 0.85) + heat--; + } else { + heat += efficiency; + } + } else { + heat += efficiency; + warning = 2; + } + + if(tank.getFill() <= 5 || heat > maxHeat * 0.9) + warning = 2; + + if(heat > maxHeat) { + heat = maxHeat; + locked = true; + ExplosionLarge.spawnShock(worldObj, xCoord, yCoord, zCoord, 24, 3); + ExplosionLarge.spawnBurst(worldObj, xCoord, yCoord, zCoord, 24, 3); + } + + power = Library.chargeTEFromItems(slots, 3, power, maxPower); + + } else { + //fire particles n stuff + + efficiency = 0; + power = 0; + warning = 3; + } + + PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0)); + } + } + + private float gauss(float a, float x) { + + //Greater values -> less difference of temperate impact + double amplifier = 0.10; + + return (float) ( (1/Math.sqrt(a * Math.PI)) * Math.pow(Math.E, -1 * Math.pow(x, 2)/amplifier) ); + } + + private float calcEffect(float a, float x) { + return (float) (gauss( 1 / a, x / maxHeat) * Math.sqrt(Math.PI * 2) / (Math.sqrt(2) * Math.sqrt(maxPower))); + } + + public long getPowerScaled(long i) { + return (power * i) / maxPower; + } + + public int getEfficiencyScaled(int i) { + return (efficiency * i) / maxEfficiency; + } + + public int getHeatScaled(int i) { + return (heat * i) / maxHeat; + } + + @Override + public void setPower(long i) { + power = i; + + } + + @Override + public long getPower() { + return power; + + } + + @Override + public long getMaxPower() { + return maxPower; + } + + @Override + public void setAFluidFill(int i, FluidType type) { + if(type.name().equals(tank.getTankType().name())) + tank.setFill(i); + } + + @Override + public int getAFluidFill(FluidType type) { + if(type.name().equals(tank.getTankType().name())) + return tank.getFill(); + else + return 0; + } + + @Override + public int getMaxAFluidFill(FluidType type) { + if(type.name().equals(tank.getTankType().name())) + return tank.getMaxFill(); + else + return 0; + } + + @Override + public void setFillstate(int fill, int index) { + tank.setFill(fill); + } + + @Override + public void setType(FluidType type, int index) { + tank.setTankType(type); + } @Override public AxisAlignedBB getRenderBoundingBox() { @@ -18,5 +401,4 @@ public class TileEntityAMSEmitter extends TileEntity { { return 65536.0D; } - } diff --git a/com/hbm/tileentity/machine/TileEntityAMSLimiter.java b/com/hbm/tileentity/machine/TileEntityAMSLimiter.java index 2ad585038..832bf3ec5 100644 --- a/com/hbm/tileentity/machine/TileEntityAMSLimiter.java +++ b/com/hbm/tileentity/machine/TileEntityAMSLimiter.java @@ -3,6 +3,8 @@ package com.hbm.tileentity.machine; import java.util.ArrayList; import java.util.List; +import com.hbm.entity.particle.EntityGasFlameFX; +import com.hbm.explosion.ExplosionLarge; import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IFluidAcceptor; @@ -13,6 +15,7 @@ import com.hbm.items.ModItems; import com.hbm.items.special.ItemBattery; import com.hbm.lib.Library; import com.hbm.packet.AuxElectricityPacket; +import com.hbm.packet.AuxGaugePacket; import com.hbm.packet.PacketDispatcher; import cpw.mods.fml.relauncher.Side; @@ -24,6 +27,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import scala.util.Random; public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, IConsumer, IFluidContainer, IFluidAcceptor { @@ -38,7 +42,10 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, public int age = 0; public int warning = 0; public int mode = 0; + public boolean locked = false; public FluidTank tank; + + Random rand = new Random(); private static final int[] slots_top = new int[] { 0 }; private static final int[] slots_bottom = new int[] { 0 }; @@ -48,7 +55,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, public TileEntityAMSLimiter() { slots = new ItemStack[4]; - tank = new FluidTank(FluidType.COOLANT, 64000, 0); + tank = new FluidTank(FluidType.COOLANT, 8000, 0); } @Override @@ -153,6 +160,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, tank.readFromNBT(nbt, "coolant"); efficiency = nbt.getInteger("efficiency"); heat = nbt.getInteger("heat"); + locked = nbt.getBoolean("locked"); slots = new ItemStack[getSizeInventory()]; for(int i = 0; i < list.tagCount(); i++) @@ -171,8 +179,9 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, super.writeToNBT(nbt); nbt.setLong("power", power); tank.writeToNBT(nbt, "coolant"); - nbt.setInteger("power", efficiency); - nbt.setInteger("power", heat); + nbt.setInteger("efficiency", efficiency); + nbt.setInteger("heat", heat); + nbt.setBoolean("locked", locked); NBTTagList list = new NBTTagList(); for(int i = 0; i < slots.length; i++) @@ -209,38 +218,127 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory, if (!worldObj.isRemote) { - tank.setType(0, 1, slots); - tank.updateTank(xCoord, yCoord, zCoord); - - heat = 0; - - if(slots[0] != null) - heat += maxHeat/2; - if(slots[1] != null) - heat += maxHeat/2; - - if(power > 0) { - //" - (maxHeat / 2)" offsets center to 50% instead of 0% - efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100); - power -= Math.ceil(power * 0.025); - heat += efficiency; - } else { - efficiency = 0; - } - - //TODO - /*if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) { + if(!locked) { - int i = (int) (1/Math.sqrt(heat + 1)); + tank.setType(0, 1, slots); + tank.updateTank(xCoord, yCoord, zCoord); - if() { - + if(power > 0) { + //" - (maxHeat / 2)" offsets center to 50% instead of 0% + efficiency = Math.round(calcEffect(power, heat - (maxHeat / 2)) * 100); + power -= Math.ceil(power * 0.025); + warning = 0; + } else { + efficiency = 0; + warning = 1; } - }*/ + + if(tank.getTankType().name().equals(FluidType.CRYOGEL.name())) { + + if(tank.getFill() >= 5) { + if(heat > 0) + tank.setFill(tank.getFill() - 5); + + if(heat <= maxHeat / 2) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 10; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 10; i++) + if(heat > maxHeat / 2) + heat--; + } else { + heat += efficiency; + } + } else if(tank.getTankType().name().equals(FluidType.COOLANT.name())) { + + if(tank.getFill() >= 5) { + if(heat > 0) + tank.setFill(tank.getFill() - 5); + + if(heat <= maxHeat / 4) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 5; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 5; i++) + if(heat > maxHeat / 4) + heat--; + } else { + heat += efficiency; + } + } else if(tank.getTankType().name().equals(FluidType.WATER.name())) { + + if(tank.getFill() >= 15) { + if(heat > 0) + tank.setFill(tank.getFill() - 15); + + if(heat <= maxHeat * 0.85) + if(efficiency > 0) + heat += efficiency; + else + for(int i = 0; i < 2; i++) + if(heat > 0) + heat--; + + for(int i = 0; i < 2; i++) + if(heat > maxHeat * 0.85) + heat--; + } else { + heat += efficiency; + } + } else { + heat += efficiency; + warning = 2; + } + + mode = 0; + if(slots[2] != null) { + if(slots[2].getItem() == ModItems.ams_focus_limiter) + mode = 1; + if(slots[2].getItem() == ModItems.ams_focus_booster) + mode = 2; + } + + if(tank.getFill() <= 5 || heat > maxHeat * 0.9) + warning = 2; + + if(heat > maxHeat) { + heat = maxHeat; + locked = true; + ExplosionLarge.spawnShock(worldObj, xCoord, yCoord, zCoord, 24, 3); + ExplosionLarge.spawnBurst(worldObj, xCoord, yCoord, zCoord, 24, 3); + } + + power = Library.chargeTEFromItems(slots, 3, power, maxPower); + + } else { + //fire particles n stuff + int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + double pos = rand.nextDouble() * 2.5; + double off = 0.25; + if(meta == 2) + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 + off, yCoord + 5.5, zCoord + 0.5 - pos, 0.0, 0.0, 0.0)); + if(meta == 3) + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 - off, yCoord + 5.5, zCoord + 0.5 + pos, 0.0, 0.0, 0.0)); + if(meta == 4) + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 - pos, yCoord + 5.5, zCoord + 0.5 - off, 0.0, 0.0, 0.0)); + if(meta == 5) + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, xCoord + 0.5 + pos, yCoord + 5.5, zCoord + 0.5 + off, 0.0, 0.0, 0.0)); + + efficiency = 0; + power = 0; + warning = 3; + } - power = Library.chargeTEFromItems(slots, 3, power, maxPower); - PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power)); + PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, locked ? 1 : 0, 0)); } }