a lot of stuff idk
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// 1.20.1 2025-02-17T16:42:33.2664344 TFMG'S Sequenced Assembly Recipes
|
||||
8e18331462285f0f09e5897f4cd797c89b6ffc23 data/tfmg/recipes/sequenced_assembly/capacitor.json
|
||||
7d00b6d19198afdb320d77ecfbbf6be9fa8434d3 data/tfmg/recipes/sequenced_assembly/generator.json
|
||||
6e387cd804d473dcdade4de8d90ce1982add7447 data/tfmg/recipes/sequenced_assembly/motor.json
|
||||
6943441658b1aa9175e6dce859896609b2d7aa28 data/tfmg/recipes/sequenced_assembly/potentiometer.json
|
||||
70be470bb0b72de21713f1c0e08a529780a199c0 data/tfmg/recipes/sequenced_assembly/transistor.json
|
||||
@@ -1,4 +1,4 @@
|
||||
// 1.20.1 2025-01-31T19:38:20.6663693 Registrate Provider for tfmg [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
// 1.20.1 2025-02-20T20:30:41.8392612 Registrate Provider for tfmg [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
ff5a5721633b83465ab501cbdfdc579a0f20e938 assets/tfmg/blockstates/accumulator.json
|
||||
e982a263b6af75821042107fdeff7bd809436d08 assets/tfmg/blockstates/air_intake.json
|
||||
e7f63aadfc892e337d9f87b5e50af8b1c7e4103f assets/tfmg/blockstates/aluminum_bars.json
|
||||
@@ -55,7 +55,7 @@ b846b257ecd76322e904bd9c78a8b263a2799ad5 assets/tfmg/blockstates/brown_concrete.
|
||||
8b756fc85daef6d064edf3ea2b2e4c397e67c4a2 assets/tfmg/blockstates/brown_rebar_concrete_slab.json
|
||||
99c8ea149db01211c82a02af3d738494694b2114 assets/tfmg/blockstates/brown_rebar_concrete_stairs.json
|
||||
0ee9e3a46eaad9b1aa6eeaf1046044a7bf410af8 assets/tfmg/blockstates/brown_rebar_concrete_wall.json
|
||||
6af2ee6cde5159868287bfb01d0997f0ce0695d3 assets/tfmg/blockstates/cable_connector.json
|
||||
840c72a290cd0731b678233786a87602f3fa8c31 assets/tfmg/blockstates/cable_connector.json
|
||||
e22bcb9d31726a734c6741fca494e409c590bf14 assets/tfmg/blockstates/cable_tube.json
|
||||
86df9d2a2840b9ca6d2ef8f2a2f62bf285bed3a1 assets/tfmg/blockstates/casting_basin.json
|
||||
2ccbf31047ec5a9b3dd285fda5a402281869f721 assets/tfmg/blockstates/cast_iron_bars.json
|
||||
@@ -76,7 +76,7 @@ c67b91a7fd9f16cd2d7eaa92dd9b945042d58130 assets/tfmg/blockstates/concrete.json
|
||||
d0709116064c94684adca52587bd0f48b3900423 assets/tfmg/blockstates/concrete_encased_cable_tube.json
|
||||
4a5b7c93ccd3bf2eeee42a6ae4b8209938980b72 assets/tfmg/blockstates/concrete_encased_electric_post.json
|
||||
2dcc62250e0e7a2f7f49c21e72176905243c7e76 assets/tfmg/blockstates/concrete_encased_industrial_pipe.json
|
||||
07c54b869311e56ecf8e740c6d5e103dc302c2c8 assets/tfmg/blockstates/concrete_hose.json
|
||||
69c8b627d7b93cddf1a777ec77fe8ebdd0e88a77 assets/tfmg/blockstates/concrete_hose.json
|
||||
9c9cac30f015e72418736cbec2d721a6dec56fb7 assets/tfmg/blockstates/concrete_slab.json
|
||||
1bb17c9ead851661909f9d223aa3947267c0a84e assets/tfmg/blockstates/concrete_smokestack.json
|
||||
84fcaec7626f69e9a27ef235121f9a9db9955530 assets/tfmg/blockstates/concrete_stairs.json
|
||||
@@ -85,6 +85,7 @@ ff85a7b17cfc90735a0d6a868ff05bb77797adc4 assets/tfmg/blockstates/concrete_wall.j
|
||||
597a80861fc67cab5c0081f6887c868b7f1608c4 assets/tfmg/blockstates/constantan_frame.json
|
||||
53a7c2c917f5074fe2c683b839a33487c1194e9a assets/tfmg/blockstates/constantan_ladder.json
|
||||
53b8e39bebcf7f672cc05c9004ad1c0ab15797b8 assets/tfmg/blockstates/constantan_truss.json
|
||||
9070d146f25231108735e25ea0fee258aa2dea4e assets/tfmg/blockstates/converter.json
|
||||
dca4728ef33ca9d54fb55d707761c2eeb77c32b1 assets/tfmg/blockstates/cooling_fluid.json
|
||||
8b9225e35a3b3543d5866650bf4ac9775942368e assets/tfmg/blockstates/copper_cable_hub.json
|
||||
a8ffe111ead9a06af01f91232ce3b2f152deaab2 assets/tfmg/blockstates/copper_encased_aluminum_pipe.json
|
||||
@@ -94,6 +95,8 @@ e097073364c3d4214212332ba036eefb9e857715 assets/tfmg/blockstates/copper_encased_
|
||||
8b6052f05d1b9cd80062de3fb79e36eb0727ecd5 assets/tfmg/blockstates/copper_encased_steel_pipe.json
|
||||
083f2b157fbc14718db084169776596d8f750c14 assets/tfmg/blockstates/copper_frame.json
|
||||
fb27cbbba0cfc4169f0d20524fd8fa9ddad18144 assets/tfmg/blockstates/copper_truss.json
|
||||
ee52b1eec63e67a98244c87d2cce7f045c483593 assets/tfmg/blockstates/copycat_cable_base.json
|
||||
3dff9e1ec59415779195d2abfa9f07bc17b428a1 assets/tfmg/blockstates/copycat_cable_block.json
|
||||
0b0aafe0a045dd28968cb8260db0afde9d11472b assets/tfmg/blockstates/creative_generator.json
|
||||
fa1fa0509cd94e57da7624b5d094c228d6b92593 assets/tfmg/blockstates/creosote.json
|
||||
d284d43a9b9527128c706adbd3dff3fa6e8ca048 assets/tfmg/blockstates/crude_oil.json
|
||||
@@ -130,11 +133,12 @@ da3ce72a164ba44b83d2e0a34aba7a2e0bf1f7e0 assets/tfmg/blockstates/deepslate_lead_
|
||||
0c1f4a179de5361677ab6a190f3b3279374dfdf0 assets/tfmg/blockstates/deepslate_nickel_ore.json
|
||||
c9291b06874778c72b970c234fdf7b48cbc443cb assets/tfmg/blockstates/diagonal_cable_block.json
|
||||
03983ce3de10310cd75b98f17c9161653b7034cd assets/tfmg/blockstates/diesel.json
|
||||
78c9f8ef78402e4e4e2ed6050a4d144ce0145aae assets/tfmg/blockstates/electrical_switch.json
|
||||
9e5371b956a65a7a49581208e331ee1fc8b8acc2 assets/tfmg/blockstates/electrical_switch.json
|
||||
3cb8f9a5ab392d7fb37dea856f16e3d501986ef8 assets/tfmg/blockstates/electric_casing.json
|
||||
fce44cbe5ec7bc7ec527327088be37cea56ac85c assets/tfmg/blockstates/electric_diode.json
|
||||
fec8a2ce3fa897609383099ca2f30b92f591428b assets/tfmg/blockstates/electric_motor.json
|
||||
edaa0018b0c7dffe0b552e5f7dd539c5484600fb assets/tfmg/blockstates/electric_post.json
|
||||
637b5240220dcff1f51dfa02ae44ceb43392a55b assets/tfmg/blockstates/electric_pump.json
|
||||
5258f718a70e0e9b9f1433aa67fd7faa0a8f28c5 assets/tfmg/blockstates/electrode_holder.json
|
||||
e452793b4673eaf1821619357692b41c297988f7 assets/tfmg/blockstates/encased_diode.json
|
||||
5cd35edc93b0e5bc3fe86e4fd160ba2a660404ff assets/tfmg/blockstates/encased_potentiometer.json
|
||||
@@ -156,6 +160,7 @@ b0a3f4da5d9efdd01800c8b9738aee194565c6e7 assets/tfmg/blockstates/gasoline.json
|
||||
307dfb8175dbcda4107a36d25b25004d41b901ca assets/tfmg/blockstates/generator.json
|
||||
c58cc6ae649bc1bafe76b85f0ad4a96c78c237a7 assets/tfmg/blockstates/glass_aluminum_pipe.json
|
||||
de3098b3dfd1bdaabbd437af409b9fdef7d5ccd6 assets/tfmg/blockstates/glass_brass_pipe.json
|
||||
6d70d188380a7c925b52c44e3d8306aa1088e4c7 assets/tfmg/blockstates/glass_cable_insulator.json
|
||||
be2ae6bcf2aead92612fafa57edcac1f0e7775db assets/tfmg/blockstates/glass_cast_iron_pipe.json
|
||||
078297bd91c6b0f19bed8e1b415c3fc48c879ef3 assets/tfmg/blockstates/glass_plastic_pipe.json
|
||||
d23c28129bc7885986c65290071fb7a9cc5391d7 assets/tfmg/blockstates/glass_steel_pipe.json
|
||||
@@ -259,6 +264,7 @@ a4d0f4f955fe3ac39933613a721521849bcae8c6 assets/tfmg/blockstates/molten_steel.js
|
||||
ebd6804b999acea36abbf07c2381ee6dee0d7a16 assets/tfmg/blockstates/napalm.json
|
||||
d4912088a46f9bdff74bf95f2d78aec4e4c8a6cb assets/tfmg/blockstates/napalm_bomb.json
|
||||
89f2902010903aad686571ef37c781b111147456 assets/tfmg/blockstates/naphtha.json
|
||||
50554cd2533852d92fd55438c7b334a66d0b394a assets/tfmg/blockstates/neon_tube.json
|
||||
b143304f44f6eb7a2d1a6a9ee6b42b8aa4e0bd03 assets/tfmg/blockstates/nickel_bars.json
|
||||
2804515ba81747bf9d1f04dc38c4d1aad7751b7f assets/tfmg/blockstates/nickel_block.json
|
||||
846b7738390847af67e357932b3ac8dbefd83074 assets/tfmg/blockstates/nickel_flywheel.json
|
||||
@@ -315,6 +321,9 @@ d213b1e171f2c1cb3da1e18f05fa6bb263562901 assets/tfmg/blockstates/purple_rebar_co
|
||||
0e498253d6e9cc8085dba93440b5531d6f4e6d3f assets/tfmg/blockstates/purple_rebar_concrete_slab.json
|
||||
cd0efffbfec34f486ff8754fe101d549ecb89b4f assets/tfmg/blockstates/purple_rebar_concrete_stairs.json
|
||||
aa93dabc5a9694f94d2a91e6b4060eccfa108a0c assets/tfmg/blockstates/purple_rebar_concrete_wall.json
|
||||
61c3fb463cbf621b692307cada7201e3882b26ed assets/tfmg/blockstates/raw_lead_block.json
|
||||
0000593f18477817db98661055ab25034c12990f assets/tfmg/blockstates/raw_lithium_block.json
|
||||
8f4e79b9966ed492e30afd07cdc2e77465e0a4de assets/tfmg/blockstates/raw_nickel_block.json
|
||||
4cc9b6e69063a86660c3bc8d0b2105bf32d0c29d assets/tfmg/blockstates/rebar_block.json
|
||||
b96efc46401770e0661dc36466ff6b233232e7f5 assets/tfmg/blockstates/rebar_concrete.json
|
||||
9c9cac30f015e72418736cbec2d721a6dec56fb7 assets/tfmg/blockstates/rebar_concrete_slab.json
|
||||
@@ -386,7 +395,6 @@ e7bbd21def546ff0b7db68091c877da4ac3fe301 assets/tfmg/blockstates/sulfur.json
|
||||
5a477cb69a83689c52ad333d7dbc3c4c93680c6d assets/tfmg/blockstates/surface_scanner.json
|
||||
630732e33c7cab7e8a9f126bf3b5f0cc58d3c5fd assets/tfmg/blockstates/traffic_light.json
|
||||
22e56693892c3c7113999216111223b271cf7783 assets/tfmg/blockstates/transformer.json
|
||||
701d3292946ce29234fb8da435ec010879d6bafd assets/tfmg/blockstates/transistor.json
|
||||
1a9d971bfb2af3594592ce835b54a94ed8f76f7b assets/tfmg/blockstates/voltage_observer.json
|
||||
253af20ab871a235c0cfd95d6212760a6dac352d assets/tfmg/blockstates/voltmeter.json
|
||||
3ae604025ac79eccc5fd1ff34d3854c50b17ce76 assets/tfmg/blockstates/white_caution_block.json
|
||||
@@ -410,8 +418,8 @@ a1988ec6a98f23cad8321b46345fbf1c5fd20489 assets/tfmg/blockstates/yellow_rebar_co
|
||||
c58fa20c091e5ecddfb7164cba45538a8f911431 assets/tfmg/blockstates/yellow_rebar_concrete_wall.json
|
||||
0271e2b940bb94cdb7e951b81e277ee633d64d62 assets/tfmg/blockstates/zinc_frame.json
|
||||
1bd66f29acffb67f30bfe94c8535509bd009beab assets/tfmg/blockstates/zinc_truss.json
|
||||
1c4cbd77879f25d9d8a71c500da46e8f6e20eefc assets/tfmg/lang/en_ud.json
|
||||
5b5f6a784c1a5b830571c6cb32fbd4c3c5fc4b7b assets/tfmg/lang/en_us.json
|
||||
bed3816da4b736c65b2b721c2abf68a6baad8dec assets/tfmg/lang/en_ud.json
|
||||
23d8d0235ab141ddade59ee9bacb4a962d0d2269 assets/tfmg/lang/en_us.json
|
||||
9e6a6b62f5e7528c4e4d4f72f3510edcd8f0c078 assets/tfmg/models/block/aluminum_block.json
|
||||
1d33a893d6ac05f9adaceb7f84423ebe9b195c01 assets/tfmg/models/block/aluminum_cable_hub.json
|
||||
da469bf3233944085f07d4ef437827061e408838 assets/tfmg/models/block/aluminum_cap.json
|
||||
@@ -564,7 +572,6 @@ a9024b0da6c2087e52429770d5e855dd285cc1c6 assets/tfmg/models/block/cast_iron_side
|
||||
50c47672a7e9f7180af78c4bef42d5db1822b08b assets/tfmg/models/block/coal_coke_block.json
|
||||
75c31d328fc5d6d46c8b43e8bde7504f4e51dadc assets/tfmg/models/block/concrete.json
|
||||
a7b301c044049a3037f6695fb165e77264e84519 assets/tfmg/models/block/concrete_bottom.json
|
||||
0ceb30eaff16a495c9a165ca16c925cbff836755 assets/tfmg/models/block/concrete_hose.json
|
||||
031cd9564cc8af1c8712627d8cb3931be6ccc46d assets/tfmg/models/block/concrete_stairs.json
|
||||
7251c262b597916cad63fa470fdddca80d814591 assets/tfmg/models/block/concrete_stairs_inner.json
|
||||
67229ab94c818bbdafe561cb5ab62f7a0f3f6dcc assets/tfmg/models/block/concrete_stairs_outer.json
|
||||
@@ -860,6 +867,9 @@ ed75898bcabca38c33cf3b5f4cdf542ad8f43823 assets/tfmg/models/block/purple_concret
|
||||
53fec6bdb6dfe8b9a75efc0e6e58560c8b616231 assets/tfmg/models/block/purple_concrete_wall_side.json
|
||||
dc6efe4ecdf11fdabd48bd635343571341e0c7a1 assets/tfmg/models/block/purple_concrete_wall_side_tall.json
|
||||
ba6f69e143915fedf081f7bf3434e2ecfe9c86a7 assets/tfmg/models/block/purple_rebar_concrete.json
|
||||
6f2b4e6eabcd6eb785a6f0490d576e7c9542e004 assets/tfmg/models/block/raw_lead_block.json
|
||||
b5dbb2a95f6c0035ac1d9b1a398523ebbf4389ee assets/tfmg/models/block/raw_lithium_block.json
|
||||
4365f59397d10a5a90fc396b7b3b554c195fc9ab assets/tfmg/models/block/raw_nickel_block.json
|
||||
75c31d328fc5d6d46c8b43e8bde7504f4e51dadc assets/tfmg/models/block/rebar_concrete.json
|
||||
8b901f38d5d1f28d81e44eff725b1a7d5d74c164 assets/tfmg/models/block/red_caution_block.json
|
||||
1a7e3178749d61380189e5d2e82a449a7af955e9 assets/tfmg/models/block/red_concrete.json
|
||||
@@ -1096,6 +1106,8 @@ dfc11d8b61afa72b969c79a0c6cc01e8d6fca169 assets/tfmg/models/item/constantan_ingo
|
||||
381e0d64eeb5c13f759e3d4fe9842dea759ee073 assets/tfmg/models/item/constantan_nugget.json
|
||||
6b458b591be15313380988f3154fa6df067aac46 assets/tfmg/models/item/constantan_spool.json
|
||||
a7e0b0c5b9cdcb7e48ce92754b4714cdec94095e assets/tfmg/models/item/constantan_truss.json
|
||||
fbef525eaae76c32fb3d7ef415a94f39d033a1ae assets/tfmg/models/item/constantan_wire.json
|
||||
1d29da201c5d3cbd80ffddafebe9a740f7c9e985 assets/tfmg/models/item/converter.json
|
||||
cbebe27349c77edc77e836d00339571a9d42d1c6 assets/tfmg/models/item/cooling_fluid_bottle.json
|
||||
e8c4e68647a6ced815cfca649c679e709fcc7751 assets/tfmg/models/item/cooling_fluid_bucket.json
|
||||
04bf0e4e6afcdcf4e1712536afdbac6ae64091c3 assets/tfmg/models/item/copper_cable_hub.json
|
||||
@@ -1106,6 +1118,7 @@ cd782e6a5296067494443920d220889937a6de65 assets/tfmg/models/item/copper_spool.js
|
||||
45a8624d38d2723f58678704b4bcf9a738006551 assets/tfmg/models/item/copper_sulfate.json
|
||||
19e87f4dcd3cd01daf1eec8b06df743898dcc775 assets/tfmg/models/item/copper_truss.json
|
||||
d34ea5d4a5fbae394f3773155c901da7e8a9f99e assets/tfmg/models/item/copper_wire.json
|
||||
ad22e8940129ab3a0601244b48387b1832bcb80e assets/tfmg/models/item/copycat_cable_block.json
|
||||
594b3b4201e8a781bc1280d668a8ba43fc64c945 assets/tfmg/models/item/crankshaft.json
|
||||
e90663032572b10fff3b45cdf2435211cb1ef05b assets/tfmg/models/item/creative_generator.json
|
||||
0abf2b2d61995c4fd3e3c88656e740ffe0a2f083 assets/tfmg/models/item/creosote_bucket.json
|
||||
@@ -1151,6 +1164,7 @@ aa89976b1ba543ff94656cc405d57f2d91ef1cb5 assets/tfmg/models/item/electric_casing
|
||||
d2ddba2549ea27f94ff7de3f91414235edd9e827 assets/tfmg/models/item/electric_diode.json
|
||||
b90d6ceb1c64ade022a893ed4b442b0e100e42b1 assets/tfmg/models/item/electric_motor.json
|
||||
deb7528506dca13e6f3c7a9057105b97c7faddef assets/tfmg/models/item/electric_post.json
|
||||
e36f2280b360cbd37267b3351a131ebcfb499fe7 assets/tfmg/models/item/electric_pump.json
|
||||
1a73802a404a841834fa695ed6ee985741e6ec4b assets/tfmg/models/item/electrode_holder.json
|
||||
7b898ca0de43a97cda3733b254c3aa112f6a5251 assets/tfmg/models/item/electromagnetic_coil.json
|
||||
969c1a0cf944e95b0807ba0d9fe0641e052e1a7f assets/tfmg/models/item/empty_circuit_board.json
|
||||
@@ -1179,6 +1193,8 @@ c8a7e3f8161d0ab32be2af91cd590b63b5f1aa93 assets/tfmg/models/item/fuse_block.json
|
||||
acd5c31ea8e24ca099199932affdc705e5abe3fd assets/tfmg/models/item/galena_pillar.json
|
||||
ed2830b2988403aebaca633b2e315878b41f7503 assets/tfmg/models/item/gasoline_bucket.json
|
||||
b577d1d699bbea896237f71a8f5582bcdfcd4534 assets/tfmg/models/item/generator.json
|
||||
06d25769506a7173b15af2069573b2983b587cc4 assets/tfmg/models/item/glass_cable_insulator.json
|
||||
35bca54df08df5acb0bb3e86537571db39f7d165 assets/tfmg/models/item/glass_insulator_segment.json
|
||||
b3aebfc27e431cb0b099c3df6dc30dea1e1b6ec3 assets/tfmg/models/item/graphite_electrode.json
|
||||
f80ea87018220fdac6fe8e4cc7490bcdb90cb5d0 assets/tfmg/models/item/gray_caution_block.json
|
||||
c7d4cc91447bc3512efbe18bc7b2344a42196a88 assets/tfmg/models/item/gray_concrete.json
|
||||
@@ -1303,6 +1319,7 @@ b41853a4ae8b890f924058e57d274e956e6f4e37 assets/tfmg/models/item/napalm_bucket.j
|
||||
9edf655bf9d93785d47b42106ab1a326d57125b4 assets/tfmg/models/item/napalm_potato.json
|
||||
aa94f1afebb7c458e85849d8ddff76c27efefb80 assets/tfmg/models/item/naphtha_bucket.json
|
||||
693ee4907e6e65975a4aefba6af81ccd9e6fb206 assets/tfmg/models/item/neon_bucket.json
|
||||
9fc098be5e50d8a65de98bb6fc90e5f45e0ab968 assets/tfmg/models/item/neon_tube.json
|
||||
6bf4a2c685296b40e5f3919518579a855cfa6e22 assets/tfmg/models/item/nickel_bars.json
|
||||
43b15f990e2656ae97be24051dc98917255e960c assets/tfmg/models/item/nickel_block.json
|
||||
fa02415636ae9c5f0aee76fc4e97893e2bfd123c assets/tfmg/models/item/nickel_flywheel.json
|
||||
@@ -1372,8 +1389,11 @@ fcc22d0322de977957e8353c7b9108e79fdca094 assets/tfmg/models/item/purple_rebar_co
|
||||
6c3eaf18f8d57793c6378fd0c05175612ca7319a assets/tfmg/models/item/p_semiconductor.json
|
||||
3cfdbac1c06b4e75416fcd24a93616d98f59d6e3 assets/tfmg/models/item/quad_potato_cannon.json
|
||||
7b98c40428b278303a2251ff729593ef5e4047b2 assets/tfmg/models/item/raw_lead.json
|
||||
beaf17bc426f3260739d710bee368a107c3df7ea assets/tfmg/models/item/raw_lead_block.json
|
||||
87f214f3eeeb0b7a2ddaf504f9e02e975e078835 assets/tfmg/models/item/raw_lithium.json
|
||||
1fa5b5a655f29ea8468504fa8f3faa3c4dfaaa1b assets/tfmg/models/item/raw_lithium_block.json
|
||||
ba559e572a5602073bd24bd6e5810d07e5774387 assets/tfmg/models/item/raw_nickel.json
|
||||
a3eede49ded9c130255768790203be049bcd8bea assets/tfmg/models/item/raw_nickel_block.json
|
||||
212327f9d3eebd3f0c363d57a42d75b79a82a1f8 assets/tfmg/models/item/rebar_block.json
|
||||
94dd27526967032c1ab4f94d19ad24a60a03c278 assets/tfmg/models/item/rebar_concrete.json
|
||||
685e08733e5195a8714284be2eeba8f47736115e assets/tfmg/models/item/rebar_concrete_slab.json
|
||||
@@ -1467,9 +1487,18 @@ e2fb504cbb8808de330d4ea87030f0d089921e23 assets/tfmg/models/item/surface_scanner
|
||||
31ca5e14f8583f2e73a3aeea14e129026ec79974 assets/tfmg/models/item/thermite_powder.json
|
||||
dc7cec557984ae6aeaa1cb4136acc12e95123f9c assets/tfmg/models/item/traffic_light.json
|
||||
ceca2b38bca3eca6e17419064b782ad745dd229b assets/tfmg/models/item/transformer.json
|
||||
c7a287237f856b6006610eef6b1fab49279dd00b assets/tfmg/models/item/transistor.json
|
||||
cd6944ca5fe85883cdc520778f9b2ecf4830c2de assets/tfmg/models/item/transistor_item.json
|
||||
7bffba77b51ec27a99bd5a20f62c23315c31fe13 assets/tfmg/models/item/turbine_blade.json
|
||||
a11cee5b22052675790c9115cf615b3a2beeee01 assets/tfmg/models/item/unfinished_capacitor.json
|
||||
ce1c112f8068e82082834562d661e7d94bf2a262 assets/tfmg/models/item/unfinished_electric_motor.json
|
||||
d4562d6022360cefd8fe93fc7257a89aa9caa5df assets/tfmg/models/item/unfinished_generator.json
|
||||
e1315ad9ba1bb749c3c746bb4dd1f1333293fc9e assets/tfmg/models/item/unfinished_insulator.json
|
||||
f268aff3ae208a366d98b816356594de497507dd assets/tfmg/models/item/unfinished_potentiometer.json
|
||||
83751c3e8ecd4157c95d286451222978ecb9d62c assets/tfmg/models/item/unfinished_resistor.json
|
||||
108b74837387c74cbcfe24bdd4dc0cb5c0ee2b93 assets/tfmg/models/item/unfinished_steel_mechanism.json
|
||||
4bbea3b514f7799fa37718ae2371c8ef20486e0a assets/tfmg/models/item/unfinished_transistor.json
|
||||
43eac4a385f1b4d6b5637218e1601f0eafbfa85c assets/tfmg/models/item/unfired_insulator.json
|
||||
5a772b5ff15b50bbfb3c8ff5c67d499aae4082d2 assets/tfmg/models/item/unprocessed_heavy_plate.json
|
||||
0374bdc855791f3d90600a025a46f56a4fbfc324 assets/tfmg/models/item/voltage_observer.json
|
||||
0ae8adf5d09cd1ced828eae47298be7a77e52bc1 assets/tfmg/models/item/voltmeter.json
|
||||
abc7aeba84770fef277f2892536738c7af407d9f assets/tfmg/models/item/white_caution_block.json
|
||||
@@ -1513,7 +1542,7 @@ c1c3c38f057a7d55140398a9b7d7ab85e160b1b0 data/create/recipes/polished_cut_galena
|
||||
9c7da3eec428e48ad5977ecfa2e058fff7c81156 data/create/recipes/small_bauxite_brick_slab_recycling.json
|
||||
a3b4393f7a5ff503b7bef1f941b666b28d42c2f0 data/create/recipes/small_galena_brick_slab_recycling.json
|
||||
b202817c001ed31fd0aafc2c4b4102b8adbde108 data/create/tags/blocks/casing.json
|
||||
4c51fc6154c49a68dc342c5e0e001073f8942e3e data/create/tags/blocks/fan_transparent.json
|
||||
f89b8482c9709a46bb2161a70330596c2a723657 data/create/tags/blocks/fan_transparent.json
|
||||
7f2ce9c0c2595d78a2230a5e478bd1ece53f63d1 data/create/tags/blocks/non_movable.json
|
||||
92db31919c2410ef20a6a586eac2f4a9f231bf63 data/create/tags/blocks/safe_nbt.json
|
||||
4c51fc6154c49a68dc342c5e0e001073f8942e3e data/create/tags/blocks/wrench_pickup.json
|
||||
@@ -1527,7 +1556,7 @@ d24579a31b2842ed918f938ad204e91ab405cc32 data/forge/tags/blocks/ores/lithium.jso
|
||||
4a4923c9c00653a98fb9b247ee5ac9191d7c2ede data/forge/tags/blocks/ores/nickel.json
|
||||
94ba62223301585f0de8d7bee24c39cce84f6ae8 data/forge/tags/blocks/ores_in_ground/deepslate.json
|
||||
eefda4e96e7bc3a3c3c130eb5593a811b50255ce data/forge/tags/blocks/ores_in_ground/stone.json
|
||||
87c5a787906199c4270b17d45d0e73ae2f16212e data/forge/tags/blocks/storage_blocks.json
|
||||
a2029f4d5ac94eb5514d525fa8296d78e65d338f data/forge/tags/blocks/storage_blocks.json
|
||||
5f36040d029001793eb338e1a8c5d95b9abcc9b3 data/forge/tags/blocks/storage_blocks/aluminum.json
|
||||
7c5615c56bb169570a061f052ebb1f5115760c16 data/forge/tags/blocks/storage_blocks/cast_iron.json
|
||||
b9900e5c7523b9c0a71b5695576d1d9923ea7625 data/forge/tags/blocks/storage_blocks/constantan.json
|
||||
@@ -1535,6 +1564,9 @@ d26621b9617890011a68780cf7ab40fbb4658edc data/forge/tags/blocks/storage_blocks/l
|
||||
d90a1f9c03f64fad5c3248d46176b6332004b78d data/forge/tags/blocks/storage_blocks/lithium.json
|
||||
87e39c96c409f7e862d71e20bcf8a96d5936f2f9 data/forge/tags/blocks/storage_blocks/nickel.json
|
||||
5d9ffd0da6bdb068c0aa92a6919a722339b5a039 data/forge/tags/blocks/storage_blocks/plastic.json
|
||||
23308e52c71940a45a2ec590c5ca89966e115451 data/forge/tags/blocks/storage_blocks/raw_lead.json
|
||||
c06711f911c6e48111c6441978c6185cc1ef8641 data/forge/tags/blocks/storage_blocks/raw_lithium.json
|
||||
a1f3c8498ccc83ea4a9015e4214c596753f58a81 data/forge/tags/blocks/storage_blocks/raw_nickel.json
|
||||
37b1c9c3ae722d8110db48015993ede3e194c0a0 data/forge/tags/blocks/storage_blocks/steel.json
|
||||
98d0545decb38ccb6b4da967c598af78bac888ea data/forge/tags/fluids/creosote.json
|
||||
d0e3e4382c78a56c7e341aa2009c6e3c8cf75cb4 data/forge/tags/fluids/crude_oil.json
|
||||
@@ -1609,7 +1641,7 @@ bcd97e4d08daef6f60e6e0239222009540dac177 data/forge/tags/items/plates/steel.json
|
||||
3f7807c4bc7aece02066f3dc5e0f436a0d5fa078 data/forge/tags/items/raw_materials/lead.json
|
||||
808564cbcb70936b3da0a2a1bfa063752a0688d3 data/forge/tags/items/raw_materials/lithium.json
|
||||
88f3d6f99c74dabb2491637c6b2ba766a1f662f1 data/forge/tags/items/raw_materials/nickel.json
|
||||
87c5a787906199c4270b17d45d0e73ae2f16212e data/forge/tags/items/storage_blocks.json
|
||||
a2029f4d5ac94eb5514d525fa8296d78e65d338f data/forge/tags/items/storage_blocks.json
|
||||
5f36040d029001793eb338e1a8c5d95b9abcc9b3 data/forge/tags/items/storage_blocks/aluminum.json
|
||||
7c5615c56bb169570a061f052ebb1f5115760c16 data/forge/tags/items/storage_blocks/cast_iron.json
|
||||
b9900e5c7523b9c0a71b5695576d1d9923ea7625 data/forge/tags/items/storage_blocks/constantan.json
|
||||
@@ -1617,9 +1649,13 @@ d26621b9617890011a68780cf7ab40fbb4658edc data/forge/tags/items/storage_blocks/le
|
||||
d90a1f9c03f64fad5c3248d46176b6332004b78d data/forge/tags/items/storage_blocks/lithium.json
|
||||
87e39c96c409f7e862d71e20bcf8a96d5936f2f9 data/forge/tags/items/storage_blocks/nickel.json
|
||||
5d9ffd0da6bdb068c0aa92a6919a722339b5a039 data/forge/tags/items/storage_blocks/plastic.json
|
||||
23308e52c71940a45a2ec590c5ca89966e115451 data/forge/tags/items/storage_blocks/raw_lead.json
|
||||
c06711f911c6e48111c6441978c6185cc1ef8641 data/forge/tags/items/storage_blocks/raw_lithium.json
|
||||
a1f3c8498ccc83ea4a9015e4214c596753f58a81 data/forge/tags/items/storage_blocks/raw_nickel.json
|
||||
37b1c9c3ae722d8110db48015993ede3e194c0a0 data/forge/tags/items/storage_blocks/steel.json
|
||||
d030bcdb3da4c37703a22037cc3a26830c7a9498 data/forge/tags/items/string.json
|
||||
ffb77323df69802d55e95d7fc30a45b3fbca8db8 data/forge/tags/items/wires/aluminum.json
|
||||
ccae2d221dc320981c331f4b8e07fe159176557a data/forge/tags/items/wires/constantan.json
|
||||
863e668119b306cf119cb6a7a62a2d1e12bee1ff data/forge/tags/items/wires/copper.json
|
||||
543dbb3bba839c96d454f6e26e7e97ce5ae9dc4e data/minecraft/tags/blocks/azalea_root_replaceable.json
|
||||
0b452fe131e1fd26fe896792aa41e5cd8fe16acf data/minecraft/tags/blocks/beacon_base_blocks.json
|
||||
@@ -1630,11 +1666,11 @@ ffb77323df69802d55e95d7fc30a45b3fbca8db8 data/forge/tags/items/wires/aluminum.js
|
||||
7f2ce9c0c2595d78a2230a5e478bd1ece53f63d1 data/minecraft/tags/blocks/features_cannot_replace.json
|
||||
7f2ce9c0c2595d78a2230a5e478bd1ece53f63d1 data/minecraft/tags/blocks/infiniburn_overworld.json
|
||||
543dbb3bba839c96d454f6e26e7e97ce5ae9dc4e data/minecraft/tags/blocks/lush_ground_replaceable.json
|
||||
4f7716833abf51fabd165bf2481a84ea431fffe1 data/minecraft/tags/blocks/mineable/axe.json
|
||||
e8578d82319fcd78f187553328f67168139b7769 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
410b2ee2d8668a6fc91c7c33d5bf5ec8798421d3 data/minecraft/tags/blocks/mineable/axe.json
|
||||
f09cb368a68ceada919774666a5ab7ac6dc5c109 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
9aa107af39387783bd5f8c05bfdb9293387ccea4 data/minecraft/tags/blocks/mineable/shovel.json
|
||||
543dbb3bba839c96d454f6e26e7e97ce5ae9dc4e data/minecraft/tags/blocks/moss_replaceable.json
|
||||
0b452fe131e1fd26fe896792aa41e5cd8fe16acf data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
dfca9f1cc79d30334f344f024c13a7c717bf4027 data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
6345cd343d2a625dd38b37d7ff953813fcfa63b3 data/minecraft/tags/blocks/needs_stone_tool.json
|
||||
cf379823a7829c966e31763524da2bd584e77bc5 data/minecraft/tags/blocks/slabs.json
|
||||
47ad300c492fb6b0afd3b6b499802d6a92fe76e9 data/minecraft/tags/blocks/stairs.json
|
||||
@@ -1815,6 +1851,7 @@ a26bbb17cb091dc44faa0211c3c1481fb0d4e017 data/tfmg/loot_tables/blocks/concrete_h
|
||||
5e1c3e074ff1f5a2778cb9c8a9b06dba6dbac0b4 data/tfmg/loot_tables/blocks/constantan_frame.json
|
||||
51cc26c05d868b26a9928045c071ca574a269a1f data/tfmg/loot_tables/blocks/constantan_ladder.json
|
||||
467b8e3858a8d712b09aabdef9c57a14a3e1ad14 data/tfmg/loot_tables/blocks/constantan_truss.json
|
||||
6e1ec2a21b3ad3bd0df2e6e2d40f53f71bb0b8c1 data/tfmg/loot_tables/blocks/converter.json
|
||||
73e770fe84929435e079304c35fdb3ae6c16cb86 data/tfmg/loot_tables/blocks/copper_cable_hub.json
|
||||
b1ca7d57591fa444b6e1cb6e7073e0aafb4e149a data/tfmg/loot_tables/blocks/copper_encased_aluminum_pipe.json
|
||||
2b284725c7823fa65778e737018acfa018e0f394 data/tfmg/loot_tables/blocks/copper_encased_brass_pipe.json
|
||||
@@ -1823,6 +1860,8 @@ b1ca7d57591fa444b6e1cb6e7073e0aafb4e149a data/tfmg/loot_tables/blocks/copper_enc
|
||||
8389fc272d983d9137551fb9eff8c5c29a6404ab data/tfmg/loot_tables/blocks/copper_encased_steel_pipe.json
|
||||
6f8260ed2477e9980e1b2ba5caddf018130c39b0 data/tfmg/loot_tables/blocks/copper_frame.json
|
||||
5ef528dac7a07d3f6276a591c515b57a0232f217 data/tfmg/loot_tables/blocks/copper_truss.json
|
||||
f1648d2a817fbd3e73998515175546f0db4a5d89 data/tfmg/loot_tables/blocks/copycat_cable_base.json
|
||||
40097204f87c08bfa7a398fc72ecaff7c3a6bb49 data/tfmg/loot_tables/blocks/copycat_cable_block.json
|
||||
e3d8605c9ca9206c059bed870ec68f1a1ee01f1c data/tfmg/loot_tables/blocks/creative_generator.json
|
||||
721347336ee749165c6ac8447b0666f6d4c9e673 data/tfmg/loot_tables/blocks/cut_bauxite.json
|
||||
82da0500317157c4246fc37dc1dc3fb12fddfcc1 data/tfmg/loot_tables/blocks/cut_bauxite_bricks.json
|
||||
@@ -1861,6 +1900,7 @@ a1aa5b0d4cee5067aff0598d083e27bf318bde04 data/tfmg/loot_tables/blocks/electrical
|
||||
5d500af70bee2658fe37e7be1dd252a2ccb75a7e data/tfmg/loot_tables/blocks/electric_diode.json
|
||||
b8bdebe81f97872eb5dbb1b645b871922b2fb4b7 data/tfmg/loot_tables/blocks/electric_motor.json
|
||||
4166590bfa4d891f7ddc21d8f116e08a57bbc9db data/tfmg/loot_tables/blocks/electric_post.json
|
||||
261790b99184c00192f41e8938b0bcb30d7e2a93 data/tfmg/loot_tables/blocks/electric_pump.json
|
||||
657af76ea4fdd97034dadac49f2663671f404212 data/tfmg/loot_tables/blocks/electrode_holder.json
|
||||
7b5b916ebb11d9f7a634add40226533fee29aa82 data/tfmg/loot_tables/blocks/encased_diode.json
|
||||
28a38b257764d5c13546a5328166b54d718584da data/tfmg/loot_tables/blocks/encased_potentiometer.json
|
||||
@@ -1881,6 +1921,7 @@ f8274f88b8a4171676976b58bd30ab283571f6b8 data/tfmg/loot_tables/blocks/galena_pil
|
||||
90322865e154696c6845fbadc81cafd8b5c9f78d data/tfmg/loot_tables/blocks/generator.json
|
||||
2eb72789f8dd117af17aafd0adbddbbbe574ad27 data/tfmg/loot_tables/blocks/glass_aluminum_pipe.json
|
||||
dc7461e6cd019a5af3f71de7e6f04c0d89607d51 data/tfmg/loot_tables/blocks/glass_brass_pipe.json
|
||||
c74c62e9958bd621f69a29c6626e12d9196e37a9 data/tfmg/loot_tables/blocks/glass_cable_insulator.json
|
||||
e8aa3a5242276f5ca80d096b0cfa03211fedbf12 data/tfmg/loot_tables/blocks/glass_cast_iron_pipe.json
|
||||
518d85c4092bc22a07f3d5dec1375d7c728bb613 data/tfmg/loot_tables/blocks/glass_plastic_pipe.json
|
||||
1854d11f8657d6d8a3c9ec3fac12e412f65be8fd data/tfmg/loot_tables/blocks/glass_steel_pipe.json
|
||||
@@ -1973,6 +2014,7 @@ fa2ab4bc3da24a1870702d7fd65628ed55b6ac41 data/tfmg/loot_tables/blocks/magenta_co
|
||||
647b27bf2a5ff3376cde7422c44dbeffd8130ecd data/tfmg/loot_tables/blocks/metal_smokestack.json
|
||||
04588ccbc6f960a7a415d5f1cd83c38553aea219 data/tfmg/loot_tables/blocks/modern_light.json
|
||||
35d8d0fc24380f370f65f6ff8d3f2cee4a765a78 data/tfmg/loot_tables/blocks/napalm_bomb.json
|
||||
33a1d653364c4f28cb3c35067ed789bdbca77990 data/tfmg/loot_tables/blocks/neon_tube.json
|
||||
0ae9b931267bc7e518b9e2a98a401bcbd3e91318 data/tfmg/loot_tables/blocks/nickel_bars.json
|
||||
303f10e7adba41c5776d77e326b2f1f5a2bcb276 data/tfmg/loot_tables/blocks/nickel_block.json
|
||||
b897a01f80c17acb0695f99df2d1ae5bcd7c3151 data/tfmg/loot_tables/blocks/nickel_flywheel.json
|
||||
@@ -2029,6 +2071,9 @@ fe680d135d2cbc3e1d16b22dc55264857da885f1 data/tfmg/loot_tables/blocks/purple_con
|
||||
d2fa9f08a6af6b93f6f7c9d5bd4d5224762073d1 data/tfmg/loot_tables/blocks/purple_rebar_concrete_slab.json
|
||||
1815c93721aa88d56ba19bb531748309f2dc5d53 data/tfmg/loot_tables/blocks/purple_rebar_concrete_stairs.json
|
||||
e2d793873db74a1225db5984149c86333683a610 data/tfmg/loot_tables/blocks/purple_rebar_concrete_wall.json
|
||||
c151aeccce85ffc594ea4a02fb55c2d83ac43d04 data/tfmg/loot_tables/blocks/raw_lead_block.json
|
||||
fea2cdc5d851988d3274f3809aaf3dab4edcf611 data/tfmg/loot_tables/blocks/raw_lithium_block.json
|
||||
2075bb2a9d6c60f0aece85373668a96a8dcdd192 data/tfmg/loot_tables/blocks/raw_nickel_block.json
|
||||
58657ba63913ebfb0cabd48e262bcb5032609e37 data/tfmg/loot_tables/blocks/rebar_block.json
|
||||
9701e07427b96c5beccd0aab015be98cf51402f4 data/tfmg/loot_tables/blocks/rebar_concrete.json
|
||||
23ea2541f57bb395658a582d12b102649862a7df data/tfmg/loot_tables/blocks/rebar_concrete_slab.json
|
||||
@@ -2100,7 +2145,6 @@ aad98868e2a12899a9ae9f30ce409b936d9ba7bd data/tfmg/loot_tables/blocks/steel_trap
|
||||
b9d01fccfddf5458a705560da5cd2450bdfde9ec data/tfmg/loot_tables/blocks/surface_scanner.json
|
||||
ed5b75cddc07db30b57b633c9ce5572546899aa2 data/tfmg/loot_tables/blocks/traffic_light.json
|
||||
b112d5170c07072a431a3e36476a653ff2647160 data/tfmg/loot_tables/blocks/transformer.json
|
||||
e4b46675a978b0d1019273cfb9c9fcb982ff7718 data/tfmg/loot_tables/blocks/transistor.json
|
||||
b5310b6e5e668d1b4fa3225e9672fd185f6831c2 data/tfmg/loot_tables/blocks/voltage_observer.json
|
||||
e8d2138992850b78009c0af31dcf3a743a41ecde data/tfmg/loot_tables/blocks/voltmeter.json
|
||||
295dc761fbdb402edc3f990ec2d676e0f6fc29bf data/tfmg/loot_tables/blocks/white_caution_block.json
|
||||
|
||||
@@ -27,28 +27,28 @@
|
||||
"y": 270
|
||||
},
|
||||
"extension=true,facing=down": {
|
||||
"model": "tfmg:block/cable_connector/block",
|
||||
"model": "tfmg:block/cable_connector/block_extension",
|
||||
"x": 180
|
||||
},
|
||||
"extension=true,facing=east": {
|
||||
"model": "tfmg:block/cable_connector/block",
|
||||
"model": "tfmg:block/cable_connector/block_extension",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extension=true,facing=north": {
|
||||
"model": "tfmg:block/cable_connector/block",
|
||||
"model": "tfmg:block/cable_connector/block_extension",
|
||||
"x": 90
|
||||
},
|
||||
"extension=true,facing=south": {
|
||||
"model": "tfmg:block/cable_connector/block",
|
||||
"model": "tfmg:block/cable_connector/block_extension",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extension=true,facing=up": {
|
||||
"model": "tfmg:block/cable_connector/block"
|
||||
"model": "tfmg:block/cable_connector/block_extension"
|
||||
},
|
||||
"extension=true,facing=west": {
|
||||
"model": "tfmg:block/cable_connector/block",
|
||||
"model": "tfmg:block/cable_connector/block_extension",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/concrete_hose"
|
||||
"facing=east": {
|
||||
"model": "tfmg:block/concrete_hose/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "tfmg:block/concrete_hose/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "tfmg:block/concrete_hose/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "tfmg:block/concrete_hose/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east,input=false": {
|
||||
"model": "tfmg:block/converter/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,input=true": {
|
||||
"model": "tfmg:block/converter/block_rotated",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north,input=false": {
|
||||
"model": "tfmg:block/converter/block"
|
||||
},
|
||||
"facing=north,input=true": {
|
||||
"model": "tfmg:block/converter/block_rotated"
|
||||
},
|
||||
"facing=south,input=false": {
|
||||
"model": "tfmg:block/converter/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,input=true": {
|
||||
"model": "tfmg:block/converter/block_rotated",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,input=false": {
|
||||
"model": "tfmg:block/converter/block",
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,input=true": {
|
||||
"model": "tfmg:block/converter/block_rotated",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/copycat_cable_base/block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "minecraft:block/air"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 180
|
||||
},
|
||||
"facing=down,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"facing=north,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90
|
||||
},
|
||||
"facing=north,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90
|
||||
},
|
||||
"facing=south,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=up,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block"
|
||||
},
|
||||
"facing=up,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block"
|
||||
},
|
||||
"facing=west,waterlogged=false": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,waterlogged=true": {
|
||||
"model": "tfmg:block/electric_pump/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,29 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=down": {
|
||||
"model": "tfmg:block/electrical_switch/block",
|
||||
"x": 180
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "tfmg:block/electrical_switch/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "tfmg:block/electrical_switch/block"
|
||||
"model": "tfmg:block/electrical_switch/block",
|
||||
"x": 90
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "tfmg:block/electrical_switch/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"facing=up": {
|
||||
"model": "tfmg:block/electrical_switch/block"
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "tfmg:block/electrical_switch/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"variants": {
|
||||
"extension=false,facing=down": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block",
|
||||
"x": 180
|
||||
},
|
||||
"extension=false,facing=east": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extension=false,facing=north": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block",
|
||||
"x": 90
|
||||
},
|
||||
"extension=false,facing=south": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extension=false,facing=up": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block"
|
||||
},
|
||||
"extension=false,facing=west": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"extension=true,facing=down": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension",
|
||||
"x": 180
|
||||
},
|
||||
"extension=true,facing=east": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"extension=true,facing=north": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension",
|
||||
"x": 90
|
||||
},
|
||||
"extension=true,facing=south": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension",
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"extension=true,facing=up": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension"
|
||||
},
|
||||
"extension=true,facing=west": {
|
||||
"model": "tfmg:block/glass_cable_insulator/block_extension",
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_center"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_north"
|
||||
},
|
||||
"when": {
|
||||
"north": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_south"
|
||||
},
|
||||
"when": {
|
||||
"south": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_west"
|
||||
},
|
||||
"when": {
|
||||
"west": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_east"
|
||||
},
|
||||
"when": {
|
||||
"east": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_top"
|
||||
},
|
||||
"when": {
|
||||
"up": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "tfmg:block/neon_tube/block_bottom"
|
||||
},
|
||||
"when": {
|
||||
"down": "true"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/raw_lead_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/raw_lithium_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/raw_nickel_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "tfmg:block/transistor/block",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "tfmg:block/transistor/block"
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "tfmg:block/transistor/block",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "tfmg:block/transistor/block",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@
|
||||
"block.tfmg.brown_rebar_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ɹɐqǝᴚ uʍoɹᗺ",
|
||||
"block.tfmg.brown_rebar_concrete_wall": "ןןɐM ǝʇǝɹɔuoƆ ɹɐqǝᴚ uʍoɹᗺ",
|
||||
"block.tfmg.cable connector.tooltip.summary": "‾ʎbɹǝuƎ‾ ʇɹodsuɐɹʇ ɯǝɥʇ buıʞɯɐ ‾ǝןqɐƆ ɹǝddoƆ‾ ɐ ɥʇıʍ sɹoʇɔǝuuoɔ ǝןqɐɔ ᄅ ʞɔıןɔ ʇɥbıᴚ",
|
||||
"block.tfmg.cable_connector": "ɹoʇɔǝuuoƆ ǝןqɐƆ",
|
||||
"block.tfmg.cable_connector": "ɹoʇɐןnsuI ǝןqɐƆ",
|
||||
"block.tfmg.cable_tube": "ǝqn⟘ ǝןqɐƆ",
|
||||
"block.tfmg.cable_tube.tooltip.summary": "ǝןqɐƆ ɐ ǝʞıן ʎbɹǝuƎ sʇɹodsuɐɹ⟘",
|
||||
"block.tfmg.capacitor.tooltip.summary": "do⟘ ǝɥʇ ɯoɹɟ ʎןʞɔınὉ pǝʇʇndʇno ǝq uɐɔ ʇɐɥʇ )ɯoʇʇoq ɯoɹɟ pǝʇɹǝsuı( ʎbɹǝuǝ ɟo ʇunoɯⱯ ןןɐɯS ɐ spןoH",
|
||||
@@ -95,6 +95,7 @@
|
||||
"block.tfmg.constantan_frame": "ǝɯɐɹℲ uɐʇuɐʇsuoƆ",
|
||||
"block.tfmg.constantan_ladder": "ɹǝppɐꞀ uɐʇuɐʇsuoƆ",
|
||||
"block.tfmg.constantan_truss": "ssnɹ⟘ uɐʇuɐʇsuoƆ",
|
||||
"block.tfmg.converter": "ɹǝʇɹǝʌuoƆ",
|
||||
"block.tfmg.converter.behaviour1": "‾⅁WℲ⟘‾ ɥʇıʍ ǝןqɐsn ʇı buıʞɐɯ ‾ǝbɐʇןoΛ‾ ɥʇıM ƎℲ sʇndʇno ‾do⟘‾ ǝɥ⟘",
|
||||
"block.tfmg.converter.condition1": "ɯoʇʇoᗺ ɯoɹɟ ƎℲ ʇnԀ uǝɥM",
|
||||
"block.tfmg.converter.tooltip.summary": "ǝbɐʇןoʌ buıppɐ ʎq ⅁WℲ⟘ ɥʇıʍ ǝןqıʇɐdɯoɔ spoɯ ɹǝɥʇo sǝʞɐW",
|
||||
@@ -110,6 +111,8 @@
|
||||
"block.tfmg.copper_encased_steel_pipe": "ǝdıԀ ןǝǝʇS pǝsɐɔuƎ ɹǝddoƆ",
|
||||
"block.tfmg.copper_frame": "ǝɯɐɹℲ ɹǝddoƆ",
|
||||
"block.tfmg.copper_truss": "ssnɹ⟘ ɹǝddoƆ",
|
||||
"block.tfmg.copycat_cable_base": "ǝsɐᗺ ǝןqɐƆ ʇɐɔʎdoƆ",
|
||||
"block.tfmg.copycat_cable_block": "ʞɔoןᗺ ǝןqɐƆ ʇɐɔʎdoƆ",
|
||||
"block.tfmg.copycat_cable_block.tooltip.summary": "ǝuoʇspǝɹ ɥʇıʍ ɟɟo pǝuɹnʇ ǝq uɐƆ",
|
||||
"block.tfmg.creative_generator": "ɹoʇɐɹǝuǝ⅁ ǝʌıʇɐǝɹƆ",
|
||||
"block.tfmg.creative_generator.tooltip.summary": "ןǝuɐd ʇnduı sʇı uo ǝnןɐʌ ǝɥʇ uo pǝsɐq ʎbɹǝuǝ sʇndʇnO",
|
||||
@@ -154,7 +157,8 @@
|
||||
"block.tfmg.electric_motor": "ɹoʇoW ɔıɹʇɔǝןƎ",
|
||||
"block.tfmg.electric_motor.tooltip.summary": ")ǝpıs uo ǝןqɐɹnbıɟuoɔ ɯdɹ( uoıʇɐʇoɹ oʇ ʎbɹǝuǝ sǝbuɐɥƆ",
|
||||
"block.tfmg.electric_post": "ʇsoԀ ɔıɹʇɔǝןƎ",
|
||||
"block.tfmg.electrical_switch": "ɥɔʇıʍS ןɐɔıɹʇɔǝןƎ",
|
||||
"block.tfmg.electric_pump": "dɯnԀ ɔıɹʇɔǝןƎ",
|
||||
"block.tfmg.electrical_switch": "ɥɔʇıʍS ɔıɹʇɔǝןƎ",
|
||||
"block.tfmg.electrode_holder": "ɹǝpןoH ǝpoɹʇɔǝןƎ",
|
||||
"block.tfmg.encased_diode": "ǝpoıᗡ pǝsɐɔuƎ",
|
||||
"block.tfmg.encased_potentiometer": "ɹǝʇǝɯoıʇuǝʇoԀ pǝsɐɔuƎ",
|
||||
@@ -193,6 +197,7 @@
|
||||
"block.tfmg.generator.tooltip.summary": "ʎbɹǝuǝ oʇ uoıʇɐʇoɹ sǝbuɐɥƆ",
|
||||
"block.tfmg.glass_aluminum_pipe": "ǝdıԀ ɯnuıɯnןⱯ ssɐן⅁",
|
||||
"block.tfmg.glass_brass_pipe": "ǝdıԀ ssɐɹᗺ ssɐן⅁",
|
||||
"block.tfmg.glass_cable_insulator": "ɹoʇɐןnsuI ǝןqɐƆ ssɐן⅁",
|
||||
"block.tfmg.glass_cast_iron_pipe": "ǝdıԀ uoɹI ʇsɐƆ ssɐן⅁",
|
||||
"block.tfmg.glass_plastic_pipe": "ǝdıԀ ɔıʇsɐןԀ ssɐן⅁",
|
||||
"block.tfmg.glass_steel_pipe": "ǝdıԀ ןǝǝʇS ssɐן⅁",
|
||||
@@ -304,6 +309,7 @@
|
||||
"block.tfmg.napalm": "ɯןɐdɐN",
|
||||
"block.tfmg.napalm_bomb": "qɯoᗺ ɯןɐdɐN",
|
||||
"block.tfmg.naphtha": "ɐɥʇɥdɐN",
|
||||
"block.tfmg.neon_tube": "ǝqn⟘ uoǝN",
|
||||
"block.tfmg.neon_tube.behaviour1": " ‾ʍoן⅁‾ ןןıʍ ǝqnʇ ǝɥ⟘",
|
||||
"block.tfmg.neon_tube.behaviour2": "ɹoןoƆ sǝbuɐɥƆ",
|
||||
"block.tfmg.neon_tube.condition1": "ǝɔɹnoS ɹǝʍoԀ uo ʇnd uǝɥM",
|
||||
@@ -368,6 +374,9 @@
|
||||
"block.tfmg.purple_rebar_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ɹɐqǝᴚ ǝןdɹnԀ",
|
||||
"block.tfmg.purple_rebar_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ɹɐqǝᴚ ǝןdɹnԀ",
|
||||
"block.tfmg.purple_rebar_concrete_wall": "ןןɐM ǝʇǝɹɔuoƆ ɹɐqǝᴚ ǝןdɹnԀ",
|
||||
"block.tfmg.raw_lead_block": "pɐǝꞀ ʍɐᴚ ɟo ʞɔoןᗺ",
|
||||
"block.tfmg.raw_lithium_block": "ɯnıɥʇıꞀ ʍɐᴚ ɟo ʞɔoןᗺ",
|
||||
"block.tfmg.raw_nickel_block": "ןǝʞɔıN ʍɐᴚ ɟo ʞɔoןᗺ",
|
||||
"block.tfmg.rebar_block": "ʞɔoןᗺ ɹɐqǝᴚ",
|
||||
"block.tfmg.rebar_concrete": "ǝʇǝɹɔuoƆ ɹɐqǝᴚ",
|
||||
"block.tfmg.rebar_concrete_slab": "qɐןS ǝʇǝɹɔuoƆ ɹɐqǝᴚ",
|
||||
@@ -452,7 +461,6 @@
|
||||
"block.tfmg.surface_scanner": "ɹǝuuɐɔS ǝɔɐɟɹnS",
|
||||
"block.tfmg.traffic_light": "ʇɥbıꞀ ɔıɟɟɐɹ⟘",
|
||||
"block.tfmg.transformer": "ɹǝɯɹoɟsuɐɹ⟘",
|
||||
"block.tfmg.transistor": "ɹoʇsısuɐɹ⟘",
|
||||
"block.tfmg.voltage_observer": "ɹǝʌɹǝsqO ǝbɐʇןoΛ",
|
||||
"block.tfmg.voltmeter": "ɹǝʇǝɯʇןoΛ",
|
||||
"block.tfmg.voltmeter.condition1": "ǝɔɹnoS ɹǝʍoԀ uo ʇnd uǝɥM",
|
||||
@@ -551,6 +559,7 @@
|
||||
"create.recipe.polarizing": "buızıɹɐןoԀ",
|
||||
"create.resistor.allowed_voltage": "pǝʍoןןⱯ ǝbɐʇןoΛ ɟo ǝbɐʇuǝɔɹǝԀ",
|
||||
"create.tooltip.coils": "%1$s :suɹn⟘",
|
||||
"create.tooltip.cylinder": ":sןǝnℲ pǝʇɹoddnS",
|
||||
"create.tooltip.fuse": "%1$s :buıʇɐᴚ",
|
||||
"create.tooltip.resistor": "%1$s :ǝɔuɐʇsısǝᴚ",
|
||||
"create.voltage": "%1$s :ǝbɐʇןoΛ",
|
||||
@@ -636,6 +645,7 @@
|
||||
"item.tfmg.constantan_ingot": "ʇobuI uɐʇuɐʇsuoƆ",
|
||||
"item.tfmg.constantan_nugget": "ʇǝbbnN uɐʇuɐʇsuoƆ",
|
||||
"item.tfmg.constantan_spool": "ןoodS uɐʇuɐʇsuoƆ",
|
||||
"item.tfmg.constantan_wire": "ǝɹıM uɐʇuɐʇsuoƆ",
|
||||
"item.tfmg.cooling_fluid_bottle": "ǝןʇʇoᗺ pınןℲ buıןooƆ",
|
||||
"item.tfmg.cooling_fluid_bucket": "ʇǝʞɔnᗺ pınןℲ buıןooƆ",
|
||||
"item.tfmg.copper_electrode": "ǝpoɹʇɔǝןƎ ɹǝddoƆ",
|
||||
@@ -667,6 +677,7 @@
|
||||
"item.tfmg.furnace_gas_bucket": "ʞuɐ⟘ sɐ⅁ ǝɔɐuɹnℲ",
|
||||
"item.tfmg.fuse": "ǝsnℲ",
|
||||
"item.tfmg.gasoline_bucket": "ʇǝʞɔnᗺ ǝuıןosɐ⅁",
|
||||
"item.tfmg.glass_insulator_segment": "ʇuǝɯbǝS ɹoʇɐןnsuI ssɐן⅁",
|
||||
"item.tfmg.graphite_electrode": "ǝpoɹʇɔǝןƎ ǝʇıɥdɐɹ⅁",
|
||||
"item.tfmg.heavy_oil_bucket": "ʇǝʞɔnᗺ ןıO ʎʌɐǝH",
|
||||
"item.tfmg.heavy_plate": "ǝʇɐןԀ ʎʌɐǝH",
|
||||
@@ -757,6 +768,16 @@
|
||||
"item.tfmg.thermite_powder": "ɹǝpʍoԀ ǝʇıɯɹǝɥ⟘",
|
||||
"item.tfmg.transistor_item": "ɹoʇsısuɐɹ⟘",
|
||||
"item.tfmg.turbine_blade": "ǝpɐןᗺ ǝuıqɹn⟘",
|
||||
"item.tfmg.unfinished_capacitor": "ɹoʇıɔɐdɐƆ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_electric_motor": "ɹoʇoW ɔıɹʇɔǝןƎ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_generator": "ɹoʇɐɹǝuǝ⅁ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_insulator": "ɹoʇɐןnsuI pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_potentiometer": "ɹǝʇǝɯoıʇuǝʇoԀ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_resistor": "ɹoʇsısǝᴚ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_steel_mechanism": "ɯsıuɐɥɔǝW ןǝǝʇS pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfinished_transistor": "ɹoʇsısuɐɹ⟘ pǝɥsıuıɟu∩",
|
||||
"item.tfmg.unfired_insulator": "ɹoʇɐןnsuI pǝɹıɟu∩",
|
||||
"item.tfmg.unprocessed_heavy_plate": "ǝʇɐןԀ ʎʌɐǝH pǝssǝɔoɹdu∩",
|
||||
"item.tfmg.zinc_electrode": "ǝpoɹʇɔǝןƎ ɔuıZ",
|
||||
"item.tfmg.zinc_grenade": "ǝpɐuǝɹ⅁ ɔuıZ",
|
||||
"item.tfmg.zinc_sulfate": "ǝʇɐɟןnS ɔuıZ",
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"block.tfmg.brown_rebar_concrete_stairs": "Brown Rebar Concrete Stairs",
|
||||
"block.tfmg.brown_rebar_concrete_wall": "Brown Rebar Concrete Wall",
|
||||
"block.tfmg.cable connector.tooltip.summary": "Right click 2 cable connectors with a _Copper Cable_ amking them transport _Energy_",
|
||||
"block.tfmg.cable_connector": "Cable Connector",
|
||||
"block.tfmg.cable_connector": "Cable Insulator",
|
||||
"block.tfmg.cable_tube": "Cable Tube",
|
||||
"block.tfmg.cable_tube.tooltip.summary": "Transports Energy like a Cable",
|
||||
"block.tfmg.capacitor.tooltip.summary": "Holds a Small Amount of energy (inserted from bottom) that can be outputted Quickly from the Top",
|
||||
@@ -95,6 +95,7 @@
|
||||
"block.tfmg.constantan_frame": "Constantan Frame",
|
||||
"block.tfmg.constantan_ladder": "Constantan Ladder",
|
||||
"block.tfmg.constantan_truss": "Constantan Truss",
|
||||
"block.tfmg.converter": "Converter",
|
||||
"block.tfmg.converter.behaviour1": "The _Top_ outputs FE With _Voltage_ making it usable with _TFMG_",
|
||||
"block.tfmg.converter.condition1": "When Put FE from Bottom",
|
||||
"block.tfmg.converter.tooltip.summary": "Makes other mods compatible with TFMG by adding voltage",
|
||||
@@ -110,6 +111,8 @@
|
||||
"block.tfmg.copper_encased_steel_pipe": "Copper Encased Steel Pipe",
|
||||
"block.tfmg.copper_frame": "Copper Frame",
|
||||
"block.tfmg.copper_truss": "Copper Truss",
|
||||
"block.tfmg.copycat_cable_base": "Copycat Cable Base",
|
||||
"block.tfmg.copycat_cable_block": "Copycat Cable Block",
|
||||
"block.tfmg.copycat_cable_block.tooltip.summary": "Can be turned off with redstone",
|
||||
"block.tfmg.creative_generator": "Creative Generator",
|
||||
"block.tfmg.creative_generator.tooltip.summary": "Outputs energy based on the value on its input panel",
|
||||
@@ -154,7 +157,8 @@
|
||||
"block.tfmg.electric_motor": "Electric Motor",
|
||||
"block.tfmg.electric_motor.tooltip.summary": "Changes energy to rotation (rpm configurable on side)",
|
||||
"block.tfmg.electric_post": "Electric Post",
|
||||
"block.tfmg.electrical_switch": "Electrical Switch",
|
||||
"block.tfmg.electric_pump": "Electric Pump",
|
||||
"block.tfmg.electrical_switch": "Electric Switch",
|
||||
"block.tfmg.electrode_holder": "Electrode Holder",
|
||||
"block.tfmg.encased_diode": "Encased Diode",
|
||||
"block.tfmg.encased_potentiometer": "Encased Potentiometer",
|
||||
@@ -193,6 +197,7 @@
|
||||
"block.tfmg.generator.tooltip.summary": "Changes rotation to energy",
|
||||
"block.tfmg.glass_aluminum_pipe": "Glass Aluminum Pipe",
|
||||
"block.tfmg.glass_brass_pipe": "Glass Brass Pipe",
|
||||
"block.tfmg.glass_cable_insulator": "Glass Cable Insulator",
|
||||
"block.tfmg.glass_cast_iron_pipe": "Glass Cast Iron Pipe",
|
||||
"block.tfmg.glass_plastic_pipe": "Glass Plastic Pipe",
|
||||
"block.tfmg.glass_steel_pipe": "Glass Steel Pipe",
|
||||
@@ -304,6 +309,7 @@
|
||||
"block.tfmg.napalm": "Napalm",
|
||||
"block.tfmg.napalm_bomb": "Napalm Bomb",
|
||||
"block.tfmg.naphtha": "Naphtha",
|
||||
"block.tfmg.neon_tube": "Neon Tube",
|
||||
"block.tfmg.neon_tube.behaviour1": "The tube will _Glow_ ",
|
||||
"block.tfmg.neon_tube.behaviour2": "Changes Color",
|
||||
"block.tfmg.neon_tube.condition1": "When put on Power Source",
|
||||
@@ -368,6 +374,9 @@
|
||||
"block.tfmg.purple_rebar_concrete_slab": "Purple Rebar Concrete Slab",
|
||||
"block.tfmg.purple_rebar_concrete_stairs": "Purple Rebar Concrete Stairs",
|
||||
"block.tfmg.purple_rebar_concrete_wall": "Purple Rebar Concrete Wall",
|
||||
"block.tfmg.raw_lead_block": "Block of Raw Lead",
|
||||
"block.tfmg.raw_lithium_block": "Block of Raw Lithium",
|
||||
"block.tfmg.raw_nickel_block": "Block of Raw Nickel",
|
||||
"block.tfmg.rebar_block": "Rebar Block",
|
||||
"block.tfmg.rebar_concrete": "Rebar Concrete",
|
||||
"block.tfmg.rebar_concrete_slab": "Rebar Concrete Slab",
|
||||
@@ -452,7 +461,6 @@
|
||||
"block.tfmg.surface_scanner": "Surface Scanner",
|
||||
"block.tfmg.traffic_light": "Traffic Light",
|
||||
"block.tfmg.transformer": "Transformer",
|
||||
"block.tfmg.transistor": "Transistor",
|
||||
"block.tfmg.voltage_observer": "Voltage Observer",
|
||||
"block.tfmg.voltmeter": "Voltmeter",
|
||||
"block.tfmg.voltmeter.condition1": "When put on Power Source",
|
||||
@@ -551,6 +559,7 @@
|
||||
"create.recipe.polarizing": "Polarizing",
|
||||
"create.resistor.allowed_voltage": "Percentage of Voltage Allowed",
|
||||
"create.tooltip.coils": "Turns: %1$s",
|
||||
"create.tooltip.cylinder": "Supported Fuels:",
|
||||
"create.tooltip.fuse": "Rating: %1$s",
|
||||
"create.tooltip.resistor": "Resistance: %1$s",
|
||||
"create.voltage": "Voltage: %1$s",
|
||||
@@ -636,6 +645,7 @@
|
||||
"item.tfmg.constantan_ingot": "Constantan Ingot",
|
||||
"item.tfmg.constantan_nugget": "Constantan Nugget",
|
||||
"item.tfmg.constantan_spool": "Constantan Spool",
|
||||
"item.tfmg.constantan_wire": "Constantan Wire",
|
||||
"item.tfmg.cooling_fluid_bottle": "Cooling Fluid Bottle",
|
||||
"item.tfmg.cooling_fluid_bucket": "Cooling Fluid Bucket",
|
||||
"item.tfmg.copper_electrode": "Copper Electrode",
|
||||
@@ -667,6 +677,7 @@
|
||||
"item.tfmg.furnace_gas_bucket": "Furnace Gas Tank",
|
||||
"item.tfmg.fuse": "Fuse",
|
||||
"item.tfmg.gasoline_bucket": "Gasoline Bucket",
|
||||
"item.tfmg.glass_insulator_segment": "Glass Insulator Segment",
|
||||
"item.tfmg.graphite_electrode": "Graphite Electrode",
|
||||
"item.tfmg.heavy_oil_bucket": "Heavy Oil Bucket",
|
||||
"item.tfmg.heavy_plate": "Heavy Plate",
|
||||
@@ -757,6 +768,16 @@
|
||||
"item.tfmg.thermite_powder": "Thermite Powder",
|
||||
"item.tfmg.transistor_item": "Transistor",
|
||||
"item.tfmg.turbine_blade": "Turbine Blade",
|
||||
"item.tfmg.unfinished_capacitor": "Unfinished Capacitor",
|
||||
"item.tfmg.unfinished_electric_motor": "Unfinished Electric Motor",
|
||||
"item.tfmg.unfinished_generator": "Unfinished Generator",
|
||||
"item.tfmg.unfinished_insulator": "Unfinished Insulator",
|
||||
"item.tfmg.unfinished_potentiometer": "Unfinished Potentiometer",
|
||||
"item.tfmg.unfinished_resistor": "Unfinished Resistor",
|
||||
"item.tfmg.unfinished_steel_mechanism": "Unfinished Steel Mechanism",
|
||||
"item.tfmg.unfinished_transistor": "Unfinished Transistor",
|
||||
"item.tfmg.unfired_insulator": "Unfired Insulator",
|
||||
"item.tfmg.unprocessed_heavy_plate": "Unprocessed Heavy Plate",
|
||||
"item.tfmg.zinc_electrode": "Zinc Electrode",
|
||||
"item.tfmg.zinc_grenade": "Zinc Grenade",
|
||||
"item.tfmg.zinc_sulfate": "Zinc Sulfate",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "tfmg:block/steel_block"
|
||||
"all": "tfmg:block/raw_lead_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "tfmg:block/raw_lithium_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "tfmg:block/raw_nickel_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/constantan_wire"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/converter/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/copycat_cable_block/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/electric_pump/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/glass_cable_insulator/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:item/glass_insulator_segment_model"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/neon_tube/item"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/raw_lead_block"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/raw_lithium_block"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/raw_nickel_block"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"parent": "tfmg:block/transistor/item"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/unfinished_capacitor"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/electric_motor/unfinished"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:item/unfinished_generator_model"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:item/unfinished_insulator_model"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/potentiometer/unfinished"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/unfinished_resistor"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/unfinished_steel_mechanism"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/unfinished_transistor"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:item/unfired_insulator_model"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tfmg:item/unprocessed_heavy_plate"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:copycat_cable_base",
|
||||
"tfmg:steel_bars",
|
||||
"tfmg:aluminum_bars",
|
||||
"tfmg:cast_iron_bars",
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_nickel_block",
|
||||
"tfmg:raw_lead_block",
|
||||
"tfmg:raw_lithium_block",
|
||||
"tfmg:steel_block",
|
||||
"tfmg:cast_iron_block",
|
||||
"tfmg:aluminum_block",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_lead_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_lithium_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_nickel_block"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_nickel_block",
|
||||
"tfmg:raw_lead_block",
|
||||
"tfmg:raw_lithium_block",
|
||||
"tfmg:steel_block",
|
||||
"tfmg:cast_iron_block",
|
||||
"tfmg:aluminum_block",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_lead_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_lithium_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_nickel_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:constantan_wire"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:machine_input",
|
||||
"tfmg:copycat_cable_block",
|
||||
"tfmg:steel_cogwheel",
|
||||
"tfmg:large_steel_cogwheel",
|
||||
"tfmg:aluminum_cogwheel",
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
"tfmg:lignite",
|
||||
"tfmg:fossilstone",
|
||||
"tfmg:slag_block",
|
||||
"tfmg:raw_nickel_block",
|
||||
"tfmg:raw_lead_block",
|
||||
"tfmg:raw_lithium_block",
|
||||
"tfmg:air_intake",
|
||||
"tfmg:firebox",
|
||||
"tfmg:winding_machine",
|
||||
@@ -51,7 +54,10 @@
|
||||
"tfmg:napalm_bomb",
|
||||
"tfmg:generator",
|
||||
"tfmg:cable_connector",
|
||||
"tfmg:glass_cable_insulator",
|
||||
"tfmg:resistor",
|
||||
"tfmg:copycat_cable_block",
|
||||
"tfmg:copycat_cable_base",
|
||||
"tfmg:brass_cable_hub",
|
||||
"tfmg:copper_cable_hub",
|
||||
"tfmg:steel_cable_hub",
|
||||
@@ -70,13 +76,14 @@
|
||||
"tfmg:circular_light",
|
||||
"tfmg:modern_light",
|
||||
"tfmg:aluminum_lamp",
|
||||
"tfmg:neon_tube",
|
||||
"tfmg:electric_diode",
|
||||
"tfmg:encased_diode",
|
||||
"tfmg:potentiometer",
|
||||
"tfmg:transistor",
|
||||
"tfmg:electrical_switch",
|
||||
"tfmg:encased_potentiometer",
|
||||
"tfmg:debug_conductor",
|
||||
"tfmg:electric_pump",
|
||||
"tfmg:voltage_observer",
|
||||
"tfmg:voltmeter",
|
||||
"tfmg:ammeter",
|
||||
@@ -86,6 +93,7 @@
|
||||
"tfmg:traffic_light",
|
||||
"tfmg:segmented_display",
|
||||
"tfmg:transformer",
|
||||
"tfmg:converter",
|
||||
"tfmg:fuse_block",
|
||||
"tfmg:brick_smokestack",
|
||||
"tfmg:metal_smokestack",
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:raw_nickel_block",
|
||||
"tfmg:raw_lead_block",
|
||||
"tfmg:raw_lithium_block",
|
||||
"tfmg:steel_block",
|
||||
"tfmg:cast_iron_block",
|
||||
"tfmg:aluminum_block",
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:transistor"
|
||||
"name": "tfmg:converter"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/transistor"
|
||||
"random_sequence": "tfmg:blocks/converter"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:air"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/copycat_cable_base"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:copycat_cable_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/copycat_cable_block"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:electric_pump"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/electric_pump"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:glass_cable_insulator"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/glass_cable_insulator"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:neon_tube"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/neon_tube"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:raw_lead_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/raw_lead_block"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:raw_lithium_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/raw_lithium_block"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:raw_nickel_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tfmg:blocks/raw_nickel_block"
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"type": "create:sequenced_assembly",
|
||||
"ingredient": {
|
||||
"tag": "forge:plates/steel"
|
||||
},
|
||||
"loops": 1,
|
||||
"results": [
|
||||
{
|
||||
"count": 4,
|
||||
"item": "tfmg:capacitor_item"
|
||||
}
|
||||
],
|
||||
"sequence": [
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
},
|
||||
{
|
||||
"tag": "forge:plates/copper"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
},
|
||||
{
|
||||
"tag": "forge:plates/copper"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transitionalItem": {
|
||||
"item": "tfmg:unfinished_capacitor"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"type": "create:sequenced_assembly",
|
||||
"ingredient": {
|
||||
"item": "create:shaft"
|
||||
},
|
||||
"loops": 5,
|
||||
"results": [
|
||||
{
|
||||
"chance": 120.0,
|
||||
"item": "tfmg:generator"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:steel_casing"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:steel_cogwheel"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:capacitor_item"
|
||||
}
|
||||
],
|
||||
"sequence": [
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:capacitor_item"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"tag": "forge:plates/steel"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "tfmg:winding",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:copper_spool"
|
||||
}
|
||||
],
|
||||
"processingTime": 75,
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:magnet"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:steel_mechanism"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:screwdriver"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transitionalItem": {
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"type": "create:sequenced_assembly",
|
||||
"ingredient": {
|
||||
"item": "create:shaft"
|
||||
},
|
||||
"loops": 5,
|
||||
"results": [
|
||||
{
|
||||
"chance": 120.0,
|
||||
"item": "tfmg:electric_motor"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:steel_casing"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:nickel_sheet"
|
||||
}
|
||||
],
|
||||
"sequence": [
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"tag": "forge:plates/nickel"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "tfmg:winding",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:copper_spool"
|
||||
}
|
||||
],
|
||||
"processingTime": 75,
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:magnet"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"tag": "forge:plates/steel"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:steel_mechanism"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:screwdriver"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transitionalItem": {
|
||||
"item": "tfmg:unfinished_generator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"type": "create:sequenced_assembly",
|
||||
"ingredient": {
|
||||
"item": "tfmg:heavy_machinery_casing"
|
||||
},
|
||||
"loops": 3,
|
||||
"results": [
|
||||
{
|
||||
"chance": 120.0,
|
||||
"item": "tfmg:potentiometer"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:steel_casing"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:steel_cogwheel"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:electric_post"
|
||||
}
|
||||
],
|
||||
"sequence": [
|
||||
{
|
||||
"type": "tfmg:winding",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:constantan_spool"
|
||||
}
|
||||
],
|
||||
"processingTime": 100,
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:steel_cogwheel"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:copper_wire"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:filling",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
},
|
||||
{
|
||||
"amount": 50,
|
||||
"fluid": "tfmg:lubrication_oil",
|
||||
"nbt": {}
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transitionalItem": {
|
||||
"item": "tfmg:unfinished_potentiometer"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"type": "create:sequenced_assembly",
|
||||
"ingredient": {
|
||||
"item": "tfmg:plastic_sheet"
|
||||
},
|
||||
"loops": 1,
|
||||
"results": [
|
||||
{
|
||||
"chance": 120.0,
|
||||
"count": 4,
|
||||
"item": "tfmg:transistor_item"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:silicon_ingot"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:p_semiconductor"
|
||||
},
|
||||
{
|
||||
"chance": 8.0,
|
||||
"item": "tfmg:n_semiconductor"
|
||||
}
|
||||
],
|
||||
"sequence": [
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
},
|
||||
{
|
||||
"tag": "forge:wires/copper"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:n_semiconductor"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:p_semiconductor"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "create:deploying",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
},
|
||||
{
|
||||
"item": "tfmg:n_semiconductor"
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"transitionalItem": {
|
||||
"item": "tfmg:unfinished_transistor"
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.drmangotea.tfmg.base.TFMGContraptions;
|
||||
import com.drmangotea.tfmg.base.TFMGCreativeTabs;
|
||||
import com.drmangotea.tfmg.base.TFMGRegistrate;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ElectricNetworkManager;
|
||||
import com.drmangotea.tfmg.content.engines.fuels.BaseFuelTypes;
|
||||
import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.fire.TFMGColoredFires;
|
||||
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.base.DepositManager;
|
||||
import com.drmangotea.tfmg.datagen.TFMGDatagen;
|
||||
@@ -92,7 +93,7 @@ public class TFMG {
|
||||
TFMGFluidInteractions.registerFluidInteractions();
|
||||
|
||||
event.enqueueWork(() -> {
|
||||
|
||||
BaseFuelTypes.register();
|
||||
registerHeater(TFMGBlocks.FIREBOX.get(), (level, pos, state) -> {
|
||||
BlazeBurnerBlock.HeatLevel value = state.getValue(BlazeBurnerBlock.HEAT_LEVEL);
|
||||
if (value == BlazeBurnerBlock.HeatLevel.NONE) {
|
||||
|
||||
@@ -8,18 +8,24 @@ import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlock;
|
||||
import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock;
|
||||
import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedShaftBlock;
|
||||
import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.copycat_cable.CopycatCableBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.neon_tube.NeonTubeBlock;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllTags;
|
||||
import com.simibubi.create.content.contraptions.behaviour.DoorMovingInteraction;
|
||||
import com.simibubi.create.content.decoration.encasing.EncasedCTBehaviour;
|
||||
import com.simibubi.create.content.decoration.girder.GirderBlock;
|
||||
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorMovementBehaviour;
|
||||
import com.simibubi.create.content.kinetics.BlockStressDefaults;
|
||||
import com.simibubi.create.content.kinetics.base.RotatedPillarKineticBlock;
|
||||
import com.simibubi.create.content.kinetics.simpleRelays.encased.EncasedCogCTBehaviour;
|
||||
import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry;
|
||||
import com.simibubi.create.foundation.data.*;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.tterrag.registrate.builders.BlockBuilder;
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
import com.tterrag.registrate.util.DataIngredient;
|
||||
import com.tterrag.registrate.util.entry.BlockEntry;
|
||||
import com.tterrag.registrate.util.nullness.NonNullUnaryOperator;
|
||||
@@ -32,7 +38,9 @@ import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder;
|
||||
|
||||
import java.nio.channels.Pipe;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static com.drmangotea.tfmg.TFMG.REGISTRATE;
|
||||
@@ -70,15 +78,44 @@ public class TFMGBuilderTransformers {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static <B extends Block, P> NonNullUnaryOperator<BlockBuilder<B, P>> surfaceScanner() {
|
||||
return b -> b.initialProperties(SharedProperties::softMetal)
|
||||
.blockstate((c, p) -> p.horizontalBlock(c.get(), p.models()
|
||||
.getExistingFile(p.modLoc("block/surface_scanner/block"))))
|
||||
.addLayer(() -> RenderType::cutoutMipped)
|
||||
.item()
|
||||
.transform(ModelGen.customItemModel("surface_scanner", "item"));
|
||||
public static void generateNeonTubeBlockState(DataGenContext<Block, NeonTubeBlock> c, RegistrateBlockstateProvider p) {
|
||||
MultiPartBlockStateBuilder builder = p.getMultipartBuilder(c.get());
|
||||
|
||||
|
||||
builder.part()
|
||||
.modelFile(AssetLookup.partialBaseModel(c, p, "center"))
|
||||
.addModel()
|
||||
.end();
|
||||
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "north"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.NORTH, true)
|
||||
.end();
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "south"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.SOUTH, true)
|
||||
.end();
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "west"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.WEST, true)
|
||||
.end();
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "east"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.EAST, true)
|
||||
.end();
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "top"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.UP, true)
|
||||
.end();
|
||||
builder.part().modelFile(AssetLookup.partialBaseModel(c, p, "bottom"))
|
||||
.addModel()
|
||||
.condition(PipeBlock.DOWN, true)
|
||||
.end();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static <B extends TFMGEncasedShaftBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> encasedShaft(String casing,
|
||||
Supplier<CTSpriteShiftEntry> casingShift) {
|
||||
return builder -> encasedBase(builder, AllBlocks.SHAFT::get)
|
||||
@@ -147,19 +184,19 @@ public class TFMGBuilderTransformers {
|
||||
.transform(BlockStressDefaults.setNoImpact())
|
||||
.loot((p, lb) -> p.dropOther(lb, drop.get()));
|
||||
}
|
||||
//public static <B extends CopycatCableBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> copycatCable() {
|
||||
// return b -> b.initialProperties(SharedProperties::softMetal)
|
||||
// .blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
|
||||
// .getExistingFile(p.mcLoc("air"))))
|
||||
// .initialProperties(SharedProperties::softMetal)
|
||||
// .properties(BlockBehaviour.Properties::noOcclusion)
|
||||
// .addLayer(() -> RenderType::solid)
|
||||
// .addLayer(() -> RenderType::cutout)
|
||||
// .addLayer(() -> RenderType::cutoutMipped)
|
||||
// // .addLayer(() -> RenderType::translucent)
|
||||
// .color(() -> CopycatCableBlock::wrappedColor)
|
||||
// .transform(TagGen.axeOrPickaxe());
|
||||
//}
|
||||
public static <B extends CopycatCableBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> copycatCable() {
|
||||
return b -> b.initialProperties(SharedProperties::softMetal)
|
||||
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
|
||||
.getExistingFile(p.mcLoc("air"))))
|
||||
.initialProperties(SharedProperties::softMetal)
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.addLayer(() -> RenderType::solid)
|
||||
.addLayer(() -> RenderType::cutout)
|
||||
.addLayer(() -> RenderType::cutoutMipped)
|
||||
// .addLayer(() -> RenderType::translucent)
|
||||
.color(() -> CopycatCableBlock::wrappedColor)
|
||||
.transform(TagGen.axeOrPickaxe());
|
||||
}
|
||||
|
||||
///////////////
|
||||
public static BlockEntry<TFMGFlywheelBlock> flywheel(String name) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem;
|
||||
import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||
import com.tterrag.registrate.util.entry.RegistryEntry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.Item;
|
||||
@@ -40,6 +41,7 @@ public class TFMGCreativeTabs {
|
||||
.build());
|
||||
public static void addCreative(BuildCreativeModeTabContentsEvent event) {
|
||||
if (event.getTab() == TFMG_MAIN.get()){
|
||||
event.acceptAll(customAdditions());
|
||||
for(RegistryEntry<Item> item : REGISTRATE.getAll(Registries.ITEM)){
|
||||
|
||||
if(!CreateRegistrate.isInCreativeTab(item,TFMG_MAIN))
|
||||
@@ -49,7 +51,6 @@ public class TFMGCreativeTabs {
|
||||
if(item.get() instanceof SequencedAssemblyItem)
|
||||
continue;
|
||||
if(item.get() instanceof SpoolItem&&!item.is(TFMGItems.EMPTY_SPOOL.get())){
|
||||
|
||||
ItemStack spool = item.get().getDefaultInstance();
|
||||
spool.getOrCreateTag().putInt("Amount", 1000);
|
||||
event.accept(spool);
|
||||
@@ -71,6 +72,7 @@ public class TFMGCreativeTabs {
|
||||
event.accept(item);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public static void register(IEventBus modEventBus){
|
||||
@@ -81,6 +83,41 @@ public class TFMGCreativeTabs {
|
||||
List<RegistryEntry<Item>> list = new ArrayList<>();
|
||||
return list;
|
||||
}
|
||||
public static List<ItemStack> customAdditions(){
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
|
||||
CompoundTag gasolineTag = new CompoundTag();
|
||||
gasolineTag.putString("gasoline", "forge:gasoline");
|
||||
CompoundTag gasolineTagName = new CompoundTag();
|
||||
gasolineTagName.putString("gasoline", "Gasoline");
|
||||
//
|
||||
CompoundTag dieselTag = new CompoundTag();
|
||||
dieselTag.putString("diesel", "forge:diesel");
|
||||
CompoundTag dieselTagName = new CompoundTag();
|
||||
dieselTagName.putString("diesel", "Diesel");
|
||||
//
|
||||
CompoundTag lpgTag = new CompoundTag();
|
||||
lpgTag.putString("lpg", "forge:lpg");
|
||||
CompoundTag lpgTagName = new CompoundTag();
|
||||
lpgTagName.putString("lpg", "LPG");
|
||||
//
|
||||
|
||||
|
||||
ItemStack gasoline = TFMGItems.ENGINE_CYLINDER.asStack();
|
||||
gasoline.getOrCreateTag().put("Fuels", gasolineTag);
|
||||
gasoline.getOrCreateTag().put("FuelNames", gasolineTagName);
|
||||
list.add(gasoline);
|
||||
ItemStack diesel = TFMGItems.ENGINE_CYLINDER.asStack();
|
||||
diesel.getOrCreateTag().put("Fuels", dieselTag);
|
||||
diesel.getOrCreateTag().put("FuelNames", dieselTagName);
|
||||
list.add(diesel);
|
||||
ItemStack lpg = TFMGItems.ENGINE_CYLINDER.asStack();
|
||||
lpg.getOrCreateTag().put("Fuels", lpgTag);
|
||||
lpg.getOrCreateTag().put("FuelNames", lpgTagName);
|
||||
list.add(lpg);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
96
src/main/java/com/drmangotea/tfmg/base/TFMGIcons.java
Normal file
96
src/main/java/com/drmangotea/tfmg/base/TFMGIcons.java
Normal file
@@ -0,0 +1,96 @@
|
||||
package com.drmangotea.tfmg.base;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.foundation.gui.AllIcons;
|
||||
import com.simibubi.create.foundation.gui.element.DelegatedStencilElement;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
public class TFMGIcons extends AllIcons {
|
||||
|
||||
|
||||
public static final ResourceLocation ICON_ATLAS = TFMG.asResource("textures/gui/icons.png");
|
||||
public static final int ICON_ATLAS_SIZE = 256;
|
||||
|
||||
private static int x = 0, y = -1;
|
||||
private int iconX;
|
||||
private int iconY;
|
||||
|
||||
|
||||
public static final TFMGIcons
|
||||
DISTILLATION_OUTPUT_ICON_DO_NOT_VOID = newRow(),
|
||||
DISTILLATION_OUTPUT_ICON_VOID = next();
|
||||
|
||||
public TFMGIcons(int x, int y) {
|
||||
super(x, y);
|
||||
iconX = x * 16;
|
||||
iconY = y * 16;
|
||||
}
|
||||
|
||||
private static TFMGIcons next() {
|
||||
return new TFMGIcons(++x, y);
|
||||
}
|
||||
|
||||
private static TFMGIcons newRow() {
|
||||
return new TFMGIcons(x = 0, ++y);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void bind() {
|
||||
RenderSystem.setShaderTexture(0, ICON_ATLAS);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public void render(GuiGraphics graphics, int x, int y) {
|
||||
graphics.blit(ICON_ATLAS, x, y, 0, iconX, iconY, 16, 16, 256, 256);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void render(PoseStack ms, MultiBufferSource buffer, int color) {
|
||||
VertexConsumer builder = buffer.getBuffer(RenderType.text(ICON_ATLAS));
|
||||
Matrix4f matrix = ms.last().pose();
|
||||
Color rgb = new Color(color);
|
||||
int light = LightTexture.FULL_BRIGHT;
|
||||
|
||||
Vec3 vec1 = new Vec3(0, 0, 0);
|
||||
Vec3 vec2 = new Vec3(0, 1, 0);
|
||||
Vec3 vec3 = new Vec3(1, 1, 0);
|
||||
Vec3 vec4 = new Vec3(1, 0, 0);
|
||||
|
||||
float u1 = iconX * 1f / ICON_ATLAS_SIZE;
|
||||
float u2 = (iconX + 16) * 1f / ICON_ATLAS_SIZE;
|
||||
float v1 = iconY * 1f / ICON_ATLAS_SIZE;
|
||||
float v2 = (iconY + 16) * 1f / ICON_ATLAS_SIZE;
|
||||
|
||||
vertex(builder, matrix, vec1, rgb, u1, v1, light);
|
||||
vertex(builder, matrix, vec2, rgb, u1, v2, light);
|
||||
vertex(builder, matrix, vec3, rgb, u2, v2, light);
|
||||
vertex(builder, matrix, vec4, rgb, u2, v1, light);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private void vertex(VertexConsumer builder, Matrix4f matrix, Vec3 vec, Color rgb, float u, float v, int light) {
|
||||
builder.vertex(matrix, (float) vec.x, (float) vec.y, (float) vec.z)
|
||||
.color(rgb.getRed(), rgb.getGreen(), rgb.getBlue(), 255)
|
||||
.uv(u, v)
|
||||
.uv2(light)
|
||||
.endVertex();
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public DelegatedStencilElement asStencil() {
|
||||
return new DelegatedStencilElement().withStencilRenderer((ms, w, h, alpha) -> this.render(ms, 0, 0)).withBounds(16, 16);
|
||||
}
|
||||
}
|
||||
@@ -16,33 +16,33 @@ import static net.minecraft.core.Direction.*;
|
||||
public class TFMGShapes {
|
||||
public static final VoxelShaper
|
||||
ENGINE = shape(0, 0, 0, 16, 7, 16).add(3, 7, 0, 13, 12, 16)
|
||||
.forDirectional(SOUTH),
|
||||
.forDirectional(SOUTH),
|
||||
ENGINE_FRONT = shape(0, 0, 1, 16, 7, 16).add(3, 7, 1, 13, 12, 16)
|
||||
.forDirectional(SOUTH),
|
||||
PUMPJACK_HAMMER_PART = shape(0, 2, 0, 16, 14, 16)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
RADIAL_ENGINE = shape(1, 4, 1, 15, 12, 15)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
LARGE_RADIAL_ENGINE = shape(-3, 4, -3, 19, 12, 19)
|
||||
.forDirectional(),
|
||||
PUMPJACK_HEAD = shape(1, 0, -4, 15, 14, 24)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
COMPACT_ENGINE_VERTICAL = shape(3, 0, 3, 13, 14, 14)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
COMPACT_ENGINE = shape(3, 0, 3, 13, 14, 14)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
CABLE_CONNECTOR = shape(6, 0, 6, 10, 9, 10)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
CABLE_CONNECTOR_MIDDLE = shape(6, 0, 6, 10, 16, 10)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
GALVANIC_CELL = shape(5, 10, 5, 11, 16, 16).add(1, 4, 6, 15, 10, 16)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
RESISTOR = shape(6, 0, 3, 10, 4, 13)
|
||||
.forDirectional(),
|
||||
GENERATOR = shape(3, 0, 3, 13, 14, 13).add(0, 4, 0, 16, 10, 16)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
LIGHT_BULB = shape(5, 0, 5, 11, 9, 11)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
MODERN_LIGHT = shape(0, 0, 0, 16, 3, 16)
|
||||
.forDirectional(),
|
||||
CIRCULAR_LIGHT = shape(3, 0, 3, 13, 10, 13)
|
||||
@@ -50,7 +50,7 @@ public class TFMGShapes {
|
||||
ALUMINUM_LAMP = shape(3, 0, 3, 13, 2, 13).add(4, 2, 4, 12, 3, 12)
|
||||
.forDirectional(),
|
||||
POTENTIOMETER = shape(3, 0, 3, 13, 16, 13).add(1, 1, 13, 15, 15, 16)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
WINDING_MACHINE = shape(0, 0, 0, 16, 8, 16).add(0, 8, 4, 10, 12, 12)
|
||||
.forHorizontal(NORTH),
|
||||
RESISTOR_VERTICAL = shape(3, 0, 3, 13, 16, 13)
|
||||
@@ -58,16 +58,21 @@ public class TFMGShapes {
|
||||
BLAST_FURNACE_REINFORCEMENT_WALL = shape(0, 0, 0, 16, 6, 16)
|
||||
.forDirectional(),
|
||||
|
||||
ROTOR = shape(4, 5, 4, 12, 11, 12).add(5, 0, 5, 11, 16, 11)
|
||||
ROTOR = shape(4, 5, 4, 12, 11, 12).add(5, 0, 5, 11, 16, 11)
|
||||
.forDirectional(),
|
||||
STATOR = shape(5, 1, 0, 16, 15.2, 5).add(5, 1, 5, 10, 15.2, 10).add(0, 1, 0, 5, 15.2, 16)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
STATOR_ROTATED = shape(5, 1, 11, 16, 15, 16).add(5, 1, 6, 10, 15, 11).add(0, 1, 0, 5, 15, 16)
|
||||
.forDirectional(),
|
||||
STATOR_VERTICAL = shape(5, 0, 1, 16, 5, 15).add(5, 5, 1, 10, 10, 15).add(0, 0, 1, 5, 16, 15)
|
||||
.forDirectional(),
|
||||
VOLTMETER = shape(0, 0, 2, 16, 3, 14)
|
||||
.forDirectional(),
|
||||
.forDirectional(),
|
||||
ELECTRIC_PUMP = shape(2, 6, 2, 14, 10, 14)
|
||||
.add(4, 3, 4, 12, 11, 12)
|
||||
.add(3, 11, 3, 13, 16, 13)
|
||||
.add(3, 0, 3, 13, 5, 13)
|
||||
.forDirectional(),
|
||||
DIAGONAL_CABLE_BLOCK_DOWN = shape(3, 3, 11, 13, 13, 16)
|
||||
.add(3, 11, 3, 13, 16, 13)
|
||||
.add(4, 4, 5, 12, 11, 12)
|
||||
@@ -79,38 +84,41 @@ public class TFMGShapes {
|
||||
CASTING_BASIN = shape(0, 0, 0, 16, 8, 16)
|
||||
.add(4, 8, 14, 12, 13, 16)
|
||||
.forHorizontal(NORTH),
|
||||
TRANSFORMER = shape(0, 0, 0, 16, 6, 16)
|
||||
.add(1, 6, 5, 15, 15, 11)
|
||||
.forHorizontal(NORTH),
|
||||
CABLE_TUBE = shape(6, 0, 6, 10, 16, 10)
|
||||
.forDirectional(),
|
||||
REBAR_PILLAR = shape(3, 0, 3, 13, 16, 13)
|
||||
.forDirectional(),
|
||||
ELECTRICAL_SWITCH = shape(5, 0, 3, 11, 3, 13)
|
||||
.forHorizontalAxis(),
|
||||
.forHorizontalAxis(),
|
||||
ELECTRICAL_SWITCH_CEILING = shape(5, 13, 3, 11, 16, 13)
|
||||
.forHorizontalAxis(),
|
||||
ELECTRICAL_SWITCH_WALL = shape(5, 3, 0, 11, 13, 3)
|
||||
.forHorizontal(SOUTH),
|
||||
|
||||
POLARIZER = shape(4, 8, 0, 12, 12, 2)
|
||||
.add(5, 8, 14, 11, 11, 16)
|
||||
.add(11, 8, 4, 15, 12, 11)
|
||||
.add(1, 8, 4, 5, 12, 11)
|
||||
.add(0, 0, 0, 16, 8, 16)
|
||||
.forHorizontal(NORTH)
|
||||
;
|
||||
.forHorizontal(NORTH);
|
||||
public static final VoxelShape
|
||||
|
||||
EMPTY = shape(0, 0, 0, 0, 0, 0).build(),
|
||||
PUMPJACK_CRANK = shape(0, 0, 0, 16, 8, 16).build(),
|
||||
INDUSTRIAL_PIPE = shape(4, 0, 4, 12, 16, 12).build(),
|
||||
FLARESTACK = shape(3, 0, 3, 13, 14, 14).build(),
|
||||
PUMPJACK_BASE = shape(3, 0, 3, 13, 16, 13).build(),
|
||||
TRAFFIC_LIGHT = shape(3, 0, 3, 13, 16, 13).build(),
|
||||
REBAR_FLOOR = shape(0, 4, 0, 16, 12, 16)
|
||||
.build(),
|
||||
SURFACE_SCANNER = shape(2, 0, 2, 14, 14, 14).build(),
|
||||
FULL = shape(0, 0, 0, 16, 16, 16).build(),
|
||||
ELECTRIC_POST = shape(4, 0, 4, 12, 16, 12).build(),
|
||||
SLAB = shape(0, 0, 0, 16, 8, 16).build();
|
||||
;
|
||||
EMPTY = shape(0, 0, 0, 0, 0, 0).build(),
|
||||
PUMPJACK_CRANK = shape(0, 0, 0, 16, 8, 16).build(),
|
||||
INDUSTRIAL_PIPE = shape(4, 0, 4, 12, 16, 12).build(),
|
||||
FLARESTACK = shape(3, 0, 3, 13, 14, 14).build(),
|
||||
PUMPJACK_BASE = shape(3, 0, 3, 13, 16, 13).build(),
|
||||
TRAFFIC_LIGHT = shape(3, 0, 3, 13, 16, 13).build(),
|
||||
REBAR_FLOOR = shape(0, 4, 0, 16, 12, 16)
|
||||
.build(),
|
||||
SURFACE_SCANNER = shape(2, 0, 2, 14, 14, 14).build(),
|
||||
FULL = shape(0, 0, 0, 16, 16, 16).build(),
|
||||
ELECTRIC_POST = shape(4, 0, 4, 12, 16, 12).build(),
|
||||
SLAB = shape(0, 0, 0, 16, 8, 16).build();
|
||||
;
|
||||
|
||||
private static Builder shape(VoxelShape shape) {
|
||||
return new Builder(shape);
|
||||
@@ -156,6 +164,7 @@ public class TFMGShapes {
|
||||
public VoxelShaper build(BiFunction<VoxelShape, Axis, VoxelShaper> factory, Axis axis) {
|
||||
return factory.apply(shape, axis);
|
||||
}
|
||||
|
||||
public VoxelShaper forDirectional(Direction direction) {
|
||||
return build(VoxelShaper::forDirectional, direction);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.drmangotea.tfmg.content.electricity.connection.cables.CablePos;
|
||||
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.AllSoundEvents;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
|
||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||
@@ -20,9 +21,12 @@ import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockAndTintGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -69,6 +73,18 @@ public class TFMGUtils {
|
||||
}
|
||||
level.explode(null, pos.getX(), pos.getY(), pos.getZ(), radius, Level.ExplosionInteraction.BLOCK);
|
||||
}
|
||||
public static void playSound(Level level, BlockPos pos, SoundEvent sound, SoundSource source){
|
||||
playSound(level,pos,sound,source,1,1,null);
|
||||
}
|
||||
public static void playSound(Level level, BlockPos pos, SoundEvent sound, SoundSource source, Player player){
|
||||
playSound(level,pos,sound,source,1,1,player);
|
||||
}
|
||||
public static void playSound(Level level, BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch){
|
||||
playSound(level,pos,sound,source,volume,pitch,null);
|
||||
}
|
||||
public static void playSound(Level level, BlockPos pos, SoundEvent sound, SoundSource source, float volume, float pitch, Player player){
|
||||
level.playSound(player,pos,sound,source,volume,pitch);
|
||||
}
|
||||
|
||||
public static void blowUpTank(FluidTankBlockEntity tank, int power) {
|
||||
|
||||
@@ -264,6 +280,10 @@ public class TFMGUtils {
|
||||
return super.drain(resource, action);
|
||||
}
|
||||
|
||||
public FluidStack forceDrain(FluidStack resource, FluidAction action){
|
||||
return super.drain(resource,action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(int maxDrain, FluidAction action) {
|
||||
if (!extractionAllowed) return FluidStack.EMPTY;
|
||||
|
||||
@@ -2,11 +2,19 @@ package com.drmangotea.tfmg.base.events;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.content.engines.fuels.EngineFuelTypeManager;
|
||||
import com.drmangotea.tfmg.registry.TFMGItems;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.api.event.BlockEntityBehaviourEvent;
|
||||
import com.simibubi.create.content.equipment.toolbox.ToolboxHandler;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraftforge.event.AddReloadListenerEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.event.level.BlockEvent;
|
||||
import net.minecraftforge.event.level.LevelEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -20,9 +28,31 @@ public class TFMGCommonEvents {
|
||||
Player player = event.getEntity();
|
||||
TFMG.DEPOSITS.playerLogin(player);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onLoadWorld(LevelEvent.Load event) {
|
||||
LevelAccessor world = event.getLevel();
|
||||
TFMG.DEPOSITS.levelLoaded(world);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onBlockPlaced(BlockEvent.EntityPlaceEvent event) {
|
||||
|
||||
if (event.getEntity() instanceof Player player) {
|
||||
if (player.getItemInHand(InteractionHand.OFF_HAND).is(TFMGItems.ELECTRICIANS_WRENCH.get()) && event.getLevel().getBlockEntity(event.getPos()) instanceof IElectric be && be.canBeInGroups()) {
|
||||
|
||||
be.getData().group.id = player.getItemInHand(InteractionHand.OFF_HAND).getOrCreateTag().getInt("Number");
|
||||
be.updateNextTick();
|
||||
be.sendStuff();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void addReloadListeners(AddReloadListenerEvent event) {
|
||||
event.addListener(EngineFuelTypeManager.ReloadListener.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ public class MachineConfig extends ConfigBase {
|
||||
public final ConfigInt blastFurnaceMaxHeight = i(10, 3, "blastFurnaceMaxHeight", Comments.blastFurnaceHeight);
|
||||
public final ConfigFloat blastFurnaceHeightSpeedModifier = f(1f, 0.1f, "blastFurnaceHeightSpeedModifier", Comments.blastFurnaceHeightSpeedModifier);
|
||||
public final ConfigInt blastFurnaceFuelConsumption = i(600, 1, "blastFurnaceFuelConsumption", Comments.blastFurnaceFuelConsumption);
|
||||
public final ConfigInt electricMotorMinimumPower = i(3000, 1, "electricMotorMinimumPower", Comments.electricMotorMinimumPower);
|
||||
public final ConfigInt electricMotorMinimumPower = i(250, 1, "electricMotorMinimumPower", Comments.electricMotorMinimumPower);
|
||||
public final ConfigInt electricMotorMinimumVoltage = i(150, 1, "electricMotorMinimumVoltage", Comments.electricMotorMinimumVoltage);
|
||||
public final ConfigFloat electricMotorPowerUsageModifier = f(1, 0, "electricMotorPowerUsageModifier", Comments.electricMotorPowerUsageModifier);
|
||||
public final ConfigFloat electricMotorInternalResistance = f(100, 0, "electricMotorInternalResistance", Comments.electricMotorInternalResistance);
|
||||
public final ConfigInt cokeOvenMaxSize = i(5, 1, "cokeOvenMaxSize", Comments.cokeOvenMaxSize);
|
||||
public final ConfigInt accumulatorStorage = i(100000, 1, "accumulatorStorage", Comments.accumulatorStorage);
|
||||
public final ConfigInt accumulatorVoltage = i(12, 1, "accumulatorVoltage", Comments.accumulatorVoltage);
|
||||
@@ -41,7 +41,7 @@ public class MachineConfig extends ConfigBase {
|
||||
static String blastFurnaceFuelConsumption = "Determines how many ticks does it take to consume one fuel.";
|
||||
static String electricMotorMinimumPower = "Determines the minimum power an electric motor can run on.";
|
||||
static String electricMotorMinimumVoltage = "Determines the minimum voltage an electric motor can run on.";
|
||||
static String electricMotorPowerUsageModifier = "Changes the power usage of electric motors.";
|
||||
static String electricMotorInternalResistance = "Sets the internal resistance of the electric motor.";
|
||||
static String cokeOvenMaxSize = "Determines the maximum size of coke ovens.";
|
||||
static String accumulatorStorage = "Determines the storage space of accumulators.";
|
||||
static String accumulatorVoltage = "Determines the voltage accumulators output.";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.drmangotea.tfmg.content.electricity.base;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveHoveringInformation;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
@@ -10,7 +9,6 @@ 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.item.DyeColor;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -23,22 +21,26 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
public ElectricBlockValues data = new ElectricBlockValues(getPos());
|
||||
|
||||
int powerPercentage = 100;
|
||||
|
||||
public ElectricBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
data.connectNextTick = true;
|
||||
if(!canBeInGroups()){
|
||||
if (!canBeInGroups()) {
|
||||
data.group = new ElectricalGroup(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
return makeElectricityTooltip(tooltip, isPlayerSneaking);
|
||||
}
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
|
||||
@Override
|
||||
public LevelAccessor getLevelAccessor(){
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LevelAccessor getLevelAccessor() {
|
||||
return level;
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
|
||||
@Override
|
||||
public ElectricalNetwork getOrCreateElectricNetwork() {
|
||||
if(level.getBlockEntity(BlockPos.of(data.electricalNetworkId)) instanceof IElectric) {
|
||||
if (level.getBlockEntity(BlockPos.of(data.electricalNetworkId)) instanceof IElectric) {
|
||||
return TFMG.NETWORK_MANAGER.getOrCreateNetworkFor((IElectric) level.getBlockEntity(BlockPos.of(data.electricalNetworkId)));
|
||||
} else {
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
@@ -61,6 +63,14 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
if(data.failTimer >=4){
|
||||
this.blockFail();
|
||||
data.failTimer = 0;
|
||||
sendStuff();
|
||||
} else if((data.voltage>getMaxVoltage()&&getMaxVoltage()>0)||(getCurrent()>getMaxCurrent()&&getMaxCurrent()>0)){
|
||||
blockFail();
|
||||
data.failTimer++;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +79,6 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int getPowerPercentage() {
|
||||
return powerPercentage;
|
||||
@@ -79,25 +88,26 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
public float resistance() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int voltageGeneration() {
|
||||
|
||||
int voltageGeneration = 0;
|
||||
|
||||
for(Direction direction : Direction.values()){
|
||||
if(hasElectricitySlot(direction)){
|
||||
for (Direction direction : Direction.values()) {
|
||||
if (hasElectricitySlot(direction)) {
|
||||
|
||||
if(level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be)
|
||||
if(be.getData().getId() !=getData().getId())
|
||||
if(be.getData().getVoltage()!=0)
|
||||
if(be.hasElectricitySlot(direction)){
|
||||
voltageGeneration = Math.max(voltageGeneration,be.getOutputVoltage());
|
||||
if (level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be)
|
||||
if (be.getData().getId() != getData().getId())
|
||||
if (be.getData().getVoltage() != 0)
|
||||
if (be.hasElectricitySlot(direction)) {
|
||||
voltageGeneration = Math.max(voltageGeneration, be.getOutputVoltage());
|
||||
data.getsOutsidePower = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(voltageGeneration == 0)
|
||||
if (voltageGeneration == 0)
|
||||
data.getsOutsidePower = false;
|
||||
|
||||
return voltageGeneration;
|
||||
@@ -108,15 +118,16 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
|
||||
int powerGeneration = 0;
|
||||
|
||||
for(Direction direction : Direction.values()){
|
||||
if(hasElectricitySlot(direction)){
|
||||
for (Direction direction : Direction.values()) {
|
||||
if (hasElectricitySlot(direction)) {
|
||||
|
||||
if(level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be)
|
||||
if(be.getData().getId() !=getData().getId())
|
||||
if(be.getData().getVoltage()!=0)
|
||||
if(be.hasElectricitySlot(direction)){
|
||||
powerGeneration = Math.max(powerGeneration,be.getOutputPower());
|
||||
if (level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be) {
|
||||
if (be.getData().getId() != getData().getId())
|
||||
if (be.getData().getVoltage() != 0)
|
||||
if (be.hasElectricitySlot(direction)) {
|
||||
powerGeneration = Math.max(powerGeneration, be.getPowerUsage()) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +147,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
@Override
|
||||
public void updateNetwork() {
|
||||
getOrCreateElectricNetwork().updateNetwork();
|
||||
if(!level.isClientSide)
|
||||
if (!level.isClientSide)
|
||||
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new NetworkUpdatePacket(BlockPos.of(getPos())));
|
||||
sendData();
|
||||
}
|
||||
@@ -153,8 +164,8 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
// TFMG.LOGGER.debug("Rezistancja Grup "+data.group.resistance);
|
||||
//}
|
||||
|
||||
if(canBeInGroups()){
|
||||
data.voltage = (int) (((float)resistance()/data.group.resistance)*(float)data.voltageSupply);
|
||||
if (canBeInGroups()) {
|
||||
data.voltage = (int) (((float) resistance() / data.group.resistance) * (float) data.voltageSupply);
|
||||
return;
|
||||
}
|
||||
data.voltage = newVoltage;
|
||||
@@ -187,13 +198,13 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
@Override
|
||||
public void setNetwork(long network) {
|
||||
this.data.electricalNetworkId = network;
|
||||
if(network!=getPos())
|
||||
if (network != getPos())
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(getPos());
|
||||
}
|
||||
|
||||
public boolean networkUndersupplied(){
|
||||
return getNetworkPowerUsage()>data.networkPowerGeneration;
|
||||
public boolean networkUndersupplied() {
|
||||
return getNetworkPowerUsage() > data.networkPowerGeneration;
|
||||
}
|
||||
|
||||
|
||||
@@ -206,21 +217,20 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
public void remove() {
|
||||
super.remove();
|
||||
this.data.destroyed = true;
|
||||
for(Direction d : Direction.values()) {
|
||||
if(hasElectricitySlot(d))
|
||||
if(getLevelAccessor().getBlockEntity(BlockPos.of(getPos()).relative(d)) instanceof IElectric be&&be.hasElectricitySlot(d.getOpposite())) {
|
||||
for (Direction d : Direction.values()) {
|
||||
if (hasElectricitySlot(d))
|
||||
if (getLevelAccessor().getBlockEntity(BlockPos.of(getPos()).relative(d)) instanceof IElectric be && be.hasElectricitySlot(d.getOpposite())) {
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(be.getPos());
|
||||
be.setNetwork(be.getPos());
|
||||
be.onPlaced();
|
||||
|
||||
be.updateNextTick();
|
||||
}
|
||||
}
|
||||
if(data.electricalNetworkId != getPos())
|
||||
if (data.electricalNetworkId != getPos())
|
||||
getOrCreateElectricNetwork().getMembers().remove(this);
|
||||
|
||||
if(data.electricalNetworkId == getPos())
|
||||
if (data.electricalNetworkId == getPos())
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(getData().getId());
|
||||
}
|
||||
@@ -228,15 +238,16 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if(data.connectNextTick) {
|
||||
onPlaced();
|
||||
data.connectNextTick = false;
|
||||
}
|
||||
if(data.updateNextTick) {
|
||||
updateNetwork();
|
||||
data.updateNextTick = false;
|
||||
}
|
||||
if(data.setVoltageNextTick) {
|
||||
if (data.connectNextTick) {
|
||||
TFMG.LOGGER.debug("SIGMA A");
|
||||
onPlaced();
|
||||
data.connectNextTick = false;
|
||||
}
|
||||
if (data.updateNextTick) {
|
||||
updateNetwork();
|
||||
data.updateNextTick = false;
|
||||
}
|
||||
if (data.setVoltageNextTick) {
|
||||
setVoltage(data.voltageSupply);
|
||||
data.setVoltageNextTick = false;
|
||||
}
|
||||
@@ -256,7 +267,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
|
||||
super.read(compound, clientPacket);
|
||||
data.group = new ElectricalGroup(compound.getInt("GroupId"));
|
||||
data.group.resistance = compound.getFloat("GroupResistance");
|
||||
if(!clientPacket)
|
||||
if (!clientPacket)
|
||||
data.connectNextTick = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ public class ElectricBlockValues {
|
||||
|
||||
public boolean setVoltageNextTick = false;
|
||||
|
||||
public int failTimer = 0;
|
||||
|
||||
public ElectricalGroup group = new ElectricalGroup(0);
|
||||
|
||||
public ElectricBlockValues(long pos){
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.drmangotea.tfmg.content.electricity.base;
|
||||
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.IHaveCables;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.WireNetwork;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import org.apache.http.impl.conn.Wire;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.drmangotea.tfmg.content.electricity.base;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -27,11 +32,9 @@ public class ElectricalNetwork {
|
||||
List<Long> posList = new ArrayList<>();
|
||||
|
||||
members.forEach(member -> posList.add(member.getData().getId()));
|
||||
|
||||
if (posList.contains(be.getData().getId()))
|
||||
return;
|
||||
members.add(be);
|
||||
|
||||
}
|
||||
|
||||
public void updateNetwork() {
|
||||
@@ -42,10 +45,10 @@ public class ElectricalNetwork {
|
||||
int powerGeneration = 0;
|
||||
|
||||
|
||||
|
||||
Map<Integer, Float> groups = new HashMap<>();
|
||||
|
||||
for (IElectric member : members) {
|
||||
|
||||
int groupId = member.getData().group.id;
|
||||
|
||||
maxVoltage = Math.max(member.voltageGeneration(), maxVoltage);
|
||||
|
||||
@@ -29,18 +29,28 @@ public interface IElectric {
|
||||
}
|
||||
|
||||
default void onPlaced() {
|
||||
|
||||
if (!getLevelAccessor().isClientSide())
|
||||
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new ConnectNeightborsPacket(BlockPos.of(getPos())));
|
||||
TFMG.NETWORK_MANAGER.getOrCreateNetworkFor(this);
|
||||
setNetwork(getPos());
|
||||
getData().electricalNetworkId = getPos();
|
||||
updateNetwork();
|
||||
|
||||
onConnected();
|
||||
sendStuff();
|
||||
updateNextTick();
|
||||
}
|
||||
|
||||
default void onConnected() {
|
||||
default int getMaxVoltage() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
default int getMaxCurrent() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
default void onConnected() {
|
||||
|
||||
BlockPos pos = BlockPos.of(getPos());
|
||||
for (Direction d : Direction.values()) {
|
||||
@@ -51,6 +61,7 @@ public interface IElectric {
|
||||
getOrCreateElectricNetwork().add(be);
|
||||
if (be.getData().getId() != getData().getId()) {
|
||||
be.setNetwork(getData().getId());
|
||||
TFMG.LOGGER.debug("KONNEQT ");
|
||||
be.onConnected();
|
||||
if (!getLevelAccessor().isClientSide())
|
||||
sendStuff();
|
||||
@@ -62,12 +73,16 @@ public interface IElectric {
|
||||
}
|
||||
}
|
||||
sendStuff();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
default boolean makeElectricityTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
|
||||
|
||||
Lang.number(getOrCreateElectricNetwork().members.size()).forGoggles(tooltip, 1);
|
||||
if (getData().failTimer > 0)
|
||||
Lang.text("Skill issue: " + getData().failTimer).forGoggles(tooltip, 1);
|
||||
Lang.text("X " + BlockPos.of(getData().electricalNetworkId).getX() + " Y " + BlockPos.of(getData().electricalNetworkId).getY() + " Z " + BlockPos.of(getData().electricalNetworkId).getZ()).forGoggles(tooltip, 1);
|
||||
Lang.translate("multimeter.header")
|
||||
.style(ChatFormatting.WHITE)
|
||||
.forGoggles(tooltip, 1);
|
||||
@@ -136,13 +151,27 @@ public interface IElectric {
|
||||
|
||||
ElectricBlockValues getData();
|
||||
|
||||
default void blockFail() {
|
||||
getLevelAccessor().destroyBlock(BlockPos.of(getPos()), false);
|
||||
}
|
||||
|
||||
default int getPowerUsage() {
|
||||
return (int) (getData().getVoltage() * getCurrent());
|
||||
}
|
||||
|
||||
default int getNetworkPowerUsage(IElectric blocked) {
|
||||
int power = 0;
|
||||
for (IElectric member : getOrCreateElectricNetwork().members)
|
||||
if (member.getPos() != blocked.getPos()) {
|
||||
power += member.getPowerUsage();
|
||||
} else blocked.updateNextTick();
|
||||
return power;
|
||||
}
|
||||
|
||||
default int getNetworkPowerUsage() {
|
||||
int power = 0;
|
||||
for (IElectric member : getOrCreateElectricNetwork().members)
|
||||
|
||||
power += member.getPowerUsage();
|
||||
return power;
|
||||
}
|
||||
@@ -181,18 +210,20 @@ public interface IElectric {
|
||||
default float getCurrent() {
|
||||
return getData().getVoltage() == 0 || resistance() == 0 ? 0 : ((float) getData().getVoltage() / (float) resistance());
|
||||
}
|
||||
default float getCableCurrent(){
|
||||
float current =0;
|
||||
|
||||
default float getCableCurrent() {
|
||||
float current = 0;
|
||||
List<Integer> groups = new ArrayList<>();
|
||||
for(IElectric member : getOrCreateElectricNetwork().members){
|
||||
if(member.canBeInGroups())
|
||||
if(!groups.contains(member.getData().group.id)){
|
||||
current+=member.getCurrent();
|
||||
for (IElectric member : getOrCreateElectricNetwork().members) {
|
||||
if (member.canBeInGroups())
|
||||
if (!groups.contains(member.getData().group.id)) {
|
||||
current += member.getCurrent();
|
||||
groups.add(member.getData().group.id);
|
||||
}
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
void updateNextTick();
|
||||
|
||||
void updateNetwork();
|
||||
|
||||
@@ -112,7 +112,7 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
|
||||
if(be.getData().getId() !=getData().getId())
|
||||
if(be.getData().getVoltage()!=0)
|
||||
if(be.hasElectricitySlot(direction)){
|
||||
powerGeneration = Math.max(powerGeneration,be.getOutputPower());
|
||||
powerGeneration = Math.max(powerGeneration,be.getOutputPower())+10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,9 +126,6 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateNextTick() {
|
||||
data.updateNextTick = true;
|
||||
@@ -149,6 +146,7 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
|
||||
|
||||
@Override
|
||||
public void setVoltage(int newVoltage) {
|
||||
|
||||
if(canBeInGroups()){
|
||||
data.voltage = (int) (((float)resistance()/data.group.resistance)*(float)data.voltageSupply);
|
||||
return;
|
||||
@@ -202,20 +200,20 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
|
||||
public void remove() {
|
||||
super.remove();
|
||||
this.data.destroyed = true;
|
||||
for(Direction d : Direction.values()) {
|
||||
if(hasElectricitySlot(d))
|
||||
if(getLevelAccessor().getBlockEntity(BlockPos.of(getPos()).relative(d)) instanceof IElectric be&&be.hasElectricitySlot(d.getOpposite())) {
|
||||
for (Direction d : Direction.values()) {
|
||||
if (hasElectricitySlot(d))
|
||||
if (getLevelAccessor().getBlockEntity(BlockPos.of(getPos()).relative(d)) instanceof IElectric be && be.hasElectricitySlot(d.getOpposite())) {
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(be.getPos());
|
||||
be.setNetwork(be.getPos());
|
||||
be.onPlaced();
|
||||
be.getData().connectNextTick = true;
|
||||
be.updateNextTick();
|
||||
}
|
||||
}
|
||||
if(data.electricalNetworkId != getPos())
|
||||
if (data.electricalNetworkId != getPos())
|
||||
getOrCreateElectricNetwork().getMembers().remove(this);
|
||||
|
||||
if(data.electricalNetworkId == getPos())
|
||||
if (data.electricalNetworkId == getPos())
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(getData().getId());
|
||||
}
|
||||
@@ -243,6 +241,20 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
|
||||
if(data.failTimer >=4){
|
||||
this.blockFail();
|
||||
data.failTimer = 0;
|
||||
sendStuff();
|
||||
} else if((data.voltage>getMaxVoltage()&&getMaxVoltage()>0)||(getCurrent()>getMaxCurrent()&&getMaxCurrent()>0)){
|
||||
blockFail();
|
||||
data.failTimer++;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void write(CompoundTag tag, boolean clientPacket) {
|
||||
super.write(tag, clientPacket);
|
||||
|
||||
@@ -11,18 +11,16 @@ import org.checkerframework.checker.units.qual.C;
|
||||
|
||||
public class CableConnection {
|
||||
|
||||
final CablePos pos1;
|
||||
final CablePos pos2;
|
||||
final BlockPos blockPos1;
|
||||
final BlockPos blockPos2;
|
||||
final boolean visible;
|
||||
final CableType type;
|
||||
public final CablePos pos1;
|
||||
public final CablePos pos2;
|
||||
public final BlockPos blockPos1;
|
||||
public final boolean visible;
|
||||
public final CableType type;
|
||||
|
||||
public CableConnection(CablePos pos1, CablePos pos2,BlockPos blockPos1,BlockPos blockPos2,CableType type, boolean visible){
|
||||
public CableConnection(CablePos pos1, CablePos pos2,BlockPos blockPos1,CableType type, boolean visible){
|
||||
this.pos1 = pos1;
|
||||
this.pos2 = pos2;
|
||||
this.blockPos1 = blockPos1;
|
||||
this.blockPos2 = blockPos2;
|
||||
this.visible = visible;
|
||||
this.type = type;
|
||||
}
|
||||
@@ -41,13 +39,9 @@ public class CableConnection {
|
||||
//compoundTag.putLong("BlockPos1", blockPos1.asLong());
|
||||
//compoundTag.putLong("BlockPos2", blockPos2.asLong());
|
||||
|
||||
compoundTag.putInt("XX1", blockPos1.getX());
|
||||
compoundTag.putInt("YY1", blockPos1.getY());
|
||||
compoundTag.putInt("ZZ1", blockPos1.getZ());
|
||||
compoundTag.putLong("Pos", blockPos1.asLong());
|
||||
|
||||
|
||||
compoundTag.putInt("XX2", blockPos2.getX());
|
||||
compoundTag.putInt("YY2", blockPos2.getY());
|
||||
compoundTag.putInt("ZZ2", blockPos2.getZ());
|
||||
|
||||
|
||||
compoundTag.putBoolean("Visible", visible);
|
||||
@@ -66,13 +60,11 @@ public class CableConnection {
|
||||
//BlockPos blockPos1 = BlockPos.of(compoundTag.getLong("BlockPos1"));
|
||||
//BlockPos blockPos2 = BlockPos.of(compoundTag.getLong("BlockPos2"));
|
||||
|
||||
BlockPos blockPos1 = new BlockPos(compoundTag.getInt("XX1"),compoundTag.getInt("YY1"),compoundTag.getInt("ZZ1"));
|
||||
BlockPos blockPos2 = new BlockPos(compoundTag.getInt("XX2"),compoundTag.getInt("YY2"),compoundTag.getInt("ZZ2"));
|
||||
BlockPos blockPos1 = BlockPos.of(compoundTag.getLong("Pos"));
|
||||
|
||||
boolean visible = compoundTag.getBoolean("Visible");
|
||||
CableType type = CableType.valueOf(compoundTag.getString("CableType"));
|
||||
|
||||
return new CableConnection(pos1,pos2,blockPos1,blockPos2,type,visible);
|
||||
return new CableConnection(pos1,pos2,blockPos1,type,visible);
|
||||
}
|
||||
public float getLength(){
|
||||
return TFMGUtils.getDistance(new BlockPos((int) pos1.x(), (int) pos1.y(), (int) pos1.z()),new BlockPos((int) pos2.x(), (int) pos2.y(), (int) pos2.z()), false);
|
||||
@@ -82,9 +74,10 @@ public class CableConnection {
|
||||
|
||||
public enum CableType{
|
||||
NONE(TFMGItems.COPPER_WIRE, 0,0xffffff),
|
||||
COPPER(TFMGItems.COPPER_WIRE, 0.0188f,0xD8735A),
|
||||
ALUMINUM(TFMGItems.ALUMINUM_WIRE, 0.0188f,0xEDEFEF),
|
||||
STEEL_REINFORCED_ALUMINUM(TFMGItems.COPPER_WIRE, 0.0188f,0x595E5F)
|
||||
COPPER(TFMGItems.COPPER_WIRE, 0.00188f,0xD8735A),
|
||||
ALUMINUM(TFMGItems.ALUMINUM_WIRE, 0.0027f,0xEDEFEF),
|
||||
CONSTANTAN(TFMGItems.CONSTANTAN_WIRE, 1f,0xEDEFEF),
|
||||
STEEL_REINFORCED_ALUMINUM(TFMGItems.COPPER_WIRE, 0.0027f,0xB8A08D)
|
||||
;
|
||||
public final ItemEntry<?> wire;
|
||||
public final float resistivity;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.drmangotea.tfmg.content.electricity.connection.cables;
|
||||
|
||||
import com.drmangotea.tfmg.base.TFMGShapes;
|
||||
import com.drmangotea.tfmg.base.WallMountBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -29,7 +30,7 @@ public class CableConnectorBlock extends WallMountBlock implements IBE<CableConn
|
||||
@Override
|
||||
public void onPlace(BlockState state, Level level, BlockPos pos, BlockState blockState1, boolean b) {
|
||||
updateExtension(level,state,pos);
|
||||
|
||||
withBlockEntityDo(level,pos, IElectric::onPlaced);
|
||||
BlockPos below = pos.relative(state.getValue(FACING).getOpposite());
|
||||
BlockState stateBelow = level.getBlockState(below);
|
||||
if(stateBelow.getBlock() instanceof IHaveCables)
|
||||
@@ -38,6 +39,13 @@ public class CableConnectorBlock extends WallMountBlock implements IBE<CableConn
|
||||
super.onPlace(state, level, pos, blockState1, b);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
IBE.onRemove(state, level, pos, newState);
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public InteractionResult use(BlockState state, Level level, BlockPos pos, Player p_60506_, InteractionHand p_60507_, BlockHitResult p_60508_) {
|
||||
// if(level.isClientSide)
|
||||
@@ -90,7 +98,7 @@ public class CableConnectorBlock extends WallMountBlock implements IBE<CableConn
|
||||
BlockPos above = pos.relative(state.getValue(FACING));
|
||||
BlockState stateAbove = level.getBlockState(above);
|
||||
|
||||
if(stateAbove.getBlock() instanceof IHaveCables) {
|
||||
if(stateAbove.getBlock() instanceof IHaveCables&&stateAbove.getValue(FACING)==state.getValue(FACING)) {
|
||||
level.setBlockAndUpdate(pos, state.setValue(EXTENSION, true));
|
||||
} else {
|
||||
level.setBlockAndUpdate(pos, state.setValue(EXTENSION, false));
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.cables;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ElectricNetworkManager;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ElectricBlockEntity;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveHoveringInformation;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
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.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
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.network.PacketDistributor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CableConnectorBlockEntity extends SmartBlockEntity implements IHaveHoveringInformation {
|
||||
import static com.drmangotea.tfmg.base.WallMountBlock.FACING;
|
||||
import static com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlock.EXTENSION;
|
||||
|
||||
public class CableConnectorBlockEntity extends ElectricBlockEntity implements IHaveHoveringInformation {
|
||||
|
||||
//player held cable rendering
|
||||
public Player player;
|
||||
@@ -36,6 +36,7 @@ public class CableConnectorBlockEntity extends SmartBlockEntity implements IHave
|
||||
|
||||
public List<CableConnection> connections = new ArrayList<>();
|
||||
public long id;
|
||||
public boolean removeWiresNextTick = false;
|
||||
|
||||
public CableConnectorBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
@@ -46,17 +47,34 @@ public class CableConnectorBlockEntity extends SmartBlockEntity implements IHave
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
removeConnections(false);
|
||||
notifyRemoval();
|
||||
}
|
||||
|
||||
public void removeConnections(boolean client) {
|
||||
if (!level.isClientSide()) {
|
||||
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new CablePacket(this.getBlockPos()));
|
||||
} else if(!client)
|
||||
|
||||
@Override
|
||||
public boolean hasElectricitySlot(Direction direction) {
|
||||
if(getBlockState().getValue(EXTENSION))
|
||||
return direction.getAxis() == getBlockState().getValue(FACING).getAxis();
|
||||
|
||||
return direction == getBlockState().getValue(FACING).getOpposite();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean makeElectricityTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
|
||||
|
||||
return super.makeElectricityTooltip(tooltip, isPlayerSneaking);
|
||||
}
|
||||
|
||||
public void notifyRemoval() {
|
||||
|
||||
if(level.isClientSide)
|
||||
return;
|
||||
|
||||
for (CableConnection connection : connections) {
|
||||
@@ -64,25 +82,119 @@ public class CableConnectorBlockEntity extends SmartBlockEntity implements IHave
|
||||
if (itemToDrop.getItem().getCount() > 0) {
|
||||
level.addFreshEntity(itemToDrop);
|
||||
}
|
||||
BlockPos pos = connection.blockPos1 == getBlockPos() ? connection.blockPos2 : connection.blockPos1;
|
||||
if (level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be) {
|
||||
BlockPos pos = connection.blockPos1;
|
||||
|
||||
if(be.getBlockPos() == getBlockPos())
|
||||
// level.setBlock(connection.blockPos1.above(), Blocks.GOLD_BLOCK.defaultBlockState(),3);
|
||||
if (level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be) {
|
||||
if (be.getBlockPos() == getBlockPos())
|
||||
continue;
|
||||
be.connections.removeIf(c->c.blockPos1==getBlockPos()||c.blockPos2==getBlockPos());
|
||||
be.setChanged();
|
||||
be.sendData();
|
||||
setChanged();
|
||||
sendData();
|
||||
be.onPlaced();
|
||||
be.removeWiresNextTick = true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//@Override
|
||||
//public float resistance() {
|
||||
// float resistance = 0;
|
||||
|
||||
// for(CableConnection connection : connections){
|
||||
// if(connection.visible){
|
||||
// resistance+=connection.type.resistivity*connection.getLength();
|
||||
// }
|
||||
// }
|
||||
|
||||
// return resistance;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
public void removeConnection(){
|
||||
connections.removeIf(c->{
|
||||
BlockPos pos = c.blockPos1;
|
||||
|
||||
return !(level.getBlockEntity(pos) instanceof CableConnectorBlockEntity);
|
||||
|
||||
});
|
||||
sendStuff();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnected() {
|
||||
super.onConnected();
|
||||
|
||||
for(CableConnectorBlockEntity be : getConnectedWires()){
|
||||
|
||||
if (be.getData().getId() != getData().getId()) {
|
||||
be.setNetwork(getData().getId());
|
||||
be.onConnected();
|
||||
}
|
||||
|
||||
be.sendStuff();
|
||||
}
|
||||
sendStuff();
|
||||
|
||||
}
|
||||
public List<CableConnectorBlockEntity> getConnectedWires(){
|
||||
return getConnectedWires(new ArrayList<>());
|
||||
}
|
||||
public List<CableConnectorBlockEntity> getConnectedWires(List<CableConnectorBlockEntity> foundList){
|
||||
|
||||
|
||||
if(!foundList.contains(this)) {
|
||||
foundList.add(this);
|
||||
}
|
||||
|
||||
for(CableConnection connection : connections){
|
||||
BlockPos pos = connection.blockPos1;
|
||||
|
||||
|
||||
//level.setBlockAndUpdate(pos.above(), Blocks.GOLD_BLOCK.defaultBlockState());
|
||||
//level.setBlockAndUpdate(pos2.above(2), Blocks.DIAMOND_BLOCK.defaultBlockState());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(connection.blockPos1 == getBlockPos())
|
||||
TFMGUtils.debugMessage(level, "PRIMARY IS SUS");
|
||||
|
||||
if(pos ==getBlockPos()){
|
||||
TFMG.LOGGER.debug("WHAT THE SIGMA");
|
||||
continue;
|
||||
}
|
||||
// TFMGUtils.debugMessage(level, "Eﴤ "+connections.size());
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof CableConnectorBlockEntity bee&&bee.getBlockPos() == getBlockPos())
|
||||
TFMGUtils.debugMessage(level, "SUSSY BEHAVIOUR");
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be&&!foundList.contains(be)){
|
||||
// TFMGUtils.debugMessage(level, "Bﴤ "+connections.size());
|
||||
be.getConnectedWires(foundList);
|
||||
sendStuff();
|
||||
be.sendStuff();
|
||||
|
||||
}
|
||||
}
|
||||
sendStuff();
|
||||
return foundList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if(removeWiresNextTick) {
|
||||
|
||||
removeConnection();
|
||||
removeWiresNextTick = false;
|
||||
}
|
||||
if (player != null)
|
||||
managePlayerWire();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,6 +203,8 @@ public class CableConnectorBlockEntity extends SmartBlockEntity implements IHave
|
||||
|
||||
compound.putInt("ConnectionCount", connections.size());
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < connections.size(); i++) {
|
||||
CableConnection connection = connections.get(i);
|
||||
compound.put("Connection" + i, connection.saveConnection());
|
||||
@@ -108,6 +222,7 @@ public class CableConnectorBlockEntity extends SmartBlockEntity implements IHave
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
|
||||
connections = new ArrayList<>();
|
||||
for (int i = 0; i < compound.getInt("ConnectionCount"); i++) {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CableConnectorRenderer extends SafeBlockEntityRenderer<CableConnect
|
||||
|
||||
for (CableConnection connection : be.connections) {
|
||||
if (connection.visible)
|
||||
TFMGUtils.renderWire(be.getLevel(), ms, bufferSource, connection.pos1, connection.pos2, connection.getLength() / 4500, new Color(connection.type.color).getRed(), new Color(connection.type.color).getGreen(), new Color(connection.type.color).getBlue());
|
||||
TFMGUtils.renderWire(be.getLevel(), ms, bufferSource, connection.pos2, connection.pos1, connection.getLength() / 4500, new Color(connection.type.color).getRed(), new Color(connection.type.color).getGreen(), new Color(connection.type.color).getBlue());
|
||||
}
|
||||
|
||||
//for (BlockPos connection : be.connections) {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.cables;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.networking.BlockEntityDataPacket;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
|
||||
public class CablePacket extends BlockEntityDataPacket<SmartBlockEntity> {
|
||||
public class CablePlacePacket extends BlockEntityDataPacket<SmartBlockEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public CablePacket(BlockPos pos) {
|
||||
|
||||
public CablePlacePacket(BlockPos pos) {
|
||||
super(pos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public CablePacket(FriendlyByteBuf buffer) {
|
||||
public CablePlacePacket(FriendlyByteBuf buffer) {
|
||||
super(buffer);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CablePacket extends BlockEntityDataPacket<SmartBlockEntity> {
|
||||
protected void handlePacket(SmartBlockEntity blockEntity) {
|
||||
|
||||
if(blockEntity instanceof CableConnectorBlockEntity be) {
|
||||
be.removeConnections(true);
|
||||
be.onConnected();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.cables;
|
||||
|
||||
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.networking.BlockEntityDataPacket;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
|
||||
public class CableRemovalPacket extends BlockEntityDataPacket<SmartBlockEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public CableRemovalPacket(BlockPos pos) {
|
||||
super(pos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public CableRemovalPacket(FriendlyByteBuf buffer) {
|
||||
super(buffer);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void writeData(FriendlyByteBuf buffer) {}
|
||||
|
||||
@Override
|
||||
protected void handlePacket(SmartBlockEntity blockEntity) {
|
||||
|
||||
if(blockEntity instanceof CableConnectorBlockEntity be) {
|
||||
// be.removeConnections(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.cables;
|
||||
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import org.apache.http.impl.conn.Wire;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WireNetwork{
|
||||
|
||||
public long id;
|
||||
|
||||
public List<IHaveCables> connectors = new ArrayList<>();
|
||||
|
||||
public int voltage;
|
||||
|
||||
public float resistance;
|
||||
|
||||
|
||||
public WireNetwork(long id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void add(IHaveCables be) {
|
||||
List<Long> posList = new ArrayList<>();
|
||||
|
||||
connectors.forEach(member -> posList.add(member.getId()));
|
||||
|
||||
if (posList.contains(be.getId()))
|
||||
return;
|
||||
connectors.add(be);
|
||||
|
||||
}
|
||||
|
||||
public void updateCables(){
|
||||
|
||||
|
||||
for(IHaveCables cable : connectors){
|
||||
if(cable instanceof IElectric be){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.copycat_cable;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.simibubi.create.AllTags;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.SpawnPlacements;
|
||||
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.UseOnContext;
|
||||
import net.minecraft.world.level.*;
|
||||
import net.minecraft.world.level.block.*;
|
||||
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.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.model.data.ModelDataManager;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class CopycatCableBlock extends Block implements IBE<CopycatCableBlockEntity>, IWrenchable {
|
||||
|
||||
public CopycatCableBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult onSneakWrenched(BlockState state, UseOnContext context) {
|
||||
onWrenched(state, context);
|
||||
return IWrenchable.super.onSneakWrenched(state, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
return onBlockEntityUse(context.getLevel(), context.getClickedPos(), ufte -> {
|
||||
ItemStack consumedItem = ufte.getConsumedItem();
|
||||
if (!ufte.hasCustomMaterial())
|
||||
return InteractionResult.PASS;
|
||||
Player player = context.getPlayer();
|
||||
if (!player.isCreative())
|
||||
player.getInventory()
|
||||
.placeItemBackInInventory(consumedItem);
|
||||
context.getLevel()
|
||||
.levelEvent(2001, context.getClickedPos(), Block.getId(ufte.getBlockState()));
|
||||
ufte.setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
|
||||
ufte.setConsumedItem(ItemStack.EMPTY);
|
||||
return InteractionResult.SUCCESS;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) {
|
||||
|
||||
if (pPlayer == null)
|
||||
return InteractionResult.PASS;
|
||||
|
||||
Direction face = pHit.getDirection();
|
||||
ItemStack itemInHand = pPlayer.getItemInHand(pHand);
|
||||
BlockState materialIn = getAcceptedBlockState(pLevel, pPos, itemInHand, face);
|
||||
|
||||
if (materialIn != null)
|
||||
materialIn = prepareMaterial(pLevel, pPos, pState, pPlayer, pHand, pHit, materialIn);
|
||||
if (materialIn == null)
|
||||
return InteractionResult.PASS;
|
||||
|
||||
BlockState material = materialIn;
|
||||
return onBlockEntityUse(pLevel, pPos, ufte -> {
|
||||
if (ufte.getMaterial()
|
||||
.is(material.getBlock())) {
|
||||
if (!ufte.cycleMaterial())
|
||||
return InteractionResult.PASS;
|
||||
ufte.getLevel()
|
||||
.playSound(null, ufte.getBlockPos(), SoundEvents.ITEM_FRAME_ADD_ITEM, SoundSource.BLOCKS, .75f,
|
||||
.95f);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if (ufte.hasCustomMaterial())
|
||||
return InteractionResult.PASS;
|
||||
if (pLevel.isClientSide())
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
ufte.setMaterial(material);
|
||||
ufte.setConsumedItem(itemInHand);
|
||||
ufte.getLevel()
|
||||
.playSound(null, ufte.getBlockPos(), material.getSoundType()
|
||||
.getPlaceSound(), SoundSource.BLOCKS, 1, .75f);
|
||||
|
||||
if (pPlayer.isCreative())
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
itemInHand.shrink(1);
|
||||
if (itemInHand.isEmpty())
|
||||
pPlayer.setItemInHand(pHand, ItemStack.EMPTY);
|
||||
return InteractionResult.SUCCESS;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level pLevel, BlockPos pPos, BlockState pState, LivingEntity pPlacer, ItemStack pStack) {
|
||||
if (pPlacer == null)
|
||||
return;
|
||||
ItemStack offhandItem = pPlacer.getItemInHand(InteractionHand.OFF_HAND);
|
||||
BlockState appliedState =
|
||||
getAcceptedBlockState(pLevel, pPos, offhandItem, Direction.orderedByNearest(pPlacer)[0]);
|
||||
|
||||
if (appliedState == null)
|
||||
return;
|
||||
withBlockEntityDo(pLevel, pPos, ufte -> {
|
||||
if (ufte.hasCustomMaterial())
|
||||
return;
|
||||
|
||||
ufte.setMaterial(appliedState);
|
||||
ufte.setConsumedItem(offhandItem);
|
||||
|
||||
if (pPlacer instanceof Player player && player.isCreative())
|
||||
return;
|
||||
offhandItem.shrink(1);
|
||||
if (offhandItem.isEmpty())
|
||||
pPlacer.setItemInHand(InteractionHand.OFF_HAND, ItemStack.EMPTY);
|
||||
});
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BlockState getAcceptedBlockState(Level pLevel, BlockPos pPos, ItemStack item, Direction face) {
|
||||
if (!(item.getItem() instanceof BlockItem bi))
|
||||
return null;
|
||||
|
||||
Block block = bi.getBlock();
|
||||
if (block instanceof com.simibubi.create.content.decoration.copycat.CopycatBlock||block instanceof CopycatCableBlock)
|
||||
return null;
|
||||
|
||||
BlockState appliedState = block.defaultBlockState();
|
||||
boolean hardCodedAllow = isAcceptedRegardless(appliedState);
|
||||
|
||||
if (!AllTags.AllBlockTags.COPYCAT_ALLOW.matches(block) && !hardCodedAllow) {
|
||||
|
||||
if (AllTags.AllBlockTags.COPYCAT_DENY.matches(block))
|
||||
return null;
|
||||
if (block instanceof EntityBlock)
|
||||
return null;
|
||||
if (block instanceof StairBlock)
|
||||
return null;
|
||||
|
||||
if (pLevel != null) {
|
||||
VoxelShape shape = appliedState.getShape(pLevel, pPos);
|
||||
if (shape.isEmpty() || !shape.bounds()
|
||||
.equals(Shapes.block()
|
||||
.bounds()))
|
||||
return null;
|
||||
|
||||
VoxelShape collisionShape = appliedState.getCollisionShape(pLevel, pPos);
|
||||
if (collisionShape.isEmpty())
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (face != null) {
|
||||
Direction.Axis axis = face.getAxis();
|
||||
|
||||
if (appliedState.hasProperty(BlockStateProperties.FACING))
|
||||
appliedState = appliedState.setValue(BlockStateProperties.FACING, face);
|
||||
if (appliedState.hasProperty(BlockStateProperties.HORIZONTAL_FACING) && axis != Direction.Axis.Y)
|
||||
appliedState = appliedState.setValue(BlockStateProperties.HORIZONTAL_FACING, face);
|
||||
if (appliedState.hasProperty(BlockStateProperties.AXIS))
|
||||
appliedState = appliedState.setValue(BlockStateProperties.AXIS, axis);
|
||||
if (appliedState.hasProperty(BlockStateProperties.HORIZONTAL_AXIS) && axis != Direction.Axis.Y)
|
||||
appliedState = appliedState.setValue(BlockStateProperties.HORIZONTAL_AXIS, axis);
|
||||
}
|
||||
|
||||
return appliedState;
|
||||
}
|
||||
|
||||
public boolean isAcceptedRegardless(BlockState material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public BlockState prepareMaterial(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer, InteractionHand pHand, BlockHitResult pHit, BlockState material) {
|
||||
return material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean pIsMoving) {
|
||||
|
||||
IBE.onRemove(state, level, pos, newState);
|
||||
|
||||
if (!state.hasBlockEntity() || state.getBlock() == newState.getBlock())
|
||||
return;
|
||||
if (!pIsMoving)
|
||||
withBlockEntityDo(level, pos, ufte -> Block.popResource(level, pos, ufte.getConsumedItem()));
|
||||
level.removeBlockEntity(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playerWillDestroy(Level pLevel, BlockPos pPos, BlockState pState, Player pPlayer) {
|
||||
super.playerWillDestroy(pLevel, pPos, pState, pPlayer);
|
||||
if (pPlayer.isCreative())
|
||||
withBlockEntityDo(pLevel, pPos, ufte -> ufte.setConsumedItem(ItemStack.EMPTY));
|
||||
}
|
||||
@Override
|
||||
public void onPlace(BlockState pState, Level level, BlockPos pos, BlockState pOldState, boolean pIsMoving) {
|
||||
withBlockEntityDo(level,pos, IElectric::onPlaced);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<CopycatCableBlockEntity> getBlockEntityClass() {
|
||||
return CopycatCableBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends CopycatCableBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.COPYCAT_CABLE.get();
|
||||
}
|
||||
// Connected Textures
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public BlockState getAppearance(BlockState state, BlockAndTintGetter level, BlockPos pos, Direction side,
|
||||
BlockState queryState, BlockPos queryPos) {
|
||||
if (isIgnoredConnectivitySide(level, state, side, pos, queryPos))
|
||||
return state;
|
||||
|
||||
ModelDataManager modelDataManager = level.getModelDataManager();
|
||||
if (modelDataManager == null)
|
||||
return getMaterial(level, pos);
|
||||
return CopycatCableBlockModel.getMaterial(modelDataManager.getAt(pos));
|
||||
}
|
||||
|
||||
public boolean isIgnoredConnectivitySide(BlockAndTintGetter reader, BlockState state, Direction face,
|
||||
BlockPos fromPos, BlockPos toPos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static BlockState getMaterial(BlockGetter reader, BlockPos targetPos) {
|
||||
if (reader.getBlockEntity(targetPos) instanceof CopycatCableBlockEntity cbe)
|
||||
return cbe.getMaterial();
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
}
|
||||
|
||||
// Wrapped properties
|
||||
|
||||
@Override
|
||||
public SoundType getSoundType(BlockState state, LevelReader level, BlockPos pos, Entity entity) {
|
||||
return getMaterial(level, pos).getSoundType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFriction(BlockState state, LevelReader level, BlockPos pos, Entity entity) {
|
||||
return getMaterial(level, pos).getFriction(level, pos, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) {
|
||||
return getMaterial(level, pos).getLightEmission(level, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(BlockState state, BlockGetter level, BlockPos pos, Player player) {
|
||||
return getMaterial(level, pos).canHarvestBlock(level, pos, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExplosionResistance(BlockState state, BlockGetter level, BlockPos pos, Explosion explosion) {
|
||||
return getMaterial(level, pos).getExplosionResistance(level, pos, explosion);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos,
|
||||
Player player) {
|
||||
BlockState material = getMaterial(level, pos);
|
||||
if (TFMGBlocks.COPYCAT_CABLE_BASE.has(material) || player != null && player.isShiftKeyDown())
|
||||
return new ItemStack(this);
|
||||
return material.getCloneItemStack(target, level, pos, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLandingEffects(BlockState state1, ServerLevel level, BlockPos pos, BlockState state2,
|
||||
LivingEntity entity, int numberOfParticles) {
|
||||
return getMaterial(level, pos).addLandingEffects(level, pos, state2, entity, numberOfParticles);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addRunningEffects(BlockState state, Level level, BlockPos pos, Entity entity) {
|
||||
return getMaterial(level, pos).addRunningEffects(level, pos, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEnchantPowerBonus(BlockState state, LevelReader level, BlockPos pos) {
|
||||
return getMaterial(level, pos).getEnchantPowerBonus(level, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy(BlockState state, BlockGetter level, BlockPos pos, Entity entity) {
|
||||
return getMaterial(level, pos).canEntityDestroy(level, pos, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidSpawn(BlockState state, BlockGetter level, BlockPos pos, SpawnPlacements.Type type,
|
||||
EntityType<?> entityType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fallOn(Level pLevel, BlockState pState, BlockPos pPos, Entity pEntity, float pFallDistance) {
|
||||
BlockState material = getMaterial(pLevel, pPos);
|
||||
material.getBlock()
|
||||
.fallOn(pLevel, material, pPos, pEntity, pFallDistance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDestroyProgress(BlockState pState, Player pPlayer, BlockGetter pLevel, BlockPos pPos) {
|
||||
return getMaterial(pLevel, pPos).getDestroyProgress(pPlayer, pLevel, pPos);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static BlockColor wrappedColor() {
|
||||
return new WrappedBlockColor();
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class WrappedBlockColor implements BlockColor {
|
||||
|
||||
@Override
|
||||
public int getColor(BlockState pState, @Nullable BlockAndTintGetter pLevel, @Nullable BlockPos pPos,
|
||||
int pTintIndex) {
|
||||
if (pLevel == null || pPos == null)
|
||||
return GrassColor.get(0.5D, 1.0D);
|
||||
return Minecraft.getInstance()
|
||||
.getBlockColors()
|
||||
.getColor(getMaterial(pLevel, pPos), pLevel, pPos, pTintIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.copycat_cable;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.content.electricity.base.*;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.content.decoration.copycat.CopycatBlock;
|
||||
import com.simibubi.create.content.decoration.copycat.CopycatBlockEntity;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveHoveringInformation;
|
||||
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.network.chat.Component;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElectric, IHaveHoveringInformation {
|
||||
|
||||
public ElectricBlockValues data = new ElectricBlockValues(getPos());
|
||||
|
||||
int powerPercentage = 100;
|
||||
boolean setNextTick = true;
|
||||
public CopycatCableBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
data.connectNextTick = true;
|
||||
if (!canBeInGroups()) {
|
||||
data.group = new ElectricalGroup(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
return makeElectricityTooltip(tooltip, isPlayerSneaking);
|
||||
}
|
||||
@Override
|
||||
public boolean hasCustomMaterial() {
|
||||
return !TFMGBlocks.COPYCAT_CABLE_BASE.has(getMaterial());
|
||||
}
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LevelAccessor getLevelAccessor() {
|
||||
return level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean destroyed() {
|
||||
return data.destroyed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElectricalNetwork getOrCreateElectricNetwork() {
|
||||
if (level.getBlockEntity(BlockPos.of(data.electricalNetworkId)) instanceof IElectric) {
|
||||
return TFMG.NETWORK_MANAGER.getOrCreateNetworkFor((IElectric) level.getBlockEntity(BlockPos.of(data.electricalNetworkId)));
|
||||
} else {
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(data.electricalNetworkId);
|
||||
return TFMG.NETWORK_MANAGER.getOrCreateNetworkFor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lazyTick() {
|
||||
super.lazyTick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElectricBlockValues getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getPowerPercentage() {
|
||||
return powerPercentage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float resistance() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int voltageGeneration() {
|
||||
|
||||
int voltageGeneration = 0;
|
||||
|
||||
for (Direction direction : Direction.values()) {
|
||||
if (hasElectricitySlot(direction)) {
|
||||
|
||||
if (level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be)
|
||||
if (be.getData().getId() != getData().getId())
|
||||
if (be.getData().getVoltage() != 0)
|
||||
if (be.hasElectricitySlot(direction)) {
|
||||
voltageGeneration = Math.max(voltageGeneration, be.getOutputVoltage());
|
||||
data.getsOutsidePower = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (voltageGeneration == 0)
|
||||
data.getsOutsidePower = false;
|
||||
|
||||
return voltageGeneration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int powerGeneration() {
|
||||
|
||||
int powerGeneration = 0;
|
||||
|
||||
for (Direction direction : Direction.values()) {
|
||||
if (hasElectricitySlot(direction)) {
|
||||
|
||||
if (level.getBlockEntity(getBlockPos().relative(direction)) instanceof VoltageAlteringBlockEntity be) {
|
||||
if (be.getData().getId() != getData().getId())
|
||||
if (be.getData().getVoltage() != 0)
|
||||
if (be.hasElectricitySlot(direction)) {
|
||||
powerGeneration = Math.max(powerGeneration, be.getPowerUsage()) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return powerGeneration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int frequencyGeneration() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateNextTick() {
|
||||
data.updateNextTick = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateNetwork() {
|
||||
getOrCreateElectricNetwork().updateNetwork();
|
||||
if (!level.isClientSide)
|
||||
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new NetworkUpdatePacket(BlockPos.of(getPos())));
|
||||
sendData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStuff() {
|
||||
sendData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVoltage(int newVoltage) {
|
||||
|
||||
//if(this instanceof LightBulbBlockEntity be&&be.color == DyeColor.WHITE){
|
||||
// TFMG.LOGGER.debug("Rezistancja Grup "+data.group.resistance);
|
||||
//}
|
||||
|
||||
if (canBeInGroups()) {
|
||||
data.voltage = (int) (((float) resistance() / data.group.resistance) * (float) data.voltageSupply);
|
||||
return;
|
||||
}
|
||||
data.voltage = newVoltage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFrequency(int newFrequency) {
|
||||
data.frequency = newFrequency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetworkResistance(int newUsage) {
|
||||
data.networkResistance = newUsage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNetworkResistance() {
|
||||
return data.networkResistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWattage(int newWattage) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPowerPercentage(int percentage) {
|
||||
powerPercentage = percentage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetwork(long network) {
|
||||
this.data.electricalNetworkId = network;
|
||||
if (network != getPos())
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(getPos());
|
||||
}
|
||||
|
||||
public boolean networkUndersupplied() {
|
||||
return getNetworkPowerUsage() > data.networkPowerGeneration;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long getPos() {
|
||||
return getBlockPos().asLong();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
this.data.destroyed = true;
|
||||
for (Direction d : Direction.values()) {
|
||||
if (hasElectricitySlot(d))
|
||||
if (getLevelAccessor().getBlockEntity(BlockPos.of(getPos()).relative(d)) instanceof IElectric be && be.hasElectricitySlot(d.getOpposite())) {
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(be.getPos());
|
||||
be.setNetwork(be.getPos());
|
||||
be.onPlaced();
|
||||
be.updateNextTick();
|
||||
}
|
||||
}
|
||||
if (data.electricalNetworkId != getPos())
|
||||
getOrCreateElectricNetwork().getMembers().remove(this);
|
||||
|
||||
if (data.electricalNetworkId == getPos())
|
||||
ElectricNetworkManager.networks.get(getLevel())
|
||||
.remove(getData().getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (data.connectNextTick) {
|
||||
onPlaced();
|
||||
data.connectNextTick = false;
|
||||
}
|
||||
if (data.updateNextTick) {
|
||||
updateNetwork();
|
||||
data.updateNextTick = false;
|
||||
}
|
||||
if (data.setVoltageNextTick) {
|
||||
setVoltage(data.voltageSupply);
|
||||
data.setVoltageNextTick = false;
|
||||
}
|
||||
if(setNextTick) {
|
||||
setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
|
||||
setNextTick = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
|
||||
compound.putInt("GroupId", data.group.id);
|
||||
compound.putFloat("GroupResistance", data.group.resistance);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
// Validate Material
|
||||
if (getMaterial() != null && !clientPacket) {
|
||||
BlockState blockState = getBlockState();
|
||||
if (blockState == null)
|
||||
return;
|
||||
if (!(blockState.getBlock() instanceof CopycatBlock cb))
|
||||
return;
|
||||
BlockState acceptedBlockState = cb.getAcceptedBlockState(level, worldPosition, ItemStack.EMPTY, null);
|
||||
if (acceptedBlockState != null && getMaterial().is(acceptedBlockState.getBlock()))
|
||||
return;
|
||||
setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
|
||||
}
|
||||
|
||||
//
|
||||
data.group = new ElectricalGroup(compound.getInt("GroupId"));
|
||||
data.group.resistance = compound.getFloat("GroupResistance");
|
||||
if (!clientPacket)
|
||||
data.connectNextTick = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.drmangotea.tfmg.content.electricity.connection.copycat_cable;
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.content.decoration.copycat.CopycatSpecialCases;
|
||||
import com.simibubi.create.foundation.model.BakedModelHelper;
|
||||
import com.simibubi.create.foundation.model.BakedQuadHelper;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.resources.model.BakedModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.BlockAndTintGetter;
|
||||
import net.minecraft.world.level.block.DirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.client.model.data.ModelData;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CopycatCableBlockModel extends com.simibubi.create.content.decoration.copycat.CopycatModel {
|
||||
|
||||
protected static final AABB CUBE_AABB = new AABB(BlockPos.ZERO);
|
||||
|
||||
public CopycatCableBlockModel(BakedModel originalModel) {
|
||||
super(originalModel);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ModelData.Builder gatherModelData(ModelData.Builder builder, BlockAndTintGetter world, BlockPos pos, BlockState state, ModelData blockEntityData) {
|
||||
BlockState material = getMaterial(blockEntityData);
|
||||
if (material == null)
|
||||
return builder;
|
||||
|
||||
return super.gatherModelData(builder, world, pos, state, blockEntityData);
|
||||
}
|
||||
@Nullable
|
||||
public static BlockState getMaterial(ModelData data) {
|
||||
BlockState material = data == null ? null : data.get(MATERIAL_PROPERTY);
|
||||
return material == null ? TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState() : material;
|
||||
}
|
||||
@Override
|
||||
protected List<BakedQuad> getCroppedQuads(BlockState state, Direction side, RandomSource rand, BlockState material,
|
||||
ModelData wrappedData, RenderType renderType) {
|
||||
Direction facing = Direction.UP;
|
||||
BlockRenderDispatcher blockRenderer = Minecraft.getInstance()
|
||||
.getBlockRenderer();
|
||||
|
||||
BlockState specialCopycatModelState = null;
|
||||
//if (CopycatSpecialCases.isBarsMaterial(material))
|
||||
// specialCopycatModelState = AllBlocks.COPYCAT_BARS.getDefaultState();
|
||||
if (CopycatSpecialCases.isTrapdoorMaterial(material))
|
||||
return blockRenderer.getBlockModel(material)
|
||||
.getQuads(state, side, rand, wrappedData, renderType);
|
||||
|
||||
//if (specialCopycatModelState != null) {
|
||||
// BakedModel blockModel = blockRenderer
|
||||
// .getBlockModel(specialCopycatModelState.setValue(DirectionalBlock.FACING, facing));
|
||||
// if (blockModel instanceof AbstractCopycatCableModel cm)
|
||||
// return cm.getCroppedQuads(state, side, rand, material, wrappedData, renderType);
|
||||
//}
|
||||
|
||||
BakedModel model = getModelOf(material);
|
||||
List<BakedQuad> templateQuads = model.getQuads(material, side, rand, wrappedData, renderType);
|
||||
int size = templateQuads.size();
|
||||
|
||||
List<BakedQuad> quads = new ArrayList<>();
|
||||
|
||||
Vec3 normal = Vec3.atLowerCornerOf(facing.getNormal());
|
||||
Vec3 normalScaled16 = normal.scale(8 / 16f);
|
||||
|
||||
// 2 Pieces
|
||||
for (boolean front : Iterate.trueAndFalse) {
|
||||
Vec3 normalScaledN13 = normal.scale(front ? 0 : -0 / 16f);
|
||||
float contract = 16 - (8);
|
||||
AABB bb = CUBE_AABB.contract(normal.x * contract / 16, normal.y * contract / 16, normal.z * contract / 16);
|
||||
if (!front)
|
||||
bb = bb.move(normalScaled16);
|
||||
|
||||
for (BakedQuad quad : templateQuads) {
|
||||
Direction direction = quad.getDirection();
|
||||
|
||||
if (front && direction == facing)
|
||||
continue;
|
||||
if (!front && direction == facing.getOpposite())
|
||||
continue;
|
||||
|
||||
quads.add(BakedQuadHelper.cloneWithCustomGeometry(quad,
|
||||
BakedModelHelper.cropAndMove(quad.getVertices(), quad.getSprite(), bb, normalScaledN13)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return quads;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,29 +3,40 @@ package com.drmangotea.tfmg.content.electricity.debug;
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnection;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity;
|
||||
import com.drmangotea.tfmg.content.electricity.generators.GeneratorBlockEntity;
|
||||
import com.drmangotea.tfmg.content.electricity.storage.AccumulatorBlockEntity;
|
||||
import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.ElectricMotorBlockEntity;
|
||||
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
|
||||
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_stove.BlastStoveBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.metallurgy.casting_basin.CastingBasinBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.metallurgy.coke_oven.CokeOvenBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.misc.concrete_hose.ConcreteHoseBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.misc.vat_machines.base.VatBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.base.PumpjackBaseBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machinery.oil_processing.surface_scanner.SurfaceScannerBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGItems;
|
||||
import com.simibubi.create.content.fluids.FluidPropagator;
|
||||
import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity;
|
||||
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.protocol.game.DebugPackets;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.ticks.TickPriority;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.simibubi.create.content.fluids.pipes.FluidPipeBlock.isOpenAt;
|
||||
|
||||
public class DebugCinderBlockItem extends Item {
|
||||
public DebugCinderBlockItem(Properties p_41383_) {
|
||||
super(p_41383_);
|
||||
@@ -41,15 +52,41 @@ public class DebugCinderBlockItem extends Item {
|
||||
|
||||
BlockPos pos = context.getClickedPos();
|
||||
Level level = context.getLevel();
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be){
|
||||
be.updateRotation();
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if(level.getBlockEntity(pos) instanceof GeneratorBlockEntity be){
|
||||
be.updateStress();
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if(level.getBlockEntity(pos) instanceof ElectricMotorBlockEntity be){
|
||||
be.onPlaced();
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof ConcreteHoseBlockEntity be){
|
||||
|
||||
be.filler.reset();
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be){
|
||||
//be.testSigma();
|
||||
be.wiresUpdated();
|
||||
if(context.getPlayer().isShiftKeyDown()) {
|
||||
TFMG.LOGGER.debug("///////////////////////////////");
|
||||
for(CableConnection connection : be.connections) {
|
||||
TFMG.LOGGER.debug("Primary Pos "+connection.blockPos1.getX()+" "+connection.blockPos1.getY()+" "+connection.blockPos1.getZ());
|
||||
}
|
||||
TFMG.LOGGER.debug("///////////////////////////////");
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
TFMG.LOGGER.debug("///////////////////////////////");
|
||||
TFMG.LOGGER.debug("Connector Count "+be.getConnectedWires().size());
|
||||
TFMG.LOGGER.debug("Wire Count "+be.connections.size());
|
||||
TFMG.LOGGER.debug("Member Count "+be.getOrCreateElectricNetwork().members.size());
|
||||
TFMG.LOGGER.debug("Id "+"X "+BlockPos.of(be.getData().electricalNetworkId).getX()+" Y "+BlockPos.of(be.getData().electricalNetworkId).getY()+" Z "+BlockPos.of(be.getData().electricalNetworkId).getZ());
|
||||
TFMG.LOGGER.debug("///////////////////////////////");
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if(level.getBlockEntity(pos) instanceof IElectric be){
|
||||
@@ -61,7 +98,12 @@ public class DebugCinderBlockItem extends Item {
|
||||
TFMG.LOGGER.debug("Higherst Current "+be.getData().highestCurrent);
|
||||
TFMG.LOGGER.debug("Group "+be.getData().group.id);
|
||||
TFMG.LOGGER.debug("///////////////////////////////");
|
||||
}else be.updateNextTick();
|
||||
}else {
|
||||
|
||||
TFMGUtils.debugMessage(level, "Power "+be.getNetworkPowerUsage());
|
||||
TFMGUtils.debugMessage(level, "Voltage "+be.getData().getVoltage());
|
||||
|
||||
};
|
||||
}
|
||||
if(level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be){
|
||||
be.controller = be.getBlockPos();
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.drmangotea.tfmg.content.electricity.electrians_wrench;
|
||||
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
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.state.BlockState;
|
||||
|
||||
public class ElectricBlockItem extends BlockItem {
|
||||
public ElectricBlockItem(Block p_40565_, Properties p_40566_) {
|
||||
super(p_40565_, p_40566_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public InteractionResult place(BlockPlaceContext context) {
|
||||
Level level = context.getLevel();
|
||||
BlockPos pos = context.getClickedPos();
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof IElectric be&&be.canBeInGroups()){
|
||||
be.getData().group.id = context.getItemInHand().getOrCreateTag().getInt("Number");
|
||||
be.updateNextTick();
|
||||
be.sendStuff();
|
||||
}
|
||||
|
||||
return super.place(context);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,17 @@
|
||||
package com.drmangotea.tfmg.content.electricity.electrians_wrench;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ConnectNeightborsPacket;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.simibubi.create.content.equipment.symmetryWand.SymmetryWandScreen;
|
||||
import com.simibubi.create.foundation.gui.ScreenOpener;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
@@ -48,15 +53,24 @@ public class ElectriciansWrenchItem extends Item {
|
||||
Level level = context.getLevel();
|
||||
BlockPos pos = context.getClickedPos();
|
||||
|
||||
if(!context.getPlayer().isShiftKeyDown())
|
||||
if(level.getBlockEntity(pos) instanceof IElectric be){
|
||||
if(!context.getPlayer().isShiftKeyDown()) {
|
||||
if (level.getBlockEntity(pos) instanceof IElectric be && be.canBeInGroups()) {
|
||||
|
||||
be.getData().group.id = context.getItemInHand().getOrCreateTag().getInt("Number");
|
||||
|
||||
TFMGUtils.playSound(level, pos, SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, context.getPlayer());
|
||||
|
||||
be.updateNextTick();
|
||||
be.sendStuff();
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be ) {
|
||||
|
||||
be.changeDirection();
|
||||
return InteractionResult.SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return super.useOn(context);
|
||||
|
||||
@@ -2,18 +2,14 @@ package com.drmangotea.tfmg.content.electricity.lights;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ElectricBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
@@ -69,6 +65,22 @@ public class LightBulbBlockEntity extends ElectricBlockEntity {
|
||||
notifyUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void blockFail() {
|
||||
super.blockFail();
|
||||
TFMGUtils.playSound(level,getBlockPos(), SoundEvents.GLASS_BREAK, SoundSource.BLOCKS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxVoltage() {
|
||||
return 500;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxCurrent() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVoltage(int newVoltage) {
|
||||
super.setVoltage(newVoltage);
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.drmangotea.tfmg.content.electricity.lights.neon_tube;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.simibubi.create.content.contraptions.behaviour.dispenser.SimplePos;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
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.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.PipeBlock;
|
||||
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.BlockStateProperties;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class NeonTubeBlock extends PipeBlock implements IBE<NeonTubeBlockEntity>, IWrenchable {
|
||||
|
||||
public static final IntegerProperty LIGHT = LightBulbBlock.LIGHT;
|
||||
|
||||
public NeonTubeBlock(Properties p_55160_) {
|
||||
super(0.3125F/2.5f, p_55160_);
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(LIGHT, 0).setValue(NORTH, Boolean.valueOf(false)).setValue(EAST, Boolean.valueOf(false)).setValue(SOUTH, Boolean.valueOf(false)).setValue(WEST, Boolean.valueOf(false)).setValue(UP, Boolean.valueOf(true)).setValue(DOWN, Boolean.valueOf(true)));
|
||||
}
|
||||
public BlockState getStateForPlacement(BlockPlaceContext p_51709_) {
|
||||
return this.getStateForPlacement(p_51709_.getLevel(), p_51709_.getClickedPos());
|
||||
}
|
||||
public BlockState getStateForPlacement(BlockGetter p_51711_, BlockPos p_51712_) {
|
||||
BlockState blockstate = p_51711_.getBlockState(p_51712_.below());
|
||||
BlockState blockstate1 = p_51711_.getBlockState(p_51712_.above());
|
||||
BlockState blockstate2 = p_51711_.getBlockState(p_51712_.north());
|
||||
BlockState blockstate3 = p_51711_.getBlockState(p_51712_.east());
|
||||
BlockState blockstate4 = p_51711_.getBlockState(p_51712_.south());
|
||||
BlockState blockstate5 = p_51711_.getBlockState(p_51712_.west());
|
||||
return this.defaultBlockState().setValue(DOWN, Boolean.valueOf(blockstate.is(this) || blockstate.is(Blocks.CHORUS_FLOWER) || blockstate.is(Blocks.END_STONE))).setValue(UP, Boolean.valueOf(blockstate1.is(this) || blockstate1.is(Blocks.CHORUS_FLOWER))).setValue(NORTH, Boolean.valueOf(blockstate2.is(this) || blockstate2.is(Blocks.CHORUS_FLOWER))).setValue(EAST, Boolean.valueOf(blockstate3.is(this) || blockstate3.is(Blocks.CHORUS_FLOWER))).setValue(SOUTH, Boolean.valueOf(blockstate4.is(this) || blockstate4.is(Blocks.CHORUS_FLOWER))).setValue(WEST, Boolean.valueOf(blockstate5.is(this) || blockstate5.is(Blocks.CHORUS_FLOWER)));
|
||||
}
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_51735_) {
|
||||
p_51735_.add(NORTH, EAST, SOUTH, WEST, UP, DOWN,LIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
|
||||
Level level = context.getLevel();
|
||||
BlockPos pos = context.getClickedPos();
|
||||
Direction facing = context.getClickedFace();
|
||||
Vec3 position = context.getClickLocation();
|
||||
|
||||
TFMG.LOGGER.debug("X "+(position.x()-pos.getX())+" Y "+(position.y()-pos.getY())+" Z "+(position.z()-pos.getZ()));
|
||||
SimplePos clickPosition = new SimplePos(position.x()-pos.getX(),position.y()-pos.getY(),position.z()-pos.getZ());
|
||||
|
||||
Direction dirToToggle = Direction.NORTH;
|
||||
|
||||
if(clickPosition.x()>=0.375&&clickPosition.x()<=0.625&&clickPosition.y()>=0.375&&clickPosition.y()<=0.625&&clickPosition.z()>=0.375&&clickPosition.z()<=0.625){
|
||||
dirToToggle = facing;
|
||||
}
|
||||
|
||||
if(clickPosition.x()>0.625)
|
||||
dirToToggle = Direction.EAST;
|
||||
if(clickPosition.x()<0.375)
|
||||
dirToToggle = Direction.WEST;
|
||||
if(clickPosition.y()>0.625)
|
||||
dirToToggle = Direction.UP;
|
||||
if(clickPosition.y()<0.375)
|
||||
dirToToggle = Direction.DOWN;
|
||||
if(clickPosition.z()>0.625)
|
||||
dirToToggle = Direction.SOUTH;
|
||||
if(clickPosition.z()<0.375)
|
||||
dirToToggle = Direction.NORTH;
|
||||
|
||||
|
||||
|
||||
switch (dirToToggle){
|
||||
case UP -> level.setBlockAndUpdate(pos, state.setValue(UP,!state.getValue(UP)));
|
||||
case DOWN -> level.setBlockAndUpdate(pos, state.setValue(DOWN,!state.getValue(DOWN)));
|
||||
case WEST -> level.setBlockAndUpdate(pos, state.setValue(WEST,!state.getValue(WEST)));
|
||||
case EAST -> level.setBlockAndUpdate(pos, state.setValue(EAST,!state.getValue(EAST)));
|
||||
case NORTH -> level.setBlockAndUpdate(pos, state.setValue(NORTH,!state.getValue(NORTH)));
|
||||
case SOUTH -> level.setBlockAndUpdate(pos, state.setValue(SOUTH,!state.getValue(SOUTH)));
|
||||
}
|
||||
|
||||
withBlockEntityDo(level,pos, IElectric::onPlaced);
|
||||
|
||||
for(Direction direction : Direction.values()){
|
||||
if(level.getBlockEntity(pos.relative(direction)) instanceof IElectric be){
|
||||
be.onPlaced();
|
||||
}
|
||||
}
|
||||
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player player, InteractionHand pHand,
|
||||
BlockHitResult pHit) {
|
||||
if (player.isShiftKeyDown())
|
||||
return InteractionResult.PASS;
|
||||
ItemStack heldItem = player.getItemInHand(pHand);
|
||||
NeonTubeBlockEntity be = getBlockEntity(pLevel, pPos);
|
||||
DyeColor dye = DyeColor.getColor(heldItem);
|
||||
if (be != null) {
|
||||
if (dye != null) {
|
||||
pLevel.playSound(null, pPos, SoundEvents.DYE_USE, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
be.setColor(dye);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlace(BlockState state, Level level, BlockPos pos, BlockState p_60569_, boolean p_60570_) {
|
||||
|
||||
if(!p_60569_.is(TFMGBlocks.NEON_TUBE.get()))
|
||||
for(Direction facing : Direction.values()) {
|
||||
BlockState neighbourState = level.getBlockState(pos.relative(facing));
|
||||
TFMG.LOGGER.debug("A");
|
||||
if (neighbourState.is(TFMGBlocks.NEON_TUBE.get())) {
|
||||
level.setBlockAndUpdate(pos.relative(facing), neighbourState.setValue(PipeBlock.PROPERTY_BY_DIRECTION.get(facing.getOpposite()), true));
|
||||
TFMG.LOGGER.debug("B");
|
||||
}
|
||||
}
|
||||
withBlockEntityDo(level,pos, IElectric::onPlaced);
|
||||
super.onPlace(state, level, pos, p_60569_, p_60570_);
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
IBE.onRemove(state, level, pos, newState);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Class<NeonTubeBlockEntity> getBlockEntityClass() {
|
||||
return NeonTubeBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends NeonTubeBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.NEON_TUBE.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.drmangotea.tfmg.content.electricity.lights.neon_tube;
|
||||
|
||||
import com.drmangotea.tfmg.content.electricity.base.ElectricBlockEntity;
|
||||
import com.simibubi.create.foundation.utility.NBTHelper;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.level.block.PipeBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import static com.drmangotea.tfmg.content.electricity.lights.LightBulbBlock.LIGHT;
|
||||
|
||||
public class NeonTubeBlockEntity extends ElectricBlockEntity {
|
||||
|
||||
public DyeColor color= DyeColor.WHITE;
|
||||
|
||||
public LerpedFloat glow = LerpedFloat.linear();
|
||||
|
||||
public NeonTubeBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeInGroups() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
|
||||
glow.chase(getPowerUsage()*1.5, 0.4, LerpedFloat.Chaser.EXP);
|
||||
glow.tickChaser();
|
||||
if (Math.min(getData().getVoltage() / 10, 15) != getBlockState().getValue(LIGHT))
|
||||
level.setBlock(getBlockPos(), getBlockState().setValue(LIGHT, (int) Math.min(getData().getVoltage() / 10, 15)), 2);
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
NBTHelper.writeEnum(compound,"color",color);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
color = NBTHelper.readEnum(compound,"color",DyeColor.class);
|
||||
}
|
||||
public void setColor(DyeColor color) {
|
||||
if(color==DyeColor.BLACK||color == DyeColor.LIGHT_GRAY|| color == DyeColor.GRAY)
|
||||
return;
|
||||
|
||||
this.color = color;
|
||||
notifyUpdate();
|
||||
}
|
||||
@Override
|
||||
public boolean hasElectricitySlot(Direction direction) {
|
||||
return getBlockState().getValue(PipeBlock.PROPERTY_BY_DIRECTION.get(direction));
|
||||
}
|
||||
|
||||
@Override
|
||||
public float resistance() {
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.drmangotea.tfmg.content.electricity.lights.neon_tube;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.base.WallMountBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.RenderTypes;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.level.block.PipeBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
|
||||
public class NeonTubeRenderer extends SafeBlockEntityRenderer<NeonTubeBlockEntity> {
|
||||
|
||||
|
||||
public NeonTubeRenderer(BlockEntityRendererProvider.Context context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(NeonTubeBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {
|
||||
|
||||
|
||||
BlockState blockState = be.getBlockState();
|
||||
ms.pushPose();
|
||||
float glow = be.glow.getValue(partialTicks);
|
||||
int color = Math.min(100, (int) (glow / 0.2f));
|
||||
if (be.glow.getValue() != 0) {
|
||||
|
||||
SuperByteBuffer lightModel = CachedBufferer.partial(TFMGPartialModels.NEON_TUBE_LIGHT_CENTER, blockState)
|
||||
.light((int) glow * 3 + 40)
|
||||
.color(color, color, (int) (color * 0.8), 255)
|
||||
.disableDiffuse();
|
||||
|
||||
PipeBlock.PROPERTY_BY_DIRECTION.forEach((d, p) -> {
|
||||
if (blockState.getValue(p)) {
|
||||
|
||||
int xRotation = d.getAxis().isHorizontal() ? 90 : d == Direction.DOWN ? 180 : 0;
|
||||
int yRotation = 0;
|
||||
|
||||
if(d==Direction.NORTH)
|
||||
yRotation = 180;
|
||||
if(d==Direction.WEST)
|
||||
yRotation = 270;
|
||||
if(d==Direction.EAST)
|
||||
yRotation = 90;
|
||||
SuperByteBuffer sideModel = CachedBufferer.partial(TFMGPartialModels.NEON_TUBE_LIGHT_SIDE, blockState)
|
||||
.centre()
|
||||
.rotateY(yRotation)
|
||||
.rotateX(xRotation)
|
||||
.unCentre()
|
||||
.light((int) glow * 3 + 40)
|
||||
.color(color, color, (int) (color * 0.8), 255)
|
||||
.disableDiffuse();
|
||||
|
||||
|
||||
if (be.color == DyeColor.WHITE) {
|
||||
sideModel.color(color, color, (int) (color * 0.8), 255);
|
||||
} else sideModel.color(be.color.getTextColor());
|
||||
sideModel.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if (be.color == DyeColor.WHITE) {
|
||||
lightModel.color(color, color, (int) (color * 0.8), 255);
|
||||
} else lightModel.color(be.color.getTextColor());
|
||||
|
||||
lightModel.renderInto(ms, buffer.getBuffer(RenderTypes.getAdditive()));
|
||||
}
|
||||
ms.popPose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.drmangotea.tfmg.content.electricity.storage;
|
||||
|
||||
import com.drmangotea.tfmg.base.TFMGDirectionalBlock;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ConnectNeightborsPacket;
|
||||
import com.drmangotea.tfmg.content.electricity.base.IElectric;
|
||||
import com.drmangotea.tfmg.content.electricity.connection.cables.IHaveCables;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
@@ -15,11 +18,15 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
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.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.storage.loot.BuiltInLootTables;
|
||||
import net.minecraft.world.level.storage.loot.LootParams;
|
||||
@@ -31,17 +38,15 @@ import net.minecraftforge.network.PacketDistributor;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class AccumulatorBlock extends DirectionalBlock implements IBE<AccumulatorBlockEntity> {
|
||||
public class AccumulatorBlock extends TFMGDirectionalBlock implements IBE<AccumulatorBlockEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public AccumulatorBlock(Properties p_49795_) {
|
||||
super(p_49795_);
|
||||
|
||||
}
|
||||
|
||||
public BlockState getStateForPlacement(BlockPlaceContext pContext) {
|
||||
return this.defaultBlockState().setValue(FACING, pContext.getClickedFace());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
|
||||
@@ -69,20 +74,36 @@ public class AccumulatorBlock extends DirectionalBlock implements IBE<Accumulato
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlace(BlockState pState, Level level, BlockPos pos, BlockState pOldState, boolean pIsMoving) {
|
||||
withBlockEntityDo(level, pos, IElectric::onPlaced);
|
||||
public void onNeighborChange(BlockState state, LevelReader level, BlockPos pos, BlockPos neighbor) {
|
||||
|
||||
|
||||
withBlockEntityDo(level,pos,AccumulatorBlockEntity::refreshMultiblock);
|
||||
|
||||
super.onNeighborChange(state, level, pos, neighbor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlace(BlockState state, Level level, BlockPos pos, BlockState blockState1, boolean a) {
|
||||
|
||||
|
||||
withBlockEntityDo(level,pos, IElectric::onPlaced);
|
||||
withBlockEntityDo(level,pos,b->b.refreshNextTick =true);
|
||||
|
||||
super.onPlace(state, level, pos, blockState1, a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
for(Direction direction : Direction.values()){
|
||||
BlockPos neighborPos = pos.relative(direction);
|
||||
if(level.getBlockState(pos).is(TFMGBlocks.ACCUMULATOR.get()))
|
||||
withBlockEntityDo(level,neighborPos,AccumulatorBlockEntity::refreshMultiblock);
|
||||
//
|
||||
}
|
||||
IBE.onRemove(state, level, pos, newState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(FACING);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<AccumulatorBlockEntity> getBlockEntityClass() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user