版本:1.20.1-1.5.1-beta
(以下内容迁移自1.18.2) * 重绘了数字方块的材质(小喵绘制,本来是有阴影的,但是因为颜色层可能不兼容就去掉了阴影) * 数字方块的数字部分可以染色(不消耗染料),但是直接破坏会恢复为默认色(红色) * 变更了数字方块的Null块的合成(现在为8个石英加个红石)
|
|
@ -43,7 +43,7 @@ mod_name=Modern Life Patch
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=MIT
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.20.1-1.5.0-beta
|
mod_version=1.20.1-1.5.1-beta
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,16 @@
|
||||||
// 1.20.1 2025-02-22T12:37:42.6884778 Item Models: modernlifepatch
|
// 1.20.1 2025-05-03T19:59:50.2010966 Item Models: modernlifepatch
|
||||||
|
f3bfd5fc26d5405526c79c925a7c01db004b3c29 assets/modernlifepatch/models/item/eight_block.json
|
||||||
|
12fae55f55346fb9968dbae4fc1b4cf739bf09a0 assets/modernlifepatch/models/item/five_block.json
|
||||||
|
ab3a28dbd3340bfae8db4bf2a81024d212494a9b assets/modernlifepatch/models/item/four_block.json
|
||||||
1eabd9e17c204afaa5e461373e76704b469b1551 assets/modernlifepatch/models/item/large_mirror.json
|
1eabd9e17c204afaa5e461373e76704b469b1551 assets/modernlifepatch/models/item/large_mirror.json
|
||||||
ddf31e8377fca2bb97fef098a294a7473b56bd96 assets/modernlifepatch/models/item/massive_mirror.json
|
ddf31e8377fca2bb97fef098a294a7473b56bd96 assets/modernlifepatch/models/item/massive_mirror.json
|
||||||
bd757d611e2b5cac8731ae51b0b8ce0d77da80ae assets/modernlifepatch/models/item/mirror.json
|
bd757d611e2b5cac8731ae51b0b8ce0d77da80ae assets/modernlifepatch/models/item/mirror.json
|
||||||
|
d0cd2d7c36d45ad50879a40eef6dad753b3e4e67 assets/modernlifepatch/models/item/nine_block.json
|
||||||
|
41b9a4a3fd9d711b32dfc4b2a013ef96c15f0ec7 assets/modernlifepatch/models/item/null_block.json
|
||||||
|
07a65900f932dedc58164511624e1dd3338f1d64 assets/modernlifepatch/models/item/one_block.json
|
||||||
|
23bfb55fa9a6f92a2e9f55f623518f50a0d898c9 assets/modernlifepatch/models/item/seven_block.json
|
||||||
|
a92414e81c702ba0f96a56dc41fbac14edd55b19 assets/modernlifepatch/models/item/six_block.json
|
||||||
9d0fdb4d53d6cf9e86d1f98aeb9f23f9310a9ec7 assets/modernlifepatch/models/item/tall_mirror.json
|
9d0fdb4d53d6cf9e86d1f98aeb9f23f9310a9ec7 assets/modernlifepatch/models/item/tall_mirror.json
|
||||||
|
4e64adfeae281b2f249e98e4d98cadfcd2735975 assets/modernlifepatch/models/item/three_block.json
|
||||||
|
8fc30f0f91647f6d40c005e326d35f9fe61f8654 assets/modernlifepatch/models/item/two_block.json
|
||||||
|
4f5320fdf8549e158dd87a7e27a6b462580f6632 assets/modernlifepatch/models/item/zero_block.json
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
// 1.20.1 2025-03-24T10:47:19.6116707 Languages: zh_cn
|
// 1.20.1 2025-05-03T19:59:50.2079155 Languages: zh_cn
|
||||||
6aeaf89b678252a7560e5a569075edb0394582f9 assets/modernlifepatch/lang/zh_cn.json
|
a4c278a5e332696da1a21414831e7a90f5e7b8f8 assets/modernlifepatch/lang/zh_cn.json
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.1 2025-03-24T10:47:19.616683 Recipes
|
// 1.20.1 2025-05-03T19:59:50.2079155 Recipes
|
||||||
2f62b2d36534a48a65e8cfedc1e45ac3e0089ff9 data/minecraft/advancements/recipes/decorations/black_concrete_barrier_from_black_concrete_stonecutting.json
|
2f62b2d36534a48a65e8cfedc1e45ac3e0089ff9 data/minecraft/advancements/recipes/decorations/black_concrete_barrier_from_black_concrete_stonecutting.json
|
||||||
a888d18dbf22aa8b46a077bae7f6b717d9885572 data/minecraft/advancements/recipes/decorations/blue_concrete_barrier_from_blue_concrete_stonecutting.json
|
a888d18dbf22aa8b46a077bae7f6b717d9885572 data/minecraft/advancements/recipes/decorations/blue_concrete_barrier_from_blue_concrete_stonecutting.json
|
||||||
f0ed2368d1265cce94f7e843f4de55e328902ae6 data/minecraft/advancements/recipes/decorations/brown_concrete_barrier_from_brown_concrete_stonecutting.json
|
f0ed2368d1265cce94f7e843f4de55e328902ae6 data/minecraft/advancements/recipes/decorations/brown_concrete_barrier_from_brown_concrete_stonecutting.json
|
||||||
|
|
@ -105,15 +105,15 @@ de65a15aa31006a2ff1b14d47452b410a16ccf44 data/minecraft/recipes/two_block_from_n
|
||||||
620c5bea1a315f4f4d84274d74b2e07d21807b0e data/minecraft/recipes/zero_block_from_null_block_stonecutting.json
|
620c5bea1a315f4f4d84274d74b2e07d21807b0e data/minecraft/recipes/zero_block_from_null_block_stonecutting.json
|
||||||
829d226e46b965c74cdc812972e5e4a6feee89d3 data/modernlifepatch/advancements/recipes/decorations/large_mirror.json
|
829d226e46b965c74cdc812972e5e4a6feee89d3 data/modernlifepatch/advancements/recipes/decorations/large_mirror.json
|
||||||
9d1914bb2bddd1bbadd0b58f3f7e5eb992f984c8 data/modernlifepatch/advancements/recipes/decorations/massive_mirror.json
|
9d1914bb2bddd1bbadd0b58f3f7e5eb992f984c8 data/modernlifepatch/advancements/recipes/decorations/massive_mirror.json
|
||||||
|
b504244797d565ee02ab4775b5e05be332d918f4 data/modernlifepatch/advancements/recipes/decorations/null_block.json
|
||||||
94a737ff42179d0caaf7b0f73701fb8d1e54dd2a data/modernlifepatch/advancements/recipes/decorations/quartz_block_barrier.json
|
94a737ff42179d0caaf7b0f73701fb8d1e54dd2a data/modernlifepatch/advancements/recipes/decorations/quartz_block_barrier.json
|
||||||
b5ce34d4d0fc82adaf4fb0982d74dd8fd10a3f7f data/modernlifepatch/advancements/recipes/decorations/smooth_quartz_barrier.json
|
b5ce34d4d0fc82adaf4fb0982d74dd8fd10a3f7f data/modernlifepatch/advancements/recipes/decorations/smooth_quartz_barrier.json
|
||||||
1a1423565c4e8c9d2b2a4157c61ab00ea154e474 data/modernlifepatch/advancements/recipes/decorations/tall_mirror.json
|
1a1423565c4e8c9d2b2a4157c61ab00ea154e474 data/modernlifepatch/advancements/recipes/decorations/tall_mirror.json
|
||||||
e31f330892c0abe33cce7f858b1e2cb23125e29c data/modernlifepatch/advancements/recipes/misc/mirror.json
|
e31f330892c0abe33cce7f858b1e2cb23125e29c data/modernlifepatch/advancements/recipes/misc/mirror.json
|
||||||
50bbd11db7daa8589f9874aef9cc5643bb22098d data/modernlifepatch/advancements/recipes/misc/null_block.json
|
|
||||||
c7af367b61d30ea781a72a6a72e86677bc5b0136 data/modernlifepatch/recipes/large_mirror.json
|
c7af367b61d30ea781a72a6a72e86677bc5b0136 data/modernlifepatch/recipes/large_mirror.json
|
||||||
89bab02b61801049313724df763ab216dbf1f09c data/modernlifepatch/recipes/massive_mirror.json
|
89bab02b61801049313724df763ab216dbf1f09c data/modernlifepatch/recipes/massive_mirror.json
|
||||||
28133e9320816c3ffc37e11191f19dffd41da17c data/modernlifepatch/recipes/mirror.json
|
28133e9320816c3ffc37e11191f19dffd41da17c data/modernlifepatch/recipes/mirror.json
|
||||||
f8485dfe69854d05a945a18c579664c446aff5e1 data/modernlifepatch/recipes/null_block.json
|
aeb3920e4e64ff28b32009a08a6a66b5775af3e7 data/modernlifepatch/recipes/null_block.json
|
||||||
f1edaf2c9ee61959bd64bb7e35a717b41969d8b9 data/modernlifepatch/recipes/quartz_block_barrier.json
|
f1edaf2c9ee61959bd64bb7e35a717b41969d8b9 data/modernlifepatch/recipes/quartz_block_barrier.json
|
||||||
d2bcf4f75604965f615ad5fb5c4b496f85f0375f data/modernlifepatch/recipes/smooth_quartz_barrier.json
|
d2bcf4f75604965f615ad5fb5c4b496f85f0375f data/modernlifepatch/recipes/smooth_quartz_barrier.json
|
||||||
fc2a0f648922c5e671df5e33e7634c1a54c78739 data/modernlifepatch/recipes/tall_mirror.json
|
fc2a0f648922c5e671df5e33e7634c1a54c78739 data/modernlifepatch/recipes/tall_mirror.json
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.1 2025-03-24T10:47:19.616683 Block States: modernlifepatch
|
// 1.20.1 2025-05-03T19:59:50.2079155 Block States: modernlifepatch
|
||||||
6dcfec708d429da81fb2776dda9af3023908da59 assets/modernlifepatch/blockstates/black_concrete_barrier.json
|
6dcfec708d429da81fb2776dda9af3023908da59 assets/modernlifepatch/blockstates/black_concrete_barrier.json
|
||||||
e2016906e5c3589daac72c5cb7d603e4eeb6621f assets/modernlifepatch/blockstates/blue_concrete_barrier.json
|
e2016906e5c3589daac72c5cb7d603e4eeb6621f assets/modernlifepatch/blockstates/blue_concrete_barrier.json
|
||||||
4f993c3d5452903f0c09bdd60edfb01316c52ebb assets/modernlifepatch/blockstates/brown_concrete_barrier.json
|
4f993c3d5452903f0c09bdd60edfb01316c52ebb assets/modernlifepatch/blockstates/brown_concrete_barrier.json
|
||||||
|
|
@ -28,43 +28,32 @@ f78e6379e5cba21992fb16167c3650f8aa56bf76 assets/modernlifepatch/blockstates/six_
|
||||||
c4e8d556ce255d18da5a5c926bf3da963fb40f1a assets/modernlifepatch/blockstates/white_concrete_barrier.json
|
c4e8d556ce255d18da5a5c926bf3da963fb40f1a assets/modernlifepatch/blockstates/white_concrete_barrier.json
|
||||||
bea52888b9b32d9866643be4a99cd9802c1a1322 assets/modernlifepatch/blockstates/yellow_concrete_barrier.json
|
bea52888b9b32d9866643be4a99cd9802c1a1322 assets/modernlifepatch/blockstates/yellow_concrete_barrier.json
|
||||||
46e2bb42a836fa8abe826a976d00213e8497f251 assets/modernlifepatch/blockstates/zero_block.json
|
46e2bb42a836fa8abe826a976d00213e8497f251 assets/modernlifepatch/blockstates/zero_block.json
|
||||||
3f7c110f3ca64ad71c03387ece666fd09c5c28f1 assets/modernlifepatch/models/block/eight_block.json
|
2f926076a3a4c23c7fc7c4fbbdc9132a48e82f7d assets/modernlifepatch/models/block/eight_block.json
|
||||||
5be6a040d6c1ee37b87b0286363f8847bec2d7d3 assets/modernlifepatch/models/block/five_block.json
|
31fe4707fc9058e663a054a4b6d147911acfa0f2 assets/modernlifepatch/models/block/five_block.json
|
||||||
095a8d390b130bb6c1103ce588fe9377cc77c804 assets/modernlifepatch/models/block/four_block.json
|
16b0fab04755d905f9c483a8ce59ff066108277e assets/modernlifepatch/models/block/four_block.json
|
||||||
6d7f9714cfcc044e1eea0b2f30db1f6624f1b6e9 assets/modernlifepatch/models/block/nine_block.json
|
9f7d5b1e154d227e51774cda29f26eaa8350690e assets/modernlifepatch/models/block/nine_block.json
|
||||||
a968df7e821cd48cad613d2b4abebc4252bdb763 assets/modernlifepatch/models/block/null_block.json
|
5cf2ad128e41450c543ed5182cd0765991ffa057 assets/modernlifepatch/models/block/null_block.json
|
||||||
25b86b0e7165dbfcbf9bfc8d7a7ef0edceee6053 assets/modernlifepatch/models/block/one_block.json
|
7ebef25ff96f9fcce947336dd5cc76063531e173 assets/modernlifepatch/models/block/one_block.json
|
||||||
85987b934f60e11f19dc6f01f30c803a99daf1ba assets/modernlifepatch/models/block/seven_block.json
|
c4fc45ed94180cc064fe42463cfc9b2817cffc38 assets/modernlifepatch/models/block/seven_block.json
|
||||||
a3b73fae1741fdf8d7297c17460632cde69817e7 assets/modernlifepatch/models/block/six_block.json
|
1de734219c2beeb19d18df5590d193c9286d464e assets/modernlifepatch/models/block/six_block.json
|
||||||
37b0d19e0fdf4587857d9bbb26dde3027305c122 assets/modernlifepatch/models/block/three_block.json
|
e3ba2a282503d401c42e6a65671f786b7d32bc42 assets/modernlifepatch/models/block/three_block.json
|
||||||
8b96042da9c470fec37bbef2dc0e39f052dafe26 assets/modernlifepatch/models/block/two_block.json
|
8cb0ed20e4464c9d4fac84e3ab483e07ec517694 assets/modernlifepatch/models/block/two_block.json
|
||||||
203c3074c370b60b8d4d68578d7029f92c2b9801 assets/modernlifepatch/models/block/zero_block.json
|
3ad9375c5f770e97fd8f62725c317c0a7e7c0d85 assets/modernlifepatch/models/block/zero_block.json
|
||||||
507562e8509a8c83a4c2cebb4cbb682e94315ef4 assets/modernlifepatch/models/item/black_concrete_barrier.json
|
507562e8509a8c83a4c2cebb4cbb682e94315ef4 assets/modernlifepatch/models/item/black_concrete_barrier.json
|
||||||
fd17c7f34bb615f8113659d2f2c9b8e06d3bf0a3 assets/modernlifepatch/models/item/blue_concrete_barrier.json
|
fd17c7f34bb615f8113659d2f2c9b8e06d3bf0a3 assets/modernlifepatch/models/item/blue_concrete_barrier.json
|
||||||
31968e21ff06436df0828990e3521536a2997926 assets/modernlifepatch/models/item/brown_concrete_barrier.json
|
31968e21ff06436df0828990e3521536a2997926 assets/modernlifepatch/models/item/brown_concrete_barrier.json
|
||||||
b745fdc77b1c8f87e654ef81eca4e95a5672ab71 assets/modernlifepatch/models/item/cyan_concrete_barrier.json
|
b745fdc77b1c8f87e654ef81eca4e95a5672ab71 assets/modernlifepatch/models/item/cyan_concrete_barrier.json
|
||||||
8f29bc3a55da94cc0447981fd0f9fc2a4bf31b1c assets/modernlifepatch/models/item/eight_block.json
|
|
||||||
68a75e3443076e627278ebb32ae8f4e4d8f6dd41 assets/modernlifepatch/models/item/five_block.json
|
|
||||||
4185461b86ab61e91a508228ed03ac4b90a39086 assets/modernlifepatch/models/item/four_block.json
|
|
||||||
b3e601ef38191f0e5c23a41145c1e280244b673d assets/modernlifepatch/models/item/gray_concrete_barrier.json
|
b3e601ef38191f0e5c23a41145c1e280244b673d assets/modernlifepatch/models/item/gray_concrete_barrier.json
|
||||||
84a0567e3f014560778f924f2b8d8c9fd4c7f93f assets/modernlifepatch/models/item/green_concrete_barrier.json
|
84a0567e3f014560778f924f2b8d8c9fd4c7f93f assets/modernlifepatch/models/item/green_concrete_barrier.json
|
||||||
3c734794d9c1fcf7664bb9d3faeef5d4d1ee298e assets/modernlifepatch/models/item/light_blue_concrete_barrier.json
|
3c734794d9c1fcf7664bb9d3faeef5d4d1ee298e assets/modernlifepatch/models/item/light_blue_concrete_barrier.json
|
||||||
53d8a0955735f262b6209005567f590a716163e1 assets/modernlifepatch/models/item/light_gray_concrete_barrier.json
|
53d8a0955735f262b6209005567f590a716163e1 assets/modernlifepatch/models/item/light_gray_concrete_barrier.json
|
||||||
88adeb6343ab5e6e36658df72cc8e8e82be4dcaa assets/modernlifepatch/models/item/lime_concrete_barrier.json
|
88adeb6343ab5e6e36658df72cc8e8e82be4dcaa assets/modernlifepatch/models/item/lime_concrete_barrier.json
|
||||||
0fb4649f0b6b149e79e111b2bd59e04a92ee34ac assets/modernlifepatch/models/item/magenta_concrete_barrier.json
|
0fb4649f0b6b149e79e111b2bd59e04a92ee34ac assets/modernlifepatch/models/item/magenta_concrete_barrier.json
|
||||||
c043971dd5e167cba09647250a66ab7eefa2a97a assets/modernlifepatch/models/item/nine_block.json
|
|
||||||
95740eec66e6a3db5e62602774c342057842591d assets/modernlifepatch/models/item/null_block.json
|
|
||||||
64679ea5f6830197b8e895618b7717d189335680 assets/modernlifepatch/models/item/one_block.json
|
|
||||||
6e55165c8604cb1fff47a9a1b5ab1af60620b274 assets/modernlifepatch/models/item/orange_concrete_barrier.json
|
6e55165c8604cb1fff47a9a1b5ab1af60620b274 assets/modernlifepatch/models/item/orange_concrete_barrier.json
|
||||||
8f8d499631adf1fb5c8344e4f9534b7309ba2c5d assets/modernlifepatch/models/item/pink_concrete_barrier.json
|
8f8d499631adf1fb5c8344e4f9534b7309ba2c5d assets/modernlifepatch/models/item/pink_concrete_barrier.json
|
||||||
3cbaeb4fe8b2afa39d5abb0cc9b3ec959ac8ee16 assets/modernlifepatch/models/item/purple_concrete_barrier.json
|
3cbaeb4fe8b2afa39d5abb0cc9b3ec959ac8ee16 assets/modernlifepatch/models/item/purple_concrete_barrier.json
|
||||||
98d40fd38a81284295147a39f429e809565d9b3c assets/modernlifepatch/models/item/quartz_block_barrier.json
|
98d40fd38a81284295147a39f429e809565d9b3c assets/modernlifepatch/models/item/quartz_block_barrier.json
|
||||||
864d1685c60fcdaca3825e7d05af6eff438cf9cb assets/modernlifepatch/models/item/red_concrete_barrier.json
|
864d1685c60fcdaca3825e7d05af6eff438cf9cb assets/modernlifepatch/models/item/red_concrete_barrier.json
|
||||||
1ae02ba84d6831857ea6a483fba5fb10145c795f assets/modernlifepatch/models/item/seven_block.json
|
|
||||||
9b0c86cd54cf9c0fa28ae721a646e15342521d74 assets/modernlifepatch/models/item/six_block.json
|
|
||||||
461bbfab1e521e5450df4dad7cd3a64d84299db7 assets/modernlifepatch/models/item/smooth_quartz_barrier.json
|
461bbfab1e521e5450df4dad7cd3a64d84299db7 assets/modernlifepatch/models/item/smooth_quartz_barrier.json
|
||||||
675cb937d8a7037f06d59647fb075490eb03c616 assets/modernlifepatch/models/item/three_block.json
|
|
||||||
ae1e95a89db61abc03cf8c1a3db6ba11b0f6af9e assets/modernlifepatch/models/item/two_block.json
|
|
||||||
1feb32683f4f57640577fccf962c04ab48c2ce9d assets/modernlifepatch/models/item/white_concrete_barrier.json
|
1feb32683f4f57640577fccf962c04ab48c2ce9d assets/modernlifepatch/models/item/white_concrete_barrier.json
|
||||||
9c3f0791c55bc96bbb9123a1024258053ead327a assets/modernlifepatch/models/item/yellow_concrete_barrier.json
|
9c3f0791c55bc96bbb9123a1024258053ead327a assets/modernlifepatch/models/item/yellow_concrete_barrier.json
|
||||||
ef3b0767abf21d61065a01fc2e4e651c6e967b37 assets/modernlifepatch/models/item/zero_block.json
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
// 1.20.1 2025-03-24T10:47:19.616683 Languages: en_us
|
// 1.20.1 2025-05-03T19:59:50.2236791 Languages: en_us
|
||||||
9203b3022dbbabf42c979cb473e76db411d65928 assets/modernlifepatch/lang/en_us.json
|
1c37169f53ac69857962e56f36baddc4708ec4a3 assets/modernlifepatch/lang/en_us.json
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,8 @@
|
||||||
"modernlifepatch.lang.motorboat.hover_text.3": "Refuel by using a gas can on the deployed boat",
|
"modernlifepatch.lang.motorboat.hover_text.3": "Refuel by using a gas can on the deployed boat",
|
||||||
"modernlifepatch.lang.need_rs_power_turn_off.hover_text.0": "Requires redstone power to turn off",
|
"modernlifepatch.lang.need_rs_power_turn_off.hover_text.0": "Requires redstone power to turn off",
|
||||||
"modernlifepatch.lang.need_rs_power_turn_on.hover_text.0": "Requires redstone power to turn on",
|
"modernlifepatch.lang.need_rs_power_turn_on.hover_text.0": "Requires redstone power to turn on",
|
||||||
|
"modernlifepatch.lang.number_block.hover_text.1": "The number on the block defaults to red and can be recolored using dyes.",
|
||||||
|
"modernlifepatch.lang.number_block.hover_text.2": "Can be converted into other numbers via a Stonecutter.",
|
||||||
"modernlifepatch.lang.paved_road.hover_text.0": "Slightly increases movement speed of vehicles",
|
"modernlifepatch.lang.paved_road.hover_text.0": "Slightly increases movement speed of vehicles",
|
||||||
"modernlifepatch.lang.photocopier.hover_text.1": "Interact with a canvas or photograph to make copies",
|
"modernlifepatch.lang.photocopier.hover_text.1": "Interact with a canvas or photograph to make copies",
|
||||||
"modernlifepatch.lang.photocopier.hover_text.2": " * Requires paper",
|
"modernlifepatch.lang.photocopier.hover_text.2": " * Requires paper",
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,8 @@
|
||||||
"modernlifepatch.lang.motorboat.hover_text.3": "对船使用汽油罐来加油",
|
"modernlifepatch.lang.motorboat.hover_text.3": "对船使用汽油罐来加油",
|
||||||
"modernlifepatch.lang.need_rs_power_turn_off.hover_text.0": "需要红石充能才能关闭",
|
"modernlifepatch.lang.need_rs_power_turn_off.hover_text.0": "需要红石充能才能关闭",
|
||||||
"modernlifepatch.lang.need_rs_power_turn_on.hover_text.0": "需要红石充能才能开启",
|
"modernlifepatch.lang.need_rs_power_turn_on.hover_text.0": "需要红石充能才能开启",
|
||||||
|
"modernlifepatch.lang.number_block.hover_text.1": "数字方块数字颜色默认为红色,可以通过使用染料来改变其颜色。",
|
||||||
|
"modernlifepatch.lang.number_block.hover_text.2": "数字方块可以通过切石机换成其它数字。",
|
||||||
"modernlifepatch.lang.paved_road.hover_text.0": "载具在该路上行驶,移速会有所提升",
|
"modernlifepatch.lang.paved_road.hover_text.0": "载具在该路上行驶,移速会有所提升",
|
||||||
"modernlifepatch.lang.photocopier.hover_text.1": "可以用于照片或画作的复制",
|
"modernlifepatch.lang.photocopier.hover_text.1": "可以用于照片或画作的复制",
|
||||||
"modernlifepatch.lang.photocopier.hover_text.2": " * 需要纸",
|
"modernlifepatch.lang.photocopier.hover_text.2": " * 需要纸",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/eight_block"
|
"number": "modernlifepatch:block/number/eight_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/five_block"
|
"number": "modernlifepatch:block/number/five_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/four_block"
|
"number": "modernlifepatch:block/number/four_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/nine_block"
|
"number": "modernlifepatch:block/number/nine_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/null_block"
|
"number": "modernlifepatch:block/number/null_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/one_block"
|
"number": "modernlifepatch:block/number/one_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/seven_block"
|
"number": "modernlifepatch:block/number/seven_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/six_block"
|
"number": "modernlifepatch:block/number/six_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/three_block"
|
"number": "modernlifepatch:block/number/three_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/two_block"
|
"number": "modernlifepatch:block/number/two_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:block/cube_all",
|
"parent": "modernlifepatch:block/number_block",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "modernlifepatch:block/zero_block"
|
"number": "modernlifepatch:block/number/zero_block_layer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/eight_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/eight_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/five_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/five_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/four_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/four_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/nine_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/nine_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/null_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/null_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/one_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/one_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/seven_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/seven_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/six_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/six_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/three_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/three_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/two_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/two_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "modernlifepatch:block/zero_block"
|
"parent": "modernlifepatch:item/number_block_item",
|
||||||
|
"textures": {
|
||||||
|
"number": "modernlifepatch:block/number/zero_block_layer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:recipes/root",
|
"parent": "minecraft:recipes/root",
|
||||||
"criteria": {
|
"criteria": {
|
||||||
"has_red_dye": {
|
"has_quartz": {
|
||||||
"conditions": {
|
"conditions": {
|
||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"items": [
|
"items": [
|
||||||
"minecraft:red_dye"
|
"minecraft:quartz"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"requirements": [
|
"requirements": [
|
||||||
[
|
[
|
||||||
"has_red_dye",
|
"has_quartz",
|
||||||
"has_the_recipe"
|
"has_the_recipe"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
@ -3,39 +3,16 @@
|
||||||
"category": "misc",
|
"category": "misc",
|
||||||
"key": {
|
"key": {
|
||||||
"#": {
|
"#": {
|
||||||
"item": "minecraft:white_dye"
|
"item": "minecraft:quartz"
|
||||||
},
|
},
|
||||||
"$": {
|
"@": {
|
||||||
"item": "minecraft:red_dye"
|
"item": "minecraft:red_concrete_powder"
|
||||||
},
|
}
|
||||||
"@": [
|
|
||||||
{
|
|
||||||
"item": "minecraft:stone"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:granite"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:diorite"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:andesite"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:deepslate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:calcite"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "minecraft:tuff"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"#$#",
|
"###",
|
||||||
"$@$",
|
"#@#",
|
||||||
"#$#"
|
"###"
|
||||||
],
|
],
|
||||||
"result": {
|
"result": {
|
||||||
"count": 2,
|
"count": 2,
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,20 @@ package com.r3944realms.modernlifepatch;
|
||||||
import com.r3944realms.modernlifepatch.client.blockentity.MirrorBlockEntityRenderer;
|
import com.r3944realms.modernlifepatch.client.blockentity.MirrorBlockEntityRenderer;
|
||||||
import com.r3944realms.modernlifepatch.client.event.CreativeScreenEvents;
|
import com.r3944realms.modernlifepatch.client.event.CreativeScreenEvents;
|
||||||
import com.r3944realms.modernlifepatch.client.render.BlockOutlineRenderer;
|
import com.r3944realms.modernlifepatch.client.render.BlockOutlineRenderer;
|
||||||
|
import com.r3944realms.modernlifepatch.client.render.color.blockColor.NumberBlockColorHandler;
|
||||||
|
import com.r3944realms.modernlifepatch.client.render.color.itemColor.NumberBlockItemColorHandler;
|
||||||
import com.r3944realms.modernlifepatch.client.render.outline.RampOutlineRenderer;
|
import com.r3944realms.modernlifepatch.client.render.outline.RampOutlineRenderer;
|
||||||
|
import com.r3944realms.modernlifepatch.content.blocks.ModBlocks;
|
||||||
import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType;
|
import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType;
|
||||||
|
import com.r3944realms.modernlifepatch.content.item.ModItems;
|
||||||
import com.r3944realms.modernlifepatch.data.SpecialHitBoxBlockType;
|
import com.r3944realms.modernlifepatch.data.SpecialHitBoxBlockType;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.color.block.BlockColors;
|
||||||
|
import net.minecraft.client.color.item.ItemColors;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.client.event.EntityRenderersEvent;
|
import net.minecraftforge.client.event.EntityRenderersEvent;
|
||||||
|
import net.minecraftforge.client.event.RegisterColorHandlersEvent;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||||
|
|
@ -28,7 +36,9 @@ public abstract class ClientEventHandler {
|
||||||
});
|
});
|
||||||
if(ModernLifePatch.isModernLifeLoaded) {
|
if(ModernLifePatch.isModernLifeLoaded) {
|
||||||
MinecraftForge.EVENT_BUS.register(new CreativeScreenEvents());
|
MinecraftForge.EVENT_BUS.register(new CreativeScreenEvents());
|
||||||
BlockOutlineRenderer.registerOutlineRender(SpecialHitBoxBlockType.RAMP, new RampOutlineRenderer());
|
event.enqueueWork(() -> {
|
||||||
|
BlockOutlineRenderer.registerOutlineRender(SpecialHitBoxBlockType.RAMP, new RampOutlineRenderer());
|
||||||
|
});
|
||||||
MinecraftForge.EVENT_BUS.addListener(BlockOutlineRenderer::onRenderBlockHighlight);
|
MinecraftForge.EVENT_BUS.addListener(BlockOutlineRenderer::onRenderBlockHighlight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -36,5 +46,40 @@ public abstract class ClientEventHandler {
|
||||||
public static void onRegisterRenderer (EntityRenderersEvent.RegisterRenderers event) {
|
public static void onRegisterRenderer (EntityRenderersEvent.RegisterRenderers event) {
|
||||||
event.registerBlockEntityRenderer(ModBlockEntityType.MIRROR.get(), MirrorBlockEntityRenderer::new);
|
event.registerBlockEntityRenderer(ModBlockEntityType.MIRROR.get(), MirrorBlockEntityRenderer::new);
|
||||||
}
|
}
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void registerBlockColorHandler(RegisterColorHandlersEvent.Block event) {
|
||||||
|
event.register(
|
||||||
|
new NumberBlockColorHandler(),
|
||||||
|
ModBlocks.NULL_BLOCK.get(),
|
||||||
|
ModBlocks.ONE_BLOCK.get(),
|
||||||
|
ModBlocks.TWO_BLOCK.get(),
|
||||||
|
ModBlocks.THREE_BLOCK.get(),
|
||||||
|
ModBlocks.FOUR_BLOCK.get(),
|
||||||
|
ModBlocks.FIVE_BLOCK.get(),
|
||||||
|
ModBlocks.SIX_BLOCK.get(),
|
||||||
|
ModBlocks.SEVEN_BLOCK.get(),
|
||||||
|
ModBlocks.EIGHT_BLOCK.get(),
|
||||||
|
ModBlocks.NINE_BLOCK.get(),
|
||||||
|
ModBlocks.ZERO_BLOCK.get()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void registerItemColorHandler(RegisterColorHandlersEvent.Item event) {
|
||||||
|
event.register(
|
||||||
|
new NumberBlockItemColorHandler(),
|
||||||
|
ModItems.NULL_BLOCK_ITEM.get(),
|
||||||
|
ModItems.ZERO_BLOCK_ITEM.get(),
|
||||||
|
ModItems.ONE_BLOCK_ITEM.get(),
|
||||||
|
ModItems.TWO_BLOCK_ITEM.get(),
|
||||||
|
ModItems.THREE_BLOCK_ITEM.get(),
|
||||||
|
ModItems.FOUR_BLOCK_ITEM.get(),
|
||||||
|
ModItems.FIVE_BLOCK_ITEM.get(),
|
||||||
|
ModItems.SIX_BLOCK_ITEM.get(),
|
||||||
|
ModItems.SEVEN_BLOCK_ITEM.get(),
|
||||||
|
ModItems.EIGHT_BLOCK_ITEM.get(),
|
||||||
|
ModItems.NINE_BLOCK_ITEM.get()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.r3944realms.modernlifepatch.client.render.color;
|
||||||
|
|
||||||
|
import com.google.common.collect.BiMap;
|
||||||
|
import com.google.common.collect.HashBiMap;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public final class ColorSharedData {
|
||||||
|
public static Map<Integer, DyeColor> COLORS;
|
||||||
|
private static void init() {
|
||||||
|
DyeColor[] dyeColors = DyeColor.values();
|
||||||
|
BiMap<Integer, DyeColor> objectObjectHashMap = HashBiMap.create(dyeColors.length);
|
||||||
|
for (DyeColor dyeColor : dyeColors) {
|
||||||
|
objectObjectHashMap.put(dyeColor.getTextColor(), dyeColor);
|
||||||
|
}
|
||||||
|
COLORS = Maps.unmodifiableBiMap(objectObjectHashMap);
|
||||||
|
}
|
||||||
|
static {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
public static Map<Integer, DyeColor> getColorBiMap() {
|
||||||
|
return COLORS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getColor(DyeColor dyeColor) {
|
||||||
|
return Objects.requireNonNullElse(dyeColor, DyeColor.RED).getTextColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.r3944realms.modernlifepatch.client.render.color.blockColor;
|
||||||
|
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public interface BlockColor extends net.minecraft.client.color.block.BlockColor {
|
||||||
|
default int getColor(DyeColor dyeColor) {
|
||||||
|
return Objects.requireNonNullElse(dyeColor, DyeColor.RED).getTextColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.r3944realms.modernlifepatch.client.render.color.blockColor;
|
||||||
|
|
||||||
|
import com.r3944realms.modernlifepatch.content.blocks.entities.type.custom.NumberBlockEntity;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
import net.minecraft.world.level.BlockAndTintGetter;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class NumberBlockColorHandler implements BlockColor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getColor(@NotNull BlockState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos, int tintIndex) {
|
||||||
|
if (tintIndex == 0) {
|
||||||
|
if(level != null && pos != null) {
|
||||||
|
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||||
|
if (blockEntity instanceof NumberBlockEntity numberBlock) {
|
||||||
|
return getColor(numberBlock.getBlockColor());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getColor(DyeColor.RED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.r3944realms.modernlifepatch.client.render.color.itemColor;
|
||||||
|
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public interface ItemColor extends net.minecraft.client.color.item.ItemColor {
|
||||||
|
default int getColor(DyeColor dyeColor) {
|
||||||
|
return Objects.requireNonNullElse(dyeColor, DyeColor.RED).getTextColor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.r3944realms.modernlifepatch.client.render.color.itemColor;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
|
public class NumberBlockItemColorHandler implements ItemColor{
|
||||||
|
@Override
|
||||||
|
public int getColor(@NotNull ItemStack pStack, int pTintIndex) {
|
||||||
|
if (pTintIndex == 0) {
|
||||||
|
AtomicReference<DyeColor> color = new AtomicReference<>();
|
||||||
|
CompoundTag tag = pStack.getTag();Optional.ofNullable(tag)
|
||||||
|
.map(i -> i.contains("BlockEntityTag") ? i.getCompound("BlockEntityTag") : null)
|
||||||
|
.map(i -> i.contains("b_color") ? i.getString("b_color") : null)
|
||||||
|
.map(i -> DyeColor.byName(i, DyeColor.RED)).ifPresent(color::set);
|
||||||
|
return color.get() == null ? getColor(DyeColor.RED) : getColor(color.get());
|
||||||
|
}
|
||||||
|
return getColor(DyeColor.RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,9 @@ import com.r3944realms.modernlifepatch.content.blocks.type.NumberBlock;
|
||||||
import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorBlock;
|
import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorBlock;
|
||||||
import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart;
|
import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart;
|
||||||
import com.r3944realms.modernlifepatch.content.item.ModItems;
|
import com.r3944realms.modernlifepatch.content.item.ModItems;
|
||||||
|
import com.r3944realms.modernlifepatch.content.item.type.NumberBlockItem;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
|
@ -93,6 +95,9 @@ public class ModBlocks {
|
||||||
public static <T extends Block> RegistryObject<BlockItem> registerBlockItem(String name , RegistryObject<T> block){
|
public static <T extends Block> RegistryObject<BlockItem> registerBlockItem(String name , RegistryObject<T> block){
|
||||||
return ModItems.register(name,() -> new BlockItem(block.get(),new Item.Properties()));
|
return ModItems.register(name,() -> new BlockItem(block.get(),new Item.Properties()));
|
||||||
}
|
}
|
||||||
|
public static <T extends Block> RegistryObject<BlockItem> registerNumberBlockItem(String name , RegistryObject<T> block){
|
||||||
|
return ModItems.register(name,() -> new NumberBlockItem(block.get(),new Item.Properties()));
|
||||||
|
}
|
||||||
public static Collection<RegistryObject<Block>> getEntries() {
|
public static Collection<RegistryObject<Block>> getEntries() {
|
||||||
return BLOCKS.getEntries();
|
return BLOCKS.getEntries();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.r3944realms.modernlifepatch.content.blocks.entities;
|
||||||
|
|
||||||
import com.r3944realms.modernlifepatch.ModernLifePatch;
|
import com.r3944realms.modernlifepatch.ModernLifePatch;
|
||||||
import com.r3944realms.modernlifepatch.content.blocks.ModBlocks;
|
import com.r3944realms.modernlifepatch.content.blocks.ModBlocks;
|
||||||
|
import com.r3944realms.modernlifepatch.content.blocks.entities.type.custom.NumberBlockEntity;
|
||||||
import com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror.MirrorBlockEntity;
|
import com.r3944realms.modernlifepatch.content.blocks.entities.type.mirror.MirrorBlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
|
|
@ -17,6 +18,9 @@ public class ModBlockEntityType {
|
||||||
@SuppressWarnings("DataFlowIssue")
|
@SuppressWarnings("DataFlowIssue")
|
||||||
public static final RegistryObject<BlockEntityType<MirrorBlockEntity>> MIRROR
|
public static final RegistryObject<BlockEntityType<MirrorBlockEntity>> MIRROR
|
||||||
= BLOCK_ENTITY_TYPE.register("mirror", () -> new BlockEntityType<>(MirrorBlockEntity::new, Set.of(ModBlocks.MIRROR.get()), null));
|
= BLOCK_ENTITY_TYPE.register("mirror", () -> new BlockEntityType<>(MirrorBlockEntity::new, Set.of(ModBlocks.MIRROR.get()), null));
|
||||||
|
@SuppressWarnings("DataFlowIssue")
|
||||||
|
public static final RegistryObject<BlockEntityType<NumberBlockEntity>> NUMBER_BLOCK
|
||||||
|
= BLOCK_ENTITY_TYPE.register("number_block", () -> new BlockEntityType<>(NumberBlockEntity::new, Set.of(ModBlocks.NULL_BLOCK.get(), ModBlocks.ONE_BLOCK.get(), ModBlocks.TWO_BLOCK.get(), ModBlocks.THREE_BLOCK.get(), ModBlocks.FOUR_BLOCK.get(), ModBlocks.FIVE_BLOCK.get(), ModBlocks.SIX_BLOCK.get(), ModBlocks.SEVEN_BLOCK.get(), ModBlocks.EIGHT_BLOCK.get(), ModBlocks.NINE_BLOCK.get(), ModBlocks.ZERO_BLOCK.get()), null));
|
||||||
public static void register(IEventBus bus) {
|
public static void register(IEventBus bus) {
|
||||||
BLOCK_ENTITY_TYPE.register(bus);
|
BLOCK_ENTITY_TYPE.register(bus);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.r3944realms.modernlifepatch.content.blocks.entities.type.custom;
|
||||||
|
|
||||||
|
import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.network.Connection;
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
|
public class NumberBlockEntity extends BlockEntity {
|
||||||
|
public DyeColor blockColor;
|
||||||
|
public NumberBlockEntity(BlockPos pPos, BlockState pBlockState) {
|
||||||
|
super(ModBlockEntityType.NUMBER_BLOCK.get(), pPos, pBlockState);
|
||||||
|
}
|
||||||
|
public void setBlockColor(DyeColor pColor) {
|
||||||
|
this.blockColor = pColor;
|
||||||
|
setChanged(); // 标记数据需要保存
|
||||||
|
if (level != null && !level.isClientSide()) {
|
||||||
|
level.sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public DyeColor getBlockColor() {
|
||||||
|
return Objects.requireNonNullElse(this.blockColor, DyeColor.RED);
|
||||||
|
}
|
||||||
|
public int getBlockColorInt() {
|
||||||
|
return getBlockColor().getTextColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// NBT 序列化
|
||||||
|
@Override
|
||||||
|
public void load(@NotNull CompoundTag tag) {
|
||||||
|
super.load(tag);
|
||||||
|
if (tag.contains("b_color")) {
|
||||||
|
blockColor = DyeColor.byName(tag.getString("b_color"), DyeColor.RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAdditional(@NotNull CompoundTag tag) {
|
||||||
|
super.saveAdditional(tag);
|
||||||
|
tag.putString("b_color", getBlockColor().getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ClientboundBlockEntityDataPacket getUpdatePacket() {
|
||||||
|
return ClientboundBlockEntityDataPacket.create(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull CompoundTag getUpdateTag() {
|
||||||
|
CompoundTag tag = super.getUpdateTag();
|
||||||
|
saveAdditional(tag);
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) {
|
||||||
|
if (level != null && level.isClientSide) {
|
||||||
|
load(Objects.requireNonNull(pkt.getTag())); // 加载接收到的 NBT 数据
|
||||||
|
level.sendBlockUpdated(worldPosition, getBlockState(), getBlockState(), Block.UPDATE_ALL); // 触发客户端重绘
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,28 @@
|
||||||
package com.r3944realms.modernlifepatch.content.blocks.type;
|
package com.r3944realms.modernlifepatch.content.blocks.type;
|
||||||
|
|
||||||
|
import com.r3944realms.modernlifepatch.content.blocks.entities.type.custom.NumberBlockEntity;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResult;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.DyeColor;
|
||||||
|
import net.minecraft.world.item.DyeItem;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
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.Block;
|
||||||
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class NumberBlock extends HorizontalDirectionalBlock {
|
public class NumberBlock extends HorizontalDirectionalBlock implements EntityBlock {
|
||||||
public NumberBlock(Properties pProperties) {
|
public NumberBlock(Properties pProperties) {
|
||||||
super(pProperties);
|
super(pProperties);
|
||||||
}
|
}
|
||||||
|
|
@ -19,5 +35,41 @@ public class NumberBlock extends HorizontalDirectionalBlock {
|
||||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
|
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
|
||||||
pBuilder.add(FACING);
|
pBuilder.add(FACING);
|
||||||
}
|
}
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public BlockEntity newBlockEntity(@NotNull BlockPos pPos, @NotNull BlockState pState) {
|
||||||
|
return new NumberBlockEntity(pPos, pState);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public @NotNull InteractionResult use(@NotNull BlockState state, Level level, @NotNull BlockPos pos, @NotNull Player player,
|
||||||
|
@NotNull InteractionHand hand, @NotNull BlockHitResult hit) {
|
||||||
|
if (!level.isClientSide && hand == InteractionHand.MAIN_HAND) {
|
||||||
|
ItemStack stack = player.getItemInHand(hand);
|
||||||
|
if (stack.getItem() instanceof DyeItem dyeItem) {
|
||||||
|
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||||
|
if (blockEntity instanceof NumberBlockEntity numberBlock) {
|
||||||
|
DyeColor dyeColor = dyeItem.getDyeColor();
|
||||||
|
numberBlock.setBlockColor(dyeColor);
|
||||||
|
return InteractionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return InteractionResult.PASS;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void setPlacedBy(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state, @Nullable LivingEntity placer, @NotNull ItemStack stack) {
|
||||||
|
super.setPlacedBy(level, pos, state, placer, stack);
|
||||||
|
if (level.isClientSide) return; // 仅服务端执行
|
||||||
|
// 读取物品的 BlockEntityTag
|
||||||
|
CompoundTag tag = stack.getTagElement("BlockEntityTag");
|
||||||
|
if (tag != null) {
|
||||||
|
BlockEntity blockEntity = level.getBlockEntity(pos);
|
||||||
|
if (blockEntity instanceof NumberBlockEntity myBE) {
|
||||||
|
// 将 BlockEntityTag 的数据加载到方块实体
|
||||||
|
myBE.load(tag);
|
||||||
|
myBE.setChanged(); // 标记数据变更
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,17 +39,17 @@ public class ModItems {
|
||||||
public static final RegistryObject<BlockItem> QUARTZ_BLOCK_BARRIER = ModBlocks.registerBlockItem("quartz_block_barrier", ModBlocks.QUARTZ_BLOCK_BARRIER);
|
public static final RegistryObject<BlockItem> QUARTZ_BLOCK_BARRIER = ModBlocks.registerBlockItem("quartz_block_barrier", ModBlocks.QUARTZ_BLOCK_BARRIER);
|
||||||
public static final RegistryObject<BlockItem> SMOOTH_QUARTZ_BARRIER = ModBlocks.registerBlockItem("smooth_quartz_barrier", ModBlocks.SMOOTH_QUARTZ_BARRIER);
|
public static final RegistryObject<BlockItem> SMOOTH_QUARTZ_BARRIER = ModBlocks.registerBlockItem("smooth_quartz_barrier", ModBlocks.SMOOTH_QUARTZ_BARRIER);
|
||||||
//NUMBER
|
//NUMBER
|
||||||
public static final RegistryObject<BlockItem> NULL_BLOCK_ITEM = ModBlocks.registerBlockItem("null_block", ModBlocks.NULL_BLOCK);
|
public static final RegistryObject<BlockItem> NULL_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("null_block", ModBlocks.NULL_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> ONE_BLOCK_ITEM = ModBlocks.registerBlockItem("one_block", ModBlocks.ONE_BLOCK);
|
public static final RegistryObject<BlockItem> ONE_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("one_block", ModBlocks.ONE_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> TWO_BLOCK_ITEM = ModBlocks.registerBlockItem("two_block", ModBlocks.TWO_BLOCK);
|
public static final RegistryObject<BlockItem> TWO_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("two_block", ModBlocks.TWO_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> THREE_BLOCK_ITEM = ModBlocks.registerBlockItem("three_block", ModBlocks.THREE_BLOCK);
|
public static final RegistryObject<BlockItem> THREE_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("three_block", ModBlocks.THREE_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> FOUR_BLOCK_ITEM = ModBlocks.registerBlockItem("four_block", ModBlocks.FOUR_BLOCK);
|
public static final RegistryObject<BlockItem> FOUR_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("four_block", ModBlocks.FOUR_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> FIVE_BLOCK_ITEM = ModBlocks.registerBlockItem("five_block", ModBlocks.FIVE_BLOCK);
|
public static final RegistryObject<BlockItem> FIVE_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("five_block", ModBlocks.FIVE_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> SIX_BLOCK_ITEM = ModBlocks.registerBlockItem("six_block", ModBlocks.SIX_BLOCK);
|
public static final RegistryObject<BlockItem> SIX_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("six_block", ModBlocks.SIX_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> SEVEN_BLOCK_ITEM = ModBlocks.registerBlockItem("seven_block", ModBlocks.SEVEN_BLOCK);
|
public static final RegistryObject<BlockItem> SEVEN_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("seven_block", ModBlocks.SEVEN_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> EIGHT_BLOCK_ITEM = ModBlocks.registerBlockItem("eight_block", ModBlocks.EIGHT_BLOCK);
|
public static final RegistryObject<BlockItem> EIGHT_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("eight_block", ModBlocks.EIGHT_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> NINE_BLOCK_ITEM = ModBlocks.registerBlockItem("nine_block", ModBlocks.NINE_BLOCK);
|
public static final RegistryObject<BlockItem> NINE_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("nine_block", ModBlocks.NINE_BLOCK);
|
||||||
public static final RegistryObject<BlockItem> ZERO_BLOCK_ITEM = ModBlocks.registerBlockItem("zero_block", ModBlocks.ZERO_BLOCK);
|
public static final RegistryObject<BlockItem> ZERO_BLOCK_ITEM = ModBlocks.registerNumberBlockItem("zero_block", ModBlocks.ZERO_BLOCK);
|
||||||
public static RegistryObject<BlockItem> register(String name, Supplier<? extends BlockItem> sup) {
|
public static RegistryObject<BlockItem> register(String name, Supplier<? extends BlockItem> sup) {
|
||||||
return ITEMS.register(name, sup);
|
return ITEMS.register(name, sup);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.r3944realms.modernlifepatch.content.item.type;
|
||||||
|
|
||||||
|
import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.item.BlockItem;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class NumberBlockItem extends BlockItem {
|
||||||
|
public NumberBlockItem(Block pBlock, Properties pProperties) {
|
||||||
|
super(pBlock, pProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void appendHoverText(@NotNull ItemStack pStack, @Nullable Level pLevel, @NotNull List<Component> pTooltip, @NotNull TooltipFlag pFlag) {
|
||||||
|
pTooltip.add(Component.translatable(ModLangKeyValue.NUMBER_BLOCK_ITEM_HOVER_ONE.getKey()));
|
||||||
|
pTooltip.add(Component.translatable(ModLangKeyValue.NUMBER_BLOCK_ITEM_HOVER_TWO.getKey()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -194,7 +194,9 @@ public enum ModLangKeyValue {
|
||||||
NINE_BLOCK_ITEM(getItemKey(ModItems.NINE_BLOCK_ITEM.get()), "Nine", "九"),
|
NINE_BLOCK_ITEM(getItemKey(ModItems.NINE_BLOCK_ITEM.get()), "Nine", "九"),
|
||||||
NINE_BLOCK(getBlockKey(ModBlocks.NINE_BLOCK.get()), copyEnglish(NINE_BLOCK_ITEM), copySimpleChinese(NINE_BLOCK_ITEM)),
|
NINE_BLOCK(getBlockKey(ModBlocks.NINE_BLOCK.get()), copyEnglish(NINE_BLOCK_ITEM), copySimpleChinese(NINE_BLOCK_ITEM)),
|
||||||
ZERO_BLOCK_ITEM(getItemKey(ModItems.ZERO_BLOCK_ITEM.get()), "Zero", "零"),
|
ZERO_BLOCK_ITEM(getItemKey(ModItems.ZERO_BLOCK_ITEM.get()), "Zero", "零"),
|
||||||
ZERO_BLOCK(getBlockKey(ModBlocks.ZERO_BLOCK.get()), copyEnglish(ZERO_BLOCK_ITEM), copySimpleChinese(ZERO_BLOCK_ITEM))
|
ZERO_BLOCK(getBlockKey(ModBlocks.ZERO_BLOCK.get()), copyEnglish(ZERO_BLOCK_ITEM), copySimpleChinese(ZERO_BLOCK_ITEM)),
|
||||||
|
NUMBER_BLOCK_ITEM_HOVER_ONE(getHoverTextKey("number_block", "1"), "The number on the block defaults to red and can be recolored using dyes.", "数字方块数字颜色默认为红色,可以通过使用染料来改变其颜色。"),
|
||||||
|
NUMBER_BLOCK_ITEM_HOVER_TWO(getHoverTextKey("number_block", "2"), "Can be converted into other numbers via a Stonecutter.", "数字方块可以通过切石机换成其它数字。"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,10 @@ public class ModBlockStatesProvider extends BlockStateProvider {
|
||||||
registerNumberStates(ModBlocks.ZERO_BLOCK.get(), "zero");
|
registerNumberStates(ModBlocks.ZERO_BLOCK.get(), "zero");
|
||||||
}
|
}
|
||||||
public void registerNumberStates(Block block, String number) {
|
public void registerNumberStates(Block block, String number) {
|
||||||
BlockModelBuilder numberBlock = models().cubeAll(number + "_block", new ResourceLocation(ModernLifePatch.MOD_ID, "block/" + number + "_block"));
|
BlockModelBuilder numberBlock = models()
|
||||||
|
.withExistingParent(number + "_block", new ResourceLocation(ModernLifePatch.MOD_ID, "block/number_block"))
|
||||||
|
.texture("number", new ResourceLocation(ModernLifePatch.MOD_ID, "block/number/"+ number + "_block_layer"));
|
||||||
horizontalBlock(block, numberBlock);
|
horizontalBlock(block, numberBlock);
|
||||||
simpleBlockItem(block, numberBlock);
|
|
||||||
}
|
}
|
||||||
public void registerBarrierStates(Block block, ResourceLocation location) {
|
public void registerBarrierStates(Block block, ResourceLocation location) {
|
||||||
ModelFile.ExistingModelFile existingFile = models().getExistingFile(location);
|
ModelFile.ExistingModelFile existingFile = models().getExistingFile(location);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.r3944realms.modernlifepatch.ModernLifePatch;
|
||||||
import com.r3944realms.modernlifepatch.content.item.ModItems;
|
import com.r3944realms.modernlifepatch.content.item.ModItems;
|
||||||
import net.minecraft.data.PackOutput;
|
import net.minecraft.data.PackOutput;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||||
|
|
@ -13,6 +14,7 @@ import java.util.Objects;
|
||||||
|
|
||||||
public class ModItemModelProvider extends ItemModelProvider {
|
public class ModItemModelProvider extends ItemModelProvider {
|
||||||
public static final String GENERATED = "item/generated";
|
public static final String GENERATED = "item/generated";
|
||||||
|
public static final ResourceLocation NUMBER_BLOCK_ITEM = new ResourceLocation(ModernLifePatch.MOD_ID, "item/number_block_item");
|
||||||
public ModItemModelProvider(PackOutput packOutput, ExistingFileHelper existingFileHelper) {
|
public ModItemModelProvider(PackOutput packOutput, ExistingFileHelper existingFileHelper) {
|
||||||
super(packOutput, ModernLifePatch.MOD_ID, existingFileHelper);
|
super(packOutput, ModernLifePatch.MOD_ID, existingFileHelper);
|
||||||
}
|
}
|
||||||
|
|
@ -23,8 +25,22 @@ public class ModItemModelProvider extends ItemModelProvider {
|
||||||
itemGeneratedModel(ModItems.TALL_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/tall_mirror_item"));
|
itemGeneratedModel(ModItems.TALL_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/tall_mirror_item"));
|
||||||
itemGeneratedModel(ModItems.LARGE_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/large_mirror_item"));
|
itemGeneratedModel(ModItems.LARGE_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/large_mirror_item"));
|
||||||
itemGeneratedModel(ModItems.MASSIVE_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/massive_mirror_item"));
|
itemGeneratedModel(ModItems.MASSIVE_MIRROR_ITEM.get(), new ResourceLocation(ModernLifePatch.MOD_ID, "item/massive_mirror_item"));
|
||||||
|
numberBlockGeneratedModel(ModItems.NULL_BLOCK_ITEM.get(), "null");
|
||||||
|
numberBlockGeneratedModel(ModItems.ZERO_BLOCK_ITEM.get(), "zero");
|
||||||
|
numberBlockGeneratedModel(ModItems.ONE_BLOCK_ITEM.get(), "one");
|
||||||
|
numberBlockGeneratedModel(ModItems.TWO_BLOCK_ITEM.get(), "two");
|
||||||
|
numberBlockGeneratedModel(ModItems.THREE_BLOCK_ITEM.get(), "three");
|
||||||
|
numberBlockGeneratedModel(ModItems.FOUR_BLOCK_ITEM.get(), "four");
|
||||||
|
numberBlockGeneratedModel(ModItems.FIVE_BLOCK_ITEM.get(), "five");
|
||||||
|
numberBlockGeneratedModel(ModItems.SIX_BLOCK_ITEM.get(), "six");
|
||||||
|
numberBlockGeneratedModel(ModItems.SEVEN_BLOCK_ITEM.get(), "seven");
|
||||||
|
numberBlockGeneratedModel(ModItems.EIGHT_BLOCK_ITEM.get(), "eight");
|
||||||
|
numberBlockGeneratedModel(ModItems.NINE_BLOCK_ITEM.get(), "nine");
|
||||||
|
}
|
||||||
|
public void numberBlockGeneratedModel(BlockItem bite, String number) {
|
||||||
|
withExistingParent(itemName(bite), NUMBER_BLOCK_ITEM)
|
||||||
|
.texture("number", new ResourceLocation(ModernLifePatch.MOD_ID, "block/number/"+ number + "_block_layer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void itemGeneratedModel(Item item, ResourceLocation texture) {
|
public void itemGeneratedModel(Item item, ResourceLocation texture) {
|
||||||
withExistingParent(itemName(item), GENERATED).texture("layer0", texture);
|
withExistingParent(itemName(item), GENERATED).texture("layer0", texture);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,16 +92,16 @@ public class ModRecipeProvider extends RecipeProvider {
|
||||||
.pattern("@")
|
.pattern("@")
|
||||||
.unlockedBy("has_item_quartz_slab", has(Items.QUARTZ_SLAB))
|
.unlockedBy("has_item_quartz_slab", has(Items.QUARTZ_SLAB))
|
||||||
.save(pWriter);
|
.save(pWriter);
|
||||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.NULL_BLOCK_ITEM.get(), 2)
|
ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS,ModItems.NULL_BLOCK_ITEM.get(), 2)
|
||||||
.define('#', Items.WHITE_DYE)
|
.define('#', Items.QUARTZ)
|
||||||
.define('$', Items.RED_DYE)
|
.define('@', Items.REDSTONE)
|
||||||
.define('@', Ingredient.of(Items.STONE, Items.GRANITE, Items.DIORITE, Items.ANDESITE, Items.DEEPSLATE, Items.CALCITE, Items.TUFF))
|
.pattern("###")
|
||||||
.pattern("#$#")
|
.pattern("#@#")
|
||||||
.pattern("$@$")
|
.pattern("###")
|
||||||
.pattern("#$#")
|
.unlockedBy("has_quartz",has(Items.QUARTZ))
|
||||||
.unlockedBy("has_red_dye",has(Items.RED_DYE))
|
|
||||||
.save(pWriter);
|
.save(pWriter);
|
||||||
|
|
||||||
|
|
||||||
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.NULL_BLOCK_ITEM.get())
|
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.NULL_BLOCK_ITEM.get())
|
||||||
.requires(ModItems.NULL_BLOCK_ITEM.get())
|
.requires(ModItems.NULL_BLOCK_ITEM.get())
|
||||||
.unlockedBy("has_null_block", has(ModItems.NULL_BLOCK_ITEM.get()))
|
.unlockedBy("has_null_block", has(ModItems.NULL_BLOCK_ITEM.get()))
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"render_type": "cutout",
|
||||||
|
"textures": {
|
||||||
|
"number": "block/2",
|
||||||
|
"particle": "modernlifepatch:block/number/number_block_background",
|
||||||
|
"background": "modernlifepatch:block/number/number_block_background"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "texture": "#background"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"textures": {
|
||||||
|
"number": "item/0",
|
||||||
|
"background": "modernlifepatch:block/number/number_block_background"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "texture": "#background"},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "texture": "#background"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"up": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0},
|
||||||
|
"down": {"uv": [0, 0, 16, 16], "texture": "#number", "tintindex": 0}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"gui_light": "front",
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"rotation": [55, 46, 0],
|
||||||
|
"translation": [0, 0, -1.25],
|
||||||
|
"scale": [0.25, 0.25, 0.25]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"rotation": [55, 45, 0],
|
||||||
|
"translation": [0, 0, -1.25],
|
||||||
|
"scale": [0.25, 0.25, 0.25]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [0, 27, 0],
|
||||||
|
"translation": [0, 2.5, 0],
|
||||||
|
"scale": [0.25, 0.25, 0.25]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"rotation": [0, -65, 0],
|
||||||
|
"translation": [0.75, 2.5, 0],
|
||||||
|
"scale": [0.25, 0.25, 0.25]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"rotation": [8, 0, 0],
|
||||||
|
"translation": [0.5, 1.5, 0],
|
||||||
|
"scale": [0.25, 0.25, 0.25]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [20, -33, 0],
|
||||||
|
"scale": [0.6, 0.6, 0.6]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 150 B |
|
After Width: | Height: | Size: 172 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 229 B |
|
After Width: | Height: | Size: 144 B |
|
After Width: | Height: | Size: 169 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 169 B |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 175 B |