0.7.0 update :3
This commit is contained in:
@@ -23,7 +23,7 @@ apply plugin: 'org.spongepowered.mixin'
|
||||
// add sourceSets.main, "createindustry.refmap.json"
|
||||
//}
|
||||
|
||||
version = '0.6.0-1.19.2'
|
||||
version = '0.7.0c-1.19.2'
|
||||
group = 'com.drmangotea.createindustry' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'createindustry'
|
||||
|
||||
|
||||
1221
hs_err_pid7192.log
Normal file
1221
hs_err_pid7192.log
Normal file
File diff suppressed because it is too large
Load Diff
10561
replay_pid7192.log
Normal file
10561
replay_pid7192.log
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
// 1.19.2 2023-11-24T16:01:59.4253252 Registrate Provider for createindustry [Recipes, Advancements, Loot tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
// 1.19.2 2024-01-12T20:54:31.7281576 Registrate Provider for createindustry [Recipes, Advancements, Loot tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
50db526af77cf0ead08cadfd3f7daa8b84a40312 assets/createindustry/blockstates/air_intake.json
|
||||
429437419b2ec98bd716e7ba15583b84da7488d5 assets/createindustry/blockstates/aluminum_bars.json
|
||||
9e2417e479011e42ebf00685068e6b6f515f0b11 assets/createindustry/blockstates/aluminum_block.json
|
||||
@@ -44,6 +44,7 @@ ed7d5676c02a397baf4f7b70c522eae9cca743c3 assets/createindustry/blockstates/cast_
|
||||
c0758abf43c65fe23bf2a16cd74759d084228751 assets/createindustry/blockstates/cement.json
|
||||
eb886624f3c4ebc6ee27a1d1767a08fbb31334db assets/createindustry/blockstates/coal_coke_block.json
|
||||
ca4b91d51ddbf905cedfb0af43999b463858705d assets/createindustry/blockstates/coke_oven.json
|
||||
d04c82112220b535a28e33d6116656409c8ddd8c assets/createindustry/blockstates/compact_engine.json
|
||||
9382589b6348082bdfdbcd7ddc042e2f2d65f3e2 assets/createindustry/blockstates/concrete.json
|
||||
37f3bb963b224ba9adb2e35a99f201b2be8143cd assets/createindustry/blockstates/concrete_slab.json
|
||||
05d99d329620179b8842da32534dadc133186885 assets/createindustry/blockstates/concrete_stairs.json
|
||||
@@ -103,6 +104,10 @@ a418d47559d0981dd7da1441e56d3eea026bce99 assets/createindustry/blockstates/heavy
|
||||
5d6b14700e8f04cbd4308c83b0451b5443e4cf91 assets/createindustry/blockstates/heavy_oil.json
|
||||
2d0d439047ff77b031930aa39db7ac742e4d42cf assets/createindustry/blockstates/industrial_pipe.json
|
||||
593e5338e012eeb345ad42731fb603e0df9e942e assets/createindustry/blockstates/kerosene.json
|
||||
365f8641879d2abf8bd391805e38911b79f84170 assets/createindustry/blockstates/large_pumpjack_hammer_connector.json
|
||||
a1923e104f2409222bb4f0676ec6b44538b303ac assets/createindustry/blockstates/large_pumpjack_hammer_head.json
|
||||
4f9f94512b1f3f398a33fc96d21d339381ac2d94 assets/createindustry/blockstates/large_pumpjack_hammer_part.json
|
||||
c12a01a86e320e3e4e64f18bbd071cfd00fcd43b assets/createindustry/blockstates/large_radial_engine.json
|
||||
814026b6a1e8b66af769e80b0bc94e735e5c5dbb assets/createindustry/blockstates/layered_bauxite.json
|
||||
1f0e2beeef1759b1c3d07b89409144d5c4110d9b assets/createindustry/blockstates/light_blue_concrete.json
|
||||
fb2c5a29e37055fcc813528345692663e5acfcd9 assets/createindustry/blockstates/light_blue_concrete_slab.json
|
||||
@@ -113,7 +118,6 @@ fb2c5a29e37055fcc813528345692663e5acfcd9 assets/createindustry/blockstates/light
|
||||
d569d82f1434baa451f91e69bf2c118c5844c1f5 assets/createindustry/blockstates/light_gray_concrete_stairs.json
|
||||
fb0edc8845d35010438896bb3b7770282815766d assets/createindustry/blockstates/light_gray_concrete_wall.json
|
||||
95bed1b1b1bcdf5de63118e205d2084ab1c62aad assets/createindustry/blockstates/lignite.json
|
||||
86a8208cb83793a1b46018c4a4e2d2883df56708 assets/createindustry/blockstates/limesand.json
|
||||
a653e0713238dcb16cc7a393eab9e984e2c4cd48 assets/createindustry/blockstates/lime_concrete.json
|
||||
a79d3cbd02aa473cbd2b5d922bcbee8bb069297d assets/createindustry/blockstates/lime_concrete_slab.json
|
||||
9c4c1babf6fd2ece5b33755e4093d90a9befc58e assets/createindustry/blockstates/lime_concrete_stairs.json
|
||||
@@ -153,13 +157,19 @@ e0630034aba4445702d39aef3299b684c76673d2 assets/createindustry/blockstates/plast
|
||||
a61dc809bdc16e362eb3d7cc2e351a4af8383dcc assets/createindustry/blockstates/polished_cut_bauxite_slab.json
|
||||
5549b547d5c295c8794205894a7b8aa61108612c assets/createindustry/blockstates/polished_cut_bauxite_stairs.json
|
||||
90b5a9dad00c8df5594dad7e38ebd52930f1f8f8 assets/createindustry/blockstates/polished_cut_bauxite_wall.json
|
||||
cddd63096db75d439f49a9adcda2dfceffb3cdd7 assets/createindustry/blockstates/pumpjack_base.json
|
||||
75646f4e5d638d0f708fc6fde6e79eeccbd82f15 assets/createindustry/blockstates/pumpjack_base.json
|
||||
e5a2e7df7999cb2ed93de381d1eae739d5761cc8 assets/createindustry/blockstates/pumpjack_crank.json
|
||||
d84472ec4488549b6c6761ddab3faa35d6739cb2 assets/createindustry/blockstates/pumpjack_hammer_holder.json
|
||||
2842c74b855f8585c3aa5b8b3b88fa2b7fbb8cf4 assets/createindustry/blockstates/pumpjack_hammer.json
|
||||
3deb1b3c6cac306c2cbb64d672b29071f8922913 assets/createindustry/blockstates/pumpjack_hammer_connector.json
|
||||
0fcc24d7447863893b29d09bc447f6fc7fbf3a34 assets/createindustry/blockstates/pumpjack_hammer_head.json
|
||||
32c2a749ee4c977d17823a44bf752934b9134cc6 assets/createindustry/blockstates/pumpjack_hammer_part.json
|
||||
f09f808e75c89fae044b9c6f495004e8cfcace89 assets/createindustry/blockstates/purple_concrete.json
|
||||
8752258a22b4d93a18de3f6808aca31ecef0d420 assets/createindustry/blockstates/purple_concrete_slab.json
|
||||
cadf8506d3b034033bae6a3712e444fe93fc3005 assets/createindustry/blockstates/purple_concrete_stairs.json
|
||||
602d8e5e0a5ccc17d03b2d46544d5e297c9d0ba9 assets/createindustry/blockstates/purple_concrete_wall.json
|
||||
603d2543f26195003cc8c72db73036610778f32a assets/createindustry/blockstates/radial_engine.json
|
||||
70de23ce5be9cb378a48244e8ba2ffb106afa460 assets/createindustry/blockstates/radial_engine_input.json
|
||||
0f90ab693b10fb8e89774a80d9ef54d9bd58e2f9 assets/createindustry/blockstates/radial_engine_input_ponder.json
|
||||
fcced0d2b802867a9851db5e3576a84325fb1527 assets/createindustry/blockstates/rebar_concrete.json
|
||||
69847a57049017f21b9b37bff1c6424b802fca3b assets/createindustry/blockstates/rebar_concrete_slab.json
|
||||
2c3f21e21bf8febbb992d6646d4c24a06c96376c assets/createindustry/blockstates/rebar_concrete_stairs.json
|
||||
@@ -183,6 +193,7 @@ e67bfac13d06829552862e60ddc8ba8bfc129228 assets/createindustry/blockstates/steel
|
||||
5886babd046ad3259f77a7a3a4e641e702ffcd6b assets/createindustry/blockstates/steel_fluid_tank.json
|
||||
137a8b1fc60285bc033dbdf12778ec7bbc394079 assets/createindustry/blockstates/steel_fluid_valve.json
|
||||
ae1eeb60729d163fc4892866cad74c57cea962cf assets/createindustry/blockstates/steel_flywheel.json
|
||||
a4500fc8d238098e6287768e19ba3bee0c350ec4 assets/createindustry/blockstates/steel_frame.json
|
||||
18fd7e6f7ad3b4f5c3e6365739bbd83c7acb713f assets/createindustry/blockstates/steel_ladder.json
|
||||
085922665ee5c62eb33386ba83e2c0ede6d4027f assets/createindustry/blockstates/steel_mechanical_pump.json
|
||||
6ab493e40dca3f409373aeb019b37a6964bb8d36 assets/createindustry/blockstates/steel_pipe.json
|
||||
@@ -201,8 +212,8 @@ b78c8d250e7ebaf757ee7c52828be3c265d2f872 assets/createindustry/blockstates/white
|
||||
d7114f093ed9d4700045f04469b7e83ea91f46bb assets/createindustry/blockstates/yellow_concrete_slab.json
|
||||
a3376853404f164207006a3e6797872b39748966 assets/createindustry/blockstates/yellow_concrete_stairs.json
|
||||
cf86260011f9890489b886d2f29eec92ca423f94 assets/createindustry/blockstates/yellow_concrete_wall.json
|
||||
af8d031afe8f743b21f6c6709106f22625fb489c assets/createindustry/lang/en_ud.json
|
||||
cdac5149ca89cad620f5beaf15f6ed53f5692c88 assets/createindustry/lang/en_us.json
|
||||
d070e535c6568f4190821d578d8c74fb261f09e6 assets/createindustry/lang/en_ud.json
|
||||
fb17d14dbb2db15980ab38a878d41a54d147278e assets/createindustry/lang/en_us.json
|
||||
c97ace9182228ac09c3decbeae4a1c5f19bf2729 assets/createindustry/models/block/aluminum_block.json
|
||||
eadb8c93c688022b4f6e9d928a09f6e3da7d1ff8 assets/createindustry/models/block/aluminum_cap.json
|
||||
57d4ce9c693d61ef313079fc379649847b0a226a assets/createindustry/models/block/aluminum_cap_alt.json
|
||||
@@ -436,7 +447,6 @@ ae510fefdb848506b4f036364c352481173128a5 assets/createindustry/models/block/ligh
|
||||
cd27684311c3a2f5cdc98261f126feb3b8617cd2 assets/createindustry/models/block/light_gray_concrete_wall_side.json
|
||||
79f333b041420f33972e44b881dfe91ad5e07541 assets/createindustry/models/block/light_gray_concrete_wall_side_tall.json
|
||||
e000d57a54b95702b3cd1c16d6f4703e81c2907d assets/createindustry/models/block/lignite.json
|
||||
b139caa4591897e77217d209c7143fd64db1a22a assets/createindustry/models/block/limesand.json
|
||||
d8ee20b80f653494f67aa554627d8f4dd74c337f assets/createindustry/models/block/lime_concrete.json
|
||||
375dc6d83799986f79ac70c22be47f670079883b assets/createindustry/models/block/lime_concrete_bottom.json
|
||||
7461dac3119bd50f1ff7746e32dcdf15e2b4ebd3 assets/createindustry/models/block/lime_concrete_stairs.json
|
||||
@@ -669,12 +679,13 @@ a9894a4751c14ceddcf13cfee01305ffa950aa17 assets/createindustry/models/item/cast_
|
||||
bed785632798f760451d7c2cd5245659352994d2 assets/createindustry/models/item/cast_iron_smart_fluid_pipe.json
|
||||
bb102f339788990402a4675237abcf05f7ae1010 assets/createindustry/models/item/caution_block.json
|
||||
35a49862fa70c47882d7d5cb47831075755bf0d8 assets/createindustry/models/item/cement.json
|
||||
ad6760c8517d2eca692dda94ab24cee82127ad78 assets/createindustry/models/item/charcoal_dust.json
|
||||
193ac78905aa8db6ea533d5aa207ae7e8355d01d assets/createindustry/models/item/coal_coke.json
|
||||
2df55d7b93afe66992be20528b7cb03d2dfd8326 assets/createindustry/models/item/coal_coke_block.json
|
||||
29b82a0ddc14e73adceb43f8e83425f0a4a2931c assets/createindustry/models/item/coal_coke_dust.json
|
||||
648a079836a33d371d25f404bbfde7f2ba9e2c03 assets/createindustry/models/item/coke_oven.json
|
||||
e777ecfdc7c4e356782cf094f998a990f8ba2c64 assets/createindustry/models/item/compact_engine.json
|
||||
46f56662bf3b0e99aeb8c05856fd18d241565ccb assets/createindustry/models/item/concrete.json
|
||||
464630ef86af6cca97825f56e3ea71bfbbd4c72a assets/createindustry/models/item/concrete_mixture.json
|
||||
0a1143ce48399a90b3c8686c834afcdd484cb98e assets/createindustry/models/item/concrete_slab.json
|
||||
2e3318e2d03c39c336cdf05abbba1dbff3573bc7 assets/createindustry/models/item/concrete_stairs.json
|
||||
ce1f6f960f1e440b39c9e63a62f04d2ced3758ad assets/createindustry/models/item/concrete_wall.json
|
||||
@@ -730,6 +741,10 @@ f5fb667375a46af9fe0c912dbf17e7ab3ab1e359 assets/createindustry/models/item/heavy
|
||||
11d94f7781a201b621cf983f8f62ba461a94fc88 assets/createindustry/models/item/industrial_pipe.json
|
||||
005e0eff39d8333ed5dfcb052c85e2a7a23545eb assets/createindustry/models/item/ingot_mold.json
|
||||
cfbcdeb84045805de391d11ce1b92919208c37cc assets/createindustry/models/item/kerosene_bucket.json
|
||||
3447d7f6014ce4b3cad86ebd5857db7e66e9fa54 assets/createindustry/models/item/large_pumpjack_hammer_connector.json
|
||||
de50273ea6fd0584de530333aec99e08b2cd9741 assets/createindustry/models/item/large_pumpjack_hammer_head.json
|
||||
e18d2b221804a5be6d74686611a155029a3dd72f assets/createindustry/models/item/large_pumpjack_hammer_part.json
|
||||
e764465c7be6c9b06a3800aca0f99794f4c201ca assets/createindustry/models/item/large_radial_engine.json
|
||||
d7a7d4fc5fcf2a1bbe56b43501a04f5aabd98459 assets/createindustry/models/item/layered_bauxite.json
|
||||
fb58c93d46093cc523944664ee965d9b5f27877c assets/createindustry/models/item/light_blue_concrete.json
|
||||
9691dc0d4a7e9b39fe35c0cce4b3a192e6d7baac assets/createindustry/models/item/light_blue_concrete_slab.json
|
||||
@@ -740,7 +755,7 @@ c13521ab7a3d7e386889b770c95dd5a826e24c6a assets/createindustry/models/item/light
|
||||
9383a8976fe3b662aaf31d812663cc155715d4e4 assets/createindustry/models/item/light_gray_concrete_stairs.json
|
||||
c8a9634fe09987babbc8e9aa934090adfae577d8 assets/createindustry/models/item/light_gray_concrete_wall.json
|
||||
721cb5ff317258671918097bcbf97190fb5cade3 assets/createindustry/models/item/lignite.json
|
||||
753240baeb93d46c423f83eef92647bc46bb0589 assets/createindustry/models/item/limesand.json
|
||||
ef4355a0b90c09a0a83b86aad0ccf5559ca5b654 assets/createindustry/models/item/limesand.json
|
||||
829094aced5c31b521ba8e2b2ac30cca838cc6db assets/createindustry/models/item/lime_concrete.json
|
||||
b24ad6cca7065be5e47a92fffbb3877b5093ff0a assets/createindustry/models/item/lime_concrete_slab.json
|
||||
b576ca63c1f0469b7a20aa235559166b4be13032 assets/createindustry/models/item/lime_concrete_stairs.json
|
||||
@@ -781,14 +796,19 @@ c50ba841e47e130f878acfb098692c66e57ed8f1 assets/createindustry/models/item/plast
|
||||
ee64549dca25b08c0c1a65f37baae463f573b328 assets/createindustry/models/item/polished_cut_bauxite_slab.json
|
||||
02868715b44fad3e3f997d0f43ea12fcaded3c3e assets/createindustry/models/item/polished_cut_bauxite_stairs.json
|
||||
79442f95a17215f0c06b41878421694834f8ec81 assets/createindustry/models/item/polished_cut_bauxite_wall.json
|
||||
d0653bcfb46753e542d1952ff2382a0536b2d854 assets/createindustry/models/item/pumpjack_base.json
|
||||
02ba8698be21bd1ce31e65d2729354fb06c141d7 assets/createindustry/models/item/pumpjack_base.json
|
||||
d8c739d1db200fee2dd200fb1cde9c7504c9371a assets/createindustry/models/item/pumpjack_crank.json
|
||||
80c34a9dbbeab1ef8f985151e17b35ed2e640bb1 assets/createindustry/models/item/pumpjack_hammer_holder.json
|
||||
84474748c5b9ebe104627ccebc75e7f1981e803e assets/createindustry/models/item/pumpjack_hammer.json
|
||||
ae9babca4e5b69002d52e6b8f6120247ed4cf93f assets/createindustry/models/item/pumpjack_hammer_connector.json
|
||||
a3da7ffe1ff48a349e1fa8c51fad45a039df21cb assets/createindustry/models/item/pumpjack_hammer_head.json
|
||||
551269d5d631800cc23c6df0f5dab49bd744270f assets/createindustry/models/item/pumpjack_hammer_part.json
|
||||
9122863d975fd4d33444c52d3c805b4a7b7786e7 assets/createindustry/models/item/purple_concrete.json
|
||||
c7a3707d0cae163e42949b7aca308e3d7402690c assets/createindustry/models/item/purple_concrete_slab.json
|
||||
842b58437912d821c0eef7bd674943d4fd1cd93d assets/createindustry/models/item/purple_concrete_stairs.json
|
||||
4284e0d3a310ae6398f007e99e899289d5c16461 assets/createindustry/models/item/purple_concrete_wall.json
|
||||
c0d138febefccd29a2f792ba36a7134a0d1fb7bc assets/createindustry/models/item/quad_potato_cannon.json
|
||||
ba910eb8a90456ab5be8fc74bcd1132816f46453 assets/createindustry/models/item/radial_engine.json
|
||||
ab46704feee1d54d47a205e4446a935084133cd3 assets/createindustry/models/item/radial_engine_input_ponder.json
|
||||
f97c2c92585febf752568efab2e4b32c42231c05 assets/createindustry/models/item/rebar.json
|
||||
5fb2b3ff8e7512192f82e0a10a068cf4f492cf5d assets/createindustry/models/item/rebar_concrete.json
|
||||
8ec23c118ed839444d06480276dc53f15cd64670 assets/createindustry/models/item/rebar_concrete_slab.json
|
||||
@@ -817,6 +837,7 @@ b2e00aeba06f4dc6ef642668a71558c809a05216 assets/createindustry/models/item/steel
|
||||
75e956841c1ae5d1e7787f2921f625d44693635c assets/createindustry/models/item/steel_fluid_tank.json
|
||||
a5f60256e5878ffc0ed8fb117e05ac20cb385905 assets/createindustry/models/item/steel_fluid_valve.json
|
||||
c1d40f4d0737b4c3040cb5ecda04f74f602807f0 assets/createindustry/models/item/steel_flywheel.json
|
||||
361d0bd340e8d5cd176d59001f0d5e3e0b79f31b assets/createindustry/models/item/steel_frame.json
|
||||
53bb4fe19f76818636bb36220cba9889f4ecf447 assets/createindustry/models/item/steel_ingot.json
|
||||
60cd0863e32adc6fa2b777708a6959195b929e06 assets/createindustry/models/item/steel_ladder.json
|
||||
95f6dbcbc73eb13123e40e99d9550da7a182c01f assets/createindustry/models/item/steel_mechanical_pump.json
|
||||
@@ -933,6 +954,7 @@ f7a35ff98a9eaad9fc74daaae746191d21d7ec8c data/createindustry/loot_tables/blocks/
|
||||
675103fce4bd18b9f7b4d9885226fbe5a8a99ad2 data/createindustry/loot_tables/blocks/cement.json
|
||||
fd15b78d7963ea4310b55055912d6855ae4845fe data/createindustry/loot_tables/blocks/coal_coke_block.json
|
||||
938a9baa63fd3d1df69a866bcda422f98a677f1e data/createindustry/loot_tables/blocks/coke_oven.json
|
||||
2bbc58709aec0cbeb580bbd25b781562103c60c3 data/createindustry/loot_tables/blocks/compact_engine.json
|
||||
ea91f39f0ccd4f69fd32d868b8f0b05315ff1899 data/createindustry/loot_tables/blocks/concrete.json
|
||||
a2c99ecb24b56640ba92a7015e9ba116dccc137f data/createindustry/loot_tables/blocks/concrete_slab.json
|
||||
4e82ad27235b31b27ed265952516c307a1c8689e data/createindustry/loot_tables/blocks/concrete_stairs.json
|
||||
@@ -985,6 +1007,10 @@ ef182f11c2e4a4452350cee98c2aa6d99b5ce8ff data/createindustry/loot_tables/blocks/
|
||||
7e723e2728a3e83ea86ce73fbfd08e795d3b3aba data/createindustry/loot_tables/blocks/heavy_casing_door.json
|
||||
2d52ad6c125ad6b0aff1f43296dcfab4445b958f data/createindustry/loot_tables/blocks/heavy_machinery_casing.json
|
||||
b98b84953f7591fab77725714125f48962ef4306 data/createindustry/loot_tables/blocks/industrial_pipe.json
|
||||
0c60c685c9feda940453d05722490e05371d8f8a data/createindustry/loot_tables/blocks/large_pumpjack_hammer_connector.json
|
||||
a7e55bd26dc98a102c4b8d83557c6b99660a8c45 data/createindustry/loot_tables/blocks/large_pumpjack_hammer_head.json
|
||||
f2cf5b37a9dcdbe19e37623f063b6822ea5f50f1 data/createindustry/loot_tables/blocks/large_pumpjack_hammer_part.json
|
||||
384872bbfa5f2423abb75ea424be63cdcd8903a2 data/createindustry/loot_tables/blocks/large_radial_engine.json
|
||||
36202757724a9230f132621bfea48a0c1ad16dc8 data/createindustry/loot_tables/blocks/layered_bauxite.json
|
||||
ea659af1eef0db680a0ed545a673830506069f1b data/createindustry/loot_tables/blocks/light_blue_concrete.json
|
||||
eccefd712ba060534af4fd362de90a2c371504a4 data/createindustry/loot_tables/blocks/light_blue_concrete_slab.json
|
||||
@@ -995,7 +1021,6 @@ c427efc226147fbf874e57ff13aaa925bf67d9b9 data/createindustry/loot_tables/blocks/
|
||||
7b5b83ac966ed7f6e05242ae993b6594b46f727c data/createindustry/loot_tables/blocks/light_gray_concrete_stairs.json
|
||||
8c77ea9aacf57209a13c87108112afda53606dc0 data/createindustry/loot_tables/blocks/light_gray_concrete_wall.json
|
||||
7ccc6c20cf1ba714e9a7a9da0a80791654c740df data/createindustry/loot_tables/blocks/lignite.json
|
||||
3bd5f0823f65c407f65986b20e22e2c5bfa0db35 data/createindustry/loot_tables/blocks/limesand.json
|
||||
159bb60da99bd435ec12a3eb09de5c1f73609da0 data/createindustry/loot_tables/blocks/lime_concrete.json
|
||||
6a9b934b3ff9064cd67ca288d9b87013ea689540 data/createindustry/loot_tables/blocks/lime_concrete_slab.json
|
||||
d47a209bf2e0462acb46cec60c989c3d127e1594 data/createindustry/loot_tables/blocks/lime_concrete_stairs.json
|
||||
@@ -1028,11 +1053,17 @@ a448f23ebfbc0a9b66d4d79defbab722539a3924 data/createindustry/loot_tables/blocks/
|
||||
00ab1c448665bdf777cebb46565938f03480eec4 data/createindustry/loot_tables/blocks/polished_cut_bauxite_wall.json
|
||||
aad1729e6dbef82af67a4b43b4968c439504aabe data/createindustry/loot_tables/blocks/pumpjack_base.json
|
||||
d2ae42a8f7604ecbb3ebbf4bc987b615aa179ae1 data/createindustry/loot_tables/blocks/pumpjack_crank.json
|
||||
6586f5afb391c540a0af9c29947cf6a2e0a03067 data/createindustry/loot_tables/blocks/pumpjack_hammer_holder.json
|
||||
6401db2a15249d4fa68e94bea3ed973226812148 data/createindustry/loot_tables/blocks/pumpjack_hammer.json
|
||||
40dbe570b9fa83a288fa6690827635154e351321 data/createindustry/loot_tables/blocks/pumpjack_hammer_connector.json
|
||||
66a1c1ca6b4cd182a52abbb04f3d43ffa471dac5 data/createindustry/loot_tables/blocks/pumpjack_hammer_head.json
|
||||
fcc864612499add4fdd1083bda8f12502c7f89c0 data/createindustry/loot_tables/blocks/pumpjack_hammer_part.json
|
||||
6d9d8f55548f73fa44cd366cb2f22be512506089 data/createindustry/loot_tables/blocks/purple_concrete.json
|
||||
d7a54d6540bb3a609cdb5f329249a468c674bb1d data/createindustry/loot_tables/blocks/purple_concrete_slab.json
|
||||
3704829c4bedf58a98778b194e2db376c102a334 data/createindustry/loot_tables/blocks/purple_concrete_stairs.json
|
||||
e165cfb9f05b567d9ab101cd034d2321f2f3fe3a data/createindustry/loot_tables/blocks/purple_concrete_wall.json
|
||||
6909e43d91446bbfe146430be8b47b45675da9fa data/createindustry/loot_tables/blocks/radial_engine.json
|
||||
2b2a4bde1a1c86393b28fa3ff9b81ef1ddeed22d data/createindustry/loot_tables/blocks/radial_engine_input.json
|
||||
eea006aac612670486911b9d77506e72d4f44164 data/createindustry/loot_tables/blocks/radial_engine_input_ponder.json
|
||||
97594b849f65183d066d62d28ef577d954acbe6c data/createindustry/loot_tables/blocks/rebar_concrete.json
|
||||
c26bcc0c97d7b373ff6697588363b52d44f1544f data/createindustry/loot_tables/blocks/rebar_concrete_slab.json
|
||||
416753ec919ce10eefabe68c3f60ccb79cee4e1d data/createindustry/loot_tables/blocks/rebar_concrete_stairs.json
|
||||
@@ -1056,6 +1087,7 @@ a52d0c8c33106e7f2ea3342ee3f26e4457c6c008 data/createindustry/loot_tables/blocks/
|
||||
581627e80dfff55451940f5ba16f0a0a276d941e data/createindustry/loot_tables/blocks/steel_fluid_tank.json
|
||||
731e5c53f236e83d1eadff24845b9d93fefb2d3a data/createindustry/loot_tables/blocks/steel_fluid_valve.json
|
||||
c5e7e815ddeaf8ed3a5a588b2569bd39318dd55a data/createindustry/loot_tables/blocks/steel_flywheel.json
|
||||
0b2875eb6e183e7967a681f3b06872869c667a9b data/createindustry/loot_tables/blocks/steel_frame.json
|
||||
9b0fa6990106e85b02d59b83ccc680e16d02c250 data/createindustry/loot_tables/blocks/steel_ladder.json
|
||||
3c58fec9a8916214c2dda801e669881bad022944 data/createindustry/loot_tables/blocks/steel_mechanical_pump.json
|
||||
b1937dfe872021eda9cf0cae6c39e472abc96016 data/createindustry/loot_tables/blocks/steel_pipe.json
|
||||
@@ -1118,7 +1150,7 @@ b36ae4afda731f02f9e9b90da534184e4e6300f0 data/createindustry/recipes/small_bauxi
|
||||
9790752bec1ad9dc61eb08c66e62caa28516713c data/createindustry/tags/items/stone_types/bauxite.json
|
||||
5117a7556fb8ef2531c9953e9923b8fb0ce8e3d6 data/create/tags/blocks/casing.json
|
||||
f562d1124549d82b6df1ef54fc09a15a5ada6b4d data/create/tags/blocks/fan_transparent.json
|
||||
a1e826938b1ea4d7a873ec4fc1ea87c8237217e6 data/create/tags/blocks/safe_nbt.json
|
||||
2ef30f5022955fbdc71af33650e35162e681760a data/create/tags/blocks/safe_nbt.json
|
||||
f562d1124549d82b6df1ef54fc09a15a5ada6b4d data/create/tags/blocks/wrench_pickup.json
|
||||
5117a7556fb8ef2531c9953e9923b8fb0ce8e3d6 data/create/tags/items/casing.json
|
||||
23cf02cfaf4f4efd7feb2a328e623fc63523216b data/create/tags/items/contraption_controlled.json
|
||||
@@ -1140,7 +1172,6 @@ bb6ed3bebbde28633a04b3c36c5ddfa2b761e2c1 data/forge/tags/items/buckets/naphtha.j
|
||||
9fbe71f4776547000044bcc08054bb6ab2da4639 data/forge/tags/items/buckets/slag.json
|
||||
94945bea02cca0bfa9c9c05fa16b5533f47024c0 data/forge/tags/items/buckets/steel.json
|
||||
ecf1a4c60ac630afe103f9d1c8bfea432158bdf9 data/forge/tags/items/concrete.json
|
||||
d3d09e8b5b11e9272ed9e56093116cd3d82226f3 data/forge/tags/items/dusts/charcoal.json
|
||||
8d6fdd619eb49c2a6d8ee3f30138b6aa1c24a9a8 data/forge/tags/items/dusts/coal_coke.json
|
||||
a5782b1478ab73e6bc6582e4008338de550b3fc6 data/forge/tags/items/factory_floor.json
|
||||
6f21498ac0f4c376952c9c596a4813ec0919e966 data/forge/tags/items/ingots/aluminum.json
|
||||
@@ -1159,8 +1190,8 @@ c93e03d746cae5143427d5605bebd2b2a4006219 data/minecraft/tags/blocks/azalea_root_
|
||||
23cf02cfaf4f4efd7feb2a328e623fc63523216b data/minecraft/tags/blocks/doors.json
|
||||
c93e03d746cae5143427d5605bebd2b2a4006219 data/minecraft/tags/blocks/dripstone_replaceable_blocks.json
|
||||
c93e03d746cae5143427d5605bebd2b2a4006219 data/minecraft/tags/blocks/lush_ground_replaceable.json
|
||||
97796d300c6a1759abe459ae9175556a17a7e568 data/minecraft/tags/blocks/mineable/axe.json
|
||||
320d34c446d48da3b1c279110605bfbdefac98db data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
282ca3bd0a5dfdaa604a604f844547fcc4be5306 data/minecraft/tags/blocks/mineable/axe.json
|
||||
bf3205140c002e511521c7229d076cbcdcc53473 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
c93e03d746cae5143427d5605bebd2b2a4006219 data/minecraft/tags/blocks/moss_replaceable.json
|
||||
8a3dfd27452a21f14ee2a9936ddc357c3dbb9ae4 data/minecraft/tags/blocks/needs_diamond_tool.json
|
||||
c0d6e4e469f0314abef1f5221459942b0ea29558 data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// 1.19.2 2023-11-25T12:00:36.1649844 Create: The Factory Must Grow's lang merger
|
||||
97056374597c49ee4a8014ca906c9815a82274d9 assets/createindustry/lang/en_us.json
|
||||
// 1.19.2 2024-01-12T20:54:31.7261534 Create: The Factory Must Grow's lang merger
|
||||
98af1b1ba96b233fd0d321a932d7f5dcde5e7f19 assets/createindustry/lang/en_us.json
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "createindustry:block/compact_engine/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/compact_engine/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/compact_engine/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/compact_engine/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"model": "createindustry:block/compact_engine/block",
|
||||
"x": 270,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/compact_engine/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_connector",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_connector"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_connector",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_connector",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_head",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_head"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_head",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_head",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_part",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_part"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_part",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/large_pumpjack_hammer_part",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "createindustry:block/large_radial_engine/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/large_radial_engine/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/large_radial_engine/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/large_radial_engine/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"model": "createindustry:block/large_radial_engine/block",
|
||||
"x": 270,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/large_radial_engine/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "createindustry:block/limesand"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/pumpjack_base/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"": {
|
||||
"model": "createindustry:block/pumpjack_base/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/pumpjack_base/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/pumpjack_base/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=down,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide",
|
||||
"y": 180
|
||||
},
|
||||
"facing=east,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block"
|
||||
},
|
||||
"facing=east,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide"
|
||||
},
|
||||
"facing=north,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block",
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide",
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide",
|
||||
"y": 90
|
||||
},
|
||||
"facing=up,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,wide=false": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,wide=true": {
|
||||
"model": "createindustry:block/pumpjack_hammer/block_wide",
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/pumpjack_hammer_connector",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/pumpjack_hammer_connector"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/pumpjack_hammer_connector",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/pumpjack_hammer_connector",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/pumpjack_hammer_head",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/pumpjack_hammer_head"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/pumpjack_hammer_head",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/pumpjack_hammer_head",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/pumpjack_hammer_holder/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/pumpjack_hammer_holder/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/pumpjack_hammer_holder/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/pumpjack_hammer_holder/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/pumpjack_hammer_part",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/pumpjack_hammer_part"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/pumpjack_hammer_part",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/pumpjack_hammer_part",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "createindustry:block/radial_engine/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/radial_engine/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/radial_engine/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/radial_engine/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"model": "createindustry:block/radial_engine/block",
|
||||
"x": 270,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/radial_engine/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "createindustry:block/radial_engine_input",
|
||||
"x": 180
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "createindustry:block/radial_engine_input",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "createindustry:block/radial_engine_input",
|
||||
"x": 90
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "createindustry:block/radial_engine_input",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"model": "createindustry:block/radial_engine_input"
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "createindustry:block/radial_engine_input",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "createindustry:block/radial_engine_input_ponder/block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "createindustry:block/steel_frame/block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@
|
||||
"block.createindustry.cement": "ʇuǝɯǝƆ",
|
||||
"block.createindustry.coal_coke_block": "ǝʞoƆ ןɐoƆ ɟo ʞɔoןᗺ",
|
||||
"block.createindustry.coke_oven": "uǝʌO ǝʞoƆ",
|
||||
"block.createindustry.compact_engine": "ǝuıbuƎ ʇɔɐdɯoƆ",
|
||||
"block.createindustry.concrete": "ǝʇǝɹɔuoƆ",
|
||||
"block.createindustry.concrete_slab": "qɐןS ǝʇǝɹɔuoƆ",
|
||||
"block.createindustry.concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ",
|
||||
@@ -103,6 +104,10 @@
|
||||
"block.createindustry.heavy_oil": "ןıO ʎʌɐǝH",
|
||||
"block.createindustry.industrial_pipe": "ǝdıԀ ןɐıɹʇsnpuI",
|
||||
"block.createindustry.kerosene": "ǝuǝsoɹǝʞ",
|
||||
"block.createindustry.large_pumpjack_hammer_connector": "ɹoʇɔǝuuoƆ ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝbɹɐꞀ",
|
||||
"block.createindustry.large_pumpjack_hammer_head": "pɐǝH ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝbɹɐꞀ",
|
||||
"block.createindustry.large_pumpjack_hammer_part": "ʇɹɐԀ ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝbɹɐꞀ",
|
||||
"block.createindustry.large_radial_engine": "ǝuıbuƎ ןɐıpɐᴚ ǝbɹɐꞀ",
|
||||
"block.createindustry.layered_bauxite": "ǝʇıxnɐᗺ pǝɹǝʎɐꞀ",
|
||||
"block.createindustry.light_blue_concrete": "ǝʇǝɹɔuoƆ ǝnןᗺ ʇɥbıꞀ",
|
||||
"block.createindustry.light_blue_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ǝnןᗺ ʇɥbıꞀ",
|
||||
@@ -117,7 +122,6 @@
|
||||
"block.createindustry.lime_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ǝɯıꞀ",
|
||||
"block.createindustry.lime_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ǝɯıꞀ",
|
||||
"block.createindustry.lime_concrete_wall": "ןןɐM ǝʇǝɹɔuoƆ ǝɯıꞀ",
|
||||
"block.createindustry.limesand": "puɐsǝɯıꞀ",
|
||||
"block.createindustry.liquid_asphalt": "ʇןɐɥdsⱯ pınbıꞀ",
|
||||
"block.createindustry.liquid_concrete": "ǝʇǝɹɔuoƆ pınbıꞀ",
|
||||
"block.createindustry.liquid_plastic": "ɔıʇsɐןԀ pınbıꞀ",
|
||||
@@ -155,11 +159,17 @@
|
||||
"block.createindustry.polished_cut_bauxite_wall": "ןןɐM ǝʇıxnɐᗺ ʇnƆ pǝɥsıןoԀ",
|
||||
"block.createindustry.pumpjack_base": "ǝsɐᗺ ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_crank": "ʞuɐɹƆ ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_hammer_holder": "ɹǝpןoH ɹǝɯɯɐH ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_hammer": "ɹǝpןoH ɹǝɯɯɐH ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_hammer_connector": "ɹoʇɔǝuuoƆ ɹǝɯɯɐH ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_hammer_head": "pɐǝH ɹǝɯɯɐH ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.pumpjack_hammer_part": "ʇɹɐԀ ɹǝɯɯɐH ʞɔɐظdɯnԀ",
|
||||
"block.createindustry.purple_concrete": "ǝʇǝɹɔuoƆ ǝןdɹnԀ",
|
||||
"block.createindustry.purple_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ǝןdɹnԀ",
|
||||
"block.createindustry.purple_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ǝןdɹnԀ",
|
||||
"block.createindustry.purple_concrete_wall": "ןןɐM ǝʇǝɹɔuoƆ ǝןdɹnԀ",
|
||||
"block.createindustry.radial_engine": "ǝuıbuƎ ןɐıpɐᴚ",
|
||||
"block.createindustry.radial_engine_input": "ʇnduI ǝuıbuƎ ןɐıpɐᴚ",
|
||||
"block.createindustry.radial_engine_input_ponder": "ɹǝpuoԀ ʇnduI ǝuıbuƎ ןɐıpɐᴚ",
|
||||
"block.createindustry.rebar_concrete": "ǝʇǝɹɔuoƆ ɹɐqǝᴚ",
|
||||
"block.createindustry.rebar_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ɹɐqǝᴚ",
|
||||
"block.createindustry.rebar_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ɹɐqǝᴚ",
|
||||
@@ -183,6 +193,7 @@
|
||||
"block.createindustry.steel_fluid_tank": "ʞuɐ⟘ pınןℲ ןǝǝʇS",
|
||||
"block.createindustry.steel_fluid_valve": "ǝʌןɐΛ pınןℲ ןǝǝʇS",
|
||||
"block.createindustry.steel_flywheel": "ןǝǝɥʍʎןℲ ןǝǝʇS",
|
||||
"block.createindustry.steel_frame": "ǝɯɐɹℲ ןǝǝʇS",
|
||||
"block.createindustry.steel_ladder": "ɹǝppɐꞀ ןǝǝʇS",
|
||||
"block.createindustry.steel_mechanical_pump": "dɯnԀ ןɐɔıuɐɥɔǝW ןǝǝʇS",
|
||||
"block.createindustry.steel_pipe": "ǝdıԀ ןǝǝʇS",
|
||||
@@ -235,9 +246,9 @@
|
||||
"item.createindustry.blasting_mixture": "ǝɹnʇxıW buıʇsɐןᗺ",
|
||||
"item.createindustry.block_mold": "pןoW ʞɔoןᗺ",
|
||||
"item.createindustry.cast_iron_ingot": "ʇobuI uoɹI ʇsɐƆ",
|
||||
"item.createindustry.charcoal_dust": "ʇsnᗡ ןɐoɔɹɐɥƆ",
|
||||
"item.createindustry.coal_coke": "ǝʞoƆ ןɐoƆ",
|
||||
"item.createindustry.coal_coke_dust": "ʇsnᗡ ǝʞoƆ ןɐoƆ",
|
||||
"item.createindustry.concrete_mixture": "ǝɹnʇxıW ǝʇǝɹɔuoƆ",
|
||||
"item.createindustry.cooling_fluid_bucket": "ʇǝʞɔnᗺ pınןℲ buıןooƆ",
|
||||
"item.createindustry.copper_grenade": "ǝpɐuǝɹ⅁ ɹǝddoƆ",
|
||||
"item.createindustry.creosote_bucket": "ʇǝʞɔnᗺ ǝʇosoǝɹƆ",
|
||||
@@ -252,6 +263,7 @@
|
||||
"item.createindustry.heavy_plate": "ǝʇɐןԀ ʎʌɐǝH",
|
||||
"item.createindustry.ingot_mold": "pןoW ʇobuI",
|
||||
"item.createindustry.kerosene_bucket": "ʇǝʞɔnᗺ ǝuǝsoɹǝʞ",
|
||||
"item.createindustry.limesand": "puɐsǝɯıꞀ",
|
||||
"item.createindustry.liquid_asphalt_bucket": "ʇǝʞɔnᗺ ʇןɐɥdsⱯ pınbıꞀ",
|
||||
"item.createindustry.liquid_concrete_bucket": "ʇǝʞɔnᗺ ǝʇǝɹɔuoƆ pınbıꞀ",
|
||||
"item.createindustry.liquid_plastic_bucket": "ʇǝʞɔnᗺ ɔıʇsɐןԀ pınbıꞀ",
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
"block.createindustry.cement": "Cement",
|
||||
"block.createindustry.coal_coke_block": "Block of Coal Coke",
|
||||
"block.createindustry.coke_oven": "Coke Oven",
|
||||
"block.createindustry.compact_engine": "Compact Engine",
|
||||
"block.createindustry.concrete": "Concrete",
|
||||
"block.createindustry.concrete_slab": "Concrete Slab",
|
||||
"block.createindustry.concrete_stairs": "Concrete Stairs",
|
||||
@@ -106,6 +107,10 @@
|
||||
"block.createindustry.heavy_oil": "Heavy Oil",
|
||||
"block.createindustry.industrial_pipe": "Industrial Pipe",
|
||||
"block.createindustry.kerosene": "Kerosene",
|
||||
"block.createindustry.large_pumpjack_hammer_connector": "Large Pumpjack Hammer Connector",
|
||||
"block.createindustry.large_pumpjack_hammer_head": "Large Pumpjack Hammer Head",
|
||||
"block.createindustry.large_pumpjack_hammer_part": "Large Pumpjack Hammer Part",
|
||||
"block.createindustry.large_radial_engine": "Large Radial Engine",
|
||||
"block.createindustry.layered_bauxite": "Layered Bauxite",
|
||||
"block.createindustry.light_blue_concrete": "Light Blue Concrete",
|
||||
"block.createindustry.light_blue_concrete_slab": "Light Blue Concrete Slab",
|
||||
@@ -120,7 +125,6 @@
|
||||
"block.createindustry.lime_concrete_slab": "Lime Concrete Slab",
|
||||
"block.createindustry.lime_concrete_stairs": "Lime Concrete Stairs",
|
||||
"block.createindustry.lime_concrete_wall": "Lime Concrete Wall",
|
||||
"block.createindustry.limesand": "Limesand",
|
||||
"block.createindustry.liquid_asphalt": "Liquid Asphalt",
|
||||
"block.createindustry.liquid_concrete": "Liquid Concrete",
|
||||
"block.createindustry.liquid_plastic": "Liquid Plastic",
|
||||
@@ -158,11 +162,17 @@
|
||||
"block.createindustry.polished_cut_bauxite_wall": "Polished Cut Bauxite Wall",
|
||||
"block.createindustry.pumpjack_base": "Pumpjack Base",
|
||||
"block.createindustry.pumpjack_crank": "Pumpjack Crank",
|
||||
"block.createindustry.pumpjack_hammer_holder": "Pumpjack Hammer Holder",
|
||||
"block.createindustry.pumpjack_hammer": "Pumpjack Hammer Holder",
|
||||
"block.createindustry.pumpjack_hammer_connector": "Pumpjack Hammer Connector",
|
||||
"block.createindustry.pumpjack_hammer_head": "Pumpjack Hammer Head",
|
||||
"block.createindustry.pumpjack_hammer_part": "Pumpjack Hammer Part",
|
||||
"block.createindustry.purple_concrete": "Purple Concrete",
|
||||
"block.createindustry.purple_concrete_slab": "Purple Concrete Slab",
|
||||
"block.createindustry.purple_concrete_stairs": "Purple Concrete Stairs",
|
||||
"block.createindustry.purple_concrete_wall": "Purple Concrete Wall",
|
||||
"block.createindustry.radial_engine": "Radial Engine",
|
||||
"block.createindustry.radial_engine_input": "Radial Engine Input",
|
||||
"block.createindustry.radial_engine_input_ponder": "Radial Engine Input Ponder",
|
||||
"block.createindustry.rebar_concrete": "Rebar Concrete",
|
||||
"block.createindustry.rebar_concrete_slab": "Rebar Concrete Slab",
|
||||
"block.createindustry.rebar_concrete_stairs": "Rebar Concrete Stairs",
|
||||
@@ -186,6 +196,7 @@
|
||||
"block.createindustry.steel_fluid_tank": "Steel Fluid Tank",
|
||||
"block.createindustry.steel_fluid_valve": "Steel Fluid Valve",
|
||||
"block.createindustry.steel_flywheel": "Steel Flywheel",
|
||||
"block.createindustry.steel_frame": "Steel Frame",
|
||||
"block.createindustry.steel_ladder": "Steel Ladder",
|
||||
"block.createindustry.steel_mechanical_pump": "Steel Mechanical Pump",
|
||||
"block.createindustry.steel_pipe": "Steel Pipe",
|
||||
@@ -241,9 +252,9 @@
|
||||
"item.createindustry.blasting_mixture": "Blasting Mixture",
|
||||
"item.createindustry.block_mold": "Block Mold",
|
||||
"item.createindustry.cast_iron_ingot": "Cast Iron Ingot",
|
||||
"item.createindustry.charcoal_dust": "Charcoal Dust",
|
||||
"item.createindustry.coal_coke": "Coal Coke",
|
||||
"item.createindustry.coal_coke_dust": "Coal Coke Dust",
|
||||
"item.createindustry.concrete_mixture": "Concrete Mixture",
|
||||
"item.createindustry.cooling_fluid_bucket": "Cooling Fluid Bucket",
|
||||
"item.createindustry.copper_grenade": "Copper Grenade",
|
||||
"item.createindustry.creosote_bucket": "Creosote Bucket",
|
||||
@@ -258,6 +269,7 @@
|
||||
"item.createindustry.heavy_plate": "Heavy Plate",
|
||||
"item.createindustry.ingot_mold": "Ingot Mold",
|
||||
"item.createindustry.kerosene_bucket": "Kerosene Bucket",
|
||||
"item.createindustry.limesand": "Limesand",
|
||||
"item.createindustry.liquid_asphalt_bucket": "Liquid Asphalt Bucket",
|
||||
"item.createindustry.liquid_concrete_bucket": "Liquid Concrete Bucket",
|
||||
"item.createindustry.liquid_plastic_bucket": "Liquid Plastic Bucket",
|
||||
@@ -287,141 +299,6 @@
|
||||
"item.createindustry.unprocessed_heavy_plate": "Unprocessed Heavy Plate",
|
||||
"item.createindustry.zinc_grenade": "Zinc Grenade",
|
||||
|
||||
"itemGroup.createindustry.base": "Create: The Factory Must Grow",
|
||||
"itemGroup.createindustry.building": "Create: TFMG Building Blocks",
|
||||
|
||||
"create.goggles.misc.number": "%1$s",
|
||||
"create.goggles.misc.percent_symbol": "%",
|
||||
"create.goggles.misc.dot_one": ".",
|
||||
"create.goggles.misc.dot_two": "..",
|
||||
"create.goggles.misc.dot_three": "...",
|
||||
"create.goggles.misc.storage_info": "Storage Info:",
|
||||
"create.goggles.fluid_in_tank": "Tank Contents:",
|
||||
"create.goggles.surface_scanner.no_rotation": "Machine Unpowered",
|
||||
"create.goggles.surface_scanner.no_deposit": "No Deposit Found",
|
||||
"create.goggles.surface_scanner.deposit_found": "Deposit Located!",
|
||||
"create.goggles.surface_scanner.distance": "Distance: %1$s Blocks",
|
||||
"create.goggles.surface_scanner.scanning_surface": "Scanning The Surface...",
|
||||
"create.goggles.distillation_tower.status": "Distillation Tower Info:",
|
||||
"create.goggles.distillation_tower.tank_not_found": "Steel Fluid Tank Not Found",
|
||||
"create.goggles.distillation_tower.not_tall_enough": "The Fluid Tank is Too Short",
|
||||
"create.goggles.distillation_tower.level": "Distillation Tower Level: %1$s",
|
||||
"create.goggles.distillation_tower.found_outputs": "Number of Outputs: %1$s",
|
||||
"create.goggles.distillation_tower.no_outputs": "No Output Blocks Found",
|
||||
"create.goggles.blast_furnace.stats": "Blast Furnace:",
|
||||
"create.goggles.blast_furnace.size_stats": "Size:",
|
||||
"create.goggles.blast_furnace.fuel_amount": "Fuel Amount: %1$s",
|
||||
"create.goggles.blast_furnace.item_count": "Item Count: %1$s",
|
||||
"create.goggles.blast_furnace.height": "Height: %1$s",
|
||||
"create.goggles.blast_furnace.nothing_lol": "",
|
||||
"create.goggles.blast_furnace.status.off": "Status: Idle",
|
||||
"create.goggles.blast_furnace.status.running": "Status: Running",
|
||||
"create.goggles.blast_furnace.diameter.one": "Diameter: 1",
|
||||
"create.goggles.blast_furnace.diameter.two": "Diameter: 2",
|
||||
"create.goggles.blast_furnace.invalid": "Blast Furnace Invalid",
|
||||
"create.goggles.coke_oven.status": "Coke Oven:",
|
||||
"create.goggles.coke_oven.fluid_amount_output": "Internal Tank Contents: %1$s mb",
|
||||
"create.goggles.coke_oven.fluid_amount_exhaust": "Carbon Dioxide: %1$s mb",
|
||||
"create.goggles.coke_oven.item_count": "Internal Storage Item Count: %1$s",
|
||||
"create.goggles.coke_oven.invalid": "Coke Oven Invalid",
|
||||
"create.goggles.coke_oven.tank_full": "An Internal Tank is Full",
|
||||
"create.goggles.coke_oven.progress": "Progress: %1$s",
|
||||
"create.goggles.engine_stats": "Engine Stats:",
|
||||
"create.goggles.engine_exhaust_stats": "Engine Exhaust Stats:",
|
||||
"create.goggles.fuel_container": "Fluid Storage",
|
||||
"create.goggles.engine.backpartmissing": "Back Part Missing:",
|
||||
"create.goggles.engine_redstone_input": "Speed:",
|
||||
"create.goggles.engine.efficiency": "Efficiency:",
|
||||
|
||||
"create.tooltip.engine_analog_strength": "%1$s/15",
|
||||
|
||||
"create.goggles.get_engine_efficiency": "%1$s",
|
||||
"create.goggles.engine.stress": "%1$ssu",
|
||||
"create.goggles.diesel_engine.info": "Diesel Engine:",
|
||||
"create.goggles.pumpjack_info": "Pumpjack Info:",
|
||||
"create.goggles.pumpjack.part_missing": "Hammer or Crank Missing",
|
||||
"create.goggles.pumpjack.wrong_rotation1": "The Pumpjack Base is oriented incorrectly, the red marker must",
|
||||
"create.goggles.pumpjack.wrong_rotation2": "face away from the Pumpjack Hammer Holder",
|
||||
"create.goggles.pumpjack_fluid_storage": "Fluid Tank Info:",
|
||||
|
||||
"create.pumpjack_deposit_amount": "%1$s Buckets",
|
||||
|
||||
"create.goggles.pumpjack.deposit_info": "Deposit Info:",
|
||||
"create.goggles.zero": "No Deposit Found",
|
||||
"create.goggles.pumpjack.fluid_amount": "Fluid Amount:",
|
||||
"create.goggles.machine_input.info": "Machine Input Info",
|
||||
"create.goggles.machine_input.no_rot": "No Rotation Provided!",
|
||||
"create.goggles.machine_input.power_level": "Power Level: ",
|
||||
|
||||
"create.recipe.distillation": "Distillation",
|
||||
"create.recipe.advanced_distillation": "Advanced Distillation",
|
||||
"create.recipe.industrial_blasting": "Industrial Blasting",
|
||||
"create.recipe.casting": "Casting",
|
||||
"create.recipe.coking": "Coking",
|
||||
|
||||
"createindustry.ponder.small_engines.text_1": "To create a small engine, place the front and back parts adjacent to eachother",
|
||||
"createindustry.ponder.small_engines.text_2": "Fuel is inputted into the front part, and exhaust must be removed from the back part using pipes and an exhaust block",
|
||||
"createindustry.ponder.small_engines.text_3": "Applying a redstone signal to the front part starts the engine",
|
||||
"createindustry.ponder.small_engines.text_4": "Small engines include LPG, kerosene and gasoline engines",
|
||||
"createindustry.ponder.diesel_engine.text_1": "Diesel Engines are assembled by placing a shaft infront of a Diesel Engine block",
|
||||
"createindustry.ponder.diesel_engine.text_2": "The engine produces exhaust gas which has to be removed with pipes and an exhaust block",
|
||||
"createindustry.ponder.diesel_engine.text_3": "Air is needed for the engine to run, so an Air Intake is required",
|
||||
"createindustry.ponder.diesel_engine_expansion.text_1": "Diesel Engine Expansions can give a Diesel Engine two new input slots, for lubrication and radiator fluids",
|
||||
"createindustry.ponder.surface_scanner.text_1": "The Surface Scanner is used to locate crude oil deposits",
|
||||
"createindustry.ponder.surface_scanner.text_2": "Providing the machine with rotational power makes it scan for the nearest deposit",
|
||||
"createindustry.ponder.surface_scanner.text_3": "If a deposit is found, the compass will point towards its location",
|
||||
"createindustry.ponder.pumpjack.text_1": "To start extracting Oil, you must first build a pipeline on top of a deposit using Industrial Pipes",
|
||||
"createindustry.ponder.pumpjack.text_2": "Then, construct a Pumpjack on top of the pipeline by first placing down a Pumpjack Base...",
|
||||
"createindustry.ponder.pumpjack.text_3": "Placing the Pumpjack Hammer behind it...",
|
||||
"createindustry.ponder.pumpjack.text_4": "And finally, placing the Machine Input with a Pumpjack Crank above it, as shown in the scene",
|
||||
"createindustry.ponder.distillation_tower.text_1": "A sufficiently large Steel Fluid Tank can be turned into a Distillation Tower",
|
||||
"createindustry.ponder.distillation_tower.text_2": "The tower is assembled by first placing a Steel Distillation Tower Controller next to the tank...",
|
||||
"createindustry.ponder.distillation_tower.text_3": "And placing up to 6 Distillation Tower Outputs, all connected with Industrial Pipes",
|
||||
"createindustry.ponder.distillation_tower.text_4": "Blaze Burners are required to run the Distillation Tower. The dial displays current power levels",
|
||||
"createindustry.ponder.distillation_tower.text_5": "To input Crude Oil, it must be pumped into the controller block",
|
||||
"createindustry.ponder.distillation_tower.text_6": "Each output block provides one of the Oil byproducts",
|
||||
"createindustry.ponder.distillation_tower.text_7": "LPG",
|
||||
"createindustry.ponder.distillation_tower.text_8": "Gasoline",
|
||||
"createindustry.ponder.distillation_tower.text_9": "Naphtha",
|
||||
"createindustry.ponder.distillation_tower.text_10": "Kerosene",
|
||||
"createindustry.ponder.distillation_tower.text_11": "Diesel",
|
||||
"createindustry.ponder.distillation_tower.text_12": "Heavy Oil",
|
||||
"createindustry.ponder.blast_furnace.text_1": "The base of the Blast Furnace is a Blast Furnace Output block",
|
||||
"createindustry.ponder.blast_furnace.text_2": "To assemble a Blast Furnace, construct a chimney using Fireproof Bricks as shown in the scene",
|
||||
"createindustry.ponder.blast_furnace.text_3": "The bottom half of the chimney requires to be reinforced",
|
||||
"createindustry.ponder.blast_furnace.text_4": "Fuel and other items are inserted through the opening at the top",
|
||||
"createindustry.ponder.coke_oven.text_1": "The Coke Oven is built by placing Coke Oven blocks as shown in the scene, and clicking its side with a wrench",
|
||||
"createindustry.ponder.coke_oven.text_2": "The process of coking is slow, so it is more efficient to have long arrays of ovens working simultaneously",
|
||||
"createindustry.ponder.coke_oven.text_3": "Coal can be inputted from any side",
|
||||
"createindustry.ponder.coke_oven.text_4": "While running, the oven produces Creosote and CO2 which have to be pumped out for it to function",
|
||||
"createindustry.ponder.coke_oven.text_5": "Once done, Coal Coke will drop out of the opening",
|
||||
"createindustry.ponder.casting.text_1": "Casting is the process of pouring liquid metal into a Casting Basin using a Casting Spout",
|
||||
"createindustry.ponder.casting.text_2": "The Casting Basin, obviously, requires a mold to function",
|
||||
|
||||
"createindustry.ponder.distillation_tower.header": "Distillation Tower Setup",
|
||||
|
||||
"createindustry.ponder.pumpjack.header": "Building Pumpjacks",
|
||||
|
||||
"createindustry.ponder.surface_scanner.header": "Locating Oil",
|
||||
|
||||
"createindustry.ponder.diesel_engine.header": "Building a Diesel Engine",
|
||||
|
||||
"createindustry.ponder.diesel_engine_expansion.header": "Expanding Diesel Engines",
|
||||
|
||||
"createindustry.ponder.small_engines.header": "Building Small Engines",
|
||||
|
||||
"createindustry.ponder.coke_oven.header": "Building a Coke Oven",
|
||||
"createindustry.ponder.blast_furnace": "Building a Blast Furnace",
|
||||
|
||||
"createindustry.ponder.casting.header": "Casting Metal",
|
||||
"createindustry.ponder.tag.oil": "Oil Related Machines",
|
||||
"createindustry.ponder.tag.metallurgy": "Metal Working Machines",
|
||||
"createindustry.ponder.tag.oil.description": "Machines that extract, process or use Crude Oil and its byproducts",
|
||||
"createindustry.ponder.tag.metallurgy.description": "Machines that produce, process or use Metal and raw materials as such",
|
||||
|
||||
"createindustry.subtitle.engine_sounds": "Engine Sounds",
|
||||
"createindustry.subtitle.diesel_engine_sounds": "Diesel Engine Sounds",
|
||||
|
||||
|
||||
"_": "->------------------------] UI & Messages [------------------------<-",
|
||||
|
||||
@@ -520,7 +397,9 @@
|
||||
"createindustry.ponder.pumpjack.text_1": "To start extracting Oil, you must first build a pipeline on top of a deposit using Industrial Pipes",
|
||||
"createindustry.ponder.pumpjack.text_2": "Then, construct a Pumpjack on top of the pipeline by first placing down a Pumpjack Base...",
|
||||
"createindustry.ponder.pumpjack.text_3": "Placing the Pumpjack Hammer behind it...",
|
||||
"createindustry.ponder.pumpjack.text_4": "And finally, placing the Machine Input with a Pumpjack Crank above it, as shown in the scene",
|
||||
"createindustry.ponder.pumpjack.text_4": "Next step is building the Connector And the Head of the Pumpjack above the crank and the base",
|
||||
"createindustry.ponder.pumpjack.text_5": "Now they need to be connected with Pumpjack Pammer Parts, keep in mind that superglue is needed to finish the structure",
|
||||
"createindustry.ponder.pumpjack.text_6": "And finally, placing the Machine Input with a Pumpjack Crank above it, as shown in the scene",
|
||||
"createindustry.ponder.distillation_tower.text_1": "A sufficiently large Steel Fluid Tank can be turned into a Distillation Tower",
|
||||
"createindustry.ponder.distillation_tower.text_2": "The tower is assembled by first placing a Steel Distillation Tower Controller next to the tank...",
|
||||
"createindustry.ponder.distillation_tower.text_3": "And placing up to 6 Distillation Tower Outputs, all connected with Industrial Pipes",
|
||||
@@ -544,6 +423,11 @@
|
||||
"createindustry.ponder.coke_oven.text_5": "Once done, Coal Coke will drop out of the opening",
|
||||
"createindustry.ponder.casting.text_1": "Casting is the process of pouring liquid metal into a Casting Basin using a Casting Spout",
|
||||
"createindustry.ponder.casting.text_2": "The Casting Basin, obviously, requires a mold to function",
|
||||
"createindustry.ponder.radial_engines.text_1": "Radial Engines are a special Type of Engine that doesn't require an exhaust block and has a shaft from both sides",
|
||||
"createindustry.ponder.radial_engines.text_2": "Clicking the Engine from one of its sides will spawn an input slot that can accept fuel and redstone signals",
|
||||
"createindustry.ponder.radial_engines.text_3": "Regular Radial Engines uses gasoline as fuel",
|
||||
"createindustry.ponder.radial_engines.text_4": "Engine will start when redstone signal is applied to the input slot or the block itself",
|
||||
"createindustry.ponder.radial_engines.text_5": "The second variant of a radial is The Large Radial Engine which uses kerosene as fuel",
|
||||
|
||||
"createindustry.ponder.distillation_tower.header": "Distillation Tower Setup",
|
||||
|
||||
@@ -557,8 +441,11 @@
|
||||
|
||||
"createindustry.ponder.small_engines.header": "Building Small Engines",
|
||||
|
||||
"createindustry.ponder.radial_engines.header": "Using Radial Engines",
|
||||
|
||||
"createindustry.ponder.coke_oven.header": "Building a Coke Oven",
|
||||
"createindustry.ponder.blast_furnace": "Building a Blast Furnace",
|
||||
|
||||
"createindustry.ponder.blast_furnace.header": "Building a Blast Furnace",
|
||||
|
||||
"createindustry.ponder.casting.header": "Casting Metal",
|
||||
"createindustry.ponder.tag.oil": "Oil Related Machines",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "createindustry:block/limesand"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/compact_engine/item"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "createindustry:item/charcoal_dust"
|
||||
"layer0": "createindustry:item/concrete_mixture"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/large_pumpjack_hammer_connector"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/large_pumpjack_hammer_head"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/large_pumpjack_hammer_part"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/large_radial_engine/item"
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"parent": "createindustry:block/limesand"
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "createindustry:item/limesand"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_base"
|
||||
"parent": "createindustry:block/pumpjack_base/block"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_hammer/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_hammer_connector"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_hammer_head"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_hammer_holder"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/pumpjack_hammer_part"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/radial_engine/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/radial_engine_input_ponder/block"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "createindustry:block/steel_frame/block"
|
||||
}
|
||||
@@ -1,10 +1,16 @@
|
||||
{
|
||||
"values": [
|
||||
"createindustry:pumpjack_hammer",
|
||||
"createindustry:gasoline_engine",
|
||||
"createindustry:gasoline_engine_back",
|
||||
"createindustry:lpg_engine",
|
||||
"createindustry:lpg_engine_back",
|
||||
"createindustry:turbine_engine",
|
||||
"createindustry:turbine_engine_back"
|
||||
"createindustry:turbine_engine_back",
|
||||
"createindustry:radial_engine",
|
||||
"createindustry:large_radial_engine",
|
||||
"createindustry:radial_engine_input",
|
||||
"createindustry:radial_engine_input_ponder",
|
||||
"createindustry:compact_engine"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_ingots_aluminum": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:ingots/aluminum"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "createindustry:aluminum_scaffolding_from_ingots_aluminum_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_ingots_aluminum",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"createindustry:aluminum_scaffolding_from_ingots_aluminum_stonecutting"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_stone_types_bauxite": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "createindustry:stone_types/bauxite"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "createindustry:cut_bauxite_brick_stairs_from_stone_types_bauxite_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_stone_types_bauxite",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"createindustry:cut_bauxite_brick_stairs_from_stone_types_bauxite_stonecutting"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_stone_types_bauxite": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "createindustry:stone_types/bauxite"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "createindustry:polished_cut_bauxite_from_stone_types_bauxite_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_stone_types_bauxite",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"createindustry:polished_cut_bauxite_from_stone_types_bauxite_stonecutting"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_stone_types_bauxite": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "createindustry:stone_types/bauxite"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "createindustry:polished_cut_bauxite_slab_from_stone_types_bauxite_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_stone_types_bauxite",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"createindustry:polished_cut_bauxite_slab_from_stone_types_bauxite_stonecutting"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:pumpjack_hammer_holder"
|
||||
"name": "createindustry:compact_engine"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:large_pumpjack_hammer_connector"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:large_pumpjack_hammer_head"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:large_pumpjack_hammer_part"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:large_radial_engine"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:pumpjack_hammer"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:pumpjack_hammer_connector"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:pumpjack_hammer_head"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:pumpjack_hammer_part"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:radial_engine"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:limesand"
|
||||
"name": "minecraft:air"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:radial_engine_input_ponder"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "createindustry:steel_frame"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 4,
|
||||
"ingredient": {
|
||||
"tag": "forge:ingots/aluminum"
|
||||
},
|
||||
"result": "createindustry:aluminum_bars"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 2,
|
||||
"ingredient": {
|
||||
"tag": "forge:ingots/aluminum"
|
||||
},
|
||||
"result": "createindustry:aluminum_scaffolding"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "createindustry:stone_types/bauxite"
|
||||
},
|
||||
"result": "createindustry:bauxite"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 1,
|
||||
"ingredient": {
|
||||
"tag": "createindustry:stone_types/bauxite"
|
||||
},
|
||||
"result": "createindustry:cut_bauxite_brick_stairs"
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"values": [
|
||||
"createindustry:charcoal_dust"
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
"createindustry:formwork_block",
|
||||
"createindustry:rebar_formwork_block",
|
||||
"createindustry:machine_input",
|
||||
"createindustry:pumpjack_crank",
|
||||
"createindustry:copper_encased_steel_pipe",
|
||||
"createindustry:copper_encased_cast_iron_pipe",
|
||||
"createindustry:copper_encased_brass_pipe",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"values": [
|
||||
"createindustry:napalm_bomb",
|
||||
"createindustry:steel_frame",
|
||||
"createindustry:fossilstone",
|
||||
"createindustry:oil_deposit",
|
||||
"createindustry:steel_casing",
|
||||
@@ -34,9 +35,15 @@
|
||||
"createindustry:steel_distillation_controller",
|
||||
"createindustry:industrial_pipe",
|
||||
"createindustry:machine_input",
|
||||
"createindustry:pumpjack_hammer",
|
||||
"createindustry:pumpjack_crank",
|
||||
"createindustry:pumpjack_hammer_part",
|
||||
"createindustry:pumpjack_hammer_head",
|
||||
"createindustry:pumpjack_hammer_connector",
|
||||
"createindustry:large_pumpjack_hammer_part",
|
||||
"createindustry:large_pumpjack_hammer_head",
|
||||
"createindustry:large_pumpjack_hammer_connector",
|
||||
"createindustry:pumpjack_base",
|
||||
"createindustry:pumpjack_hammer_holder",
|
||||
"createindustry:fireproof_bricks",
|
||||
"createindustry:fireproof_brick_reinforcement",
|
||||
"createindustry:blast_furnace_output",
|
||||
@@ -59,6 +66,11 @@
|
||||
"createindustry:turbine_engine_back",
|
||||
"createindustry:diesel_engine",
|
||||
"createindustry:diesel_engine_expansion",
|
||||
"createindustry:radial_engine",
|
||||
"createindustry:large_radial_engine",
|
||||
"createindustry:radial_engine_input",
|
||||
"createindustry:radial_engine_input_ponder",
|
||||
"createindustry:compact_engine",
|
||||
"createindustry:steel_pipe",
|
||||
"createindustry:copper_encased_steel_pipe",
|
||||
"createindustry:glass_steel_pipe",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.drmangotea.createindustry;
|
||||
|
||||
import com.drmangotea.createindustry.base.TFMGContraptions;
|
||||
import com.drmangotea.createindustry.base.TFMGLangPartials;
|
||||
import com.drmangotea.createindustry.items.gadgets.explosives.thermite_grenades.fire.TFMGColoredFires;
|
||||
import com.drmangotea.createindustry.registry.*;
|
||||
@@ -55,6 +56,7 @@ public class CreateTFMG
|
||||
TFMGFluids.register();
|
||||
TFMGPaletteBlocks.register();
|
||||
TFMGSoundEvents.prepare();
|
||||
TFMGContraptions.prepare();
|
||||
|
||||
TFMGColoredFires.register(modEventBus);
|
||||
TFMGFeatures.register(modEventBus);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.drmangotea.createindustry.base;
|
||||
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
public class DebugBlock extends Block {
|
||||
public DebugBlock(Properties p_49795_) {
|
||||
super(p_49795_);
|
||||
}
|
||||
@Override
|
||||
public void fillItemCategory(CreativeModeTab tab, NonNullList<ItemStack> list) {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.drmangotea.createindustry.base;
|
||||
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackContraption;
|
||||
import com.simibubi.create.content.contraptions.ContraptionType;
|
||||
|
||||
public class TFMGContraptions {
|
||||
|
||||
public static final ContraptionType
|
||||
PUMPJACK_CONTRAPTION = ContraptionType.register(CreateTFMG.asResource("pumpjack").toString(), PumpjackContraption::new);
|
||||
|
||||
public static void prepare() {}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.compact;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.pathfinder.PathComputationType;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class CompactEngineBlock extends DirectionalKineticBlock implements IBE<CompactEngineBlockEntity> {
|
||||
|
||||
|
||||
public CompactEngineBlock(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
return AllShapes.MOTOR_BLOCK.get(state.getValue(FACING));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
if(pState.getValue(FACING).getAxis()==Axis.Y) {
|
||||
return TFMGShapes.COMPACT_ENGINE_VERTICAL.get(pState.getValue(FACING));
|
||||
}else
|
||||
return TFMGShapes.COMPACT_ENGINE.get(pState.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
Direction preferred = getPreferredFacing(context);
|
||||
if ((context.getPlayer() != null && context.getPlayer()
|
||||
.isShiftKeyDown()) || preferred == null)
|
||||
return super.getStateForPlacement(context);
|
||||
return defaultBlockState()
|
||||
.setValue(FACING, preferred)
|
||||
//.setValue(BACK_PART,false)
|
||||
;
|
||||
}
|
||||
|
||||
// IRotate:
|
||||
|
||||
@Override
|
||||
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
|
||||
return face == state.getValue(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Axis getRotationAxis(BlockState state) {
|
||||
return state.getValue(FACING)
|
||||
.getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideStressImpact() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level level, BlockPos pos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) {
|
||||
|
||||
|
||||
if (level.getBlockEntity(pos) instanceof CompactEngineBlockEntity be)
|
||||
if (be.playerInteract(pPlayer, pHand))
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
return super.use(pState,level,pos,pPlayer,pHand,pHit);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<CompactEngineBlockEntity> getBlockEntityClass() {
|
||||
return CompactEngineBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends CompactEngineBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.COMPACT_ENGINE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,541 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.compact;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGFluids;
|
||||
import com.drmangotea.createindustry.registry.TFMGSoundEvents;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.LangBuilder;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public class CompactEngineBlockEntity extends GeneratingKineticBlockEntity implements IHaveGoggleInformation, IWrenchable {
|
||||
|
||||
protected LazyOptional<IFluidHandler> fluidCapability;
|
||||
protected FluidTank tankInventory;
|
||||
|
||||
protected FluidTank lubricationOilTank;
|
||||
|
||||
protected FluidTank coolantTank;
|
||||
|
||||
protected int soundTimer=0;
|
||||
|
||||
|
||||
public int fuelConsumption =0;
|
||||
|
||||
public float stressTotal=0;
|
||||
public float speed=0;
|
||||
public float stressBase=0;
|
||||
|
||||
public int efficiency=1;
|
||||
public final int idealSpeed=12;
|
||||
|
||||
private int consumptionTimer=0;
|
||||
|
||||
|
||||
public Fluid lubricationOil = TFMGFluids.LUBRICATION_OIL.get();
|
||||
public Fluid coolant = TFMGFluids.COOLING_FLUID.get();
|
||||
|
||||
public float powerModifier=1;
|
||||
public float efficiencyModifier = 1.4f;
|
||||
//
|
||||
int signal;
|
||||
boolean signalChanged;
|
||||
//
|
||||
|
||||
// protected ScrollValueBehaviour generatedSpeed;
|
||||
|
||||
public CompactEngineBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tankInventory = createInventory();
|
||||
|
||||
lubricationOilTank = createUpgradeTankInventory(lubricationOil);
|
||||
coolantTank = createUpgradeTankInventory(coolant);
|
||||
|
||||
|
||||
//fluidCapability = LazyOptional.of(() -> tankInventory);
|
||||
fluidCapability = LazyOptional.of(() -> {
|
||||
return new CombinedTankWrapper(tankInventory,lubricationOilTank,coolantTank );
|
||||
});
|
||||
|
||||
signal = 0;
|
||||
setLazyTickRate(40);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
sendData();
|
||||
if (!hasSource() || getGeneratedSpeed() > getTheoreticalSpeed())
|
||||
updateGeneratedRotation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneratedSpeed() {
|
||||
|
||||
|
||||
|
||||
if(!level.isClientSide){
|
||||
|
||||
|
||||
calculateEfficiency();
|
||||
fuelConsumption = (int)((speed/(efficiency/10)/13)+1);
|
||||
if(fuelConsumption<1)
|
||||
fuelConsumption=0;
|
||||
if(!tankInventory.isEmpty()) {
|
||||
|
||||
if(consumptionTimer>=45) {
|
||||
if(signal!=0)
|
||||
tankInventory.drain(fuelConsumption, IFluidHandler.FluidAction.EXECUTE);
|
||||
consumptionTimer=0;
|
||||
}
|
||||
consumptionTimer++;
|
||||
|
||||
|
||||
|
||||
// return convertToDirection((signal * signal), getBlockState().getValue(FACING))*Create.RANDOM.nextFloat(2);
|
||||
return ((signal*signal)*0.5f)*powerModifier;
|
||||
// *powerModifier;
|
||||
}}
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void calculateEfficiency(){
|
||||
|
||||
|
||||
if(signal==0||tankInventory.isEmpty()) {
|
||||
efficiency = 0;
|
||||
return;
|
||||
}
|
||||
efficiency=100;
|
||||
|
||||
if(signal>=idealSpeed){
|
||||
efficiency= (int) ((100-(signal-idealSpeed)*5)/efficiencyModifier);
|
||||
}
|
||||
|
||||
if(signal<idealSpeed){
|
||||
efficiency= (int) ((100-(idealSpeed-signal)*3)/efficiencyModifier);
|
||||
}
|
||||
|
||||
|
||||
if(efficiency>100)
|
||||
efficiency=100;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
// boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking);
|
||||
// if (!IRotate.StressImpact.isEnabled())
|
||||
// return added;
|
||||
//
|
||||
Lang.translate("goggles.engine_stats")
|
||||
.forGoggles(tooltip);
|
||||
stressBase = calculateAddedStressCapacity();
|
||||
// if (Mth.equal(stressBase, 0))
|
||||
// return added;
|
||||
|
||||
|
||||
Lang.translate("tooltip.capacityProvided")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.space()
|
||||
.forGoggles(tooltip);
|
||||
|
||||
speed = getTheoreticalSpeed();
|
||||
if (speed != getGeneratedSpeed() && speed != 0)
|
||||
// stressBase *= getGeneratedSpeed() / speed;
|
||||
speed = Math.abs(speed);
|
||||
|
||||
stressTotal = stressBase * speed;
|
||||
|
||||
Lang.number(stressTotal)
|
||||
.translate("generic.unit.stress")
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
|
||||
.space()
|
||||
.add(Lang.translate("gui.goggles.at_current_speed")
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.translate("goggles.engine_redstone_input")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("tooltip.engine_analog_strength", this.signal)
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
/////
|
||||
|
||||
Lang.translate("goggles.engine.efficiency")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("goggles.get_engine_efficiency", this.efficiency)
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
.add(Lang.translate("goggles.misc.percent_symbol"))
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
LazyOptional<IFluidHandler> handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
|
||||
Optional<IFluidHandler> resolve = handler.resolve();
|
||||
if (!resolve.isPresent())
|
||||
return false;
|
||||
|
||||
IFluidHandler tank = resolve.get();
|
||||
if (tank.getTanks() == 0)
|
||||
return false;
|
||||
|
||||
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
|
||||
Lang.translate("goggles.fuel_container")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
|
||||
boolean isEmpty = true;
|
||||
for (int i = 0; i < tank.getTanks(); i++) {
|
||||
FluidStack fluidStack = tank.getFluidInTank(i);
|
||||
if (fluidStack.isEmpty())
|
||||
continue;
|
||||
|
||||
Lang.fluidName(fluidStack)
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.builder()
|
||||
.add(Lang.number(fluidStack.getAmount())
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_AQUA))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(Lang.number(tank.getTankCapacity(i))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
isEmpty = false;
|
||||
}
|
||||
|
||||
if (tank.getTanks() > 1) {
|
||||
if (isEmpty)
|
||||
tooltip.remove(tooltip.size() - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isEmpty)
|
||||
return true;
|
||||
|
||||
Lang.translate("gui.goggles.fluid_container.capacity")
|
||||
.add(Lang.number(tank.getTankCapacity(0))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_AQUA))
|
||||
.style(ChatFormatting.DARK_GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
|
||||
|
||||
|
||||
|
||||
// this.getBlockState().setValue(EngineBlock.BACKPART,true);
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
compound.putInt("Signal", signal);
|
||||
|
||||
|
||||
|
||||
compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag()));
|
||||
compound.put("Coolant", coolantTank.writeToNBT(new CompoundTag()));
|
||||
compound.put("LubricationOil", lubricationOilTank.writeToNBT(new CompoundTag()));
|
||||
|
||||
|
||||
super.write(compound, clientPacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
|
||||
|
||||
|
||||
tankInventory.readFromNBT(compound.getCompound("TankContent"));
|
||||
coolantTank.readFromNBT(compound.getCompound("Coolant"));
|
||||
lubricationOilTank.readFromNBT(compound.getCompound("LubricationOil"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
signal = compound.getInt("Signal");
|
||||
super.read(compound, clientPacket);
|
||||
}
|
||||
|
||||
public float getModifier() {
|
||||
return getModifierForSignal(signal);
|
||||
}
|
||||
|
||||
public void neighbourChanged() {
|
||||
if (!hasLevel())
|
||||
return;
|
||||
int power = level.getBestNeighborSignal(worldPosition);
|
||||
if (power != signal)
|
||||
signalChanged = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
neighbourChanged();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
calculateUpgradeModifier();
|
||||
|
||||
//
|
||||
int random1 = Create.RANDOM.nextInt(125);
|
||||
int random2 = Create.RANDOM.nextInt(200);
|
||||
|
||||
if(random1 == 69)
|
||||
coolantTank.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
if(random2 == 69)
|
||||
lubricationOilTank.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
///
|
||||
// if(signal!=0&&hasBackPart()&&tankInventory.getFluidAmount()!=0&&!overStressed&&isExhaustTankFull()) {
|
||||
|
||||
|
||||
soundTimer++;
|
||||
|
||||
// if(!isExhaustTankFull()) {
|
||||
if (soundTimer >= ((16-signal)/0.8)+1) {
|
||||
if(signal!=0&&
|
||||
tankInventory.getFluidAmount()!=0 &&
|
||||
!overStressed
|
||||
|
||||
|
||||
){
|
||||
|
||||
|
||||
// if(this.getGeneratedSpeed()!=0) {
|
||||
if (level.isClientSide)
|
||||
makeSound();
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
///
|
||||
updateGeneratedRotation();
|
||||
calculateEfficiency();
|
||||
|
||||
|
||||
|
||||
|
||||
stressBase = calculateAddedStressCapacity();
|
||||
speed = getTheoreticalSpeed();
|
||||
if (speed != getGeneratedSpeed() && speed != 0)
|
||||
stressBase *= getGeneratedSpeed() / speed;
|
||||
speed = Math.abs(speed);
|
||||
|
||||
stressTotal = stressBase * speed;
|
||||
// if (level.isClientSide)
|
||||
// return;
|
||||
if (signalChanged) {
|
||||
signalChanged = false;
|
||||
analogSignalChanged(level.getBestNeighborSignal(worldPosition));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void calculateUpgradeModifier(){
|
||||
|
||||
|
||||
float newPowerModifier=1;
|
||||
float newEfficiencyModifier = 1.4f;
|
||||
|
||||
if(lubricationOilTank.getFluidAmount()>0) {
|
||||
//newPowerModifier+=.3f;
|
||||
newEfficiencyModifier-=.1f;
|
||||
}
|
||||
if(coolantTank.getFluidAmount()>0) {
|
||||
newPowerModifier+=.3f;
|
||||
newEfficiencyModifier-=.3f;
|
||||
}
|
||||
|
||||
////////
|
||||
|
||||
|
||||
////
|
||||
|
||||
powerModifier=newPowerModifier;
|
||||
efficiencyModifier = newEfficiencyModifier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private void makeSound(){
|
||||
soundTimer=0;
|
||||
|
||||
|
||||
TFMGSoundEvents.ENGINE.playAt(level, worldPosition, 0.6f, 1f, false);
|
||||
|
||||
|
||||
}
|
||||
public boolean playerInteract(Player pPlayer, InteractionHand pHand) {
|
||||
|
||||
ItemStack stack = pPlayer.getItemInHand(pHand);
|
||||
|
||||
if(stack.is(TFMGFluids.GASOLINE.getBucket().get())&&tankInventory.isEmpty()){
|
||||
|
||||
tankInventory.setFluid(new FluidStack(TFMGFluids.GASOLINE.get(),1000));
|
||||
pPlayer.setItemInHand(pHand, Items.BUCKET.getDefaultInstance());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
protected void analogSignalChanged(int newSignal) {
|
||||
//removeSource();
|
||||
signal = newSignal;
|
||||
}
|
||||
|
||||
protected float getModifierForSignal(int newPower) {
|
||||
if (newPower == 0)
|
||||
return 1;
|
||||
return 1 + ((newPower + 1) / 16f);
|
||||
}
|
||||
/////////////////////
|
||||
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(validFuel());
|
||||
}
|
||||
};
|
||||
}
|
||||
protected SmartFluidTank createUpgradeTankInventory(Fluid validFluid) {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(validFluid);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public float getFillState() {
|
||||
return (float) tankInventory.getFluidAmount() / tankInventory.getCapacity();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
|
||||
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
fluidCapability.invalidate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IFluidTank getTankInventory() {
|
||||
return tankInventory;
|
||||
}
|
||||
|
||||
public Fluid validFuel(){
|
||||
return TFMGFluids.GASOLINE.get();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.compact;
|
||||
|
||||
|
||||
import com.simibubi.create.AllPartialModels;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class CompactEngineRenderer extends KineticBlockEntityRenderer<CompactEngineBlockEntity> {
|
||||
|
||||
public CompactEngineRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SuperByteBuffer getRotatedModel(CompactEngineBlockEntity be, BlockState state) {
|
||||
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -193,7 +193,8 @@ public class DieselEngineBlockEntity extends SmartBlockEntity implements IHaveGo
|
||||
if(getShaft() != null)
|
||||
engineProcess(targetAxis,verticalTarget);
|
||||
//DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::makeSound);
|
||||
makeSound(targetAxis,verticalTarget);
|
||||
if(level.isClientSide)
|
||||
makeSound(targetAxis,verticalTarget);
|
||||
|
||||
int conveyedSpeedLevel =
|
||||
engineStrength == 0 ? 1 : verticalTarget ? 1 : (int) GeneratingKineticBlockEntity.convertToDirection(1, facing)*2;
|
||||
@@ -218,7 +219,7 @@ public class DieselEngineBlockEntity extends SmartBlockEntity implements IHaveGo
|
||||
|
||||
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
//@OnlyIn(Dist.CLIENT)
|
||||
private void makeSound(Axis targetAxis, boolean verticalTarget){
|
||||
Float targetAngle = getTargetAngle();
|
||||
PoweredShaftBlockEntity ste = target.get();
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.pathfinder.PathComputationType;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class RadialEngineBlock extends DirectionalKineticBlock implements IBE<RadialEngineBlockEntity> {
|
||||
|
||||
|
||||
public RadialEngineBlock(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
|
||||
Level level = context.getLevel();
|
||||
BlockPos pos = context.getClickedPos();
|
||||
Direction direction = context.getClickedFace();
|
||||
|
||||
|
||||
return onBlockEntityUse(level, pos, be -> {
|
||||
|
||||
if(be.spawnInput(direction))
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
return InteractionResult.FAIL;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.RADIAL_ENGINE.get(pState.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
Direction preferred = getPreferredFacing(context);
|
||||
if ((context.getPlayer() != null && context.getPlayer()
|
||||
.isShiftKeyDown()) || preferred == null)
|
||||
return super.getStateForPlacement(context);
|
||||
return defaultBlockState()
|
||||
.setValue(FACING, preferred)
|
||||
//.setValue(BACK_PART,false)
|
||||
;
|
||||
}
|
||||
|
||||
// IRotate:
|
||||
|
||||
@Override
|
||||
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
|
||||
return face.getAxis() == state.getValue(FACING).getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Axis getRotationAxis(BlockState state) {
|
||||
return state.getValue(FACING)
|
||||
.getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideStressImpact() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Class<RadialEngineBlockEntity> getBlockEntityClass() {
|
||||
return RadialEngineBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends RadialEngineBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.RADIAL_ENGINE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,641 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.input.RadialEngineInputBlockEntity;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.drmangotea.createindustry.registry.TFMGFluids;
|
||||
import com.drmangotea.createindustry.registry.TFMGSoundEvents;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.LangBuilder;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.DirectionalBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static net.minecraft.world.level.block.DirectionalBlock.FACING;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public class RadialEngineBlockEntity extends GeneratingKineticBlockEntity implements IHaveGoggleInformation, IWrenchable {
|
||||
|
||||
public LazyOptional<IFluidHandler> fluidCapability;
|
||||
protected FluidTank tankInventory;
|
||||
|
||||
protected FluidTank lubricationOilTank;
|
||||
|
||||
protected FluidTank coolantTank;
|
||||
|
||||
protected int soundTimer=0;
|
||||
|
||||
public int inputSingal=0;
|
||||
|
||||
|
||||
public int fuelConsumption =0;
|
||||
|
||||
public float stressTotal=0;
|
||||
public float speed=0;
|
||||
public float stressBase=0;
|
||||
|
||||
public int efficiency=1;
|
||||
public final int idealSpeed=12;
|
||||
|
||||
public int consumptionTimer=0;
|
||||
|
||||
|
||||
|
||||
|
||||
public Fluid lubricationOil = TFMGFluids.LUBRICATION_OIL.get();
|
||||
public Fluid coolant = TFMGFluids.COOLING_FLUID.get();
|
||||
|
||||
public float powerModifier=1;
|
||||
public float efficiencyModifier = 1.4f;
|
||||
|
||||
public List<BlockPos> inputs = new ArrayList<>();
|
||||
//
|
||||
public int signal;
|
||||
boolean signalChanged;
|
||||
//
|
||||
|
||||
// protected ScrollValueBehaviour generatedSpeed;
|
||||
|
||||
public RadialEngineBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tankInventory = createInventory();
|
||||
|
||||
lubricationOilTank = createUpgradeTankInventory(lubricationOil);
|
||||
coolantTank = createUpgradeTankInventory(coolant);
|
||||
|
||||
|
||||
//fluidCapability = LazyOptional.of(() -> tankInventory);
|
||||
fluidCapability = LazyOptional.of(() -> {
|
||||
return new CombinedTankWrapper(tankInventory,lubricationOilTank,coolantTank );
|
||||
});
|
||||
|
||||
signal = 0;
|
||||
setLazyTickRate(40);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
|
||||
|
||||
|
||||
public boolean spawnInput(Direction side){
|
||||
BlockPos posToSpawn = getBlockPos().relative(side);
|
||||
|
||||
|
||||
if(side.getAxis() == this.getBlockState().getValue(DirectionalKineticBlock.FACING).getAxis())
|
||||
return false;
|
||||
|
||||
if(!level.getBlockState(posToSpawn).isAir()) {
|
||||
if(level.getBlockState(posToSpawn).is(TFMGBlocks.RADIAL_ENGINE_INPUT.get())) {
|
||||
|
||||
inputs.remove(posToSpawn);
|
||||
level.setBlock(posToSpawn, Blocks.AIR.defaultBlockState(),3);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
level.setBlock(posToSpawn, TFMGBlocks.RADIAL_ENGINE_INPUT.getDefaultState().setValue(DirectionalBlock.FACING,this.getBlockState().getValue(DirectionalKineticBlock.FACING).getOpposite()),3);
|
||||
inputs.add(posToSpawn);
|
||||
((RadialEngineInputBlockEntity)level.getBlockEntity(posToSpawn)).setEngine(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
sendData();
|
||||
if (!hasSource() || getGeneratedSpeed() > getTheoreticalSpeed())
|
||||
updateGeneratedRotation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneratedSpeed() {
|
||||
|
||||
int signal = Math.max(this.signal,inputSingal);
|
||||
|
||||
if(!level.isClientSide){
|
||||
|
||||
|
||||
calculateEfficiency();
|
||||
fuelConsumption = (int)((speed/(efficiency/10)/7)+1);
|
||||
if(fuelConsumption<1)
|
||||
fuelConsumption=0;
|
||||
if(!tankInventory.isEmpty()) {
|
||||
|
||||
if(consumptionTimer>=45) {
|
||||
if(signal!=0)
|
||||
tankInventory.drain(fuelConsumption, IFluidHandler.FluidAction.EXECUTE);
|
||||
consumptionTimer=0;
|
||||
}
|
||||
consumptionTimer++;
|
||||
|
||||
|
||||
return ((signal*signal)*0.8f)*powerModifier;
|
||||
|
||||
}}
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void setInputSingal(int inputSingal) {
|
||||
this.inputSingal = inputSingal;
|
||||
}
|
||||
|
||||
public void calculateEfficiency(){
|
||||
|
||||
int signal = Math.max(this.signal,inputSingal);
|
||||
|
||||
|
||||
if(signal==0||tankInventory.isEmpty()) {
|
||||
efficiency = 0;
|
||||
return;
|
||||
}
|
||||
efficiency=100;
|
||||
|
||||
if(signal>=idealSpeed){
|
||||
efficiency= (int) ((100-(signal-idealSpeed)*5)/efficiencyModifier);
|
||||
}
|
||||
|
||||
if(signal<idealSpeed){
|
||||
efficiency= (int) ((100-(idealSpeed-signal)*3)/efficiencyModifier);
|
||||
}
|
||||
|
||||
|
||||
if(efficiency>100)
|
||||
efficiency=100;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
// boolean added = super.addToGoggleTooltip(tooltip, isPlayerSneaking);
|
||||
// if (!IRotate.StressImpact.isEnabled())
|
||||
// return added;
|
||||
//
|
||||
Lang.translate("goggles.engine_stats")
|
||||
.forGoggles(tooltip);
|
||||
stressBase = calculateAddedStressCapacity();
|
||||
// if (Mth.equal(stressBase, 0))
|
||||
// return added;
|
||||
|
||||
|
||||
Lang.translate("tooltip.capacityProvided")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.space()
|
||||
.forGoggles(tooltip);
|
||||
|
||||
speed = getTheoreticalSpeed();
|
||||
if (speed != getGeneratedSpeed() && speed != 0)
|
||||
// stressBase *= getGeneratedSpeed() / speed;
|
||||
speed = Math.abs(speed);
|
||||
|
||||
stressTotal = stressBase * speed;
|
||||
|
||||
Lang.number(stressTotal)
|
||||
.translate("generic.unit.stress")
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
|
||||
.space()
|
||||
.add(Lang.translate("gui.goggles.at_current_speed")
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.translate("goggles.engine_redstone_input")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("tooltip.engine_analog_strength", this.signal)
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
/////
|
||||
|
||||
Lang.translate("goggles.engine.efficiency")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("goggles.get_engine_efficiency", this.efficiency)
|
||||
.style(ChatFormatting.DARK_AQUA)
|
||||
.add(Lang.translate("goggles.misc.percent_symbol"))
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
LazyOptional<IFluidHandler> handler = fluidCapability;
|
||||
Optional<IFluidHandler> resolve = handler.resolve();
|
||||
if (!resolve.isPresent())
|
||||
return false;
|
||||
|
||||
IFluidHandler tank = resolve.get();
|
||||
if (tank.getTanks() == 0)
|
||||
return false;
|
||||
|
||||
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
|
||||
Lang.translate("goggles.fuel_container")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
|
||||
boolean isEmpty = true;
|
||||
for (int i = 0; i < tank.getTanks(); i++) {
|
||||
FluidStack fluidStack = tank.getFluidInTank(i);
|
||||
if (fluidStack.isEmpty())
|
||||
continue;
|
||||
|
||||
Lang.fluidName(fluidStack)
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.builder()
|
||||
.add(Lang.number(fluidStack.getAmount())
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_AQUA))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(Lang.number(tank.getTankCapacity(i))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
isEmpty = false;
|
||||
}
|
||||
|
||||
if (tank.getTanks() > 1) {
|
||||
if (isEmpty)
|
||||
tooltip.remove(tooltip.size() - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isEmpty)
|
||||
return true;
|
||||
|
||||
Lang.translate("gui.goggles.fluid_container.capacity")
|
||||
.add(Lang.number(tank.getTankCapacity(0))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_AQUA))
|
||||
.style(ChatFormatting.DARK_GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
|
||||
|
||||
|
||||
// this.getBlockState().setValue(EngineBlock.BACKPART,true);
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
compound.putInt("Signal", signal);
|
||||
|
||||
|
||||
|
||||
compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag()));
|
||||
compound.put("Coolant", coolantTank.writeToNBT(new CompoundTag()));
|
||||
compound.put("LubricationOil", lubricationOilTank.writeToNBT(new CompoundTag()));
|
||||
|
||||
compound.put("Inputs", writeInputs(new CompoundTag(),inputs));
|
||||
|
||||
|
||||
|
||||
|
||||
super.write(compound, clientPacket);
|
||||
}
|
||||
|
||||
|
||||
public static CompoundTag writeInputs(CompoundTag nbt, List<BlockPos> inputs){
|
||||
int x = 0;
|
||||
|
||||
for(BlockPos input : inputs) {
|
||||
|
||||
nbt.putInt("X"+x, input.getX());
|
||||
nbt.putInt("Y"+x, input.getY());
|
||||
nbt.putInt("Z"+x, input.getZ());
|
||||
|
||||
x++;
|
||||
}
|
||||
|
||||
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
|
||||
|
||||
|
||||
tankInventory.readFromNBT(compound.getCompound("TankContent"));
|
||||
coolantTank.readFromNBT(compound.getCompound("Coolant"));
|
||||
lubricationOilTank.readFromNBT(compound.getCompound("LubricationOil"));
|
||||
|
||||
inputs = readInputs(compound.getCompound("Inputs"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
signal = compound.getInt("Signal");
|
||||
super.read(compound, clientPacket);
|
||||
}
|
||||
|
||||
public void loadInputs(){
|
||||
for(BlockPos pos : inputs){
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof RadialEngineInputBlockEntity be)
|
||||
be.setEngine(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<BlockPos> readInputs(CompoundTag nbt){
|
||||
|
||||
int inputCount = nbt.getAllKeys().size()/3;
|
||||
|
||||
List<BlockPos> toReturn = new ArrayList<>();
|
||||
|
||||
for(int i = 0; i < inputCount; i++){
|
||||
|
||||
|
||||
toReturn.add(new BlockPos(nbt.getInt("X"+i),nbt.getInt("Y"+i),nbt.getInt("Z"+i)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
public float getModifier() {
|
||||
return getModifierForSignal(signal);
|
||||
}
|
||||
|
||||
public void neighbourChanged() {
|
||||
if (!hasLevel())
|
||||
return;
|
||||
int power = level.getBestNeighborSignal(worldPosition);
|
||||
if (power != signal)
|
||||
signalChanged = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
neighbourChanged();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
loadInputs();
|
||||
|
||||
|
||||
|
||||
|
||||
if (signalChanged) {
|
||||
signalChanged = false;
|
||||
analogSignalChanged(level.getBestNeighborSignal(worldPosition));
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < inputs.size(); i++) {
|
||||
|
||||
BlockPos pos = inputs.get(i);
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof RadialEngineInputBlockEntity) {
|
||||
((RadialEngineInputBlockEntity) level.getBlockEntity(pos)).setEngine(this);
|
||||
if(level.getBlockState(pos).getValue(FACING)!=this.getBlockState().getValue(FACING)){
|
||||
level.getBlockState(pos).setValue(FACING,this.getBlockState().getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else inputs.remove(pos);
|
||||
|
||||
}
|
||||
|
||||
calculateUpgradeModifier();
|
||||
|
||||
//
|
||||
int random1 = Create.RANDOM.nextInt(125);
|
||||
int random2 = Create.RANDOM.nextInt(200);
|
||||
|
||||
if(random1 == 69)
|
||||
coolantTank.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
if(random2 == 69)
|
||||
lubricationOilTank.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
///
|
||||
// if(signal!=0&&hasBackPart()&&tankInventory.getFluidAmount()!=0&&!overStressed&&isExhaustTankFull()) {
|
||||
int signal = Math.max(this.signal,inputSingal);
|
||||
|
||||
soundTimer++;
|
||||
|
||||
// if(!isExhaustTankFull()) {
|
||||
if (soundTimer >= ((16-signal)/0.8)+1) {
|
||||
if(signal!=0&&
|
||||
tankInventory.getFluidAmount()!=0 &&
|
||||
!overStressed
|
||||
|
||||
|
||||
){
|
||||
|
||||
|
||||
// if(this.getGeneratedSpeed()!=0) {
|
||||
if (level.isClientSide)
|
||||
makeSound();
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
///
|
||||
updateGeneratedRotation();
|
||||
calculateEfficiency();
|
||||
|
||||
|
||||
|
||||
|
||||
stressBase = calculateAddedStressCapacity();
|
||||
speed = getTheoreticalSpeed();
|
||||
if (speed != getGeneratedSpeed() && speed != 0)
|
||||
stressBase *= getGeneratedSpeed() / speed;
|
||||
speed = Math.abs(speed);
|
||||
|
||||
stressTotal = stressBase * speed;
|
||||
// if (level.isClientSide)
|
||||
// return;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void calculateUpgradeModifier(){
|
||||
|
||||
|
||||
float newPowerModifier=1;
|
||||
float newEfficiencyModifier = 1.4f;
|
||||
|
||||
if(lubricationOilTank.getFluidAmount()>0) {
|
||||
//newPowerModifier+=.3f;
|
||||
newEfficiencyModifier-=.1f;
|
||||
}
|
||||
if(coolantTank.getFluidAmount()>0) {
|
||||
newPowerModifier+=.3f;
|
||||
newEfficiencyModifier-=.3f;
|
||||
}
|
||||
|
||||
////////
|
||||
|
||||
|
||||
////
|
||||
|
||||
powerModifier=newPowerModifier;
|
||||
efficiencyModifier = newEfficiencyModifier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private void makeSound(){
|
||||
soundTimer=0;
|
||||
|
||||
|
||||
TFMGSoundEvents.ENGINE.playAt(level, worldPosition, 0.6f, 1f, false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void analogSignalChanged(int newSignal) {
|
||||
//removeSource();
|
||||
signal = newSignal;
|
||||
}
|
||||
|
||||
protected float getModifierForSignal(int newPower) {
|
||||
if (newPower == 0)
|
||||
return 1;
|
||||
return 1 + ((newPower + 1) / 16f);
|
||||
}
|
||||
/////////////////////
|
||||
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(validFuel());
|
||||
}
|
||||
};
|
||||
}
|
||||
protected SmartFluidTank createUpgradeTankInventory(Fluid validFluid) {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(validFluid);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public float getFillState() {
|
||||
return (float) tankInventory.getFluidAmount() / tankInventory.getCapacity();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
|
||||
//if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
// return fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
fluidCapability.invalidate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IFluidTank getTankInventory() {
|
||||
return tankInventory;
|
||||
}
|
||||
|
||||
public Fluid validFuel(){
|
||||
return TFMGFluids.GASOLINE.get();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial;
|
||||
|
||||
|
||||
import com.simibubi.create.AllPartialModels;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class RadialEngineRenderer extends KineticBlockEntityRenderer<RadialEngineBlockEntity> {
|
||||
|
||||
public RadialEngineRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SuperByteBuffer getRotatedModel(RadialEngineBlockEntity be, BlockState state) {
|
||||
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial.input;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.DirectionalBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class RadialEngineInputBlock extends DirectionalBlock implements IBE<RadialEngineInputBlockEntity> {
|
||||
public RadialEngineInputBlock(Properties p_52591_) {
|
||||
super(p_52591_);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
super.createBlockStateDefinition(builder);
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter p_220053_2_, BlockPos p_220053_3_,
|
||||
CollisionContext p_220053_4_) {
|
||||
return TFMGShapes.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
|
||||
Direction nearestLookingDirection = context.getNearestLookingDirection();
|
||||
return defaultBlockState().setValue(FACING, context.getPlayer() != null && context.getPlayer()
|
||||
.isShiftKeyDown() ? nearestLookingDirection : nearestLookingDirection.getOpposite());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Class<RadialEngineInputBlockEntity> getBlockEntityClass() {
|
||||
return RadialEngineInputBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends RadialEngineInputBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.RADIAL_ENGINE_INPUT.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial.input;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.RadialEngineBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
import static net.minecraft.world.level.block.DirectionalBlock.FACING;
|
||||
// :3
|
||||
public class RadialEngineInputBlockEntity extends SmartBlockEntity {
|
||||
|
||||
|
||||
int timer = 10;
|
||||
boolean signalChanged;
|
||||
|
||||
public int signal=0;
|
||||
|
||||
RadialEngineBlockEntity engine;
|
||||
|
||||
public RadialEngineInputBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
}
|
||||
|
||||
public void setEngine(RadialEngineBlockEntity engine) {
|
||||
this.engine = engine;
|
||||
}
|
||||
|
||||
public void tick(){
|
||||
super.tick();
|
||||
|
||||
if(timer>0){
|
||||
timer--;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(engine!=null) {
|
||||
if (!(level.getBlockEntity(engine.getBlockPos()) instanceof RadialEngineBlockEntity)) {
|
||||
engine = null;
|
||||
}
|
||||
|
||||
|
||||
if(engine!=null) {
|
||||
engine.setInputSingal(signal);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(engine == null) {
|
||||
if(timer ==0)
|
||||
level.setBlock(getBlockPos(), Blocks.AIR.defaultBlockState(), 3);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (signalChanged) {
|
||||
signalChanged = false;
|
||||
analogSignalChanged(level.getBestNeighborSignal(worldPosition));
|
||||
}
|
||||
|
||||
}
|
||||
protected void analogSignalChanged(int newSignal) {
|
||||
|
||||
signal = newSignal;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
@SuppressWarnings("'net.minecraftforge.items.CapabilityItemHandler' is deprecated and marked for removal ")
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
|
||||
if(engine!=null)
|
||||
if(side == this.getBlockState().getValue(FACING))
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return engine.fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
compound.putInt("Signal", signal);
|
||||
|
||||
if(engine !=null) {
|
||||
compound.putInt("X", engine.getBlockPos().getX());
|
||||
compound.putInt("Y", engine.getBlockPos().getY());
|
||||
compound.putInt("Z", engine.getBlockPos().getZ());
|
||||
}
|
||||
|
||||
|
||||
|
||||
super.write(compound, clientPacket);
|
||||
}
|
||||
|
||||
|
||||
public void neighbourChanged() {
|
||||
if (!hasLevel())
|
||||
return;
|
||||
int power = level.getBestNeighborSignal(worldPosition);
|
||||
if (power != signal)
|
||||
signalChanged = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
neighbourChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
|
||||
if(engine == null)
|
||||
engine = (RadialEngineBlockEntity) level.getBlockEntity(new BlockPos(
|
||||
compound.getInt("X"),
|
||||
compound.getInt("Y"),
|
||||
compound.getInt("Z")
|
||||
));
|
||||
|
||||
|
||||
|
||||
signal = compound.getInt("Signal");
|
||||
|
||||
|
||||
super.read(compound, clientPacket);
|
||||
}
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial.large;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.pathfinder.PathComputationType;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class LargeRadialEngineBlock extends DirectionalKineticBlock implements IBE<LargeRadialEngineBlockEntity> {
|
||||
|
||||
|
||||
public LargeRadialEngineBlock(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
|
||||
Level level = context.getLevel();
|
||||
BlockPos pos = context.getClickedPos();
|
||||
Direction direction = context.getClickedFace();
|
||||
|
||||
|
||||
return onBlockEntityUse(level, pos, be -> {
|
||||
|
||||
if(be.spawnInput(direction))
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
return InteractionResult.FAIL;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.LARGE_RADIAL_ENGINE.get(pState.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
Direction preferred = getPreferredFacing(context);
|
||||
if ((context.getPlayer() != null && context.getPlayer()
|
||||
.isShiftKeyDown()) || preferred == null)
|
||||
return super.getStateForPlacement(context);
|
||||
return defaultBlockState()
|
||||
.setValue(FACING, preferred)
|
||||
//.setValue(BACK_PART,false)
|
||||
;
|
||||
}
|
||||
|
||||
// IRotate:
|
||||
|
||||
@Override
|
||||
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
|
||||
return face.getAxis() == state.getValue(FACING).getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Axis getRotationAxis(BlockState state) {
|
||||
return state.getValue(FACING)
|
||||
.getAxis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hideStressImpact() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Class<LargeRadialEngineBlockEntity> getBlockEntityClass() {
|
||||
return LargeRadialEngineBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends LargeRadialEngineBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.LARGE_RADIAL_ENGINE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.drmangotea.createindustry.blocks.engines.radial.large;
|
||||
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.RadialEngineBlockEntity;
|
||||
import com.drmangotea.createindustry.registry.TFMGFluids;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
|
||||
public class LargeRadialEngineBlockEntity extends RadialEngineBlockEntity {
|
||||
public LargeRadialEngineBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
}
|
||||
@Override
|
||||
public float getGeneratedSpeed() {
|
||||
|
||||
int signal = Math.max(this.signal,inputSingal);
|
||||
|
||||
if(!level.isClientSide){
|
||||
|
||||
|
||||
calculateEfficiency();
|
||||
fuelConsumption = (int)((speed/(efficiency/10)/5)+1);
|
||||
if(fuelConsumption<1)
|
||||
fuelConsumption=0;
|
||||
if(!tankInventory.isEmpty()) {
|
||||
|
||||
if(consumptionTimer>=45) {
|
||||
if(signal!=0)
|
||||
tankInventory.drain(fuelConsumption, IFluidHandler.FluidAction.EXECUTE);
|
||||
consumptionTimer=0;
|
||||
}
|
||||
consumptionTimer++;
|
||||
|
||||
|
||||
return ((signal*signal)*0.8f)*powerModifier;
|
||||
|
||||
}}
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public Fluid validFuel(){
|
||||
return TFMGFluids.KEROSENE.get();
|
||||
};
|
||||
}
|
||||
@@ -83,9 +83,9 @@ public class BlastFurnaceOutputBlockEntity extends TFMGMachineBlockEntity implem
|
||||
|
||||
|
||||
super(type, pos, state);
|
||||
inputInventory = new SmartInventory(1, this).forbidInsertion()
|
||||
inputInventory = new SmartInventory(1, this).forbidInsertion().forbidExtraction()
|
||||
.withMaxStackSize(64);
|
||||
fuelInventory = new SmartInventory(1, this).forbidInsertion()
|
||||
fuelInventory = new SmartInventory(1, this).forbidInsertion().forbidExtraction()
|
||||
.withMaxStackSize(64);
|
||||
|
||||
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory,fuelInventory));
|
||||
@@ -118,8 +118,9 @@ public class BlastFurnaceOutputBlockEntity extends TFMGMachineBlockEntity implem
|
||||
|
||||
|
||||
if(speedModifier!=0) {
|
||||
fuelEfficiency = 400 * speedModifier;
|
||||
speedModifier = (blastFurnaceLevel/2);
|
||||
fuelEfficiency = 400 * (speedModifier);
|
||||
|
||||
}else {
|
||||
fuelEfficiency = 400;
|
||||
speedModifier = 1;
|
||||
@@ -194,7 +195,7 @@ public class BlastFurnaceOutputBlockEntity extends TFMGMachineBlockEntity implem
|
||||
(tank1.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity()&&
|
||||
(tank2.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(1).getAmount())<=tank2.getPrimaryHandler().getCapacity()) {
|
||||
timer--;
|
||||
int random = Create.RANDOM.nextInt((int) fuelEfficiency);
|
||||
int random = Create.RANDOM.nextInt((int) Math.abs(fuelEfficiency)+1);
|
||||
if(random == 69)
|
||||
fuelInventory.getStackInSlot(0).shrink(1);
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.metal_processing.coke_oven;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.TFMGMachineBlockEntity;
|
||||
import com.drmangotea.createindustry.recipes.coking.CokingRecipe;
|
||||
import com.drmangotea.createindustry.registry.*;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.drmangotea.createindustry.registry.TFMGRecipeTypes;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
@@ -10,21 +13,24 @@ import com.simibubi.create.foundation.item.SmartInventory;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
|
||||
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
||||
@@ -39,7 +45,7 @@ import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWrenchable {
|
||||
|
||||
public boolean isController=false;
|
||||
public boolean isController = false;
|
||||
|
||||
public CokeOvenBlockEntity controller;
|
||||
|
||||
@@ -74,19 +80,29 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
super.tick();
|
||||
|
||||
|
||||
if(controller==null){
|
||||
inputInventory.forbidInsertion();
|
||||
} else {
|
||||
inputInventory.allowInsertion();
|
||||
}
|
||||
// if(isController)
|
||||
// level.setBlock(getBlockPos().above(5), Blocks.DIAMOND_BLOCK.defaultBlockState(),3);
|
||||
|
||||
|
||||
|
||||
|
||||
if(controller==null){
|
||||
controller = this;
|
||||
inputInventory.forbidInsertion();
|
||||
} else {
|
||||
inputInventory.allowInsertion();
|
||||
}
|
||||
|
||||
//if(controller!=this)
|
||||
// level.setBlock(this.getBlockPos().above(5), Blocks.GOLD_BLOCK.defaultBlockState(),3);
|
||||
|
||||
visualDoorAngle.chase(doorAngle, 0.2f, LerpedFloat.Chaser.EXP);
|
||||
visualDoorAngle.tickChaser();
|
||||
|
||||
|
||||
|
||||
// if(controller != null)
|
||||
// refreshCapability();
|
||||
// if(controller != null)
|
||||
// refreshCapability();
|
||||
if(isController){
|
||||
controller = this;
|
||||
}
|
||||
@@ -94,11 +110,11 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
if(controller!=null)
|
||||
if(!controller.isController)
|
||||
controller=null;
|
||||
controller=this;
|
||||
|
||||
if(controller!=null)
|
||||
if(!(level.getBlockEntity(controller.getBlockPos()) instanceof CokeOvenBlockEntity))
|
||||
controller = null;
|
||||
controller = this;
|
||||
|
||||
|
||||
setBlockState();
|
||||
@@ -110,9 +126,9 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
progress = 0;
|
||||
}else {
|
||||
|
||||
progress = 100-(timer/(lastRecipe.getProcessingDuration()/100));
|
||||
}
|
||||
progress = 100-(timer/(lastRecipe.getProcessingDuration()/100));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(timer>=0&&timer<44){
|
||||
@@ -148,7 +164,7 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
public void setBlockState(){
|
||||
|
||||
if(controller == null){
|
||||
if(controller == this){
|
||||
level.setBlock(getBlockPos(),this.getBlockState().setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.CASUAL),2);
|
||||
|
||||
}
|
||||
@@ -159,18 +175,18 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
|
||||
if(timer==-1) {
|
||||
level.setBlock(getBlockPos(),this.getBlockState().setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.MIDDLE_OFF),2);
|
||||
level.setBlock(getBlockPos(),this.getBlockState().setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.MIDDLE_OFF),2);
|
||||
if(level.getBlockEntity(getBlockPos().below())instanceof CokeOvenBlockEntity)
|
||||
level.setBlock(getBlockPos().below(),level.getBlockState(getBlockPos().below()).setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.BOTTOM_OFF).setValue(FACING,this.getBlockState().getValue(FACING)),2);
|
||||
if(level.getBlockEntity(getBlockPos().above())instanceof CokeOvenBlockEntity)
|
||||
level.setBlock(getBlockPos().above(),level.getBlockState(getBlockPos().above()).setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.TOP_OFF).setValue(FACING,this.getBlockState().getValue(FACING)),2);
|
||||
}else {
|
||||
level.setBlock(getBlockPos(),this.getBlockState().setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.MIDDLE_ON),2);
|
||||
}else {
|
||||
level.setBlock(getBlockPos(),this.getBlockState().setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.MIDDLE_ON),2);
|
||||
if(level.getBlockEntity(getBlockPos().below())instanceof CokeOvenBlockEntity)
|
||||
level.setBlock(getBlockPos().below(),level.getBlockState(getBlockPos().below()).setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.BOTTOM_ON).setValue(FACING,this.getBlockState().getValue(FACING)),2);
|
||||
if(level.getBlockEntity(getBlockPos().above())instanceof CokeOvenBlockEntity)
|
||||
level.setBlock(getBlockPos().above(),level.getBlockState(getBlockPos().above()).setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.TOP_ON).setValue(FACING,this.getBlockState().getValue(FACING)),2);
|
||||
}
|
||||
level.setBlock(getBlockPos().above(),level.getBlockState(getBlockPos().above()).setValue(CONTROLLER_TYPE, CokeOvenBlock.ControllerType.TOP_ON).setValue(FACING,this.getBlockState().getValue(FACING)),2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -192,17 +208,17 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
(tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity(
|
||||
|
||||
|
||||
)){
|
||||
)){
|
||||
timer = lastRecipe.getProcessingDuration();
|
||||
inputInventory.setItem(0,new ItemStack(inputInventory.getItem(0).getItem(),inputInventory.getItem(0).getCount()-1));
|
||||
|
||||
}
|
||||
// if(lastRecipe != null)
|
||||
// if((tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())>tank1.getPrimaryHandler().getCapacity())
|
||||
// timer = -1;
|
||||
// if(lastRecipe != null)
|
||||
// if((tank2.getPrimaryHandler().getFluidAmount()+CARBON_DIOXIDE_PRODUCTION)>tank2.getPrimaryHandler().getCapacity())
|
||||
// timer = -1;
|
||||
// if(lastRecipe != null)
|
||||
// if((tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())>tank1.getPrimaryHandler().getCapacity())
|
||||
// timer = -1;
|
||||
// if(lastRecipe != null)
|
||||
// if((tank2.getPrimaryHandler().getFluidAmount()+CARBON_DIOXIDE_PRODUCTION)>tank2.getPrimaryHandler().getCapacity())
|
||||
// timer = -1;
|
||||
|
||||
|
||||
if(lastRecipe!=null
|
||||
@@ -221,8 +237,7 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
public void process(){
|
||||
|
||||
|
||||
if(level.isClientSide)
|
||||
return;
|
||||
|
||||
if(!isController)
|
||||
return;
|
||||
//RecipeWrapper inventoryIn = new RecipeWrapper(inputInventory);
|
||||
@@ -231,13 +246,16 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
// if (!recipe.isPresent())
|
||||
// return;
|
||||
// lastRecipe = recipe.get();
|
||||
//}
|
||||
//})
|
||||
BlockPos toSpawn = getBlockPos().below().relative(this.getBlockState().getValue(FACING));
|
||||
//
|
||||
ItemEntity itemToSpawn = new ItemEntity(level,toSpawn.getX()+0.5f,toSpawn.getY()+0.5f,toSpawn.getZ()+0.5f, lastRecipe.getResultItem().copy());
|
||||
|
||||
if(lastRecipe == null)
|
||||
return;
|
||||
|
||||
ItemEntity itemToSpawn = new ItemEntity(level, toSpawn.getX() + 0.5f, toSpawn.getY() + 0.5f, toSpawn.getZ() + 0.5f, lastRecipe.getResultItem().copy());
|
||||
level.addFreshEntity(itemToSpawn);
|
||||
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -248,29 +266,18 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
private void refreshCapability() {
|
||||
|
||||
if (this.controller == null) {
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(controller!=null)
|
||||
if (controller.tank1 != null)
|
||||
if (controller.tank2 != null)
|
||||
if (controller.inputInventory != null){
|
||||
fluidCapability = LazyOptional.of(() -> new CombinedTankWrapper(controller.tank1.getPrimaryHandler(), controller.tank2.getPrimaryHandler()));
|
||||
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(controller.inputInventory));
|
||||
}
|
||||
|
||||
|
||||
LazyOptional<IFluidHandler> oldFluidCapability = fluidCapability;
|
||||
LazyOptional<IItemHandlerModifiable> oldItemCapability = itemCapability;
|
||||
|
||||
|
||||
if (controller.tank1 != null){
|
||||
|
||||
if (controller.tank2 != null){
|
||||
|
||||
if (controller.inputInventory != null){
|
||||
|
||||
fluidCapability = LazyOptional.of(() -> new CombinedTankWrapper(controller.tank1.getPrimaryHandler(), controller.tank2.getPrimaryHandler()));
|
||||
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(controller.inputInventory));
|
||||
}}}
|
||||
|
||||
//oldFluidCapability.invalidate();
|
||||
//oldItemCapability.invalidate();
|
||||
}
|
||||
public void setControllers(){
|
||||
if(!isValid())
|
||||
@@ -289,10 +296,10 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
|
||||
CokeOvenBlockEntity checkedBE = (CokeOvenBlockEntity) level.getBlockEntity(checkedPos);
|
||||
checkedBE.controller = this;
|
||||
checkedBE.controller = this;
|
||||
|
||||
if(checkedBE.getBlockState().getValue(FACING)!=getBlockState().getValue(FACING))
|
||||
level.setBlock(checkedPos,checkedBE.getBlockState().setValue(FACING,getBlockState().getValue(FACING)),2);
|
||||
if(checkedBE.getBlockState().getValue(FACING)!=getBlockState().getValue(FACING))
|
||||
level.setBlock(checkedPos,checkedBE.getBlockState().setValue(FACING,getBlockState().getValue(FACING)),2);
|
||||
|
||||
checkedPos = checkedPos.below();
|
||||
}
|
||||
@@ -308,26 +315,34 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
BlockPos checkedPos=this.getBlockPos().above();
|
||||
|
||||
if(controller!=this){
|
||||
isController = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i<3;i++){
|
||||
for(int y = 0; y<3;y++){
|
||||
|
||||
if(checkedPos == this.getBlockPos()){
|
||||
if(!isCokeOvenBlock(checkedPos,true)) {
|
||||
isController = false;
|
||||
return false;
|
||||
}
|
||||
}else
|
||||
|
||||
if(!isCokeOvenBlock(checkedPos)) {
|
||||
isController=false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(occupiedByOtherController(checkedPos)) {
|
||||
if(checkedPos == this.getBlockPos()){
|
||||
if(!isCokeOvenBlock(checkedPos,true)) {
|
||||
isController = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
//
|
||||
if(!isCokeOvenBlock(checkedPos)) {
|
||||
isController = false;
|
||||
return false;
|
||||
}
|
||||
//
|
||||
if(occupiedByOtherController(checkedPos)) {
|
||||
isController = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -351,10 +366,13 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
}
|
||||
public boolean occupiedByOtherController(BlockPos pos){
|
||||
|
||||
if(level.getBlockEntity(pos).getBlockState().is(TFMGBlocks.COKE_OVEN.get()))
|
||||
if(((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller == null||((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller == this)
|
||||
// if(((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller != this)
|
||||
return false;
|
||||
if(controller == null)
|
||||
controller = this;
|
||||
|
||||
if(level.getBlockEntity(pos).getBlockState().is(TFMGBlocks.COKE_OVEN.get()))
|
||||
if(((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller == ((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller||((CokeOvenBlockEntity)level.getBlockEntity(pos)).controller == this)
|
||||
// if(()
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -368,10 +386,10 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
// Lang.translate("goggles.surface_scanner.distance",controller.getBlockPos().getY())
|
||||
// .style(ChatFormatting.DARK_BLUE)
|
||||
// .forGoggles(tooltip,1);
|
||||
// if(controller !=null)
|
||||
// Lang.translate("goggles.surface_scanner.distance",controller.timer)
|
||||
// .style(ChatFormatting.DARK_BLUE)
|
||||
// .forGoggles(tooltip,1);
|
||||
// if(controller !=null)
|
||||
// Lang.translate("goggles.surface_scanner.distance",controller.timer)
|
||||
// .style(ChatFormatting.DARK_BLUE)
|
||||
// .forGoggles(tooltip,1);
|
||||
//
|
||||
//if(controller==null){
|
||||
// Lang.translate("aaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
||||
@@ -379,8 +397,8 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
// .forGoggles(tooltip,1);
|
||||
//
|
||||
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
if(controller!=null)
|
||||
if(controller.getBlockPos() == getBlockPos()&&!isValid()){
|
||||
Lang.translate("goggles.coke_oven.invalid")
|
||||
@@ -401,7 +419,7 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
if(lastRecipe != null)
|
||||
if((tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())>tank1.getPrimaryHandler().getCapacity()
|
||||
&&(tank2.getPrimaryHandler().getFluidAmount()+CARBON_DIOXIDE_PRODUCTION)>tank2.getPrimaryHandler().getCapacity()) {
|
||||
&&(tank2.getPrimaryHandler().getFluidAmount()+CARBON_DIOXIDE_PRODUCTION)>tank2.getPrimaryHandler().getCapacity()) {
|
||||
Lang.translate("goggles.coke_oven.tank_full")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip,1);
|
||||
@@ -429,12 +447,12 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
|
||||
|
||||
// Lang.translate("goggles.coke_oven.fluid_amount_output",tank1.getPrimaryHandler().getCapacity())
|
||||
// .style(ChatFormatting.DARK_AQUA)
|
||||
// .forGoggles(tooltip,1);
|
||||
// Lang.translate("goggles.coke_oven.fluid_amount_exhaust",tank2.getPrimaryHandler().getCapacity())
|
||||
// .style(ChatFormatting.DARK_AQUA)
|
||||
// .forGoggles(tooltip,1);
|
||||
// Lang.translate("goggles.coke_oven.fluid_amount_output",tank1.getPrimaryHandler().getCapacity())
|
||||
// .style(ChatFormatting.DARK_AQUA)
|
||||
// .forGoggles(tooltip,1);
|
||||
// Lang.translate("goggles.coke_oven.fluid_amount_exhaust",tank2.getPrimaryHandler().getCapacity())
|
||||
// .style(ChatFormatting.DARK_AQUA)
|
||||
// .forGoggles(tooltip,1);
|
||||
Lang.translate("goggles.coke_oven.item_count",inputInventory.getItem(0).getCount())
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip,1);
|
||||
@@ -457,6 +475,14 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
timer = compound.getInt("Timer");
|
||||
|
||||
|
||||
// controller = (CokeOvenBlockEntity) level.getBlockEntity(new BlockPos(
|
||||
// compound.getInt("controllerX"),
|
||||
// compound.getInt("controllerY"),
|
||||
// compound.getInt("controllerZ")
|
||||
//
|
||||
// ));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -468,6 +494,13 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
compound.putInt("Timer", timer);
|
||||
|
||||
|
||||
// compound.putInt("controllerX", controller.getBlockPos().getX());
|
||||
// compound.putInt("controllerY", controller.getBlockPos().getY());
|
||||
// compound.putInt("controllerZ", controller.getBlockPos().getZ());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -478,13 +511,12 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
}
|
||||
@Nonnull
|
||||
@Override
|
||||
@SuppressWarnings("'net.minecraftforge.items.CapabilityItemHandler' is deprecated and marked for removal ")
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
if(controller!=null)
|
||||
refreshCapability();
|
||||
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
|
||||
if (cap == ForgeCapabilities.ITEM_HANDLER)
|
||||
return itemCapability.cast();
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
if (cap == ForgeCapabilities.FLUID_HANDLER)
|
||||
return fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
@@ -495,4 +527,4 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
super.addBehaviours(behaviours);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +1,27 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.base;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackBaseBlock extends HorizontalDirectionalBlock implements IWrenchable, IBE<PumpjackBaseBlockEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public PumpjackBaseBlock(Properties p_i48440_1_) {
|
||||
super(p_i48440_1_);
|
||||
|
||||
public class PumpjackBaseBlock extends Block implements IBE<PumpjackBaseBlockEntity> {
|
||||
public PumpjackBaseBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.PUMPJACK_BASE;
|
||||
}
|
||||
public BlockState rotate(BlockState p_54540_, Rotation p_54541_) {
|
||||
return p_54540_.setValue(FACING, p_54541_.rotate(p_54540_.getValue(FACING)));
|
||||
}
|
||||
|
||||
public BlockState mirror(BlockState p_54537_, Mirror p_54538_) {
|
||||
return p_54537_.rotate(p_54538_.getRotation(p_54537_.getValue(FACING)));
|
||||
}
|
||||
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54543_) {
|
||||
p_54543_.add(FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
|
||||
|
||||
world.removeBlockEntity(pos);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Class<PumpjackBaseBlockEntity> getBlockEntityClass() {
|
||||
@@ -69,4 +33,5 @@ public class PumpjackBaseBlock extends HorizontalDirectionalBlock implements IWr
|
||||
return TFMGBlockEntities.PUMPJACK_BASE.get();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.base;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.blocks.deposits.FluidDepositBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackBlockEntity;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.drmangotea.createindustry.registry.TFMGFluids;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
@@ -23,61 +22,152 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
import java.util.Optional;
|
||||
|
||||
public class PumpjackBaseBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
|
||||
|
||||
public BlockPos crankPos = this.getBlockPos();
|
||||
public PumpjackBlockEntity controllerHammer;
|
||||
|
||||
public boolean isRunning = false;
|
||||
|
||||
int depositCheckTimer = 0;
|
||||
|
||||
public int miningRate = 0;
|
||||
|
||||
protected LazyOptional<IFluidHandler> fluidCapability;
|
||||
public FluidTank tankInventory;
|
||||
public FluidDepositBlockEntity deposit;
|
||||
public Direction direction = this.getBlockState().getValue(FACING).getOpposite();
|
||||
int debugCounter = 0;
|
||||
public int miningRate = 0;
|
||||
int depositCheckTimer = 0;
|
||||
|
||||
private static final int SYNC_RATE = 8;
|
||||
protected int syncCooldown;
|
||||
protected boolean queuedSync;
|
||||
|
||||
|
||||
public PumpjackBaseBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tankInventory = createInventory();
|
||||
fluidCapability = LazyOptional.of(() -> tankInventory);
|
||||
|
||||
refreshCapability();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
|
||||
|
||||
if(controllerHammer!=null)
|
||||
if(controllerHammer.crank!=null){
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(controllerHammer!=null)
|
||||
if (!(level.getBlockEntity(controllerHammer.getBlockPos()) instanceof PumpjackBlockEntity))
|
||||
controllerHammer = null;
|
||||
|
||||
|
||||
if(controllerHammer!=null)
|
||||
if(controllerHammer.base==null)
|
||||
controllerHammer = null;
|
||||
|
||||
if(controllerHammer!=null)
|
||||
if(!controllerHammer.isRunning())
|
||||
controllerHammer = null;
|
||||
|
||||
if(controllerHammer==null)
|
||||
return;
|
||||
|
||||
isRunning = controllerHammer.isRunning();
|
||||
|
||||
|
||||
|
||||
if(!isRunning) {
|
||||
deposit = null;
|
||||
controllerHammer = null;
|
||||
miningRate = 0;
|
||||
return;
|
||||
}
|
||||
depositCheckTimer++;
|
||||
if (depositCheckTimer > 50) {
|
||||
depositCheckTimer = 0;
|
||||
findDeposit();
|
||||
|
||||
}
|
||||
PumpjackCrankBlockEntity crank=null;
|
||||
if(controllerHammer.crank!=null)
|
||||
crank = controllerHammer.crank;
|
||||
|
||||
if(crank == null)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
miningRate =
|
||||
|
||||
(int)
|
||||
Math.abs(crank.getMachineInputSpeed()*
|
||||
(crank.heightModifier));
|
||||
|
||||
process();
|
||||
|
||||
}
|
||||
public void findDeposit() {
|
||||
for (int i = 0; i < this.getBlockPos().getY() + 64; i++) {
|
||||
BlockPos checkedPos = new BlockPos(this.getBlockPos().getX(), (this.getBlockPos().getY() - 1) - i, this.getBlockPos().getZ());
|
||||
|
||||
if (level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.OIL_DEPOSIT.get())) {
|
||||
deposit = (FluidDepositBlockEntity) level.getBlockEntity(checkedPos);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.INDUSTRIAL_PIPE.get()))) {
|
||||
deposit = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
deposit = null;
|
||||
|
||||
}
|
||||
public void process() {
|
||||
if (deposit == null || deposit.fluidAmount == 0)
|
||||
return;
|
||||
|
||||
if (tankInventory.getFluidAmount() + miningRate > 8000)
|
||||
return;
|
||||
|
||||
deposit.fluidAmount -= miningRate;
|
||||
|
||||
tankInventory.setFluid(new FluidStack(deposit.getDepositFluid(), tankInventory.getFluidAmount() + miningRate));
|
||||
|
||||
}
|
||||
|
||||
public void setControllerHammer(PumpjackBlockEntity controllerHammer) {
|
||||
this.controllerHammer = controllerHammer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
}
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(8000, this::onFluidStackChanged) {
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(TFMGFluids.CRUDE_OIL.getSource());
|
||||
}
|
||||
};
|
||||
}
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {}
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
Lang.translate("goggles.pumpjack_info")
|
||||
.forGoggles(tooltip);
|
||||
if (!isComplete()) {
|
||||
Lang.translate("goggles.pumpjack.part_missing")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip);
|
||||
if(isWronglyRotated()){
|
||||
Lang.translate("goggles.pumpjack.wrong_rotation1")
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("goggles.pumpjack.wrong_rotation2")
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
|
||||
@@ -98,6 +188,10 @@ public class PumpjackBaseBlockEntity extends SmartBlockEntity implements IHaveGo
|
||||
).forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
Lang.translate("pumpjack_deposit_amount", this.miningRate)
|
||||
.style(ChatFormatting.LIGHT_PURPLE)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
} else {
|
||||
|
||||
Lang.translate("goggles.zero")
|
||||
@@ -105,158 +199,66 @@ public class PumpjackBaseBlockEntity extends SmartBlockEntity implements IHaveGo
|
||||
.forGoggles(tooltip, 1);
|
||||
}
|
||||
|
||||
//--Fluid Info--//
|
||||
LazyOptional<IFluidHandler> handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
|
||||
Optional<IFluidHandler> resolve = handler.resolve();
|
||||
if (!resolve.isPresent())
|
||||
return false;
|
||||
|
||||
IFluidHandler tank = resolve.get();
|
||||
if (tank.getTanks() == 0)
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
|
||||
boolean isEmpty = true;
|
||||
for (int i = 0; i < tank.getTanks(); i++) {
|
||||
FluidStack fluidStack = tank.getFluidInTank(i);
|
||||
if (fluidStack.isEmpty())
|
||||
continue;
|
||||
|
||||
Lang.fluidName(fluidStack)
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.builder()
|
||||
.add(Lang.number(fluidStack.getAmount())
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(Lang.number(tank.getTankCapacity(i))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
isEmpty = false;
|
||||
}
|
||||
|
||||
if (tank.getTanks() > 1) {
|
||||
if (isEmpty)
|
||||
tooltip.remove(tooltip.size() - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isEmpty)
|
||||
return true;
|
||||
|
||||
Lang.translate("gui.goggles.fluid_container.capacity")
|
||||
.add(Lang.number(tank.getTankCapacity(0))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.style(ChatFormatting.DARK_GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void process() {
|
||||
if (deposit == null || deposit.fluidAmount == 0)
|
||||
return;
|
||||
|
||||
if (tankInventory.getFluidAmount() + miningRate > 1000)
|
||||
return;
|
||||
|
||||
deposit.fluidAmount -= miningRate;
|
||||
tankInventory.setFluid(new FluidStack(deposit.getDepositFluid(), tankInventory.getFluidAmount() + miningRate));
|
||||
}
|
||||
|
||||
public boolean hasPipe() {
|
||||
|
||||
for (int i = -62; i != getBlockPos().getY(); i++) {
|
||||
BlockPos pos = new BlockPos(getBlockPos().getX(), i, getBlockPos().getZ());
|
||||
if (!(level.getBlockState(pos).is(TFMGBlocks.INDUSTRIAL_PIPE.get())))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public void findDeposit() {
|
||||
for (int i = 0; i < this.getBlockPos().getY() + 64; i++) {
|
||||
debugCounter = this.getBlockPos().getY() - i;
|
||||
BlockPos checkedPos = new BlockPos(this.getBlockPos().getX(), (this.getBlockPos().getY() - 1) - i, this.getBlockPos().getZ());
|
||||
|
||||
if (level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.OIL_DEPOSIT.get())) {
|
||||
deposit = (FluidDepositBlockEntity) level.getBlockEntity(checkedPos);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.INDUSTRIAL_PIPE.get()))) {
|
||||
deposit = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
debugCounter = 0;
|
||||
deposit = null;
|
||||
return;
|
||||
|
||||
/*
|
||||
if(!hasPipe()) {
|
||||
deposit = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(new BlockPos(getBlockPos().getX(),-63,getBlockPos().getZ())) instanceof FluidDepositTileEntity) {
|
||||
deposit = (FluidDepositTileEntity) (level.getBlockEntity(new BlockPos(getBlockPos().getX(),-64,getBlockPos().getZ())));
|
||||
}else {
|
||||
deposit=null;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged) {
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(TFMGFluids.CRUDE_OIL.getSource());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (!isComplete())
|
||||
return;
|
||||
|
||||
|
||||
MachineInputBlockEntity input = null;
|
||||
if (level.getBlockEntity(crankPos.below()) instanceof MachineInputBlockEntity)
|
||||
input = (MachineInputBlockEntity) level.getBlockEntity(crankPos.below());
|
||||
if (input == null)
|
||||
return;
|
||||
miningRate = input.powerLevel * 12;
|
||||
|
||||
|
||||
depositCheckTimer++;
|
||||
if (depositCheckTimer > 50) {
|
||||
depositCheckTimer = 0;
|
||||
findDeposit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
direction = this.getBlockState().getValue(FACING).getOpposite();
|
||||
|
||||
process();
|
||||
if (syncCooldown > 0) {
|
||||
syncCooldown--;
|
||||
if (syncCooldown == 0 && queuedSync)
|
||||
sendData();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
super.initialize();
|
||||
sendData();
|
||||
if (level.isClientSide)
|
||||
invalidateRenderBoundingBox();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void sendData() {
|
||||
if (syncCooldown > 0) {
|
||||
queuedSync = true;
|
||||
return;
|
||||
}
|
||||
super.sendData();
|
||||
queuedSync = false;
|
||||
syncCooldown = SYNC_RATE;
|
||||
}
|
||||
|
||||
|
||||
private void refreshCapability() {
|
||||
LazyOptional<IFluidHandler> oldCap = fluidCapability;
|
||||
fluidCapability = LazyOptional.of(() -> handlerForCapability());
|
||||
oldCap.invalidate();
|
||||
}
|
||||
|
||||
private IFluidHandler handlerForCapability() {
|
||||
|
||||
return tankInventory;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
|
||||
tankInventory.setCapacity(1000);
|
||||
|
||||
tankInventory.readFromNBT(compound.getCompound("TankContent"));
|
||||
}
|
||||
|
||||
@@ -269,106 +271,13 @@ public class PumpjackBaseBlockEntity extends SmartBlockEntity implements IHaveGo
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
|
||||
if (!fluidCapability.isPresent())
|
||||
refreshCapability();
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return fluidCapability.cast();
|
||||
@SuppressWarnings("removal")
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
}
|
||||
|
||||
public IFluidTank getTankInventory() {
|
||||
return tankInventory;
|
||||
}
|
||||
|
||||
public boolean isComplete() {
|
||||
BlockPos hammerPos = this.getBlockPos();
|
||||
crankPos = this.getBlockPos();
|
||||
if (direction == Direction.WEST) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().west(4).above(1));
|
||||
}
|
||||
if (direction == Direction.EAST) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().east(4).above(1));
|
||||
}
|
||||
if (direction == Direction.NORTH) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().north(4).above(1));
|
||||
}
|
||||
if (direction == Direction.SOUTH) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().south(4).above(1));
|
||||
}
|
||||
|
||||
|
||||
if (!(level.getBlockEntity(hammerPos) instanceof PumpjackHammerHolderBlockEntity &&
|
||||
level.getBlockEntity(crankPos) instanceof PumpjackCrankBlockEntity)) {
|
||||
return false;
|
||||
}
|
||||
//MachineInputTileEntity input = (MachineInputTileEntity) level.getBlockEntity(crankPos.below());
|
||||
// if(input.powerLevel==0)
|
||||
// return false;
|
||||
|
||||
|
||||
if (level.getBlockEntity(hammerPos).getBlockState().getValue(FACING).getOpposite() == direction
|
||||
&& level.getBlockEntity(crankPos).getBlockState().getValue(FACING).getOpposite() == direction
|
||||
)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public boolean isWronglyRotated() {
|
||||
if (isComplete())
|
||||
return false;
|
||||
|
||||
|
||||
BlockPos hammerPos1 = this.getBlockPos();
|
||||
BlockPos hammerPos2 = this.getBlockPos();
|
||||
BlockPos hammerPos3 = this.getBlockPos();
|
||||
crankPos = this.getBlockPos();
|
||||
if (direction == Direction.WEST) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
}
|
||||
if (direction == Direction.EAST) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
}
|
||||
if (direction == Direction.NORTH) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
}
|
||||
if (direction == Direction.SOUTH) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
}
|
||||
|
||||
|
||||
BlockState hammer1 = level.getBlockState(hammerPos1);
|
||||
BlockState hammer2 = level.getBlockState(hammerPos2);
|
||||
BlockState hammer3 = level.getBlockState(hammerPos3);
|
||||
|
||||
|
||||
return hammer1.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get())||
|
||||
hammer2.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get())||
|
||||
hammer3.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.AllShapes;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackCrankBlock extends HorizontalDirectionalBlock implements IBE<PumpjackCrankBlockEntity>, IWrenchable {
|
||||
public class PumpjackCrankBlock extends HorizontalDirectionalBlock implements IBE<PumpjackCrankBlockEntity> {
|
||||
public PumpjackCrankBlock(Properties p_54120_) {
|
||||
super(p_54120_);
|
||||
}
|
||||
@@ -26,23 +25,22 @@ public class PumpjackCrankBlock extends HorizontalDirectionalBlock implements IB
|
||||
return this.defaultBlockState().setValue(FACING, p_54779_.getHorizontalDirection());
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter p_220053_2_, BlockPos p_220053_3_,
|
||||
CollisionContext p_220053_4_) {
|
||||
return TFMGShapes.PUMPJACK_CRANK;
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return AllShapes.CASING_14PX.get(Direction.UP);
|
||||
}
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(FACING);
|
||||
}
|
||||
@Override
|
||||
public Class<PumpjackCrankBlockEntity> getBlockEntityClass() {
|
||||
return PumpjackCrankBlockEntity.class;
|
||||
}
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState pState) {
|
||||
return RenderShape.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends PumpjackCrankBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.PUMPJACK_CRANK.get();
|
||||
}
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54794_) {
|
||||
p_54794_.add(FACING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,122 +1,101 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public class PumpjackCrankBlockEntity extends KineticBlockEntity {
|
||||
float targetSpeed;
|
||||
|
||||
|
||||
public float angle=0;
|
||||
|
||||
public Direction direction;
|
||||
public BlockPos hammerPos;
|
||||
public float heightModifier=0;
|
||||
|
||||
protected float clientAngleDiff;
|
||||
|
||||
|
||||
public float crankRadius = 0.7f;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public PumpjackCrankBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
angle=177;
|
||||
if(direction==Direction.NORTH)
|
||||
hammerPos =this.getBlockPos().north(2).above();
|
||||
if(direction==Direction.SOUTH)
|
||||
hammerPos =this.getBlockPos().south(2).above();
|
||||
if(direction==Direction.WEST)
|
||||
hammerPos =this.getBlockPos().west(2).above();
|
||||
if(direction==Direction.EAST)
|
||||
hammerPos =this.getBlockPos().east(2).above();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
compound.putFloat("Angle", angle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
|
||||
angle = compound.getFloat("Angle");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
public void tick(){
|
||||
super.tick();
|
||||
|
||||
|
||||
direction = this.getBlockState().getValue(FACING);
|
||||
|
||||
if (!level.isClientSide)
|
||||
return;
|
||||
setAngle();
|
||||
|
||||
|
||||
if(direction==Direction.NORTH)
|
||||
hammerPos =this.getBlockPos().north(2).above();
|
||||
if(direction==Direction.SOUTH)
|
||||
hammerPos =this.getBlockPos().south(2).above();
|
||||
if(direction==Direction.WEST)
|
||||
hammerPos =this.getBlockPos().west(2).above();
|
||||
if(direction==Direction.EAST)
|
||||
hammerPos =this.getBlockPos().east(2).above();
|
||||
|
||||
heightModifier = (float) (crankRadius * Math.sin(Math.toRadians(angle)));
|
||||
|
||||
|
||||
if(!isValid()) {
|
||||
angle = 177;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public float getMachineInputSpeed(){
|
||||
|
||||
if(level.getBlockEntity(getBlockPos().below()) instanceof MachineInputBlockEntity)
|
||||
return ((MachineInputBlockEntity)level.getBlockEntity(getBlockPos().below())).getSpeed();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
private void setAngle() {
|
||||
|
||||
if(level.getBlockEntity(getBlockPos().below()) instanceof MachineInputBlockEntity) {
|
||||
float time;
|
||||
if(level.isClientSide) {
|
||||
time = AnimationTickHolder.getRenderTime(getLevel());
|
||||
}else time = level.getBlockTicks().hashCode();
|
||||
float speed_amogus = Math.min(getMachineInputSpeed() /6 , (float) 10);
|
||||
|
||||
|
||||
|
||||
if(speed_amogus!=0) {
|
||||
angle = (time * speed_amogus * 3 / 10f) % 360;
|
||||
angle = angle / 180f * (float) Math.PI;
|
||||
angle = (float) Math.toDegrees(angle);
|
||||
}
|
||||
else angle = 180;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(this.getBlockPos().below())instanceof MachineInputBlockEntity) {
|
||||
if(((MachineInputBlockEntity)level.getBlockEntity(this.getBlockPos().below())).powerLevel!=0) {
|
||||
angle += 3;
|
||||
}else angle=177;
|
||||
}else
|
||||
angle=177;
|
||||
|
||||
|
||||
|
||||
targetSpeed= 10;
|
||||
|
||||
|
||||
|
||||
angle%=360;
|
||||
|
||||
}
|
||||
|
||||
public boolean isValid(){
|
||||
if(hammerPos==null)
|
||||
return false;
|
||||
|
||||
if(!(level.getBlockEntity(hammerPos) instanceof PumpjackHammerHolderBlockEntity))
|
||||
return false;
|
||||
if(!(direction==level.getBlockEntity(hammerPos).getBlockState().getValue(FACING)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
private void moveConnectionPos() {
|
||||
connectionPos = new BlockPos(this.getBlockPos().getX()+0.5f,this.getBlockPos().getY()+0.25f,this.getBlockPos().getZ()+0.5f);
|
||||
|
||||
float y=0.8f;
|
||||
float x=0.8f;
|
||||
// connectionPos.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
|
||||
// @Override
|
||||
// public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
//
|
||||
// Lang.translate("goggles.coke_oven.progress", angle)
|
||||
// .add(Lang.translate("goggles.misc.percent_symbol"))
|
||||
// .style(ChatFormatting.DARK_PURPLE)
|
||||
// .forGoggles(tooltip,1);
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.cr
|
||||
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
@@ -11,11 +11,9 @@ import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
@@ -35,15 +33,13 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer {
|
||||
|
||||
|
||||
|
||||
// if (Backend.canUseInstancing(te.getLevel()))
|
||||
// return;
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
PumpjackCrankBlockEntity wte = (PumpjackCrankBlockEntity) te;
|
||||
PumpjackCrankBlockEntity be = (PumpjackCrankBlockEntity) te;
|
||||
|
||||
|
||||
|
||||
float angle = wte.angle * partialTicks;
|
||||
float angle = be.angle * partialTicks;
|
||||
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
|
||||
@@ -54,9 +50,9 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer {
|
||||
VertexConsumer vb) {
|
||||
|
||||
|
||||
SuperByteBuffer hammer = CachedBufferer.block(blockState);
|
||||
//kineticRotationTransform(hammer, te, getRotationAxisOf(te), AngleHelper.rad(angle), light);
|
||||
hammer.renderInto(ms, vb);
|
||||
//SuperByteBuffer hammer = CachedBufferer.block(blockState);
|
||||
////kineticRotationTransform(hammer, te, getRotationAxisOf(te), AngleHelper.rad(angle), light);
|
||||
//hammer.renderInto(ms, vb);
|
||||
}
|
||||
private void renderBlock(PumpjackCrankBlockEntity be, PoseStack ms, int light,
|
||||
MultiBufferSource buffer) {
|
||||
@@ -70,18 +66,17 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer {
|
||||
float dialPivot = 5.75f / 16;
|
||||
|
||||
SuperByteBuffer crank = CachedBufferer.partialFacing(TFMGPartialModels.PUMPJACK_CRANK, blockState,blockState.getValue(FACING));
|
||||
CachedBufferer.partialFacing(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState,blockState.getValue(FACING))
|
||||
.translate(-0.5, -0.5, -0.5)
|
||||
.light(light)
|
||||
.renderInto(ms,vb);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
crank
|
||||
.translate(-0.5, -0.5, -0.5)
|
||||
.centre()
|
||||
.translate(0, -.25, 0)
|
||||
.rotate(be.getBlockState().getValue(FACING).getCounterClockWise(), -AngleHelper.rad(be.angle))
|
||||
.translate(0, .25, 0)
|
||||
// .translate(0, -.25, 0)
|
||||
.rotate(be.angle-90,be.getBlockState().getValue(FACING).getCounterClockWise().getAxis())
|
||||
//.translate(0, .25, 0)
|
||||
.unCentre()
|
||||
|
||||
.light(light);
|
||||
@@ -89,87 +84,6 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer {
|
||||
crank.renderInto(ms,vb);
|
||||
|
||||
|
||||
|
||||
if (be.direction == Direction.NORTH){
|
||||
|
||||
|
||||
if(be.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(be.direction == Direction.EAST) {
|
||||
|
||||
if(be.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(270)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(be.direction == Direction.SOUTH) {
|
||||
|
||||
|
||||
if(be.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(180)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(be.direction == Direction.WEST) {
|
||||
|
||||
if(be.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(90)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(be.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ms.popPose();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.simibubi.create.content.contraptions.bearing.BearingBlock;
|
||||
import com.simibubi.create.content.kinetics.base.IRotate;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
|
||||
public class PumpjackBlock extends BearingBlock implements IBE<PumpjackBlockEntity> {
|
||||
|
||||
|
||||
public static final BooleanProperty WIDE = BooleanProperty.create("wide");
|
||||
|
||||
public PumpjackBlock(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(WIDE);
|
||||
super.createBlockStateDefinition(builder);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn,
|
||||
BlockHitResult hit) {
|
||||
if (!player.mayBuild())
|
||||
return InteractionResult.FAIL;
|
||||
|
||||
if (player.isShiftKeyDown())
|
||||
return InteractionResult.FAIL;
|
||||
|
||||
if (player.getItemInHand(handIn)
|
||||
.isEmpty()) {
|
||||
if (worldIn.isClientSide)
|
||||
return InteractionResult.SUCCESS;
|
||||
withBlockEntityDo(worldIn, pos, be -> {
|
||||
if (be.running) {
|
||||
//be.disassemble();
|
||||
return;
|
||||
}
|
||||
|
||||
//if(be.crank==null||be.base == null)
|
||||
// return;
|
||||
|
||||
|
||||
});
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
|
||||
boolean wide = context.getLevel().getBlockState(context.getClickedPos().above()).is(TFMGBlocks.LARGE_PUMPJACK_HAMMER_PART.get());
|
||||
|
||||
Direction preferredDirection = getPreferredHorizontalFacing(context);
|
||||
if (preferredDirection != null)
|
||||
return this.defaultBlockState().setValue(FACING, preferredDirection).setValue(WIDE,wide);
|
||||
return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection()).setValue(WIDE,wide);
|
||||
}
|
||||
|
||||
public static Direction getPreferredHorizontalFacing(BlockPlaceContext context) {
|
||||
Direction prefferedSide = null;
|
||||
for (Direction side : Iterate.horizontalDirections) {
|
||||
BlockState blockState = context.getLevel().getBlockState(context.getClickedPos().relative(side));
|
||||
if (blockState.getBlock() instanceof IRotate) {
|
||||
if (((IRotate) blockState.getBlock()).hasShaftTowards(context.getLevel(), context.getClickedPos().relative(side),
|
||||
blockState, side.getOpposite()))
|
||||
if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) {
|
||||
prefferedSide = null;
|
||||
break;
|
||||
} else {
|
||||
prefferedSide = side;
|
||||
}
|
||||
}
|
||||
}
|
||||
return prefferedSide == null ? null : prefferedSide;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<PumpjackBlockEntity> getBlockEntityClass() {
|
||||
return PumpjackBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends PumpjackBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.PUMPJACK_HAMMER.get();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,720 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerConnectorBlock;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerHeadBlock;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerPartBlock;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large.LargePumpjackHammerConnectorBlock;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large.LargePumpjackHammerHeadBlock;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large.LargePumpjackHammerPartBlock;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.content.contraptions.AbstractContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.AssemblyException;
|
||||
import com.simibubi.create.content.contraptions.ControlledContraptionEntity;
|
||||
import com.simibubi.create.content.contraptions.IDisplayAssemblyExceptions;
|
||||
import com.simibubi.create.content.contraptions.bearing.BearingBlock;
|
||||
import com.simibubi.create.content.contraptions.bearing.IBearingBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.transmission.sequencer.SequencerInstructions;
|
||||
import com.simibubi.create.foundation.advancement.AllAdvancements;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.scrollValue.ScrollOptionBehaviour;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.ServerSpeedProvider;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import static com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackBlock.WIDE;
|
||||
import static net.minecraft.world.level.block.DirectionalBlock.FACING;
|
||||
|
||||
public class PumpjackBlockEntity extends GeneratingKineticBlockEntity
|
||||
implements IBearingBlockEntity, IDisplayAssemblyExceptions {
|
||||
|
||||
protected ScrollOptionBehaviour<RotationMode> movementMode;
|
||||
protected ControlledContraptionEntity movedContraption;
|
||||
protected float angle;
|
||||
protected boolean running;
|
||||
protected boolean assembleNextTick;
|
||||
protected float clientAngleDiff;
|
||||
protected AssemblyException lastException;
|
||||
protected double sequencedAngleLimit;
|
||||
|
||||
private float prevAngle;
|
||||
|
||||
public BlockPos headPosition=null;
|
||||
public BlockPos connectorPosition =null;
|
||||
|
||||
public PumpjackCrankBlockEntity crank=null;
|
||||
|
||||
public PumpjackBaseBlockEntity base=null;
|
||||
|
||||
public int connectorDistance = 0;
|
||||
|
||||
public int headDistance = 0;
|
||||
|
||||
public boolean connectorAtFront = false;
|
||||
|
||||
public boolean headAtFront = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int crankConnectorDistance = 0;
|
||||
|
||||
public int headBaseDistance = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
public PumpjackBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
setLazyTickRate(3);
|
||||
sequencedAngleLimit = -1;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWoodenTop() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean syncSequenceContext() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected AABB createRenderBoundingBox() {
|
||||
return super.createRenderBoundingBox().inflate(7);
|
||||
}
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
super.addBehaviours(behaviours);
|
||||
|
||||
registerAwardables(behaviours, AllAdvancements.CONTRAPTION_ACTORS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
if (!level.isClientSide)
|
||||
disassemble();
|
||||
super.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
|
||||
if(connectorPosition!=null) {
|
||||
compound.putInt("connectorX", connectorPosition.getX());
|
||||
compound.putInt("connectorY", connectorPosition.getY());
|
||||
compound.putInt("connectorZ", connectorPosition.getZ());
|
||||
}
|
||||
//
|
||||
if(headPosition!=null) {
|
||||
compound.putInt("headX", headPosition.getX());
|
||||
compound.putInt("headY", headPosition.getY());
|
||||
compound.putInt("headZ", headPosition.getZ());
|
||||
}
|
||||
|
||||
|
||||
compound.putBoolean("connectorAtFront", connectorAtFront);
|
||||
compound.putBoolean("headAtFront", headAtFront);
|
||||
|
||||
compound.putBoolean("Running", running);
|
||||
compound.putFloat("Angle", angle);
|
||||
if (sequencedAngleLimit >= 0)
|
||||
compound.putDouble("SequencedAngleLimit", sequencedAngleLimit);
|
||||
AssemblyException.write(compound, lastException);
|
||||
super.write(compound, clientPacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
if (wasMoved) {
|
||||
super.read(compound, clientPacket);
|
||||
return;
|
||||
}
|
||||
|
||||
connectorPosition = new BlockPos(
|
||||
compound.getInt("connectorX"),
|
||||
compound.getInt("connectorY"),
|
||||
compound.getInt("connectorZ")
|
||||
);
|
||||
headPosition = new BlockPos(
|
||||
compound.getInt("headX"),
|
||||
compound.getInt("headY"),
|
||||
compound.getInt("headZ")
|
||||
);
|
||||
|
||||
connectorAtFront = compound.getBoolean("connectorAtFront");
|
||||
headAtFront = compound.getBoolean("headAtFront");
|
||||
|
||||
float angleBefore = angle;
|
||||
running = compound.getBoolean("Running");
|
||||
angle = compound.getFloat("Angle");
|
||||
sequencedAngleLimit = compound.contains("SequencedAngleLimit") ? compound.getDouble("SequencedAngleLimit") : -1;
|
||||
lastException = AssemblyException.read(compound);
|
||||
super.read(compound, clientPacket);
|
||||
if (!clientPacket)
|
||||
return;
|
||||
if (running) {
|
||||
if (movedContraption == null || !movedContraption.isStalled()) {
|
||||
clientAngleDiff = AngleHelper.getShortestAngleDiff(angleBefore, angle);
|
||||
angle = angleBefore;
|
||||
}
|
||||
} else
|
||||
movedContraption = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedAngle(float partialTicks) {
|
||||
if (isVirtual())
|
||||
return Mth.lerp(partialTicks + .5f, prevAngle, angle);
|
||||
if (movedContraption == null || movedContraption.isStalled() || !running)
|
||||
partialTicks = 0;
|
||||
float angularSpeed = getAngularSpeed();
|
||||
if (sequencedAngleLimit >= 0)
|
||||
angularSpeed = (float) Mth.clamp(angularSpeed, -sequencedAngleLimit, sequencedAngleLimit);
|
||||
return Mth.lerp(partialTicks, angle, angle + angularSpeed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpeedChanged(float prevSpeed) {
|
||||
super.onSpeedChanged(prevSpeed);
|
||||
assembleNextTick = true;
|
||||
sequencedAngleLimit = -1;
|
||||
|
||||
if (movedContraption != null && Math.signum(prevSpeed) != Math.signum(getSpeed()) && prevSpeed != 0) {
|
||||
if (!movedContraption.isStalled()) {
|
||||
angle = Math.round(angle);
|
||||
applyRotation();
|
||||
}
|
||||
movedContraption.getContraption()
|
||||
.stop(level);
|
||||
}
|
||||
|
||||
if (sequenceContext != null
|
||||
&& sequenceContext.instruction() == SequencerInstructions.TURN_ANGLE)
|
||||
sequencedAngleLimit = sequenceContext.getEffectiveValue(getTheoreticalSpeed());
|
||||
}
|
||||
|
||||
public float getAngularSpeed() {
|
||||
float speed = convertToAngular(getSpeed());
|
||||
|
||||
|
||||
if (getSpeed() == 0)
|
||||
speed = 0;
|
||||
if (level.isClientSide) {
|
||||
speed *= ServerSpeedProvider.get();
|
||||
speed += clientAngleDiff / 3f;
|
||||
}
|
||||
return speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssemblyException getLastAssemblyException() {
|
||||
return lastException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public BlockPos getBlockPosition() {
|
||||
return worldPosition;
|
||||
}
|
||||
|
||||
public void assemble() {
|
||||
|
||||
|
||||
if (!(level.getBlockState(worldPosition)
|
||||
.getBlock() instanceof BearingBlock))
|
||||
return;
|
||||
|
||||
Direction direction = getBlockState().getValue(BearingBlock.FACING);
|
||||
PumpjackContraption contraption = new PumpjackContraption(direction);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
if (!contraption.assemble(level, worldPosition))
|
||||
return;
|
||||
|
||||
if(connectorPosition==null||headPosition == null)
|
||||
return;
|
||||
|
||||
lastException = null;
|
||||
} catch (AssemblyException e) {
|
||||
lastException = e;
|
||||
sendData();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int q = 1;
|
||||
|
||||
if(direction.getAxis()== Direction.Axis.X)
|
||||
q = -1;
|
||||
|
||||
boolean canAssemble = true;
|
||||
boolean foundHead= false;
|
||||
boolean foundConnector= false;
|
||||
|
||||
BlockPos headLocalPos = headPosition.subtract(getBlockPos().above());
|
||||
|
||||
for (StructureTemplate.StructureBlockInfo block : contraption.getBlocks().values()) {
|
||||
if(block.state.getBlock() instanceof PumpjackHammerHeadBlock||block.state.getBlock() instanceof LargePumpjackHammerHeadBlock) {
|
||||
foundHead = true;
|
||||
if (block.pos.getX() != headLocalPos.getX() ||
|
||||
block.pos.getY() != q*headLocalPos.getY() ||
|
||||
block.pos.getZ() != q*headLocalPos.getZ())
|
||||
canAssemble = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BlockPos connectorLocalPos = connectorPosition.subtract(getBlockPos().above());
|
||||
|
||||
for (StructureTemplate.StructureBlockInfo block : contraption.getBlocks().values()) {
|
||||
if(block.state.getBlock() instanceof PumpjackHammerConnectorBlock||block.state.getBlock() instanceof LargePumpjackHammerConnectorBlock) {
|
||||
foundConnector = true;
|
||||
if (block.pos.getX() !=connectorLocalPos.getX() ||
|
||||
block.pos.getY() != q*connectorLocalPos.getY() ||
|
||||
block.pos.getZ() != q*connectorLocalPos.getZ())
|
||||
canAssemble = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!canAssemble||!foundHead||!foundConnector)
|
||||
return;
|
||||
|
||||
|
||||
if(base.controllerHammer!=this&&base.controllerHammer!=null)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
contraption.removeBlocksFromWorld(level, BlockPos.ZERO);
|
||||
movedContraption = ControlledContraptionEntity.create(level, this, contraption);
|
||||
BlockPos anchor = worldPosition.above();
|
||||
movedContraption.setPos(anchor.getX(), anchor.getY(), anchor.getZ());
|
||||
movedContraption.setRotationAxis(direction.getClockWise().getAxis());
|
||||
level.addFreshEntity(movedContraption);
|
||||
|
||||
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(level, worldPosition);
|
||||
|
||||
if (contraption.containsBlockBreakers())
|
||||
award(AllAdvancements.CONTRAPTION_ACTORS);
|
||||
|
||||
|
||||
|
||||
running = true;
|
||||
angle = 0;
|
||||
sendData();
|
||||
updateGeneratedRotation();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private boolean findHeadAndConnector() {
|
||||
|
||||
|
||||
|
||||
|
||||
Direction direction = getBlockState().getValue(FACING);
|
||||
|
||||
BlockPos checkedPos = this.getBlockPos().above();
|
||||
|
||||
|
||||
|
||||
|
||||
connectorPosition = null;
|
||||
headPosition = null;
|
||||
|
||||
for(int i =0;i<7;i++){
|
||||
|
||||
if(connectorPosition!=null&&headPosition!=null
|
||||
//&&
|
||||
//level.getBlockState(headPosition).getBlock() instanceof PumpjackHammerHeadBlock&&
|
||||
//level.getBlockState(connectorPosition).getBlock() instanceof PumpjackHammerConnectorBlock
|
||||
) {
|
||||
sendData();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(i!=0)
|
||||
if(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerHeadBlock||(level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerHeadBlock)){
|
||||
headPosition = checkedPos;
|
||||
headAtFront = true;
|
||||
checkedPos = checkedPos.relative(direction);
|
||||
sendData();
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i!=0)
|
||||
if(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerConnectorBlock||level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerConnectorBlock){
|
||||
if(level.getBlockState(checkedPos).getValue(HorizontalDirectionalBlock.FACING).getAxis()==this.getBlockState().getValue(FACING).getAxis()) {
|
||||
|
||||
connectorPosition = checkedPos;
|
||||
connectorAtFront = true;
|
||||
checkedPos = checkedPos.relative(direction);
|
||||
|
||||
sendData();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerPartBlock)&&!(level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerPartBlock)) {
|
||||
|
||||
break;
|
||||
}else {
|
||||
if(level.getBlockState(checkedPos).getValue(HorizontalDirectionalBlock.FACING).getAxis()!=this.getBlockState().getValue(FACING).getAxis()) {
|
||||
|
||||
break;
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
checkedPos = checkedPos.relative(direction);
|
||||
|
||||
|
||||
}
|
||||
|
||||
checkedPos = this.getBlockPos().above();
|
||||
|
||||
|
||||
for(int i =0;i<7;i++){
|
||||
|
||||
|
||||
|
||||
if(connectorPosition!=null&&headPosition!=null) {
|
||||
sendData();
|
||||
return true;
|
||||
}
|
||||
if(i!=0)
|
||||
if(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerHeadBlock||(level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerHeadBlock)){
|
||||
headPosition = checkedPos;
|
||||
headAtFront = false;
|
||||
checkedPos = checkedPos.relative(direction.getOpposite());
|
||||
|
||||
sendData();
|
||||
continue;
|
||||
}
|
||||
|
||||
if(i!=0)
|
||||
if(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerConnectorBlock||level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerConnectorBlock){
|
||||
if(level.getBlockState(checkedPos).getValue(HorizontalDirectionalBlock.FACING).getAxis()==this.getBlockState().getValue(FACING).getAxis()) {
|
||||
connectorPosition = checkedPos;
|
||||
connectorAtFront = false;
|
||||
checkedPos = checkedPos.relative(direction.getOpposite());
|
||||
|
||||
sendData();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(level.getBlockState(checkedPos).getBlock() instanceof PumpjackHammerPartBlock)&&!(level.getBlockState(checkedPos).getBlock() instanceof LargePumpjackHammerPartBlock)) {
|
||||
|
||||
break;
|
||||
}else {
|
||||
if(level.getBlockState(checkedPos).getValue(HorizontalDirectionalBlock.FACING).getAxis()!=this.getBlockState().getValue(FACING).getAxis()) {
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkedPos = checkedPos.relative(direction.getOpposite());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
sendData();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void disassemble() {
|
||||
if (!running && movedContraption == null)
|
||||
return;
|
||||
|
||||
connectorDistance=0;
|
||||
|
||||
headDistance =0;
|
||||
|
||||
//headPosition=null;
|
||||
//connectorPosition =null;
|
||||
|
||||
angle = 0;
|
||||
sequencedAngleLimit = -1;
|
||||
|
||||
if (movedContraption != null) {
|
||||
movedContraption.disassemble();
|
||||
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(level, worldPosition);
|
||||
}
|
||||
|
||||
movedContraption = null;
|
||||
running = false;
|
||||
updateGeneratedRotation();
|
||||
assembleNextTick = false;
|
||||
sendData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
|
||||
if(!isRunning())
|
||||
findHeadAndConnector();
|
||||
|
||||
if(!isRunning()&&base !=null&&crank!=null
|
||||
&&!level.isClientSide
|
||||
) {
|
||||
assemble();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(base!=null)
|
||||
if(base.controllerHammer==null){
|
||||
if(isRunning())
|
||||
base.setControllerHammer(this);
|
||||
}
|
||||
|
||||
if(base == null||crank == null)
|
||||
if (!level.isClientSide)
|
||||
disassemble();
|
||||
|
||||
|
||||
if(level.getBlockState(getBlockPos().above()).is(TFMGBlocks.LARGE_PUMPJACK_HAMMER_PART.get())&& !getBlockState().getValue(WIDE))
|
||||
level.setBlock(getBlockPos(),getBlockState().setValue(WIDE,true),2);
|
||||
|
||||
if(!isRunning())
|
||||
if(!level.getBlockState(getBlockPos().above()).is(TFMGBlocks.LARGE_PUMPJACK_HAMMER_PART.get())&& getBlockState().getValue(WIDE))
|
||||
level.setBlock(getBlockPos(),getBlockState().setValue(WIDE,false),2);
|
||||
|
||||
|
||||
|
||||
Direction direction = getBlockState().getValue(BearingBlock.FACING);
|
||||
if(connectorPosition!=null) {
|
||||
if (direction.getAxis() == Direction.Axis.Z)
|
||||
connectorDistance = Math.abs(getBlockPos().getZ() - connectorPosition.getZ());
|
||||
|
||||
if (direction.getAxis() == Direction.Axis.X)
|
||||
connectorDistance = Math.abs(getBlockPos().getX() - connectorPosition.getX());
|
||||
|
||||
if(crank!=null) {
|
||||
crankConnectorDistance = Math.abs(crank.getBlockPos().getY() - connectorPosition.getY());
|
||||
|
||||
crank.crankRadius = (float) connectorDistance /5;
|
||||
}
|
||||
|
||||
}
|
||||
if(headPosition!=null) {
|
||||
if (direction.getAxis() == Direction.Axis.Z)
|
||||
headDistance = Math.abs(getBlockPos().getZ() - headPosition.getZ());
|
||||
|
||||
if (direction.getAxis() == Direction.Axis.X)
|
||||
headDistance = Math.abs(getBlockPos().getX() - headPosition.getX());
|
||||
|
||||
if(base!=null) {
|
||||
headBaseDistance = Math.abs(base.getBlockPos().getY() - headPosition.getY());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(connectorPosition!=null)
|
||||
crank = findCrank();
|
||||
|
||||
|
||||
if(crank!=null)
|
||||
if(!(level.getBlockEntity(crank.getBlockPos()) instanceof PumpjackCrankBlockEntity))
|
||||
crank =null;
|
||||
/////////////////////
|
||||
if(headPosition!=null) {
|
||||
|
||||
base = findBase();
|
||||
}
|
||||
|
||||
|
||||
if(base!=null)
|
||||
if(!(level.getBlockEntity(base.getBlockPos()) instanceof PumpjackBaseBlockEntity))
|
||||
base =null;
|
||||
|
||||
|
||||
////////
|
||||
prevAngle = angle;
|
||||
if (level.isClientSide)
|
||||
clientAngleDiff /= 2;
|
||||
|
||||
if (
|
||||
!level.isClientSide &&
|
||||
assembleNextTick) {
|
||||
assembleNextTick = false;
|
||||
if (running) {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
assemble();
|
||||
}
|
||||
}
|
||||
|
||||
if (!running)
|
||||
return;
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
if (!(movedContraption != null && movedContraption.isStalled())) {
|
||||
if(crank!=null) {
|
||||
|
||||
|
||||
int x = 1;
|
||||
if(connectorAtFront)
|
||||
x = -1;
|
||||
|
||||
if(direction == Direction.SOUTH||direction == Direction.WEST) {
|
||||
angle = (float) Math.toDegrees(Math.atan(crank.heightModifier*x / connectorDistance));
|
||||
|
||||
} else angle = (float) Math.toDegrees(Math.atan(-crank.heightModifier*x / connectorDistance));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
applyRotation();
|
||||
}
|
||||
|
||||
private PumpjackCrankBlockEntity findCrank() {
|
||||
BlockPos checkedPos = connectorPosition.below();
|
||||
|
||||
|
||||
for(int i =0;i<7;i++){
|
||||
|
||||
if(level.getBlockEntity(checkedPos) instanceof PumpjackCrankBlockEntity)
|
||||
if(level.getBlockState(checkedPos).getValue(HorizontalDirectionalBlock.FACING).getAxis()==this.getBlockState().getValue(FACING).getAxis())
|
||||
return (PumpjackCrankBlockEntity) level.getBlockEntity(checkedPos);
|
||||
|
||||
|
||||
|
||||
checkedPos = checkedPos.below();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private PumpjackBaseBlockEntity findBase() {
|
||||
BlockPos checkedPos = headPosition.below();
|
||||
|
||||
|
||||
|
||||
for(int i =0;i<8;i++){
|
||||
|
||||
if(level.getBlockEntity(checkedPos) instanceof PumpjackBaseBlockEntity)
|
||||
return (PumpjackBaseBlockEntity) level.getBlockEntity(checkedPos);
|
||||
|
||||
checkedPos = checkedPos.below();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public boolean isNearInitialAngle() {
|
||||
return Math.abs(angle) < 22.5 || Math.abs(angle) > 360 - 22.5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
if (movedContraption != null && !level.isClientSide)
|
||||
sendData();
|
||||
}
|
||||
|
||||
protected void applyRotation() {
|
||||
if (movedContraption == null)
|
||||
return;
|
||||
movedContraption.setAngle(angle);
|
||||
BlockState blockState = getBlockState();
|
||||
if (blockState.hasProperty(BlockStateProperties.FACING))
|
||||
movedContraption.setRotationAxis(blockState.getValue(BlockStateProperties.FACING).getClockWise()
|
||||
.getAxis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(ControlledContraptionEntity contraption) {
|
||||
BlockState blockState = getBlockState();
|
||||
if (!(contraption.getContraption() instanceof PumpjackContraption))
|
||||
return;
|
||||
if (!blockState.hasProperty(BearingBlock.FACING))
|
||||
return;
|
||||
|
||||
this.movedContraption = contraption;
|
||||
setChanged();
|
||||
|
||||
//BlockPos anchor = worldPosition.relative(blockState.getValue(BearingBlock.FACING));
|
||||
BlockPos anchor = worldPosition.above();
|
||||
movedContraption.setPos(anchor.getX(), anchor.getY(), anchor.getZ());
|
||||
if (!level.isClientSide) {
|
||||
this.running = true;
|
||||
sendData();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStall() {
|
||||
if (!level.isClientSide)
|
||||
sendData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return !isRemoved();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttachedTo(AbstractContraptionEntity contraption) {
|
||||
return movedContraption == contraption;
|
||||
}
|
||||
|
||||
public boolean isRunning() {
|
||||
return running;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setAngle(float forcedAngle) {
|
||||
angle = forcedAngle;
|
||||
}
|
||||
|
||||
public ControlledContraptionEntity getMovedContraption() {
|
||||
return movedContraption;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer;
|
||||
|
||||
|
||||
import com.drmangotea.createindustry.base.TFMGContraptions;
|
||||
import com.simibubi.create.content.contraptions.AssemblyException;
|
||||
import com.simibubi.create.content.contraptions.ContraptionType;
|
||||
import com.simibubi.create.content.contraptions.bearing.AnchoredLighter;
|
||||
import com.simibubi.create.content.contraptions.bearing.BearingContraption;
|
||||
import com.simibubi.create.content.contraptions.render.ContraptionLighter;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
public class PumpjackContraption extends BearingContraption {
|
||||
|
||||
|
||||
//protected Direction facing;
|
||||
|
||||
|
||||
|
||||
public PumpjackContraption() {}
|
||||
|
||||
public PumpjackContraption(Direction facing) {
|
||||
this.facing = facing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean assemble(Level world, BlockPos pos) throws AssemblyException {
|
||||
BlockPos offset = pos.above();
|
||||
if (!searchMovedStructure(world, offset, null))
|
||||
return false;
|
||||
startMoving(world);
|
||||
expandBoundsAroundAxis(facing.getAxis());
|
||||
if (blocks.isEmpty())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContraptionType getType() {
|
||||
return TFMGContraptions.PUMPJACK_CONTRAPTION;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAnchoringBlockAt(BlockPos pos) {
|
||||
return pos.equals(anchor.below());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlock(BlockPos pos, Pair<StructureBlockInfo, BlockEntity> capture) {
|
||||
BlockPos localPos = pos.subtract(anchor);
|
||||
|
||||
super.addBlock(pos, capture);
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public CompoundTag writeNBT(boolean spawnPacket) {
|
||||
// CompoundTag tag = super.writeNBT(spawnPacket);
|
||||
// tag.putInt("Facing", facing.get3DDataValue());
|
||||
// return tag;
|
||||
//}
|
||||
//
|
||||
//@Override
|
||||
//public void readNBT(Level world, CompoundTag tag, boolean spawnData) {
|
||||
// facing = Direction.from3DDataValue(tag.getInt("Facing"));
|
||||
// super.readNBT(world, tag, spawnData);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//public Direction getFacing() {
|
||||
// return facing;
|
||||
//}
|
||||
|
||||
@Override
|
||||
public boolean canBeStabilized(Direction facing, BlockPos localPos) {
|
||||
if (facing.getOpposite() == this.facing && BlockPos.ZERO.equals(localPos))
|
||||
return false;
|
||||
return facing.getAxis() == this.facing.getAxis();
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public ContraptionLighter<?> makeLighter() {
|
||||
return new AnchoredLighter(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer;
|
||||
|
||||
import com.simibubi.create.content.contraptions.bearing.BearingBlock;
|
||||
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
|
||||
|
||||
import static com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackBlock.WIDE;
|
||||
import static com.simibubi.create.foundation.data.AssetLookup.partialBaseModel;
|
||||
|
||||
public class PumpjackGenerator extends SpecialBlockStateGen {
|
||||
@Override
|
||||
protected int getXRotation(BlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getYRotation(BlockState state) {
|
||||
|
||||
if(state.getValue(BearingBlock.FACING).getAxis() == Direction.Axis.Y)
|
||||
return horizontalAngle(Direction.NORTH);
|
||||
|
||||
return horizontalAngle(state.getValue(BearingBlock.FACING).getClockWise());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||
BlockState state) {
|
||||
|
||||
return state.getValue(WIDE) ? partialBaseModel(ctx, prov, "wide")
|
||||
: partialBaseModel(ctx, prov);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.mojang.math.Matrix4f;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import static com.simibubi.create.content.kinetics.base.DirectionalKineticBlock.FACING;
|
||||
|
||||
|
||||
public class PumpjackRenderer extends KineticBlockEntityRenderer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public PumpjackRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(KineticBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
|
||||
|
||||
if(((PumpjackBlockEntity)be).crank == null)
|
||||
return;
|
||||
if(((PumpjackBlockEntity)be).base == null)
|
||||
return;
|
||||
if(!((PumpjackBlockEntity) be).running)
|
||||
return;
|
||||
|
||||
|
||||
renderPumpjackLink(
|
||||
false,
|
||||
ms,
|
||||
buffer,
|
||||
(PumpjackBlockEntity) be
|
||||
);
|
||||
renderPumpjackLink(
|
||||
true,
|
||||
ms,
|
||||
buffer,
|
||||
(PumpjackBlockEntity) be
|
||||
);
|
||||
renderFrontPumpjackLink(
|
||||
ms,
|
||||
buffer,
|
||||
(PumpjackBlockEntity) be
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void renderPumpjackLink(boolean second, PoseStack pMatrixStack, MultiBufferSource pBuffer, PumpjackBlockEntity be) {
|
||||
pMatrixStack.pushPose();
|
||||
Direction direction = be.getBlockState().getValue(FACING);
|
||||
|
||||
|
||||
|
||||
Vec3 vec3 = new Vec3(0,0,0);
|
||||
|
||||
// vec3 = vec3.subtract(1,0,1);
|
||||
|
||||
int q = 1;
|
||||
if(be.connectorAtFront)
|
||||
q = -1;
|
||||
|
||||
float hModifier = 0;
|
||||
float x=0;
|
||||
float y=0;
|
||||
if(be.crank!=null) {
|
||||
hModifier = be.crank.heightModifier - be.crankConnectorDistance;
|
||||
float linkLenght = be.crankConnectorDistance;
|
||||
|
||||
|
||||
|
||||
if(direction == Direction.WEST) {
|
||||
if ((be.crank.angle>0&&be.crank.angle < 90||be.crank.angle > 270)||(be.crank.angle<0&&be.crank.angle > -90||be.crank.angle < -270)) {
|
||||
x = (float) Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
} else
|
||||
x = (float) -Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
|
||||
|
||||
y = (float) (be.connectorDistance - Math.sqrt(Math.pow(be.connectorDistance, 2) - Math.pow(be.crank.heightModifier, 2)));
|
||||
}
|
||||
if(direction == Direction.EAST) {
|
||||
|
||||
if ((be.crank.angle>0&&be.crank.angle < 90||be.crank.angle > 270)||(be.crank.angle<0&&be.crank.angle > -90||be.crank.angle < -270)) {
|
||||
x = (float) Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
} else
|
||||
x = (float) -Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
|
||||
|
||||
y = (float) (be.connectorDistance - Math.sqrt(Math.pow(be.connectorDistance, 2) - Math.pow(be.crank.heightModifier, 2)));
|
||||
}
|
||||
if(direction == Direction.NORTH) {
|
||||
if ((be.crank.angle > 90&&be.crank.angle < 270)||(be.crank.angle < -90&&be.crank.angle > -270)) {
|
||||
x = (float) Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
} else
|
||||
x = (float) -Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
|
||||
|
||||
y = (float) (be.connectorDistance - Math.sqrt(Math.pow(be.connectorDistance, 2) - Math.pow(be.crank.heightModifier, 2)));
|
||||
}
|
||||
if(direction == Direction.SOUTH) {
|
||||
if ((be.crank.angle > 90&&be.crank.angle < 270)||(be.crank.angle < -90&&be.crank.angle > -270)) {
|
||||
x = (float) Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
} else
|
||||
x = (float) -Math.sqrt(Math.pow(be.crank.crankRadius, 2) - Math.pow(be.crank.heightModifier, 2));
|
||||
|
||||
|
||||
y = (float) (be.connectorDistance - Math.sqrt(Math.pow(be.connectorDistance, 2) - Math.pow(be.crank.heightModifier, 2)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
vec3 = vec3.add(0,linkLenght,0);
|
||||
}
|
||||
|
||||
|
||||
x = x * q;
|
||||
|
||||
y = y * q;
|
||||
|
||||
|
||||
|
||||
|
||||
if(direction==Direction.NORTH) {
|
||||
pMatrixStack.translate(0, hModifier +1.5, (be.connectorDistance + (.5*q) + x)*q);
|
||||
x = x * q;
|
||||
vec3 = vec3.add(0,0,-x+y);
|
||||
|
||||
if(second) {
|
||||
pMatrixStack.translate(-1,0,0);
|
||||
}
|
||||
pMatrixStack.translate(1,0,0);
|
||||
}
|
||||
|
||||
if(direction==Direction.SOUTH){
|
||||
pMatrixStack.translate(0, hModifier+1.5, (-be.connectorDistance+(.5*q)+x)*q);
|
||||
x = x * q;
|
||||
vec3 = vec3.add(0,0,-x-y);
|
||||
|
||||
if(second) {
|
||||
pMatrixStack.translate(1,0,0);
|
||||
}
|
||||
// pMatrixStack.translate(1,0,0);
|
||||
}
|
||||
|
||||
if(direction==Direction.WEST){
|
||||
pMatrixStack.translate((be.connectorDistance+(.5*q)+x)*q, hModifier+1.5, 0);
|
||||
x = x * q;
|
||||
vec3 = vec3.add(-x-y,0,0);
|
||||
if(second) {
|
||||
pMatrixStack.translate(0,0,1);
|
||||
}
|
||||
|
||||
}
|
||||
if(direction==Direction.EAST){
|
||||
pMatrixStack.translate((-be.connectorDistance+(.5*q)+x)*q, hModifier+1.5, 0);
|
||||
x = x * q;
|
||||
vec3 = vec3.add(-x+y,0,0);
|
||||
|
||||
if(second) {
|
||||
pMatrixStack.translate(0,0,-1);
|
||||
}
|
||||
|
||||
pMatrixStack.translate(0,0,1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
float f = (float)(vec3.x);
|
||||
float f1 = (float)(vec3.y );
|
||||
float f2 = (float)(vec3.z);
|
||||
VertexConsumer vertexconsumer = pBuffer.getBuffer(RenderType.leash());
|
||||
Matrix4f matrix4f = pMatrixStack.last().pose();
|
||||
float f4 = Mth.fastInvSqrt(f * f + f2 * f2) * 0.025F / 2.0F;
|
||||
float f5 = f2 * f4;
|
||||
float f6 = f * f4;
|
||||
|
||||
|
||||
int i =15;
|
||||
int j = 15;
|
||||
|
||||
//int i = this.getBlockLightLevel(pEntityLiving, blockpos);
|
||||
//int j = this.entityRenderDispatcher.getRenderer(pLeashHolder).getBlockLightLevel(pLeashHolder, blockpos1);
|
||||
//int k = pEntityLiving.level.getBrightness(LightLayer.SKY, blockpos);
|
||||
//int l = pEntityLiving.level.getBrightness(LightLayer.SKY, blockpos1);
|
||||
|
||||
|
||||
int k = 15;
|
||||
int l = 15;
|
||||
|
||||
|
||||
for(int i1 = 0; i1 <= 24; ++i1) {
|
||||
addVertexPair(vertexconsumer, matrix4f, f, f1, f2, i, j, k, l, 0.025F, 0.025F, f5, f6, i1, false);
|
||||
}
|
||||
|
||||
for(int j1 = 24; j1 >= 0; --j1) {
|
||||
addVertexPair(vertexconsumer, matrix4f, f, f1, f2, i, j, k, l, 0.025F, 0.0F, f5, f6, j1, true);
|
||||
}
|
||||
|
||||
pMatrixStack.popPose();
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
private void renderFrontPumpjackLink(PoseStack pMatrixStack, MultiBufferSource pBuffer, PumpjackBlockEntity be) {
|
||||
pMatrixStack.pushPose();
|
||||
Direction direction = be.getBlockState().getValue(FACING);
|
||||
|
||||
|
||||
|
||||
Vec3 vec3 = new Vec3(0,0,0);
|
||||
|
||||
|
||||
|
||||
int q = -1;
|
||||
|
||||
int g = 0;
|
||||
|
||||
|
||||
|
||||
float hModifier= 0;
|
||||
|
||||
if(be.headAtFront) {
|
||||
q = 1;
|
||||
}else g = 1;
|
||||
|
||||
|
||||
|
||||
float y=0;
|
||||
if(be.crank!=null) {
|
||||
|
||||
float linkLenght = be.headBaseDistance;
|
||||
|
||||
|
||||
hModifier = (float) (be.headDistance*Math.sin(Math.toRadians(be.angle)));
|
||||
|
||||
|
||||
|
||||
// if(direction == Direction.WEST) {
|
||||
//
|
||||
// y = (float) (be.headDistance);
|
||||
// }
|
||||
// if(direction == Direction.EAST) {
|
||||
//
|
||||
//
|
||||
// y = (float) (be.headDistance );
|
||||
// }
|
||||
// if(direction == Direction.NORTH) {
|
||||
//
|
||||
// y = (float) (be.headDistance);
|
||||
// }
|
||||
// if(direction == Direction.SOUTH) {
|
||||
//
|
||||
// y = (float) (be.headDistance);
|
||||
// }
|
||||
|
||||
y = -0.01f;
|
||||
|
||||
vec3 = vec3.add(0,linkLenght,0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
hModifier = hModifier*q;
|
||||
|
||||
|
||||
if(direction==Direction.NORTH) {
|
||||
pMatrixStack.translate(0.5, -be.headBaseDistance+2, (-be.headDistance*q)+(.5*q)+g);
|
||||
vec3 = vec3.add(0,hModifier-0.3,+y);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(direction==Direction.SOUTH){
|
||||
pMatrixStack.translate(0.5, -be.headBaseDistance+2, (be.headDistance*q)+(.5*q)+g);
|
||||
vec3 = vec3.add(0,-hModifier-0.3,-y);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(direction==Direction.WEST){
|
||||
pMatrixStack.translate((-be.headDistance*q)+(.5*q)+g, -be.headBaseDistance+2, 0.5);
|
||||
vec3 = vec3.add(-y,-hModifier-0.3,0);
|
||||
|
||||
|
||||
}
|
||||
if(direction==Direction.EAST){
|
||||
pMatrixStack.translate((be.headDistance*q)+(.5*q)+g, -be.headBaseDistance+2, 0.5);
|
||||
vec3 = vec3.add(+y,hModifier-0.3,0);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
float f = (float)(vec3.x);
|
||||
float f1 = (float)(vec3.y );
|
||||
float f2 = (float)(vec3.z);
|
||||
VertexConsumer vertexconsumer = pBuffer.getBuffer(RenderType.leash());
|
||||
Matrix4f matrix4f = pMatrixStack.last().pose();
|
||||
float f4 = Mth.fastInvSqrt(f * f + f2 * f2) * 0.025F / 2.0F;
|
||||
float f5 = f2 * f4;
|
||||
float f6 = f * f4;
|
||||
|
||||
|
||||
int i =15;
|
||||
int j = 15;
|
||||
|
||||
//int i = this.getBlockLightLevel(pEntityLiving, blockpos);
|
||||
//int j = this.entityRenderDispatcher.getRenderer(pLeashHolder).getBlockLightLevel(pLeashHolder, blockpos1);
|
||||
//int k = pEntityLiving.level.getBrightness(LightLayer.SKY, blockpos);
|
||||
//int l = pEntityLiving.level.getBrightness(LightLayer.SKY, blockpos1);
|
||||
|
||||
|
||||
int k = 15;
|
||||
int l = 15;
|
||||
|
||||
|
||||
for(int i1 = 0; i1 <= 24; ++i1) {
|
||||
addVertexPair(vertexconsumer, matrix4f, f, f1, f2, i, j, k, l, 0.025F, 0.025F, f5, f6, i1, false);
|
||||
}
|
||||
|
||||
for(int j1 = 24; j1 >= 0; --j1) {
|
||||
addVertexPair(vertexconsumer, matrix4f, f, f1, f2, i, j, k, l, 0.025F, 0.0F, f5, f6, j1, true);
|
||||
}
|
||||
|
||||
pMatrixStack.popPose();
|
||||
}
|
||||
|
||||
private static void addVertexPair(VertexConsumer vertexConsumer, Matrix4f p_174309_, float p_174310_, float p_174311_, float p_174312_, int p_174313_, int p_174314_, int p_174315_, int p_174316_, float p_174317_, float p_174318_, float p_174319_, float p_174320_, int p_174321_, boolean p_174322_) {
|
||||
float f = (float)p_174321_ / 24.0F;
|
||||
int i = (int)Mth.lerp(f, (float)p_174313_, (float)p_174314_);
|
||||
int j = (int)Mth.lerp(f, (float)p_174315_, (float)p_174316_);
|
||||
int k = LightTexture.pack(i, j);
|
||||
float f1 = p_174321_ % 2 == (p_174322_ ? 1 : 0) ? 0.7F : 1.0F;
|
||||
float f2 = 0.1F * f1;
|
||||
float f3 = 0.1F * f1;
|
||||
float f4 = 0.1F * f1;
|
||||
float f5 = p_174310_ * f;
|
||||
float f6 = p_174311_ > 0.0F ? p_174311_ * f * f : p_174311_ - p_174311_ * (1.0F - f) * (1.0F - f);
|
||||
float f7 = p_174312_ * f;
|
||||
vertexConsumer.vertex(p_174309_, f5 - p_174319_, f6 + p_174318_, f7 + p_174320_).color(f2, f3, f4, 1.0F).uv2(k).endVertex();
|
||||
vertexConsumer.vertex(p_174309_, f5 + p_174319_, f6 + p_174317_ - p_174318_, f7 - p_174320_).color(f2, f3, f4, 1.0F).uv2(k).endVertex();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockState getRenderedBlockState(KineticBlockEntity te) {
|
||||
return shaft(getRotationAxisOf(te));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackHammerConnectorBlock extends HorizontalDirectionalBlock {
|
||||
|
||||
public PumpjackHammerConnectorBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.PUMPJACK_HAMMER_PART.get(pState.getValue(FACING).getClockWise());
|
||||
}
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
|
||||
super.createBlockStateDefinition(pBuilder.add(FACING));
|
||||
}
|
||||
|
||||
public BlockState getStateForPlacement(BlockPlaceContext pContext) {
|
||||
return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackHammerHeadBlock extends HorizontalDirectionalBlock {
|
||||
|
||||
public PumpjackHammerHeadBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.PUMPJACK_HEAD.get(pState.getValue(FACING));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
|
||||
super.createBlockStateDefinition(pBuilder.add(FACING));
|
||||
}
|
||||
|
||||
public BlockState getStateForPlacement(BlockPlaceContext pContext) {
|
||||
return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.foundation.placement.IPlacementHelper;
|
||||
import com.simibubi.create.foundation.placement.PlacementHelpers;
|
||||
import com.simibubi.create.foundation.placement.PlacementOffset;
|
||||
import com.simibubi.create.foundation.placement.PoleHelper;
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class PumpjackHammerPartBlock extends HorizontalDirectionalBlock {
|
||||
public static final int placementHelperId = PlacementHelpers.register(new PlacementHelper());
|
||||
// public static final Property<Direction.Axis> HORIZONTAL_AXIS = BlockStateProperties.HORIZONTAL_AXIS;
|
||||
public PumpjackHammerPartBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
super.createBlockStateDefinition(builder);
|
||||
}
|
||||
|
||||
public BlockState getStateForPlacement(BlockPlaceContext pContext) {
|
||||
return this.defaultBlockState().setValue(FACING, pContext.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.PUMPJACK_HAMMER_PART.get(pState.getValue(FACING).getClockWise());
|
||||
}
|
||||
@MethodsReturnNonnullByDefault
|
||||
private static class PlacementHelper extends PoleHelper<Direction> {
|
||||
|
||||
|
||||
private PlacementHelper() {
|
||||
super(state -> state.getBlock() instanceof PumpjackHammerPartBlock, state -> state.getValue(FACING).getAxis(), FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Predicate<ItemStack> getItemPredicate() {
|
||||
return i -> i.getItem() instanceof BlockItem
|
||||
&& ((BlockItem) i.getItem()).getBlock() instanceof PumpjackHammerPartBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Predicate<BlockState> getStatePredicate() {
|
||||
return s -> s.getBlock() instanceof PumpjackHammerPartBlock;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlacementOffset getOffset(Player player, Level world, BlockState state, BlockPos pos,
|
||||
BlockHitResult ray) {
|
||||
PlacementOffset offset = super.getOffset(player, world, state, pos, ray);
|
||||
if (offset.isSuccessful())
|
||||
offset.withTransform(offset.getTransform()
|
||||
.andThen(s -> s));
|
||||
return offset;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand,
|
||||
BlockHitResult pHit) {
|
||||
if (pPlayer == null)
|
||||
return InteractionResult.PASS;
|
||||
|
||||
ItemStack itemInHand = pPlayer.getItemInHand(pHand);
|
||||
|
||||
IPlacementHelper helper = PlacementHelpers.get(placementHelperId);
|
||||
if (helper.matchesItem(itemInHand))
|
||||
return helper.getOffset(pPlayer, pLevel, pState, pPos, pHit)
|
||||
.placeInWorld(pLevel, (BlockItem) itemInHand.getItem(), pPlayer, pHand, pHit);
|
||||
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
public static BlockState pickCorrectBlock(BlockState stateForPlacement) {
|
||||
//if (PoweredShaftBlock.stillValid(stateForPlacement, level, pos))
|
||||
// return PoweredShaftBlock.getEquivalent(stateForPlacement);
|
||||
return stateForPlacement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large;
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerConnectorBlock;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class LargePumpjackHammerConnectorBlock extends PumpjackHammerConnectorBlock {
|
||||
|
||||
public LargePumpjackHammerConnectorBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.FULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large;
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerHeadBlock;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class LargePumpjackHammerHeadBlock extends PumpjackHammerHeadBlock {
|
||||
|
||||
public LargePumpjackHammerHeadBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.FULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.large;
|
||||
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.parts.PumpjackHammerPartBlock;
|
||||
import com.drmangotea.createindustry.registry.TFMGShapes;
|
||||
import com.simibubi.create.foundation.placement.IPlacementHelper;
|
||||
import com.simibubi.create.foundation.placement.PlacementHelpers;
|
||||
import com.simibubi.create.foundation.placement.PlacementOffset;
|
||||
import com.simibubi.create.foundation.placement.PoleHelper;
|
||||
import net.minecraft.MethodsReturnNonnullByDefault;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class LargePumpjackHammerPartBlock extends PumpjackHammerPartBlock {
|
||||
|
||||
public LargePumpjackHammerPartBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.FULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,6 +19,10 @@ public class TFMGPonderIndex {
|
||||
|
||||
.addStoryBoard("small_engines", OilScenes::small_engines, TFMGPonderTag.OIL);
|
||||
|
||||
HELPER.forComponents(TFMGBlocks.RADIAL_ENGINE, TFMGBlocks.LARGE_RADIAL_ENGINE)
|
||||
|
||||
.addStoryBoard("radial_engines", OilScenes::radial_engines, TFMGPonderTag.OIL);
|
||||
|
||||
|
||||
HELPER.forComponents(TFMGBlocks.DIESEL_ENGINE)
|
||||
|
||||
@@ -29,8 +33,18 @@ public class TFMGPonderIndex {
|
||||
|
||||
.addStoryBoard("surface_scanner", OilScenes::surface_scanner, TFMGPonderTag.OIL);
|
||||
|
||||
HELPER.forComponents(TFMGBlocks.PUMPJACK_BASE,TFMGBlocks.PUMPJACK_CRANK,TFMGBlocks.PUMPJACK_HAMMER_HOLDER)
|
||||
.addStoryBoard("pumpjack", OilScenes::pumpjack, TFMGPonderTag.OIL);
|
||||
HELPER.forComponents(
|
||||
TFMGBlocks.PUMPJACK_BASE,
|
||||
TFMGBlocks.PUMPJACK_CRANK,
|
||||
TFMGBlocks.PUMPJACK_HAMMER,
|
||||
TFMGBlocks.PUMPJACK_HAMMER_CONNECTOR,
|
||||
TFMGBlocks.PUMPJACK_HAMMER_PART,
|
||||
TFMGBlocks.PUMPJACK_HAMMER_HEAD,
|
||||
TFMGBlocks.LARGE_PUMPJACK_HAMMER_CONNECTOR,
|
||||
TFMGBlocks.LARGE_PUMPJACK_HAMMER_PART,
|
||||
TFMGBlocks.LARGE_PUMPJACK_HAMMER_HEAD
|
||||
|
||||
).addStoryBoard("pumpjack", OilScenes::pumpjack, TFMGPonderTag.OIL);
|
||||
HELPER.forComponents(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER,TFMGBlocks.STEEL_DISTILLATION_OUTPUT)
|
||||
|
||||
.addStoryBoard("distillation_tower", OilScenes::distillation_tower, TFMGPonderTag.OIL);
|
||||
@@ -63,9 +77,13 @@ public class TFMGPonderIndex {
|
||||
.add(TFMGBlocks.STEEL_DISTILLATION_OUTPUT)
|
||||
.add(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER)
|
||||
.add(TFMGBlocks.PUMPJACK_BASE)
|
||||
.add(TFMGBlocks.PUMPJACK_HAMMER_HOLDER)
|
||||
.add(TFMGBlocks.PUMPJACK_HAMMER)
|
||||
.add(TFMGBlocks.DIESEL_ENGINE)
|
||||
.add(TFMGBlocks.DIESEL_ENGINE_EXPANSION)
|
||||
.add(TFMGBlocks.RADIAL_ENGINE)
|
||||
.add(TFMGBlocks.LARGE_RADIAL_ENGINE)
|
||||
.add(TFMGBlocks.COMPACT_ENGINE)
|
||||
.add(TFMGBlocks.DIESEL_ENGINE_EXPANSION)
|
||||
.add(TFMGBlocks.PUMPJACK_CRANK);
|
||||
|
||||
PonderRegistry.TAGS.forTag(TFMGPonderTag.METALLURGY)
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
package com.drmangotea.createindustry.ponder.scenes;
|
||||
|
||||
import com.drmangotea.createindustry.registry.TFMGItems;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.foundation.ponder.*;
|
||||
import com.simibubi.create.foundation.ponder.element.InputWindowElement;
|
||||
import com.simibubi.create.foundation.ponder.element.WorldSectionElement;
|
||||
import com.simibubi.create.foundation.utility.Pointing;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class OilScenes {
|
||||
@@ -103,17 +109,23 @@ public class OilScenes {
|
||||
public static void pumpjack(SceneBuilder scene, SceneBuildingUtil util) {
|
||||
scene.title("pumpjack", "");
|
||||
scene.configureBasePlate(0, 0, 7);
|
||||
|
||||
|
||||
////
|
||||
Selection pipez = util.select.fromTo(0, 2, 0, 0, 4, 0);
|
||||
Selection hammer = util.select.fromTo(3, 1, 2, 3, 3, 2);
|
||||
Selection base = util.select.fromTo(1, 1, 2, 1, 1, 2);
|
||||
Selection crank = util.select.fromTo(5, 2, 2, 5, 2, 2);
|
||||
Selection input = util.select.fromTo(5, 1, 1, 5, 1, 2);
|
||||
Selection hammer = util.select.fromTo(3, 1, 2, 3, 4, 2);
|
||||
Selection base = util.select.fromTo(0, 1, 2, 0, 1, 2);
|
||||
Selection crank = util.select.fromTo(6, 2, 2, 6, 2, 2);
|
||||
Selection input = util.select.fromTo(5, 1, 1, 6, 1, 2);
|
||||
Selection base1 = util.select.fromTo(2, 0, 0, 6, 0, 4);
|
||||
Selection base2 = util.select.fromTo(0, 0, 0, 1, 0, 4);
|
||||
Selection deposit = util.select.fromTo(0, 1, 0, 0, 1, 0);
|
||||
Selection tank = util.select.fromTo(0, 0, 3, 1, 0, 4);
|
||||
|
||||
Selection hammer_part = util.select.fromTo(1, 5, 2, 5, 5, 2);
|
||||
Selection hammer_head = util.select.fromTo(6, 5 ,2, 6, 5, 2);
|
||||
Selection hammer_connector = util.select.fromTo(0, 5, 2, 0, 5, 2);
|
||||
|
||||
|
||||
////
|
||||
// scene.scaleSceneView(.4f);
|
||||
@@ -147,15 +159,34 @@ public class OilScenes {
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Pumpjack base has to be placed on the top of the pipe")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(1, 1, 2), Direction.WEST))
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(0, 1, 2), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
scene.idle(40);
|
||||
ElementLink<WorldSectionElement> hammerElement1 = scene.world.showIndependentSection(hammer,Direction.UP);
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Pumpjack hammer needs to be placed behind it")
|
||||
.text("Pumpjack Hammer Holder needs to be placed behind it")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(3, 3, 2), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
scene.idle(70);
|
||||
|
||||
|
||||
ElementLink<WorldSectionElement> connectorElement = scene.world.showIndependentSection(hammer_connector,Direction.UP);
|
||||
ElementLink<WorldSectionElement> headElement = scene.world.showIndependentSection(hammer_head,Direction.UP);
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Next step is building the Connector And the Head of the Pumpjack above the crank and the base")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(3, 3, 2), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
scene.idle(70);
|
||||
ElementLink<WorldSectionElement> partElement = scene.world.showIndependentSection(hammer_part,Direction.UP);
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Now they need to be connected with Pumpjack Pammer Parts")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(3, 3, 2), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
|
||||
|
||||
scene.idle(40);
|
||||
scene.world.setKineticSpeed(input,70);
|
||||
scene.world.setKineticSpeed(base1,-140);
|
||||
@@ -426,7 +457,107 @@ public class OilScenes {
|
||||
|
||||
}
|
||||
|
||||
public static void radial_engines(SceneBuilder scene, SceneBuildingUtil util){
|
||||
scene.title("radial_engines", "");
|
||||
scene.configureBasePlate(0, 0, 5);
|
||||
scene.idle(10);
|
||||
|
||||
scene.showBasePlate();
|
||||
|
||||
|
||||
Selection engine_small = util.select.fromTo(2, 1, 1, 2, 1, 1);
|
||||
|
||||
Selection engine_large = util.select.fromTo(1, 1, 1, 1, 1, 1);
|
||||
|
||||
|
||||
Selection engine_lever = util.select.fromTo(3, 1, 0, 3, 1, 0);
|
||||
|
||||
|
||||
Selection input_pump = util.select.fromTo(3, 1, 2, 3, 1, 2);
|
||||
|
||||
Selection input = util.select.fromTo(3, 1, 1, 3, 1, 1);
|
||||
|
||||
Selection tank_1 = util.select.fromTo(3, 1, 3, 3, 2, 3);
|
||||
|
||||
Selection tank_2 = util.select.fromTo(2, 1, 3, 2, 2, 3);
|
||||
|
||||
|
||||
scene.world.setKineticSpeed(engine_small,0);
|
||||
|
||||
|
||||
|
||||
|
||||
ElementLink<WorldSectionElement> engineElement = scene.world.showIndependentSectionImmediately(engine_small);
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Radial Engines are a special Type of Engine that doesn't require an exhaust block and has a shaft from both sides")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(4, 0, 4), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
scene.idle(100);
|
||||
|
||||
|
||||
|
||||
scene.world.setKineticSpeed(input_pump,80);
|
||||
ElementLink<WorldSectionElement> inputElement = scene.world.showIndependentSection(input,Direction.DOWN);
|
||||
scene.idle(50);
|
||||
|
||||
BlockPos inputPos = util.grid.at(2, 1, 1);
|
||||
Vec3 topOf = util.vector.topOf(inputPos);
|
||||
scene.overlay.showControls(new InputWindowElement(topOf, Pointing.DOWN).rightClick()
|
||||
.withItem(new ItemStack(AllItems.WRENCH.get())), 20);
|
||||
|
||||
scene.overlay.showText(70)
|
||||
.attachKeyFrame()
|
||||
.text("Clicking the Engine from one of its sides will spawn an input slot that can accept fuel and redstone signals")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(2, 1, 1), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
scene.idle(100);
|
||||
scene.overlay.showText(40)
|
||||
.attachKeyFrame()
|
||||
.text("Regular Radial Engines uses gasoline as fuel")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(2, 1, 1), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
|
||||
|
||||
scene.idle(80);
|
||||
|
||||
|
||||
ElementLink<WorldSectionElement> inputPumpElement = scene.world.showIndependentSection(input_pump,Direction.DOWN);
|
||||
ElementLink<WorldSectionElement> tankElement1 = scene.world.showIndependentSection(tank_1,Direction.DOWN);
|
||||
|
||||
|
||||
ElementLink<WorldSectionElement> leverElement = scene.world.showIndependentSection(engine_lever,Direction.DOWN);
|
||||
scene.world.setKineticSpeed(engine_small,180);
|
||||
scene.world.setKineticSpeed(engine_large,180);
|
||||
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("Engine will start when redstone signal is applied to the input slot or the block itself")
|
||||
.pointAt(util.vector.blockSurface(util.grid.at(3, 1, 0), Direction.WEST))
|
||||
.placeNearTarget();
|
||||
|
||||
scene.idle(100);
|
||||
|
||||
|
||||
|
||||
scene.world.hideIndependentSection(engineElement,Direction.SOUTH);
|
||||
scene.world.hideIndependentSection(tankElement1,Direction.SOUTH);
|
||||
|
||||
scene.idle(50);
|
||||
|
||||
ElementLink<WorldSectionElement> largeEngineElement = scene.world.showIndependentSection(engine_large,Direction.DOWN);
|
||||
ElementLink<WorldSectionElement> tankElement2 = scene.world.showIndependentSection(tank_2,Direction.DOWN);
|
||||
scene.world.moveSection(largeEngineElement,new Vec3(1d,0d,0d),0);
|
||||
scene.world.moveSection(tankElement2,new Vec3(1d,0d,0d),0);
|
||||
|
||||
scene.overlay.showText(50)
|
||||
.attachKeyFrame()
|
||||
.text("The second variant of a radial is The Large Radial Engine which uses kerosene as fuel");
|
||||
scene.idle(50);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.drmangotea.createindustry.blocks.decoration.flywheels.TFMGFlywheelRen
|
||||
import com.drmangotea.createindustry.blocks.deposits.FluidDepositBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.deposits.surface_scanner.SurfaceScannerBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.deposits.surface_scanner.SurfaceScannerRenderer;
|
||||
import com.drmangotea.createindustry.blocks.engines.compact.CompactEngineBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.compact.CompactEngineRenderer;
|
||||
import com.drmangotea.createindustry.blocks.engines.diesel.DieselEngineBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.diesel.DieselEngineInstance;
|
||||
import com.drmangotea.createindustry.blocks.engines.diesel.DieselEngineRenderer;
|
||||
@@ -18,6 +20,10 @@ import com.drmangotea.createindustry.blocks.engines.diesel.engine_expansion.Dies
|
||||
import com.drmangotea.createindustry.blocks.engines.intake.AirIntakeBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.intake.AirIntakeInstance;
|
||||
import com.drmangotea.createindustry.blocks.engines.intake.AirIntakeRenderer;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.RadialEngineBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.RadialEngineRenderer;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.input.RadialEngineInputBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.radial.large.LargeRadialEngineBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.small.gasoline.GasolineEngineBackTileEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.small.gasoline.GasolineEngineTileEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.small.lpg.LPGEngineBackTileEntity;
|
||||
@@ -39,21 +45,17 @@ import com.drmangotea.createindustry.blocks.machines.oil_processing.distillation
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.distillation.distillery.DistilleryOutputBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderInstance;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.hammer.PumpjackRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputRenderer;
|
||||
import com.drmangotea.createindustry.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.pipes.normal.LockablePipeBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.tanks.SteelFluidTankRenderer;
|
||||
import com.drmangotea.createindustry.blocks.tanks.SteelTankBlockEntity;
|
||||
import com.drmangotea.createindustry.blocks.engines.small.UniversalEngineRenderer;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pipes.SmartFluidPipeBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pipes.StraightPipeBlockEntity;
|
||||
@@ -139,19 +141,19 @@ public class TFMGBlockEntities {
|
||||
.validBlocks(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackHammerHolderBlockEntity> PUMPJACK_HAMMER_HOLDER = REGISTRATE
|
||||
.blockEntity("pumpjack_hammer_holder", PumpjackHammerHolderBlockEntity::new)
|
||||
.instance(() -> PumpjackHammerHolderInstance::new, false)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_HAMMER_HOLDER)
|
||||
.renderer(() -> PumpjackHammerHolderRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackCrankBlockEntity> PUMPJACK_CRANK = REGISTRATE
|
||||
.blockEntity("pumpjack_crank", PumpjackCrankBlockEntity::new)
|
||||
//.instance(() -> PumpjackCrankInstance::new, true)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_CRANK)
|
||||
.renderer(() -> PumpjackCrankRenderer::new)
|
||||
.register();
|
||||
//public static final BlockEntityEntry<PumpjackHammerHolderBlockEntity> PUMPJACK_HAMMER_HOLDER = REGISTRATE
|
||||
// .blockEntity("pumpjack_hammer_holder", PumpjackHammerHolderBlockEntity::new)
|
||||
// .instance(() -> PumpjackHammerHolderInstance::new, false)
|
||||
// .validBlocks(TFMGBlocks.PUMPJACK_HAMMER_HOLDER)
|
||||
// .renderer(() -> PumpjackHammerHolderRenderer::new)
|
||||
// .register();
|
||||
//
|
||||
//public static final BlockEntityEntry<PumpjackCrankBlockEntity> PUMPJACK_CRANK = REGISTRATE
|
||||
// .blockEntity("pumpjack_crank", PumpjackCrankBlockEntity::new)
|
||||
// //.instance(() -> PumpjackCrankInstance::new, true)
|
||||
// .validBlocks(TFMGBlocks.PUMPJACK_CRANK)
|
||||
// .renderer(() -> PumpjackCrankRenderer::new)
|
||||
// .register();
|
||||
|
||||
public static final BlockEntityEntry<MachineInputBlockEntity> MACHINE_INPUT = REGISTRATE
|
||||
.blockEntity("machine_input", MachineInputBlockEntity::new)
|
||||
@@ -160,11 +162,11 @@ public class TFMGBlockEntities {
|
||||
.renderer(() -> MachineInputRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackBaseBlockEntity> PUMPJACK_BASE = REGISTRATE
|
||||
.blockEntity("pumpjack_base", PumpjackBaseBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_BASE)
|
||||
.renderer(() -> PumpjackBaseRenderer::new)
|
||||
.register();
|
||||
//public static final BlockEntityEntry<PumpjackBaseBlockEntity> PUMPJACK_BASE = REGISTRATE
|
||||
// .blockEntity("pumpjack_base", PumpjackBaseBlockEntity::new)
|
||||
// .validBlocks(TFMGBlocks.PUMPJACK_BASE)
|
||||
// .renderer(() -> PumpjackBaseRenderer::new)
|
||||
// .register();
|
||||
|
||||
public static final BlockEntityEntry<BlastFurnaceOutputBlockEntity> BLAST_FURNACE_OUTPUT = REGISTRATE
|
||||
.blockEntity("blast_furnace_output", BlastFurnaceOutputBlockEntity::new)
|
||||
@@ -364,8 +366,49 @@ public class TFMGBlockEntities {
|
||||
.register();
|
||||
|
||||
|
||||
public static final BlockEntityEntry<RadialEngineBlockEntity> RADIAL_ENGINE = REGISTRATE
|
||||
.blockEntity("radial_engine", RadialEngineBlockEntity::new)
|
||||
.instance(() -> ShaftInstance::new, false)
|
||||
.validBlocks(TFMGBlocks.RADIAL_ENGINE)
|
||||
.renderer(() -> RadialEngineRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<LargeRadialEngineBlockEntity> LARGE_RADIAL_ENGINE = REGISTRATE
|
||||
.blockEntity("large_radial_engine", LargeRadialEngineBlockEntity::new)
|
||||
.instance(() -> ShaftInstance::new, false)
|
||||
.validBlocks(TFMGBlocks.LARGE_RADIAL_ENGINE)
|
||||
.renderer(() -> RadialEngineRenderer::new)
|
||||
.register();
|
||||
|
||||
|
||||
public static final BlockEntityEntry<RadialEngineInputBlockEntity> RADIAL_ENGINE_INPUT = REGISTRATE
|
||||
.blockEntity("radial_engine_input", RadialEngineInputBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.RADIAL_ENGINE_INPUT)
|
||||
.register();
|
||||
public static final BlockEntityEntry<CompactEngineBlockEntity> COMPACT_ENGINE = REGISTRATE
|
||||
.blockEntity("compact_engine", CompactEngineBlockEntity::new)
|
||||
.instance(() -> HalfShaftInstance::new, false)
|
||||
.validBlocks(TFMGBlocks.COMPACT_ENGINE)
|
||||
.renderer(() -> CompactEngineRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackBlockEntity> PUMPJACK_HAMMER = REGISTRATE
|
||||
.blockEntity("pumpjack_hammer", PumpjackBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_HAMMER)
|
||||
.renderer(() -> PumpjackRenderer::new)
|
||||
.register();
|
||||
|
||||
|
||||
public static final BlockEntityEntry<PumpjackCrankBlockEntity> PUMPJACK_CRANK = REGISTRATE
|
||||
.blockEntity("pumpjack_crank", PumpjackCrankBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_CRANK)
|
||||
.renderer(() -> PumpjackCrankRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackBaseBlockEntity> PUMPJACK_BASE = REGISTRATE
|
||||
.blockEntity("pumpjack_base", PumpjackBaseBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_BASE)
|
||||
.register();
|
||||
|
||||
|
||||
public static void register() {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user