From 16a290ea57b3b19094bedf655b513978757d89e6 Mon Sep 17 00:00:00 2001 From: Lithewings <2631810335@qq.com> Date: Sun, 21 Jul 2024 22:36:02 +0800 Subject: [PATCH] =?UTF-8?q?Merge=20remote-tracking=20branch=20'origin/mast?= =?UTF-8?q?er=E2=80=94'=20into=20master=E2=80=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../684a20b6ff997062e678180dff3c571444f18410 | 2 + .../8ce55c2d46c78681d7eebf7cad72e9c2de67a045 | 40 -- .../com/equilibrium/ITimeCraftPlayer.java | 25 ++ .../java/com/equilibrium/MITEequilibrium.java | 46 +++ .../MITEequilibriumDataGenerator.java | 7 +- .../block/TheCraftingTableBlock.java | 57 +++ .../com/equilibrium/block/TheFurnace.java | 187 +++++++++ .../block/UnderworldPortalBlock.java | 5 - .../blockentity/TheFurnaceEntity.java | 59 +++ .../com/equilibrium/config/CommonConfig.java | 176 ++++++++ .../java/com/equilibrium/config/Config.java | 63 +++ .../equilibrium/constant/ConstantString.java | 9 + .../entity/goal/AdvanceEscapeDangerGoal.java | 113 ++++++ .../equilibrium/event/BreakBlockEvent.java | 26 +- .../gen/ModLanguageTranslatorZhCn.java | 35 ++ .../java/com/equilibrium/item/ModItems.java | 5 - .../color/LightmapTextureManagerMixin.java | 1 - .../crafttime/MixinClientPlayerEntity.java | 111 +++++ .../mixin/crafttime/MixinCraftingScreen.java | 149 +++++++ .../mixin/crafttime/MixinInventoryScreen.java | 93 +++++ .../mixin/crafttime/ScreenHandlerMixin.java | 102 +++++ .../mixin/entitymixin/CowEntityMixin.java | 160 ++++++++ .../mixin/loot_table/BlockLootTableMixin.java | 40 -- .../oreGenerator/OreGeneratorModifiy.java | 294 ++++++++++++++ .../mixin/player/ClientPlayerEntityMixin.java | 29 ++ .../{ => player}/HungerManagerMixin.java | 4 +- .../mixin/{ => player}/PlayerEntityMixin.java | 70 +++- .../{ => player}/PlayerManagerMixin.java | 22 +- .../{ => portal}/AbstractFireBlockMixin.java | 2 +- .../mixin/{ => portal}/EnderEyeItemMixin.java | 2 +- .../{ => portal}/NetherPortalBlockMixin.java | 124 +++++- .../mixin/{ => portal}/NetherPortalMixin.java | 42 +- .../mixin/{ => portal}/PortalForcerMixin.java | 9 +- .../com/equilibrium/mixin/recipeModifier.java | 91 +++++ .../mixin/render/DebugHudMixin.java | 319 +++++++++++++++ .../mixin/{ => render}/InGameHudMixin.java | 7 +- .../{ => render}/WorldRendererMixin.java | 2 +- ...oncentricRingsStructurePlacementMixin.java | 2 +- .../StrongholdGeneratorMixin.java | 2 +- .../StrongholdGeneratorStartMixin.java | 2 +- .../tables/AbstractFurnaceEntityMixin.java | 382 ++++++++++++++++++ .../tables/CraftingScreenHandlerMixin.java | 342 ++++++++++++++++ .../mixin/tables/PlayerManagerMixin.java | 22 + .../tables/PlayerScreenHandlerAccessor.java | 12 + .../tables/PlayerScreenHandlerMixin.java | 123 ++++++ .../register/BlockEnityRegistry.java | 29 ++ .../com/equilibrium/register/BlockInit.java | 83 ++++ .../com/equilibrium/register/UseBlock.java | 40 ++ .../equilibrium/sound/SoundEventRegistry.java | 10 + .../equilibrium/util/ChangePortalColor.java | 22 + .../util/CraftingDifficultyHelper.java | 99 +++++ .../com/equilibrium/util/CreativeGroup.java | 33 ++ .../equilibrium/util/LootTableModifier.java | 40 +- .../util/PlayerMaxHealthHelper.java | 2 - .../util/PlayerMaxHungerHelper.java | 6 - .../com/equilibrium/util/ShouldSentText.java | 7 + .../util/WorldMoonPhasesSelector.java | 2 - .../com/equilibrium/util/WorldTimeHelper.java | 13 +- .../worklevel/CraftingIngredient.java | 9 + .../worklevel/CraftingIngredients.java | 66 +++ .../worklevel/FurnaceIngredient.java | 10 + .../worklevel/FurnaceIngredients.java | 54 +++ .../blockstates/clay_furnace.json | 12 + .../blockstates/copper_crafting_table.json | 5 + .../blockstates/diamond_crafting_table.json | 5 + .../blockstates/flint_crafting_table.json | 5 + .../blockstates/iron_crafting_table.json | 5 + .../blockstates/netherite_crafting_table.json | 5 + .../blockstates/netherrack_furnace.json | 12 + .../blockstates/obsidian_furnace.json | 12 + .../assets/miteequilibrium/lang/en_us.json | 30 +- .../assets/miteequilibrium/lang/zh_cn.json | 33 +- .../models/block/clay_furnace.json | 8 + .../models/block/clay_furnace_on.json | 8 + .../models/block/copper_crafting_table.json | 12 + .../models/block/diamond_crafting_table.json | 12 + .../models/block/flint_crafting_table.json | 12 + .../models/block/iron_crafting_table.json | 12 + .../block/netherite_crafting_table.json | 12 + .../models/block/netherrack_furnace.json | 8 + .../models/block/netherrack_furnace_on.json | 8 + .../models/block/obsidian_furnace.json | 8 + .../models/block/obsidian_furnace_on.json | 8 + .../models/item/clay_furnace.json | 3 + .../models/item/copper_crafting_table.json | 3 + .../models/item/diamond_crafting_table.json | 3 + .../models/item/flint_crafting_table.json | 3 + .../models/item/iron_crafting_table.json | 3 + .../models/item/netherite_crafting_table.json | 3 + .../models/item/netherrack_furnace.json | 3 + .../models/item/obsidian_furnace.json | 3 + .../assets/miteequilibrium/sounds/finish.ogg | Bin 0 -> 20761 bytes .../block/crafting_table/copper/front.png | Bin 0 -> 433 bytes .../block/crafting_table/copper/side.png | Bin 0 -> 408 bytes .../block/crafting_table/copper/top.png | Bin 0 -> 1823 bytes .../block/crafting_table/diamond/front.png | Bin 0 -> 1991 bytes .../block/crafting_table/diamond/side.png | Bin 0 -> 1952 bytes .../block/crafting_table/diamond/top.png | Bin 0 -> 1826 bytes .../block/crafting_table/flint/top.png | Bin 0 -> 546 bytes .../block/crafting_table/iron/front.png | Bin 0 -> 432 bytes .../block/crafting_table/iron/side.png | Bin 0 -> 407 bytes .../block/crafting_table/iron/top.png | Bin 0 -> 1852 bytes .../block/crafting_table/netherite/front.png | Bin 0 -> 1982 bytes .../block/crafting_table/netherite/side.png | Bin 0 -> 1953 bytes .../block/crafting_table/netherite/top.png | Bin 0 -> 1816 bytes .../textures/block/furnace/clay/front.png | Bin 0 -> 747 bytes .../textures/block/furnace/clay/front_on.png | Bin 0 -> 706 bytes .../textures/block/furnace/clay/side.png | Bin 0 -> 689 bytes .../textures/block/furnace/clay/top.png | Bin 0 -> 661 bytes .../block/furnace/netherrack/front.png | Bin 0 -> 806 bytes .../block/furnace/netherrack/front_on.png | Bin 0 -> 753 bytes .../block/furnace/netherrack/side.png | Bin 0 -> 791 bytes .../textures/block/furnace/netherrack/top.png | Bin 0 -> 735 bytes .../textures/block/furnace/obsidian/front.png | Bin 0 -> 539 bytes .../block/furnace/obsidian/front_on.png | Bin 0 -> 530 bytes .../textures/block/furnace/obsidian/side.png | Bin 0 -> 527 bytes .../textures/block/furnace/obsidian/top.png | Bin 0 -> 492 bytes .../textures/gui/crafting_table.png | Bin 0 -> 2077 bytes .../textures/gui/inventory.png | Bin 0 -> 2128 bytes .../resources/miteequilibrium.mixins.json | 44 +- src/main/resources/name.accesswidener | 21 +- 121 files changed, 4058 insertions(+), 203 deletions(-) create mode 100644 src/main/generated/.cache/684a20b6ff997062e678180dff3c571444f18410 delete mode 100644 src/main/generated/.cache/8ce55c2d46c78681d7eebf7cad72e9c2de67a045 create mode 100644 src/main/java/com/equilibrium/ITimeCraftPlayer.java create mode 100644 src/main/java/com/equilibrium/block/TheCraftingTableBlock.java create mode 100644 src/main/java/com/equilibrium/block/TheFurnace.java create mode 100644 src/main/java/com/equilibrium/blockentity/TheFurnaceEntity.java create mode 100644 src/main/java/com/equilibrium/config/CommonConfig.java create mode 100644 src/main/java/com/equilibrium/config/Config.java create mode 100644 src/main/java/com/equilibrium/constant/ConstantString.java create mode 100644 src/main/java/com/equilibrium/entity/goal/AdvanceEscapeDangerGoal.java create mode 100644 src/main/java/com/equilibrium/gen/ModLanguageTranslatorZhCn.java create mode 100644 src/main/java/com/equilibrium/mixin/crafttime/MixinClientPlayerEntity.java create mode 100644 src/main/java/com/equilibrium/mixin/crafttime/MixinCraftingScreen.java create mode 100644 src/main/java/com/equilibrium/mixin/crafttime/MixinInventoryScreen.java create mode 100644 src/main/java/com/equilibrium/mixin/crafttime/ScreenHandlerMixin.java create mode 100644 src/main/java/com/equilibrium/mixin/entitymixin/CowEntityMixin.java create mode 100644 src/main/java/com/equilibrium/mixin/oreGenerator/OreGeneratorModifiy.java create mode 100644 src/main/java/com/equilibrium/mixin/player/ClientPlayerEntityMixin.java rename src/main/java/com/equilibrium/mixin/{ => player}/HungerManagerMixin.java (95%) rename src/main/java/com/equilibrium/mixin/{ => player}/PlayerEntityMixin.java (81%) rename src/main/java/com/equilibrium/mixin/{ => player}/PlayerManagerMixin.java (55%) rename src/main/java/com/equilibrium/mixin/{ => portal}/AbstractFireBlockMixin.java (97%) rename src/main/java/com/equilibrium/mixin/{ => portal}/EnderEyeItemMixin.java (98%) rename src/main/java/com/equilibrium/mixin/{ => portal}/NetherPortalBlockMixin.java (56%) rename src/main/java/com/equilibrium/mixin/{ => portal}/NetherPortalMixin.java (95%) rename src/main/java/com/equilibrium/mixin/{ => portal}/PortalForcerMixin.java (90%) create mode 100644 src/main/java/com/equilibrium/mixin/recipeModifier.java create mode 100644 src/main/java/com/equilibrium/mixin/render/DebugHudMixin.java rename src/main/java/com/equilibrium/mixin/{ => render}/InGameHudMixin.java (94%) rename src/main/java/com/equilibrium/mixin/{ => render}/WorldRendererMixin.java (99%) rename src/main/java/com/equilibrium/mixin/{ => structure}/ConcentricRingsStructurePlacementMixin.java (96%) rename src/main/java/com/equilibrium/mixin/{ => structure}/StrongholdGeneratorMixin.java (98%) rename src/main/java/com/equilibrium/mixin/{ => structure}/StrongholdGeneratorStartMixin.java (98%) create mode 100644 src/main/java/com/equilibrium/mixin/tables/AbstractFurnaceEntityMixin.java create mode 100644 src/main/java/com/equilibrium/mixin/tables/CraftingScreenHandlerMixin.java create mode 100644 src/main/java/com/equilibrium/mixin/tables/PlayerManagerMixin.java create mode 100644 src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerAccessor.java create mode 100644 src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerMixin.java create mode 100644 src/main/java/com/equilibrium/register/BlockEnityRegistry.java create mode 100644 src/main/java/com/equilibrium/register/BlockInit.java create mode 100644 src/main/java/com/equilibrium/register/UseBlock.java create mode 100644 src/main/java/com/equilibrium/sound/SoundEventRegistry.java create mode 100644 src/main/java/com/equilibrium/util/ChangePortalColor.java create mode 100644 src/main/java/com/equilibrium/util/CraftingDifficultyHelper.java create mode 100644 src/main/java/com/equilibrium/util/CreativeGroup.java create mode 100644 src/main/java/com/equilibrium/util/ShouldSentText.java create mode 100644 src/main/java/com/equilibrium/worklevel/CraftingIngredient.java create mode 100644 src/main/java/com/equilibrium/worklevel/CraftingIngredients.java create mode 100644 src/main/java/com/equilibrium/worklevel/FurnaceIngredient.java create mode 100644 src/main/java/com/equilibrium/worklevel/FurnaceIngredients.java create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/clay_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/copper_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/diamond_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/flint_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/iron_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/netherite_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/netherrack_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/blockstates/obsidian_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/clay_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/clay_furnace_on.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/copper_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/diamond_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/flint_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/iron_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/netherite_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace_on.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace_on.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/clay_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/copper_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/diamond_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/flint_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/iron_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/netherite_crafting_table.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/netherrack_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/models/item/obsidian_furnace.json create mode 100644 src/main/resources/assets/miteequilibrium/sounds/finish.ogg create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/flint/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/iron/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/iron/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/iron/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/netherite/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/netherite/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/crafting_table/netherite/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/front_on.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/front_on.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front_on.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/side.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/top.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/gui/crafting_table.png create mode 100644 src/main/resources/assets/miteequilibrium/textures/gui/inventory.png diff --git a/src/main/generated/.cache/684a20b6ff997062e678180dff3c571444f18410 b/src/main/generated/.cache/684a20b6ff997062e678180dff3c571444f18410 new file mode 100644 index 0000000..9dd78f3 --- /dev/null +++ b/src/main/generated/.cache/684a20b6ff997062e678180dff3c571444f18410 @@ -0,0 +1,2 @@ +// 1.21 2024-07-21T05:39:39.9208483 MITEequilibrium/Language (zh_cn) +582122e265b4c630127b356fab100a52fa8e8686 assets\miteequilibrium\lang\zh_cn.json diff --git a/src/main/generated/.cache/8ce55c2d46c78681d7eebf7cad72e9c2de67a045 b/src/main/generated/.cache/8ce55c2d46c78681d7eebf7cad72e9c2de67a045 deleted file mode 100644 index c480065..0000000 --- a/src/main/generated/.cache/8ce55c2d46c78681d7eebf7cad72e9c2de67a045 +++ /dev/null @@ -1,40 +0,0 @@ -// 1.21 2024-07-20T05:31:11.5795046 MITEequilibrium/Model Definitions -e3c5f07b3b54f7f6eea5fa00ed1823c80c519c14 assets\miteequilibrium\models\item\mithril_ore.json -dccf3bc904ca2659a45b1924b2b5dd8188a0ef27 assets\miteequilibrium\blockstates\gold_block.json -6aa639f29ea4e247aa818822152bded3ec0a0ef4 assets\miteequilibrium\blockstates\mithril_block.json -a3aa407225058101f487dc2d69a2323cff577294 assets\miteequilibrium\models\block\silver_ore.json -6deb1bf7820e58ac89e2411f78d6925861ce3cf5 assets\miteequilibrium\models\item\silver_nugget.json -46bfd511f5c0f2f1afc5d77cc9dbd0144377d522 assets\miteequilibrium\models\item\mithril_nugget.json -15c22b2ffa7c2dda180ffcadd87e26e7542db7c5 assets\miteequilibrium\blockstates\silver_ore.json -c6d473a5f7fb2189afdb6f6040f9449d6355e4c9 assets\miteequilibrium\models\block\copper_block.json -904f5b6be17869c8e9b6bc8b25fd229e15163b7e assets\miteequilibrium\models\block\gold_block.json -8a2002cdb9a1c1088eac1973807e01b3db6a8fc7 assets\miteequilibrium\blockstates\gold_ore.json -37a416ce5d40380df1321db7e7272faa4858973c assets\miteequilibrium\models\item\copper_nugget.json -cabffc3950e51bb500254bcd2a47053341050615 assets\miteequilibrium\blockstates\copper_block.json -88b2592c9e57bdfd9ff42721aee23f1879810fcc assets\miteequilibrium\models\block\gold_ore.json -1c76eeb8e434a4959a45a985f71e33bee98cef47 assets\miteequilibrium\blockstates\ancient_metal_block.json -3f58a7975e017e6f5e0aefeb9d6a28b58502a0d5 assets\miteequilibrium\models\item\ancient_metal_block.json -acd36f849f7545835bcd7c024a9c9c54e8d9e1c0 assets\miteequilibrium\models\item\gold_ore.json -d7f20ad7d635c2505ea669d0de4c217d2ea182ef assets\miteequilibrium\models\block\mithril_ore.json -c877c93eb6dc6b7db3a9f39f1d1a04de0e86dff7 assets\miteequilibrium\models\item\copper_ore.json -dd63bef5ea7f82d06c0c162106a2c5a9a1efee37 assets\miteequilibrium\blockstates\mithril_ore.json -d23ecf679ccfafb2cf9b62c3aec46729ba685fa0 assets\miteequilibrium\models\item\ancient_metal_nugget.json -ddd198fb1a94b797709f8a13de207a162ca83920 assets\miteequilibrium\blockstates\silver_block.json -3a0550b68023aeb8d1f2e05c3bc8b1683a5ec457 assets\miteequilibrium\models\block\copper_ore.json -daac16a0ec15119c4965bf7b42998bf7c30f46fc assets\miteequilibrium\blockstates\adamantium_ore.json -17f4433121884390a787d54ad0545574cd77e44e assets\miteequilibrium\models\item\adamantium_ore.json -ebbf1665c7578e664e339d1379497b8e68ceb9f9 assets\miteequilibrium\blockstates\adamantium_block.json -9ec74d6fe87cfb75b15b03a4686b020726e9a03a assets\miteequilibrium\models\item\adamantium_block.json -47b83ac7ffdcd4f349e7b9d2c9ecbaa7296cd2c1 assets\miteequilibrium\models\block\adamantium_ore.json -7167477d055461b8c0d0dd1ddff296c3e8739c1b assets\miteequilibrium\models\item\gold_nugget.json -71230db95fb36a59ca886b42a8578a7e5289f27e assets\miteequilibrium\models\block\mithril_block.json -9a8cfa18c20d09c688f214eb5e9fe03d14db7761 assets\miteequilibrium\models\item\gold_block.json -9c2092f86b72ce8167788a7d59bb2f6915f0caf6 assets\miteequilibrium\models\block\ancient_metal_block.json -f34fa81117489a9a66ea93f728f5f2bcbec9b953 assets\miteequilibrium\models\block\silver_block.json -e5733a090f394c136335c8aa0dc7e5083ef31458 assets\miteequilibrium\models\item\silver_ore.json -b834efa7e8d540313d35956439827b44a4cee03e assets\miteequilibrium\models\block\adamantium_block.json -72ccce82992032390968c1c5fd7bb5aba9f4b253 assets\miteequilibrium\models\item\silver_block.json -a4b0acfc4293fcf495f36a76bdda910db3f426ee assets\miteequilibrium\models\item\mithril_block.json -d918fe036accbdb8c8dad219ff5b3f769ac1b7ab assets\miteequilibrium\models\item\adamantium_nugget.json -5af9fa21466ac378f1f8783fc5934cb0e6c77eca assets\miteequilibrium\blockstates\copper_ore.json -8dc735515e111bfc53d1a0a639d4fb027e58abfe assets\miteequilibrium\models\item\copper_block.json diff --git a/src/main/java/com/equilibrium/ITimeCraftPlayer.java b/src/main/java/com/equilibrium/ITimeCraftPlayer.java new file mode 100644 index 0000000..93014b2 --- /dev/null +++ b/src/main/java/com/equilibrium/ITimeCraftPlayer.java @@ -0,0 +1,25 @@ +package com.equilibrium; + +import net.minecraft.item.ItemStack; + +public interface ITimeCraftPlayer { + + void craftTime$setCrafting(boolean is_crafting); + + boolean craftTime$isCrafting(); + + void craftTime$setCraftTime(float craft_time); + + float craftTime$getCraftTime(); + + void craftTime$setCraftPeriod(float craft_period); + + float craftTime$getCraftPeriod(); + + void craftTime$stopCraft(); + + void craftTime$startCraftWithNewPeriod(float craft_period); + + boolean craftTime$tick(ItemStack resultStack); + +} diff --git a/src/main/java/com/equilibrium/MITEequilibrium.java b/src/main/java/com/equilibrium/MITEequilibrium.java index b6d474d..3dae4a0 100644 --- a/src/main/java/com/equilibrium/MITEequilibrium.java +++ b/src/main/java/com/equilibrium/MITEequilibrium.java @@ -9,9 +9,29 @@ import com.equilibrium.item.Tools; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.equilibrium.config.Config; +import com.equilibrium.register.BlockEnityRegistry; +import com.equilibrium.register.BlockInit; +import com.equilibrium.register.UseBlock; +import com.equilibrium.sound.SoundEventRegistry; +import com.equilibrium.util.CreativeGroup; +import com.equilibrium.worklevel.CraftingIngredients; +import com.equilibrium.worklevel.FurnaceIngredients; + + + + + + + + + + import static com.equilibrium.entity.ModEntities.registerModEntities; import static com.equilibrium.util.LootTableModifier.modifierLootTables; @@ -24,6 +44,7 @@ public class MITEequilibrium implements ModInitializer { public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + public static Config config; @@ -62,6 +83,31 @@ public void onInitialize() { //注册事件 PlayerBlockBreakEvents.AFTER.register(new BreakBlockEvent()); + + + config = new Config(); + config.load(); + + BlockInit.registerBlocks(); + BlockInit.registerBlockItems(); + BlockInit.registerFuels(); + + BlockEnityRegistry.init(); + CraftingIngredients.init(); + FurnaceIngredients.initFuel(); + FurnaceIngredients.initItem(); + + CreativeGroup.addGroup(); + UseBlock.init(); + Registry.register(Registries.SOUND_EVENT, SoundEventRegistry.finishSoundID, SoundEventRegistry.finishSound); + + + + + + + + LOGGER.info("Hello Fabric world!"); } diff --git a/src/main/java/com/equilibrium/MITEequilibriumDataGenerator.java b/src/main/java/com/equilibrium/MITEequilibriumDataGenerator.java index 7a18443..9a413d9 100644 --- a/src/main/java/com/equilibrium/MITEequilibriumDataGenerator.java +++ b/src/main/java/com/equilibrium/MITEequilibriumDataGenerator.java @@ -1,18 +1,17 @@ package com.equilibrium; +import com.equilibrium.gen.ModLanguageTranslatorZhCn; import com.equilibrium.gen.ModModelProvider; import com.equilibrium.gen.ModRecipeGenerator; import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; -import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; -import net.minecraft.data.DataGenerator; public class MITEequilibriumDataGenerator implements DataGeneratorEntrypoint { @Override public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator){ FabricDataGenerator.Pack pack=fabricDataGenerator.createPack(); // pack.addProvider(ModRecipeGenerator::new); - pack.addProvider(ModModelProvider::new); - +// pack.addProvider(ModModelProvider::new); + pack.addProvider(ModLanguageTranslatorZhCn::new); } } diff --git a/src/main/java/com/equilibrium/block/TheCraftingTableBlock.java b/src/main/java/com/equilibrium/block/TheCraftingTableBlock.java new file mode 100644 index 0000000..9f8055e --- /dev/null +++ b/src/main/java/com/equilibrium/block/TheCraftingTableBlock.java @@ -0,0 +1,57 @@ +package com.equilibrium.block; + + +import com.equilibrium.register.BlockInit; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.CraftingTableBlock; +import net.minecraft.screen.CraftingScreenHandler; +import net.minecraft.screen.NamedScreenHandlerFactory; +import net.minecraft.screen.ScreenHandlerContext; +import net.minecraft.screen.SimpleNamedScreenHandlerFactory; +import net.minecraft.text.Text; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class TheCraftingTableBlock extends CraftingTableBlock { + public static Text TITLE = Text.translatable("container.crafting"); + public static Text TITLE1 = Text.translatable("container.flint_crafting"); + public static Text TITLE2 = Text.translatable("container.copper_crafting"); + public static Text TITLE3 = Text.translatable("container.iron_crafting"); + public static Text TITLE4 = Text.translatable("container.diamond_crafting"); + public static Text TITLE5 = Text.translatable("container.netherite_crafting"); + + public TheCraftingTableBlock(Settings settings) { + super(settings); + } + + public NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos) { + Block block = state.getBlock(); + if(block == BlockInit.FLINT_CRAFTING_TABLE){ + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE1); + + }else if(block == BlockInit.COPPER_CRAFTING_TABLE){ + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE2); + }else if(block == BlockInit.IRON_CRAFTING_TABLE){ + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE3); + }else if(block == BlockInit.DIAMOND_CRAFTING_TABLE){ + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE4); + }else if(block == BlockInit.NETHERITE_CRAFTING_TABLE){ + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE5); + }else { + return new SimpleNamedScreenHandlerFactory((syncId, inventory, player) -> { + return new CraftingScreenHandler(syncId, inventory, ScreenHandlerContext.create(world, pos)); + }, TITLE); + } + } +} diff --git a/src/main/java/com/equilibrium/block/TheFurnace.java b/src/main/java/com/equilibrium/block/TheFurnace.java new file mode 100644 index 0000000..dfcebee --- /dev/null +++ b/src/main/java/com/equilibrium/block/TheFurnace.java @@ -0,0 +1,187 @@ +package com.equilibrium.block; + + +import com.equilibrium.blockentity.TheFurnaceEntity; + +import com.equilibrium.register.BlockEnityRegistry; + + +import com.mojang.serialization.MapCodec; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityTicker; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.context.LootContextParameterSet; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.screen.NamedScreenHandlerFactory; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.stat.Stats; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.state.property.Property; +import net.minecraft.util.*; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; + +public class TheFurnace extends BlockWithEntity { + private static final DirectionProperty FACING; + public static final BooleanProperty LIT; + public static final MapCodec CODEC = createCodec(TheFurnace::new); + public TheFurnace(Settings settings) { + super(settings); + this.setDefaultState((BlockState)((BlockState)((BlockState)this.stateManager.getDefaultState()).with(FACING, Direction.NORTH)).with(LIT, false)); + } + + @Override + protected MapCodec getCodec() { + return CODEC; + } + + protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { + if (world.isClient) { + return ActionResult.SUCCESS; + } else { + this.openScreen(world, pos, player); + return ActionResult.CONSUME; + } + } + + @Override + public BlockState getPlacementState(ItemPlacementContext context) { + return (BlockState)this.getDefaultState().with(FACING, context.getHorizontalPlayerFacing().getOpposite()); + } + + +// @Override +// public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { +// if (itemStack.hasCustomName()) { +// BlockEntity blockEntity = world.getBlockEntity(pos); +// +// if (blockEntity instanceof TheFurnaceEntity) { +// ((TheFurnaceEntity) blockEntity).setCustomName(itemStack.getName()); +// } +// } +// } + + @Override + public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { + if (!state.isOf(newState.getBlock())) { + BlockEntity be = world.getBlockEntity(pos); + if (be instanceof TheFurnaceEntity furnace) { + if (world instanceof ServerWorld) { + ItemScatterer.spawn(world, pos, furnace); + ((TheFurnaceEntity)be).getRecipesUsedAndDropExperience((ServerWorld)world, Vec3d.ofCenter(pos)); + } + + world.updateComparators(pos, this); + } + + super.onStateReplaced(state, world, pos, newState, moved); + } + } + + @Override + public boolean hasComparatorOutput(BlockState state) { + return true; + } + + @Override + public int getComparatorOutput(BlockState state, World world, BlockPos pos) { + return ScreenHandler.calculateComparatorOutput(world.getBlockEntity(pos)); + } + + @Override + public BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.MODEL; + } + + public BlockState rotate(BlockState state, BlockRotation rotation) { + return (BlockState)state.with(FACING, rotation.rotate((Direction)state.get(FACING))); + } + + public BlockState mirror(BlockState state, BlockMirror mirror) { + return state.rotate(mirror.getRotation((Direction)state.get(FACING))); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(new Property[]{FACING, LIT}); + } + + @Nullable + protected static BlockEntityTicker validateTicker(World world, BlockEntityType givenType, BlockEntityType expectedType) { + return world.isClient ? null : validateTicker(givenType, expectedType, TheFurnaceEntity::tick); + } + + @Override + public List getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) { + ArrayList dropList = new ArrayList(); + dropList.add(new ItemStack(this)); + return dropList; + } + + //FurnaceBlock---------------------------------------------------------------------- + @Nullable + @Override + public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new TheFurnaceEntity(pos, state); + } + + @Nullable + public BlockEntityTicker getTicker(World world, BlockState state, BlockEntityType type) { + return validateTicker(world, type, BlockEnityRegistry.THE_FURNACE); + } + + private void openScreen(World world, BlockPos blockPos, PlayerEntity playerEntity) { + BlockEntity blockEntity = world.getBlockEntity(blockPos); + + if (blockEntity instanceof TheFurnaceEntity) { + playerEntity.openHandledScreen((NamedScreenHandlerFactory) blockEntity); + playerEntity.incrementStat(Stats.INTERACT_WITH_FURNACE); + } + } + +// @Environment(EnvType.CLIENT) + @Override + public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) { + if (state.get(LIT)) { + double d = (double)pos.getX() + 0.5; + double e = (double)pos.getY(); + double f = (double)pos.getZ() + 0.5; + if (random.nextDouble() < 0.1) { + world.playSound(d, e, f, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false); + } + + Direction direction = (Direction)state.get(FACING); + Direction.Axis axis = direction.getAxis(); + double g = 0.52; + double h = random.nextDouble() * 0.6 - 0.3; + double i = axis == Direction.Axis.X ? (double)direction.getOffsetX() * 0.52 : h; + double j = random.nextDouble() * 6.0 / 16.0; + double k = axis == Direction.Axis.Z ? (double)direction.getOffsetZ() * 0.52 : h; + world.addParticle(ParticleTypes.SMOKE, d + i, e + j, f + k, 0.0, 0.0, 0.0); + world.addParticle(ParticleTypes.FLAME, d + i, e + j, f + k, 0.0, 0.0, 0.0); + } + } + + static { + FACING = HorizontalFacingBlock.FACING; + LIT = Properties.LIT; + } +} diff --git a/src/main/java/com/equilibrium/block/UnderworldPortalBlock.java b/src/main/java/com/equilibrium/block/UnderworldPortalBlock.java index 08afc6f..780392f 100644 --- a/src/main/java/com/equilibrium/block/UnderworldPortalBlock.java +++ b/src/main/java/com/equilibrium/block/UnderworldPortalBlock.java @@ -1,7 +1,5 @@ package com.equilibrium.block; -import com.equilibrium.mixin.NetherPortalMixin; -import com.equilibrium.mixin.PortalForcerMixin; import com.mojang.logging.LogUtils; import com.mojang.serialization.MapCodec; import net.minecraft.block.*; @@ -14,7 +12,6 @@ import net.minecraft.particle.ParticleTypes; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; -import net.minecraft.resource.featuretoggle.FeatureSet; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; @@ -37,8 +34,6 @@ import java.util.Optional; -import static net.minecraft.world.TeleportTarget.missingSpawnBlock; - public class UnderworldPortalBlock extends Block implements Portal{ diff --git a/src/main/java/com/equilibrium/blockentity/TheFurnaceEntity.java b/src/main/java/com/equilibrium/blockentity/TheFurnaceEntity.java new file mode 100644 index 0000000..b241431 --- /dev/null +++ b/src/main/java/com/equilibrium/blockentity/TheFurnaceEntity.java @@ -0,0 +1,59 @@ +package com.equilibrium.blockentity; + +import com.equilibrium.register.BlockEnityRegistry; +import com.equilibrium.register.BlockInit; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.AbstractFurnaceBlockEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.recipe.RecipeType; +import net.minecraft.screen.FurnaceScreenHandler; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.text.Text; +import net.minecraft.util.math.BlockPos; + +public class TheFurnaceEntity extends AbstractFurnaceBlockEntity { + public TheFurnaceEntity(BlockPos pos, BlockState state) { + super(BlockEnityRegistry.THE_FURNACE, pos, state, RecipeType.SMELTING); + } + + @Override + public Text getContainerName() { + Block block = this.world.getBlockState(this.getPos()).getBlock(); + if(block == BlockInit.CLAY_FURNACE){ + return Text.translatable("container.clay_furnace"); + } + if(block == BlockInit.NETHERRACK_FURNACE){ + return Text.translatable("container.netherrack_furnace"); + } + if(block == BlockInit.OBSIDIAN_FURNACE){ + return Text.translatable("container.obsidian_furnace"); + } + return Text.translatable("container.furnace"); + } + + @Override + public ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory) { + return new FurnaceScreenHandler(syncId, playerInventory, this, this.propertyDelegate); + } + + @Override + public int getFuelTime(ItemStack fuel) { + //此处world必须判断是否为null,否则熔炉数据无法保存。 + if(this.getWorld() != null){ + Block block = this.world.getBlockState(this.getPos()).getBlock(); + if(block == BlockInit.CLAY_FURNACE){ + return (int) (super.getFuelTime(fuel)); + } + if(block == BlockInit.OBSIDIAN_FURNACE){ + return (int) (super.getFuelTime(fuel) / 5); + } + if(block == BlockInit.NETHERRACK_FURNACE){ + return (int) (super.getFuelTime(fuel) / 10); + } + } + return (int) (super.getFuelTime(fuel)); + } + +} diff --git a/src/main/java/com/equilibrium/config/CommonConfig.java b/src/main/java/com/equilibrium/config/CommonConfig.java new file mode 100644 index 0000000..652dc1d --- /dev/null +++ b/src/main/java/com/equilibrium/config/CommonConfig.java @@ -0,0 +1,176 @@ +package com.equilibrium.config; + + +import com.equilibrium.MITEequilibrium; +import com.google.gson.JsonObject; + +import java.util.HashMap; + +public class CommonConfig { + private final static String fileConfigName = "crafttime"; + + public final static String item_crafting_time = "item_crafting_time"; + + public final static String item_crafttable_level = "item_crafttable_level"; + public final static String item_furnace_level = "item_furnace_level"; + + public final static String fuel_item_level = "fuel_item_level"; + public final static String item_cooktime = "item_cooktime"; + + + public final static HashMap craftItemTimeMap = new HashMap<>(); + + public final static HashMap itemCrafttableLevelMap = new HashMap<>(); + public final static HashMap itemFurnaceLevelMap = new HashMap<>(); + + public final static HashMap fuelItemLevelMap = new HashMap<>(); + public final static HashMap itemCooktimeMap = new HashMap<>(); + + + + public CommonConfig(){ + } + + //序列化配置文件:写入配置文件 + public JsonObject serialize(){ + JsonObject root = new JsonObject();//父类 +// JsonObject entry = new JsonObject();//子条目 +// JsonObject entry_items_crafting_time = new JsonObject();//子条目 +// JsonObject entry_item_crafttable_level = new JsonObject();//子条目 +// JsonObject entry_item_furnace_levell = new JsonObject();//子条目 +// JsonObject entry_fuel_item_level = new JsonObject();//子条目 +// JsonObject entry_item_cooktime = new JsonObject();//子条目 +// +// entry.addProperty("desc0:", "若发现配置不生效,则是模组设定好的内容不可更改,如:铁锭的工作台等级为3"); +// //物品合成时间======================================================================== +// entry.addProperty("desc1:", "添加单个材料物品的合成所需时间,例如: " + +// "{\n" + +// " \"minecraft:stick\": 20.0,\n" + +// " \"minecraft:coal\": 20.0\n" + +// "}"); +// entry.add(item_crafting_time,entry_items_crafting_time); +// craftItemTimeMap.forEach(entry_items_crafting_time::addProperty); +// +// //物品工作台等级======================================================================== +// entry.addProperty("desc2:", "添加单个材料物品的所需工作台等级,FLINT_CRAFTING_TABLE = 1, COPPER_CRAFTING_TABLE = 2, IRON_CRAFTING_TABLE = 3, DIAMOND_CRAFTING_TABLE = 4, NETHERITE_CRAFTING_TABLE = 5" + +// "例如: " + +// "{\n" + +// " \"minecraft:stick\": 1,\n" + +// " \"minecraft:coal\": 2\n" + +// "}"); +// entry.add(item_crafttable_level,entry_item_crafttable_level); +// itemCrafttableLevelMap.forEach(entry_item_crafttable_level::addProperty); +// +// //物品熔炼所需熔炉等级======================================================================== +// entry.addProperty("desc3:", "添加物品熔炼所需熔炉等级,CLAY_FURNACE = 0, FURNACE = 1, BLAST_FURNACE = 1,OBSIDIAN_FURNACE = 2, NETHERRACK_FURNACE = 3" + +// "例如: " + +// "{\n" + +// " \"minecraft:raw_copper\": 1,\n" + +// " \"minecraft:raw_iron\": 2\n" + +// "}"); +// entry.add(item_furnace_level,entry_item_furnace_levell); +// itemFurnaceLevelMap.forEach(entry_item_furnace_levell::addProperty); +// +// //燃料的等级======================================================================== +// entry.addProperty("desc4:", "添加燃料的等级,CLAY_FURNACE = 0, FURNACE = 1, BLAST_FURNACE = 1,OBSIDIAN_FURNACE = 2, NETHERRACK_FURNACE = 3" + +// "例如: " + +// "{\n" + +// " \"minecraft:stick\": 1,\n" + +// " \"minecraft:coal\": 2\n" + +// "}"); +// entry.add(fuel_item_level,entry_fuel_item_level); +// fuelItemLevelMap.forEach(entry_fuel_item_level::addProperty); +// +// //物品在熔炉中烧炼所需时间======================================================================== +// entry.addProperty("desc5:", "添加物品在熔炉中烧炼所需时间,minecraft:iron_ore为200,minecraft:deepslate_iron_ore为802" + +// "例如: " + +// "{\n" + +// " \"minecraft:iron_ore\": 200,\n" + +// " \"minecraft:deepslate_iron_ore\": 802\n" + +// "}"); +// entry.add(item_cooktime,entry_item_cooktime); +// itemCooktimeMap.forEach(entry_item_cooktime::addProperty); +// +// root.add(fileConfigName, entry);//创建父类条目名称,并把子条目添加进去 + return root; + } + + //反序列化:获取配置文件内容 + public void deserialize(JsonObject data) { + if (data == null) { + MITEequilibrium.LOGGER.error("Config file was empty!"); + } else { + try { + craftItemLevelsMapGet(data); + itemCrafttableLevelMapGet(data); + itemFurnaceLevelMapGet(data); + fuelItemLevelMapGet(data); + itemCooktimeMapGet(data); + + } catch (Exception var3) { + MITEequilibrium.LOGGER.error("Could not parse config file", var3); + } + + } + } + + //获取配置文件中:物品的工作台等级 + public void craftItemLevelsMapGet(JsonObject data){ + JsonObject object =data.get(fileConfigName).getAsJsonObject(); + JsonObject items_crafting_table = object.getAsJsonObject(item_crafting_time);//子目录 + craftItemTimeMap.clear(); + items_crafting_table.entrySet().forEach(i -> { + String item = i.getKey(); + float value = i.getValue().getAsFloat(); + craftItemTimeMap.put(item,value); + }); + } + + //获取配置文件中:单个材料物品的合成所需时间 + public void itemCrafttableLevelMapGet(JsonObject data){ + JsonObject object =data.get(fileConfigName).getAsJsonObject(); + JsonObject items_crafting_table = object.getAsJsonObject(item_crafttable_level);//子目录 + itemCrafttableLevelMap.clear(); + items_crafting_table.entrySet().forEach(i -> { + String item = i.getKey(); + int value = i.getValue().getAsInt(); + itemCrafttableLevelMap.put(item,value); + }); + } + + //获取配置文件中:物品熔炼所需熔炉等级 + public void itemFurnaceLevelMapGet(JsonObject data){ + JsonObject object =data.get(fileConfigName).getAsJsonObject(); + JsonObject items_crafting_table = object.getAsJsonObject(item_furnace_level);//子目录 + itemFurnaceLevelMap.clear(); + items_crafting_table.entrySet().forEach(i -> { + String item = i.getKey(); + int value = i.getValue().getAsInt(); + itemFurnaceLevelMap.put(item,value); + }); + } + + //获取配置文件中:物品熔炼所需熔炉等级 + public void fuelItemLevelMapGet(JsonObject data){ + JsonObject object =data.get(fileConfigName).getAsJsonObject(); + JsonObject items_crafting_table = object.getAsJsonObject(fuel_item_level);//子目录 + fuelItemLevelMap.clear(); + items_crafting_table.entrySet().forEach(i -> { + String item = i.getKey(); + int value = i.getValue().getAsInt(); + fuelItemLevelMap.put(item,value); + }); + } + + //获取配置文件中:物品熔炼所需熔炉等级 + public void itemCooktimeMapGet(JsonObject data){ + JsonObject object =data.get(fileConfigName).getAsJsonObject(); + JsonObject items_crafting_table = object.getAsJsonObject(item_cooktime);//子目录 + itemCooktimeMap.clear(); + items_crafting_table.entrySet().forEach(i -> { + String item = i.getKey(); + int value = i.getValue().getAsInt(); + itemCooktimeMap.put(item,value); + }); + } +} diff --git a/src/main/java/com/equilibrium/config/Config.java b/src/main/java/com/equilibrium/config/Config.java new file mode 100644 index 0000000..ee20d40 --- /dev/null +++ b/src/main/java/com/equilibrium/config/Config.java @@ -0,0 +1,63 @@ +package com.equilibrium.config; + + +import com.equilibrium.MITEequilibrium; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.util.Identifier; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.IOException; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; + +public class Config { + + private final CommonConfig commonConfig = new CommonConfig(); + final Gson gson = (new GsonBuilder()).setPrettyPrinting().create();//创建配置文件 + + private final static String fileConfig = "crafttime.json"; + + public Config(){ + } + + //加载 + public void load() { + + Path configPath = FabricLoader.getInstance().getConfigDir().normalize().resolve(fileConfig);//配置文件名称 + + File config = configPath.toFile(); + + if (!config.exists()) { + MITEequilibrium.LOGGER.warn("Config for allowedCheat not found, recreating default"); + this.save(); + } else { + try { + this.commonConfig.deserialize((JsonObject)this.gson.fromJson(Files.newBufferedReader(configPath), JsonObject.class)); + } catch (IOException var4) { + MITEequilibrium.LOGGER.error("Could not read config from:" + configPath, var4); + } + } + } + + public void save() { + Path configPath = FabricLoader.getInstance().getConfigDir().normalize().resolve(fileConfig); + + try { + BufferedWriter writer = Files.newBufferedWriter(configPath); + this.gson.toJson(this.commonConfig.serialize(), JsonObject.class, writer); + writer.close(); + } catch (IOException var3) { + MITEequilibrium.LOGGER.error("Could not write config to:" + configPath, var3); + } + } + + public CommonConfig getCommonConfig() { + return this.commonConfig; + } +} diff --git a/src/main/java/com/equilibrium/constant/ConstantString.java b/src/main/java/com/equilibrium/constant/ConstantString.java new file mode 100644 index 0000000..cc947c5 --- /dev/null +++ b/src/main/java/com/equilibrium/constant/ConstantString.java @@ -0,0 +1,9 @@ +package com.equilibrium.constant; + + +public class ConstantString { + public static String TRANSPORT_TARGET1="You will transport to overworld"; + public static String TRANSPORT_TARGET2="You will transport to underworld"; + public static String TRANSPORT_TARGET3="You will transport to nether"; + +} diff --git a/src/main/java/com/equilibrium/entity/goal/AdvanceEscapeDangerGoal.java b/src/main/java/com/equilibrium/entity/goal/AdvanceEscapeDangerGoal.java new file mode 100644 index 0000000..3244532 --- /dev/null +++ b/src/main/java/com/equilibrium/entity/goal/AdvanceEscapeDangerGoal.java @@ -0,0 +1,113 @@ +package com.equilibrium.entity.goal; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.ai.NoPenaltyTargeting; +import net.minecraft.entity.ai.goal.Goal; +import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.damage.DamageType; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.entity.mob.PathAwareEntity; +import net.minecraft.registry.tag.DamageTypeTags; +import net.minecraft.registry.tag.FluidTags; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.sound.SoundEvents; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +import java.util.EnumSet; +import java.util.function.Function; + +public class AdvanceEscapeDangerGoal extends Goal { + + + public static final int RANGE_Y = 1; + protected final PathAwareEntity mob; + protected final double speed; + protected double targetX; + protected double targetY; + protected double targetZ; + protected boolean active; + private final Function> entityToDangerousDamageTypes; + + public AdvanceEscapeDangerGoal(PathAwareEntity mob, double speed) { + this(mob, speed, DamageTypeTags.PANIC_CAUSES); + } + + public AdvanceEscapeDangerGoal(PathAwareEntity mob, double speed, TagKey dangerousDamageTypes) { + this(mob, speed, entity -> dangerousDamageTypes); + } + + public AdvanceEscapeDangerGoal(PathAwareEntity mob, double speed, Function> entityToDangerousDamageTypes) { + this.mob = mob; + this.speed = speed; + this.entityToDangerousDamageTypes = entityToDangerousDamageTypes; + this.setControls(EnumSet.of(Goal.Control.MOVE)); + } + + @Override + public boolean canStart() { + if (!this.isInDanger()) { + return false; + } else { + if (this.mob.isOnFire()) { + BlockPos blockPos = this.locateClosestWater(this.mob.getWorld(), this.mob, 16); + if (blockPos != null) { + this.targetX = (double) blockPos.getX(); + this.targetY = (double) blockPos.getY(); + this.targetZ = (double) blockPos.getZ(); + return true; + } + } + + return this.findTarget(); + } + } + + protected boolean isInDanger() { + return this.mob.getRecentDamageSource() != null + && this.mob.getRecentDamageSource().isIn((TagKey) this.entityToDangerousDamageTypes.apply(this.mob)); + } + + protected boolean findTarget() { + Vec3d vec3d = NoPenaltyTargeting.find(this.mob, 64, 16); + if (vec3d == null) { + return false; + } else { + this.targetX = vec3d.x; + this.targetY = vec3d.y; + this.targetZ = vec3d.z; + return true; + } + } + + public boolean isActive() { + return this.active; + } + + @Override + public void start() { + this.mob.getNavigation().startMovingTo(this.targetX, this.targetY, this.targetZ, this.speed); + this.active = true; + } + + @Override + public void stop() { + this.active = false; + } + + @Override + public boolean shouldContinue() { + return !this.mob.getNavigation().isIdle(); + } + + @Nullable + protected BlockPos locateClosestWater(BlockView world, Entity entity, int rangeX) { + BlockPos blockPos = entity.getBlockPos(); + return !world.getBlockState(blockPos).getCollisionShape(world, blockPos).isEmpty() + ? null + : (BlockPos) BlockPos.findClosest(entity.getBlockPos(), rangeX, 1, pos -> world.getFluidState(pos).isIn(FluidTags.WATER)).orElse(null); + } +} \ No newline at end of file diff --git a/src/main/java/com/equilibrium/event/BreakBlockEvent.java b/src/main/java/com/equilibrium/event/BreakBlockEvent.java index ac998bc..c3b5461 100644 --- a/src/main/java/com/equilibrium/event/BreakBlockEvent.java +++ b/src/main/java/com/equilibrium/event/BreakBlockEvent.java @@ -1,31 +1,19 @@ package com.equilibrium.event; -import net.fabricmc.fabric.api.client.message.v1.ClientSendMessageEvents; import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.component.type.ItemEnchantmentsComponent; -import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.EnchantmentLevelEntry; import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.ItemEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.*; -import net.minecraft.network.message.SentMessage; -import net.minecraft.registry.Registries; -import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.tag.BlockTags; -import net.minecraft.util.Identifier; -import net.minecraft.util.ItemScatterer; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; import java.util.Random; -import static com.equilibrium.MITEequilibrium.LOGGER; public class BreakBlockEvent implements PlayerBlockBreakEvents.After{ /** @@ -46,14 +34,14 @@ public void afterBlockBreak(World world, PlayerEntity player, BlockPos pos, Bloc int slikTouch=EnchantmentHelper.getLevel(world.getRegistryManager().get(RegistryKeys.ENCHANTMENT).getEntry(Enchantments.SILK_TOUCH).get(),itemStack); if (slikTouch==1){ - world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + world.spawnEntity(new ItemEntity(world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GRAVEL))); return; } Random random =new Random(); int randomNumber1 = random.nextInt(100); if(randomNumber1<75-funtuneLevel*15){ - world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + world.spawnEntity(new ItemEntity(world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GRAVEL))); return; } @@ -67,23 +55,23 @@ public void afterBlockBreak(World world, PlayerEntity player, BlockPos pos, Bloc ItemEntity itemDrop; if(randomNumber2==0){ //0,就1个,1% - itemDrop = new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + itemDrop = new ItemEntity( world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GOLD_BLOCK)); } else if(randomNumber2<=8) { //1-8,共8个 8% - itemDrop = new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + itemDrop = new ItemEntity( world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GOLD_INGOT)); } else if (randomNumber2 <= 24) { //9-24,共16个 16% - itemDrop = new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + itemDrop = new ItemEntity( world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GOLD_NUGGET)); } else if (randomNumber2 <= 46) { //25-46,共22个 22% - itemDrop = new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + itemDrop = new ItemEntity( world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.GOLD_NUGGET)); }else{ //47-99,共53个 75% - itemDrop = new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), + itemDrop = new ItemEntity(world, pos.getX()+0.5, pos.getY(), pos.getZ()+0.5, new ItemStack(Items.STONE)); } world.spawnEntity(itemDrop); diff --git a/src/main/java/com/equilibrium/gen/ModLanguageTranslatorZhCn.java b/src/main/java/com/equilibrium/gen/ModLanguageTranslatorZhCn.java new file mode 100644 index 0000000..dce328c --- /dev/null +++ b/src/main/java/com/equilibrium/gen/ModLanguageTranslatorZhCn.java @@ -0,0 +1,35 @@ +package com.equilibrium.gen; + +import com.equilibrium.block.ModBlocks; +import com.equilibrium.constant.ConstantString; +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; +import net.minecraft.registry.RegistryWrapper; + +import java.util.concurrent.CompletableFuture; + +public class ModLanguageTranslatorZhCn extends FabricLanguageProvider { + + + public ModLanguageTranslatorZhCn(FabricDataOutput dataOutput, CompletableFuture registryLookup) { + super(dataOutput,"zh_cn", registryLookup); + } + + /** + * Implement this method to register languages. + * + *

Call {@link TranslationBuilder#add(String, String)} to add a translation. + * + * @param registryLookup + * @param translationBuilder + */ + @Override + public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, TranslationBuilder translationBuilder) { + translationBuilder.add(ConstantString.TRANSPORT_TARGET1,"该传送门会将你传送至主世界"); + translationBuilder.add(ConstantString.TRANSPORT_TARGET2,"该传送门会将你传送至地下世界"); + translationBuilder.add(ConstantString.TRANSPORT_TARGET3,"该传送门会将你传送至下界"); + + + + } +} diff --git a/src/main/java/com/equilibrium/item/ModItems.java b/src/main/java/com/equilibrium/item/ModItems.java index 9b99285..71db58a 100644 --- a/src/main/java/com/equilibrium/item/ModItems.java +++ b/src/main/java/com/equilibrium/item/ModItems.java @@ -1,12 +1,7 @@ package com.equilibrium.item; -import com.equilibrium.MITEequilibrium; -import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries; -import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; -import net.fabricmc.fabric.api.registry.FuelRegistry; import net.minecraft.item.Item; -import net.minecraft.item.ItemGroups; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.util.Identifier; diff --git a/src/main/java/com/equilibrium/mixin/color/LightmapTextureManagerMixin.java b/src/main/java/com/equilibrium/mixin/color/LightmapTextureManagerMixin.java index de3539c..28fa6ca 100644 --- a/src/main/java/com/equilibrium/mixin/color/LightmapTextureManagerMixin.java +++ b/src/main/java/com/equilibrium/mixin/color/LightmapTextureManagerMixin.java @@ -13,7 +13,6 @@ import net.minecraft.entity.effect.StatusEffects; import net.minecraft.util.Identifier; import net.minecraft.util.math.MathHelper; -import net.minecraft.world.dimension.DimensionType; import org.joml.Vector3f; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/java/com/equilibrium/mixin/crafttime/MixinClientPlayerEntity.java b/src/main/java/com/equilibrium/mixin/crafttime/MixinClientPlayerEntity.java new file mode 100644 index 0000000..6b9a92a --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/crafttime/MixinClientPlayerEntity.java @@ -0,0 +1,111 @@ +package com.equilibrium.mixin.crafttime; + +import com.equilibrium.ITimeCraftPlayer; +import com.equilibrium.sound.SoundEventRegistry; +import com.mojang.authlib.GameProfile; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.network.AbstractClientPlayerEntity; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; + +@Mixin(ClientPlayerEntity.class) +public class MixinClientPlayerEntity extends AbstractClientPlayerEntity implements ITimeCraftPlayer { + + @Shadow @Final protected MinecraftClient client; + @Unique + public boolean is_crafting = false; + @Unique + public float craft_time = 0; + @Unique + public float craft_period = 0; + + public MixinClientPlayerEntity(ClientWorld world, GameProfile profile) { + super(world, profile); + } + + @Override + public void craftTime$setCrafting(boolean is_crafting) { + this.is_crafting = is_crafting; + } + + @Override + public boolean craftTime$isCrafting() { + return this.is_crafting; + } + + @Override + public void craftTime$setCraftTime(float craft_time) { + this.craft_time = craft_time; + } + + @Override + public float craftTime$getCraftTime() { + return this.craft_time; + } + + @Override + public void craftTime$setCraftPeriod(float craft_period) { + this.craft_period = craft_period; + } + + @Override + public float craftTime$getCraftPeriod() { + return this.craft_period; + } + + @Override + public void craftTime$stopCraft() { + this.is_crafting = false; + this.craft_time = 0F; + } + + @Override + public void craftTime$startCraftWithNewPeriod(float craft_period) { + this.craft_time = 0; + this.craft_period = craft_period; + this.is_crafting = true; + +// if (craft_period >= 10F) { +// MinecraftClient.getInstance().getSoundManager().play(new CraftingTickableSound(Random.create(),this, this.getBlockPos())); +// } + } + + @Override + public boolean craftTime$tick(ItemStack resultStack) { + + if (this.craftTime$isCrafting()) { +// ItemStack cursorStack = this.getInventory().player.currentScreenHandler.getCursorStack(); +// if (cursorStack.getItem() != Items.AIR) { +// return false; +// } + + if(resultStack.isEmpty()){ + return false; + } + + + if (this.craftTime$getCraftTime() < this.craftTime$getCraftPeriod()) { + this.craft_time += getCraftingSpeed(this); + }else if (this.craftTime$getCraftTime() >= this.craftTime$getCraftPeriod()) { + this.playSound(SoundEventRegistry.finishSound, 0.1F, 1f); + + this.craftTime$startCraftWithNewPeriod(craft_period); + return true; + } + } + return false; + } + + @Unique + public float getCraftingSpeed(PlayerEntity player) { + float speed = 1F; + speed += 0.02F * Math.min(200, player.experienceLevel); + return speed; + } +} diff --git a/src/main/java/com/equilibrium/mixin/crafttime/MixinCraftingScreen.java b/src/main/java/com/equilibrium/mixin/crafttime/MixinCraftingScreen.java new file mode 100644 index 0000000..4adc6d7 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/crafttime/MixinCraftingScreen.java @@ -0,0 +1,149 @@ +package com.equilibrium.mixin.crafttime; + +import com.equilibrium.ITimeCraftPlayer; +import com.equilibrium.MITEequilibrium; +import com.equilibrium.util.CraftingDifficultyHelper; +import com.llamalad7.mixinextras.utils.MixinExtrasLogger; +import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.navigation.GuiNavigation; +import net.minecraft.client.gui.navigation.GuiNavigationPath; +import net.minecraft.client.gui.navigation.NavigationDirection; +import net.minecraft.client.gui.screen.ingame.CraftingScreen; +import net.minecraft.client.gui.screen.ingame.HandledScreen; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.screen.CraftingScreenHandler; +import net.minecraft.screen.slot.Slot; +import net.minecraft.screen.slot.SlotActionType; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; +import org.lwjgl.glfw.GLFW; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.ArrayList; + +@Mixin(CraftingScreen.class) +public abstract class MixinCraftingScreen extends HandledScreen { + + + @Unique + private ITimeCraftPlayer player; + + public MixinCraftingScreen(CraftingScreenHandler handler, PlayerInventory inventory, Text title) { + super(handler, inventory, title); + } + + @Unique + private static final Identifier CRAFT_OVERLAY_TEXTURE = Identifier.of("miteequilibrium:textures/gui/crafting_table.png"); + + + private GuiNavigation.Arrow getArrowNavigation(NavigationDirection direction) { + return new GuiNavigation.Arrow(direction); + } + private GuiNavigation.Tab getTabNavigation() { + boolean bl = !hasShiftDown(); + return new GuiNavigation.Tab(bl); + } + + + private static boolean stopRenderArrow = false; + + + @Override + public boolean keyPressed(int keyCode, int scanCode, int modifiers) { + if (keyCode != GLFW.GLFW_KEY_LEFT_SHIFT && this.shouldCloseOnEsc()) { + stopRenderArrow=true; + this.close(); + return true; + }else{ + return false; + } + } + + + + + @Inject(method = "drawBackground", at = @At("TAIL")) + protected void timecraft$drawBackground(DrawContext context, float delta, int mouseX, int mouseY, CallbackInfo ci) { + + assert this.client != null; + this.player = (ITimeCraftPlayer) this.client.player; + + RenderSystem.setShaderTexture(0,CRAFT_OVERLAY_TEXTURE); + int i = this.x; + int j = (this.height - this.backgroundHeight) / 2; + + + if (player.craftTime$isCrafting() && player.craftTime$getCraftPeriod() > 0) { + int l = (int) ((player.craftTime$getCraftTime() * 24.0F / player.craftTime$getCraftPeriod())); + //一旦中途退出,就失去所有进度渲染,直到再次摆出正确配方而且点击了目标合成物 + + MITEequilibrium.LOGGER.info(String.valueOf(l)); + + if (stopRenderArrow){ + return; + } + + if (l >= 24) { + context.drawTexture(CRAFT_OVERLAY_TEXTURE, i + 89, j + 35, 0, 0, 25, 16, 24, 17); + } else { + context.drawTexture(CRAFT_OVERLAY_TEXTURE, i + 89, j + 35, 0, 0, l + 1, 16, 24, 17); + } + } + + + } + + + @Inject(method = "handledScreenTick", at = @At("TAIL")) + public void timecraft$tick(CallbackInfo info) { + + assert this.client != null; + this.player = (ITimeCraftPlayer) this.client.player; + ItemStack resultStack = this.handler.getSlot(0).getStack(); + boolean finished = player.craftTime$tick(resultStack); + + if (finished) { + + ArrayList old_recipe = CraftingDifficultyHelper.getItemFromMatrix(this.handler, true); + + //--------------------------------------------------------- + super.onMouseClick(this.handler.getSlot(0), 0, 0, SlotActionType.THROW); + + ArrayList new_recipe = CraftingDifficultyHelper.getItemFromMatrix(this.handler, true); + + if (old_recipe.equals(new_recipe) ) + player.craftTime$setCraftPeriod(CraftingDifficultyHelper.getCraftingDifficultyFromMatrix(this.handler, true,this)); + else + player.craftTime$stopCraft(); + + } + } + + @Inject(method = "onMouseClick", at = @At("HEAD"), cancellable = true) + public void timecraft$onMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType, + CallbackInfo info) { + if (slot != null) { + invSlot = slot.id; + } + if (invSlot > 0 && invSlot < 10) { + player.craftTime$setCraftTime(0); + player.craftTime$setCrafting(false); + } + if (invSlot == 0) { + stopRenderArrow=false; + if (!player.craftTime$isCrafting() ) { + player.craftTime$startCraftWithNewPeriod(CraftingDifficultyHelper.getCraftingDifficultyFromMatrix(this.handler, true,this)); + } + + info.cancel(); + } + } +} diff --git a/src/main/java/com/equilibrium/mixin/crafttime/MixinInventoryScreen.java b/src/main/java/com/equilibrium/mixin/crafttime/MixinInventoryScreen.java new file mode 100644 index 0000000..c51c0b1 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/crafttime/MixinInventoryScreen.java @@ -0,0 +1,93 @@ +package com.equilibrium.mixin.crafttime; + +import com.equilibrium.ITimeCraftPlayer; +import com.equilibrium.util.CraftingDifficultyHelper; +import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen; +import net.minecraft.client.gui.screen.ingame.InventoryScreen; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.screen.PlayerScreenHandler; +import net.minecraft.screen.slot.Slot; +import net.minecraft.screen.slot.SlotActionType; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.ArrayList; + +@Mixin(InventoryScreen.class) +public abstract class MixinInventoryScreen extends AbstractInventoryScreen { + + @Unique + private ITimeCraftPlayer player; + + public MixinInventoryScreen(PlayerScreenHandler screenHandler, PlayerInventory playerInventory, Text text) { + super(screenHandler, playerInventory, text); + } + + @Unique + private static final Identifier CRAFT_OVERLAY_TEXTURE = Identifier.of("miteequilibrium:textures/gui/inventory.png"); + + @Inject(method = "drawBackground", at = @At("TAIL")) + protected void timecraft$drawBackground(DrawContext context, float delta, int mouseX, int mouseY, CallbackInfo ci) { + this.player = (ITimeCraftPlayer) this.client.player; + + RenderSystem.setShaderTexture(0,CRAFT_OVERLAY_TEXTURE); + int i = this.x; + int j = this.y; + if (player.craftTime$isCrafting() && player.craftTime$getCraftPeriod() > 0) { + int l = (int) ((player.craftTime$getCraftTime() * 17.0F / player.craftTime$getCraftPeriod())); + context.drawTexture(CRAFT_OVERLAY_TEXTURE, i + 134, j + 29, 0, 0, l + 1, 14, 18, 15); + } + } + + @Inject(method = "handledScreenTick", at = @At("TAIL")) + public void timecraft$tick(CallbackInfo info) { + if (this.client != null) { + this.player = (ITimeCraftPlayer) this.client.player; + } + + ItemStack resultStack = this.handler.getSlot(0).getStack(); + + boolean finished = player.craftTime$tick(resultStack); + + //problem:when mouse cursor has stack,this is not stop + if (finished) { + ArrayList old_recipe = CraftingDifficultyHelper.getItemFromMatrix(this.handler, false); + + super.onMouseClick(this.handler.getSlot(0), 0, 0, SlotActionType.THROW); + + ArrayList new_recipe = CraftingDifficultyHelper.getItemFromMatrix(this.handler, false); + + if (old_recipe.equals(new_recipe) ) { + player.craftTime$setCraftPeriod(CraftingDifficultyHelper.getCraftingDifficultyFromMatrix(this.handler, false, this)); + }else { + player.craftTime$stopCraft(); + } + } + } + + @Inject(method = "onMouseClick", at = @At("HEAD"), cancellable = true) + public void timecraft$onMouseClick(Slot slot, int invSlot, int clickData, SlotActionType actionType, + CallbackInfo info) { + if (slot != null) { + invSlot = slot.id; + } + if (invSlot > 0 && invSlot < 5) { + player.craftTime$stopCraft(); + } + if (invSlot == 0) { + if (!player.craftTime$isCrafting()) { + player.craftTime$startCraftWithNewPeriod(CraftingDifficultyHelper.getCraftingDifficultyFromMatrix(this.handler, false,this)); + } + info.cancel(); + } + } +} diff --git a/src/main/java/com/equilibrium/mixin/crafttime/ScreenHandlerMixin.java b/src/main/java/com/equilibrium/mixin/crafttime/ScreenHandlerMixin.java new file mode 100644 index 0000000..802336e --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/crafttime/ScreenHandlerMixin.java @@ -0,0 +1,102 @@ +package com.equilibrium.mixin.crafttime; + +import net.minecraft.component.DataComponentTypes; +import net.minecraft.component.type.NbtComponent; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.registry.Registries; +import net.minecraft.screen.CraftingScreenHandler; +import net.minecraft.screen.PlayerScreenHandler; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.screen.slot.CraftingResultSlot; +import net.minecraft.screen.slot.Slot; +import net.minecraft.screen.slot.SlotActionType; +import net.minecraft.util.collection.DefaultedList; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.Objects; + +@Mixin(ScreenHandler.class) +public class ScreenHandlerMixin { + @Final + @Shadow public final DefaultedList slots = DefaultedList.of(); + + @Inject(method = "internalOnSlotClick", + at = @At( + value = "FIELD", + target = "Lnet/minecraft/screen/slot/SlotActionType;SWAP:Lnet/minecraft/screen/slot/SlotActionType;" + ), + cancellable = true) + private void internalOnSlotClick(int slotIndex, int button, SlotActionType actionType, PlayerEntity player, CallbackInfo ci) { + if(!player.getWorld().isClient){ + Slot slot3 = this.slots.get(slotIndex); + if(slot3 instanceof CraftingResultSlot && ((ScreenHandler)(Object)this instanceof CraftingScreenHandler || (ScreenHandler)(Object)this instanceof PlayerScreenHandler)){ + if (actionType == SlotActionType.THROW && slotIndex >= 0) { + + int j = button == 0 ? 1 : slot3.getStack().getCount(); + ItemStack itemStack = slot3.takeStackRange(j, Integer.MAX_VALUE, player); + + String nameItem = Registries.ITEM.getId(itemStack.getItem()).toString(); + //给特定物品添加标签:不会消失 + if (nameItem.contains("netherite_scrap") ||nameItem.contains("blaze_rod") ||nameItem.contains("elytra")) { + if (nameItem.contains("minecraft:")) { + NbtComponent data = (NbtComponent)itemStack.get(DataComponentTypes.CUSTOM_DATA); + if (data != null) { + NbtCompound value = data.copyNbt(); + if (!value.contains("aliveandwell")){ + setNbt(itemStack); + } + }else { + setNbt(itemStack); + } + } + } + if(nameItem.contains("argent_energy") ||nameItem.contains("argent_block")){ + if(nameItem.contains("doom:")) { + NbtComponent data = (NbtComponent)itemStack.get(DataComponentTypes.CUSTOM_DATA); + if (data != null) { + NbtCompound value = data.copyNbt(); + if (!value.contains("aliveandwell")){ + setNbt(itemStack); + } + }else { + setNbt(itemStack); + } + } + } + + if (player.getInventory().insertStack(itemStack)){ + player.getInventory().insertStack(itemStack); + }else { + player.dropStack(itemStack); + } + ci.cancel(); + } + } + } + } + + @Unique + public void setNbt(ItemStack itemStack) { + NbtComponent data = (NbtComponent)itemStack.get(DataComponentTypes.CUSTOM_DATA); + NbtCompound nbt; + + if (data != null) { + nbt = data.copyNbt(); + }else { + nbt = new NbtCompound(); + } + + nbt.putString("aliveandwell","aliveandwell"); + NbtComponent nbtComponent = NbtComponent.of(nbt); + + itemStack.set(DataComponentTypes.CUSTOM_DATA, nbtComponent); + } +} diff --git a/src/main/java/com/equilibrium/mixin/entitymixin/CowEntityMixin.java b/src/main/java/com/equilibrium/mixin/entitymixin/CowEntityMixin.java new file mode 100644 index 0000000..19a5a21 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/entitymixin/CowEntityMixin.java @@ -0,0 +1,160 @@ +package com.equilibrium.mixin.entitymixin; + +import com.equilibrium.entity.goal.AdvanceEscapeDangerGoal; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.ai.goal.*; +import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.passive.AnimalEntity; +import net.minecraft.entity.passive.CowEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUsage; +import net.minecraft.item.Items; +import net.minecraft.registry.tag.ItemTags; +import net.minecraft.sound.SoundEvents; +import net.minecraft.text.Text; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import static java.lang.Math.max; +import static java.lang.Math.min; + +@Mixin(CowEntity.class) +public abstract class CowEntityMixin extends AnimalEntity { + + protected CowEntityMixin(EntityType entityType, World world) { + super(entityType, world); + } + + + @Inject(method = "initGoals",at = @At(value = "HEAD"),cancellable = true) + protected void initGoals(CallbackInfo ci) { + ci.cancel(); + this.goalSelector.add(0, new SwimGoal(this)); + this.goalSelector.add(1, new AdvanceEscapeDangerGoal(this, 2.0)); + this.goalSelector.add(2, new AnimalMateGoal(this, 1.0)); + this.goalSelector.add(3, new TemptGoal(this, 1.25, stack -> stack.isIn(ItemTags.COW_FOOD), false)); + this.goalSelector.add(4, new FollowParentGoal(this, 1.25)); + this.goalSelector.add(5, new WanderAroundFarGoal(this, 1.0)); + this.goalSelector.add(6, new LookAtEntityGoal(this, PlayerEntity.class, 6.0F)); + this.goalSelector.add(7, new LookAroundGoal(this)); + } + + + + + + + + + + + public boolean isBaby() { + return this.getBreedingAge() < 0; + } + + + + + @Override + public void tick() { + super.tick(); + milkAmount++; + if (breedColdDown > 0) { + breedColdDown--; + } + } + + + @Unique + private int milkAmount; + + + + @Unique + private int breedColdDown=1000; + + + @Unique + @Override + + public DamageSource getRecentDamageSource() { + if (this.getWorld().getTime() -this.lastDamageTime > 1600L) { + this.lastDamageSource = null; + } + return this.lastDamageSource; + } + + + + + + + + @Inject(method = "interactMob",at = @At(value = "HEAD"),cancellable = true) + public void interactMob(PlayerEntity player, Hand hand, CallbackInfoReturnable cir) throws InterruptedException { + cir.cancel(); + //这份代码会被执行两次,一次在客户端一次在服务端 + ItemStack itemStack = player.getStackInHand(hand); + + + //以下是拿桶对牛交互的逻辑 + if (itemStack.isOf(Items.BUCKET) && !this.isBaby()) { + //先执行产奶判断 + //在游戏中完整度过半天,奶牛才会产一桶奶 + //一开始,没有奶,奶量最大为两桶 + //先获取奶量,上限两桶 + milkAmount = min(milkAmount,24000); + if(milkAmount>=12000) { + milkAmount=milkAmount-12000; + player.playSound(SoundEvents.ENTITY_COW_MILK, 1.0F, 1.0F); + ItemStack itemStack2 = ItemUsage.exchangeStack(itemStack, player, Items.MILK_BUCKET.getDefaultStack()); + player.setStackInHand(hand, itemStack2); + cir.setReturnValue(ActionResult.success(this.getWorld().isClient)); + } + else{ + if(this.getWorld().isClient){ + player.sendMessage(Text.of("The cow is not ready for milking")); + player.sendMessage(Text.of(String.valueOf(milkAmount))); + player.sendMessage(Text.of("The next bucket of milk is "+(int)(100*(milkAmount/12000F))+"%")); + } + + cir.setReturnValue(ActionResult.PASS); + + } + } + else if (itemStack.isOf(Items.WHEAT) && !this.isBaby()){ + if(breedColdDown==0){ + this.eat(player, hand, itemStack); + this.lovePlayer(player); + cir.setReturnValue(ActionResult.SUCCESS); + milkAmount=24000; + breedColdDown=1000; + }else{ + if(breedColdDown>0){ + if(this.getWorld().isClient){ + player.sendMessage(Text.of("The cow is full")); + cir.setReturnValue(ActionResult.PASS); + } + cir.setReturnValue(ActionResult.PASS); + } + cir.setReturnValue(ActionResult.PASS); + } + + + }else{ + cir.setReturnValue(super.interactMob(player, hand)); + } + + } +} + diff --git a/src/main/java/com/equilibrium/mixin/loot_table/BlockLootTableMixin.java b/src/main/java/com/equilibrium/mixin/loot_table/BlockLootTableMixin.java index 2d45d1e..82571b7 100644 --- a/src/main/java/com/equilibrium/mixin/loot_table/BlockLootTableMixin.java +++ b/src/main/java/com/equilibrium/mixin/loot_table/BlockLootTableMixin.java @@ -1,47 +1,7 @@ package com.equilibrium.mixin.loot_table; import net.minecraft.block.*; -import net.minecraft.block.enums.BedPart; -import net.minecraft.block.enums.DoubleBlockHalf; -import net.minecraft.component.DataComponentTypes; -import net.minecraft.data.server.loottable.BlockLootTableGenerator; -import net.minecraft.data.server.loottable.vanilla.VanillaBlockLootTableGenerator; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.Enchantments; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.loot.LootPool; -import net.minecraft.loot.LootTable; -import net.minecraft.loot.condition.*; -import net.minecraft.loot.context.LootContext; -import net.minecraft.loot.entry.*; -import net.minecraft.loot.function.ApplyBonusLootFunction; -import net.minecraft.loot.function.CopyComponentsLootFunction; -import net.minecraft.loot.function.LimitCountLootFunction; -import net.minecraft.loot.function.SetCountLootFunction; -import net.minecraft.loot.operator.BoundedIntUnaryOperator; -import net.minecraft.loot.provider.number.ConstantLootNumberProvider; -import net.minecraft.loot.provider.number.UniformLootNumberProvider; -import net.minecraft.predicate.StatePredicate; -import net.minecraft.predicate.item.ItemPredicate; -import net.minecraft.registry.*; -import net.minecraft.registry.tag.ItemTags; -import net.minecraft.resource.featuretoggle.FeatureSet; -import net.minecraft.util.Identifier; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.List; -import java.util.Set; -import java.util.function.UnaryOperator; - - -import static com.equilibrium.MITEequilibrium.LOGGER; -import static net.minecraft.util.PathUtil.validatePath; @Mixin(AbstractBlock.class) public abstract class BlockLootTableMixin{ diff --git a/src/main/java/com/equilibrium/mixin/oreGenerator/OreGeneratorModifiy.java b/src/main/java/com/equilibrium/mixin/oreGenerator/OreGeneratorModifiy.java new file mode 100644 index 0000000..6af0d59 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/oreGenerator/OreGeneratorModifiy.java @@ -0,0 +1,294 @@ +package com.equilibrium.mixin.oreGenerator; + +import net.minecraft.registry.Registerable; +import net.minecraft.registry.RegistryEntryLookup; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.util.math.intprovider.UniformIntProvider; +import net.minecraft.world.gen.YOffset; +import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.placementmodifier.*; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.List; + +@Mixin(OrePlacedFeatures.class) +public class OreGeneratorModifiy { + private static List modifiers(PlacementModifier countModifier, PlacementModifier heightModifier) { + return List.of(countModifier, SquarePlacementModifier.of(), heightModifier, BiomePlacementModifier.of()); + } + + private static List modifiersWithCount(int count, PlacementModifier heightModifier) { + return modifiers(CountPlacementModifier.of(count), heightModifier); + } + + private static List modifiersWithRarity(int chance, PlacementModifier heightModifier) { + return modifiers(RarityFilterPlacementModifier.of(chance), heightModifier); + } + @Shadow + public static final RegistryKey ORE_MAGMA = PlacedFeatures.of("ore_magma"); + @Shadow + public static final RegistryKey ORE_SOUL_SAND = PlacedFeatures.of("ore_soul_sand"); + @Shadow + public static final RegistryKey ORE_GOLD_DELTAS = PlacedFeatures.of("ore_gold_deltas"); + @Shadow + public static final RegistryKey ORE_QUARTZ_DELTAS = PlacedFeatures.of("ore_quartz_deltas"); + @Shadow + public static final RegistryKey ORE_GOLD_NETHER = PlacedFeatures.of("ore_gold_nether"); + @Shadow + public static final RegistryKey ORE_QUARTZ_NETHER = PlacedFeatures.of("ore_quartz_nether"); + @Shadow + public static final RegistryKey ORE_GRAVEL_NETHER = PlacedFeatures.of("ore_gravel_nether"); + @Shadow + public static final RegistryKey ORE_BLACKSTONE = PlacedFeatures.of("ore_blackstone"); + @Shadow + public static final RegistryKey ORE_DIRT = PlacedFeatures.of("ore_dirt"); + @Shadow + public static final RegistryKey ORE_GRAVEL = PlacedFeatures.of("ore_gravel"); + @Shadow + public static final RegistryKey ORE_GRANITE_UPPER = PlacedFeatures.of("ore_granite_upper"); + @Shadow + public static final RegistryKey ORE_GRANITE_LOWER = PlacedFeatures.of("ore_granite_lower"); + @Shadow + public static final RegistryKey ORE_DIORITE_UPPER = PlacedFeatures.of("ore_diorite_upper"); + @Shadow + public static final RegistryKey ORE_DIORITE_LOWER = PlacedFeatures.of("ore_diorite_lower"); + @Shadow + public static final RegistryKey ORE_ANDESITE_UPPER = PlacedFeatures.of("ore_andesite_upper"); + @Shadow + public static final RegistryKey ORE_ANDESITE_LOWER = PlacedFeatures.of("ore_andesite_lower"); + @Shadow + public static final RegistryKey ORE_TUFF = PlacedFeatures.of("ore_tuff"); + @Shadow + public static final RegistryKey ORE_COAL_UPPER = PlacedFeatures.of("ore_coal_upper"); + @Shadow + public static final RegistryKey ORE_COAL_LOWER = PlacedFeatures.of("ore_coal_lower"); + @Shadow + public static final RegistryKey ORE_IRON_UPPER = PlacedFeatures.of("ore_iron_upper"); + @Shadow + public static final RegistryKey ORE_IRON_MIDDLE = PlacedFeatures.of("ore_iron_middle"); + @Shadow + public static final RegistryKey ORE_IRON_SMALL = PlacedFeatures.of("ore_iron_small"); + @Shadow + public static final RegistryKey ORE_GOLD_EXTRA = PlacedFeatures.of("ore_gold_extra"); + @Shadow + public static final RegistryKey ORE_GOLD = PlacedFeatures.of("ore_gold"); + @Shadow + public static final RegistryKey ORE_GOLD_LOWER = PlacedFeatures.of("ore_gold_lower"); + @Shadow + public static final RegistryKey ORE_REDSTONE = PlacedFeatures.of("ore_redstone"); + @Shadow + public static final RegistryKey ORE_REDSTONE_LOWER = PlacedFeatures.of("ore_redstone_lower"); + @Shadow + public static final RegistryKey ORE_DIAMOND = PlacedFeatures.of("ore_diamond"); + @Shadow + public static final RegistryKey ORE_DIAMOND_MEDIUM = PlacedFeatures.of("ore_diamond_medium"); + @Shadow + public static final RegistryKey ORE_DIAMOND_LARGE = PlacedFeatures.of("ore_diamond_large"); + @Shadow + public static final RegistryKey ORE_DIAMOND_BURIED = PlacedFeatures.of("ore_diamond_buried"); + @Shadow + public static final RegistryKey ORE_LAPIS = PlacedFeatures.of("ore_lapis"); + @Shadow + public static final RegistryKey ORE_LAPIS_BURIED = PlacedFeatures.of("ore_lapis_buried"); + @Shadow + public static final RegistryKey ORE_INFESTED = PlacedFeatures.of("ore_infested"); + @Shadow + public static final RegistryKey ORE_EMERALD = PlacedFeatures.of("ore_emerald"); + @Shadow + public static final RegistryKey ORE_ANCIENT_DEBRIS_LARGE = PlacedFeatures.of("ore_ancient_debris_large"); + @Shadow + public static final RegistryKey ORE_DEBRIS_SMALL = PlacedFeatures.of("ore_debris_small"); + @Shadow + public static final RegistryKey ORE_COPPER = PlacedFeatures.of("ore_copper"); + @Shadow + public static final RegistryKey ORE_COPPER_LARGE = PlacedFeatures.of("ore_copper_large"); + @Shadow + public static final RegistryKey ORE_CLAY = PlacedFeatures.of("ore_clay"); + + + @Inject(method = "bootstrap",at = @At(value = "HEAD"),cancellable = true) + private static void bootstrap(Registerable featureRegisterable, CallbackInfo ci) { + ci.cancel(); + RegistryEntryLookup> registryEntryLookup = featureRegisterable.getRegistryLookup(RegistryKeys.CONFIGURED_FEATURE); + RegistryEntry> registryEntry = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_MAGMA); + RegistryEntry> registryEntry2 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_SOUL_SAND); + RegistryEntry> registryEntry3 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_NETHER_GOLD); + RegistryEntry> registryEntry4 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_QUARTZ); + RegistryEntry> registryEntry5 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_GRAVEL_NETHER); + RegistryEntry> registryEntry6 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_BLACKSTONE); + RegistryEntry> registryEntry7 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIRT); + RegistryEntry> registryEntry8 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_GRAVEL); + RegistryEntry> registryEntry9 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_GRANITE); + RegistryEntry> registryEntry10 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIORITE); + RegistryEntry> registryEntry11 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_ANDESITE); + RegistryEntry> registryEntry12 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_TUFF); + RegistryEntry> registryEntry13 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_COAL); + RegistryEntry> registryEntry14 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_COAL_BURIED); + RegistryEntry> registryEntry15 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_IRON); + RegistryEntry> registryEntry16 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_IRON_SMALL); + RegistryEntry> registryEntry17 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_GOLD); + RegistryEntry> registryEntry18 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_GOLD_BURIED); + RegistryEntry> registryEntry19 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_REDSTONE); + RegistryEntry> registryEntry20 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIAMOND_SMALL); + RegistryEntry> registryEntry21 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIAMOND_MEDIUM); + RegistryEntry> registryEntry22 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIAMOND_LARGE); + RegistryEntry> registryEntry23 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_DIAMOND_BURIED); + RegistryEntry> registryEntry24 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_LAPIS); + RegistryEntry> registryEntry25 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_LAPIS_BURIED); + RegistryEntry> registryEntry26 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_INFESTED); + RegistryEntry> registryEntry27 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_EMERALD); + RegistryEntry> registryEntry28 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_ANCIENT_DEBRIS_LARGE); + RegistryEntry> registryEntry29 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_ANCIENT_DEBRIS_SMALL); + RegistryEntry> registryEntry30 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_COPPER_SMALL); + RegistryEntry> registryEntry31 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_COPPER_LARGE); + RegistryEntry> registryEntry32 = registryEntryLookup.getOrThrow(OreConfiguredFeatures.ORE_CLAY); + PlacedFeatures.register( + featureRegisterable, ORE_MAGMA, registryEntry, modifiersWithCount(4, HeightRangePlacementModifier.uniform(YOffset.fixed(27), YOffset.fixed(36))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_SOUL_SAND, registryEntry2, modifiersWithCount(12, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(31))) + ); + PlacedFeatures.register(featureRegisterable, ORE_GOLD_DELTAS, registryEntry3, modifiersWithCount(20, PlacedFeatures.TEN_ABOVE_AND_BELOW_RANGE)); + PlacedFeatures.register(featureRegisterable, ORE_QUARTZ_DELTAS, registryEntry4, modifiersWithCount(32, PlacedFeatures.TEN_ABOVE_AND_BELOW_RANGE)); + PlacedFeatures.register(featureRegisterable, ORE_GOLD_NETHER, registryEntry3, modifiersWithCount(10, PlacedFeatures.TEN_ABOVE_AND_BELOW_RANGE)); + PlacedFeatures.register(featureRegisterable, ORE_QUARTZ_NETHER, registryEntry4, modifiersWithCount(16, PlacedFeatures.TEN_ABOVE_AND_BELOW_RANGE)); + PlacedFeatures.register( + featureRegisterable, ORE_GRAVEL_NETHER, registryEntry5, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(5), YOffset.fixed(41))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_BLACKSTONE, registryEntry6, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(5), YOffset.fixed(31))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_DIRT, registryEntry7, modifiersWithCount(7, HeightRangePlacementModifier.uniform(YOffset.fixed(0), YOffset.fixed(160))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_GRAVEL, registryEntry8, modifiersWithCount(14, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.getTop())) + ); + PlacedFeatures.register( + featureRegisterable, ORE_GRANITE_UPPER, registryEntry9, modifiersWithRarity(6, HeightRangePlacementModifier.uniform(YOffset.fixed(64), YOffset.fixed(128))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_GRANITE_LOWER, registryEntry9, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(0), YOffset.fixed(60))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_DIORITE_UPPER, registryEntry10, modifiersWithRarity(6, HeightRangePlacementModifier.uniform(YOffset.fixed(64), YOffset.fixed(128))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_DIORITE_LOWER, registryEntry10, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(0), YOffset.fixed(60))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_ANDESITE_UPPER, + registryEntry11, + modifiersWithRarity(6, HeightRangePlacementModifier.uniform(YOffset.fixed(64), YOffset.fixed(128))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_ANDESITE_LOWER, registryEntry11, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(0), YOffset.fixed(60))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_TUFF, registryEntry12, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(0))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_COAL_UPPER, registryEntry13, modifiersWithCount(30, HeightRangePlacementModifier.uniform(YOffset.fixed(136), YOffset.getTop())) + ); + PlacedFeatures.register( + featureRegisterable, ORE_COAL_LOWER, registryEntry14, modifiersWithCount(20, HeightRangePlacementModifier.trapezoid(YOffset.fixed(0), YOffset.fixed(192))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_IRON_UPPER, registryEntry15, modifiersWithCount(90, HeightRangePlacementModifier.trapezoid(YOffset.fixed(80), YOffset.fixed(384))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_IRON_MIDDLE, registryEntry15, modifiersWithCount(10, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-24), YOffset.fixed(56))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_IRON_SMALL, registryEntry16, modifiersWithCount(10, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(72))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_GOLD_EXTRA, registryEntry17, modifiersWithCount(50, HeightRangePlacementModifier.uniform(YOffset.fixed(32), YOffset.fixed(256))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_GOLD, registryEntry18, modifiersWithCount(4, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-64), YOffset.fixed(32))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_GOLD_LOWER, + registryEntry18, + modifiers(CountPlacementModifier.of(UniformIntProvider.create(0, 1)), HeightRangePlacementModifier.uniform(YOffset.fixed(-64), YOffset.fixed(-48))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_REDSTONE, registryEntry19, modifiersWithCount(4, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(15))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_REDSTONE_LOWER, + registryEntry19, + modifiersWithCount(8, HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(-32), YOffset.aboveBottom(32))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_DIAMOND, + registryEntry20, + modifiersWithCount(7, HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(-80), YOffset.aboveBottom(80))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_DIAMOND_MEDIUM, registryEntry21, modifiersWithCount(2, HeightRangePlacementModifier.uniform(YOffset.fixed(-64), YOffset.fixed(-4))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_DIAMOND_LARGE, + registryEntry22, + modifiersWithRarity(9, HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(-80), YOffset.aboveBottom(80))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_DIAMOND_BURIED, + registryEntry23, + modifiersWithCount(4, HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(-80), YOffset.aboveBottom(80))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_LAPIS, registryEntry24, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-32), YOffset.fixed(32))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_LAPIS_BURIED, registryEntry25, modifiersWithCount(4, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(64))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_INFESTED, registryEntry26, modifiersWithCount(14, HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(63))) + ); + PlacedFeatures.register( + featureRegisterable, ORE_EMERALD, registryEntry27, modifiersWithCount(100, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-16), YOffset.fixed(480))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_ANCIENT_DEBRIS_LARGE, + registryEntry28, + SquarePlacementModifier.of(), + HeightRangePlacementModifier.trapezoid(YOffset.fixed(8), YOffset.fixed(24)), + BiomePlacementModifier.of() + ); + PlacedFeatures.register( + featureRegisterable, + ORE_DEBRIS_SMALL, + registryEntry29, + SquarePlacementModifier.of(), + PlacedFeatures.EIGHT_ABOVE_AND_BELOW_RANGE, + BiomePlacementModifier.of() + ); + PlacedFeatures.register( + featureRegisterable, ORE_COPPER, registryEntry30, modifiersWithCount(16, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-16), YOffset.fixed(112))) + ); + PlacedFeatures.register( + featureRegisterable, + ORE_COPPER_LARGE, + registryEntry31, + modifiersWithCount(16, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-16), YOffset.fixed(112))) + ); + PlacedFeatures.register(featureRegisterable, ORE_CLAY, registryEntry32, modifiersWithCount(46, PlacedFeatures.BOTTOM_TO_120_RANGE)); + } + +} diff --git a/src/main/java/com/equilibrium/mixin/player/ClientPlayerEntityMixin.java b/src/main/java/com/equilibrium/mixin/player/ClientPlayerEntityMixin.java new file mode 100644 index 0000000..8205d16 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/player/ClientPlayerEntityMixin.java @@ -0,0 +1,29 @@ +package com.equilibrium.mixin.player; + +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.client.util.ClientPlayerTickable; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.network.packet.c2s.play.PlayerInputC2SPacket; +import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; +import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket; +import net.minecraft.stat.Stats; +import net.minecraft.text.Text; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(ClientPlayerEntity.class) +public abstract class ClientPlayerEntityMixin{ + + + + + +} diff --git a/src/main/java/com/equilibrium/mixin/HungerManagerMixin.java b/src/main/java/com/equilibrium/mixin/player/HungerManagerMixin.java similarity index 95% rename from src/main/java/com/equilibrium/mixin/HungerManagerMixin.java rename to src/main/java/com/equilibrium/mixin/player/HungerManagerMixin.java index fa0981e..4d35f94 100644 --- a/src/main/java/com/equilibrium/mixin/HungerManagerMixin.java +++ b/src/main/java/com/equilibrium/mixin/player/HungerManagerMixin.java @@ -1,12 +1,10 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.player; import com.equilibrium.util.PlayerMaxHungerHelper; import net.minecraft.entity.player.HungerManager; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.math.MathHelper; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; diff --git a/src/main/java/com/equilibrium/mixin/PlayerEntityMixin.java b/src/main/java/com/equilibrium/mixin/player/PlayerEntityMixin.java similarity index 81% rename from src/main/java/com/equilibrium/mixin/PlayerEntityMixin.java rename to src/main/java/com/equilibrium/mixin/player/PlayerEntityMixin.java index 6ade4b5..bfa2e83 100644 --- a/src/main/java/com/equilibrium/mixin/PlayerEntityMixin.java +++ b/src/main/java/com/equilibrium/mixin/player/PlayerEntityMixin.java @@ -1,25 +1,37 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.player; +import com.equilibrium.constant.ConstantString; import com.equilibrium.util.PlayerMaxHealthHelper; import com.equilibrium.util.PlayerMaxHungerHelper; +import com.equilibrium.util.ShouldSentText; import com.mojang.authlib.GameProfile; +import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.player.HungerManager; import net.minecraft.entity.player.PlayerAbilities; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.nbt.*; +import net.minecraft.network.message.SentMessage; +import net.minecraft.network.message.SignedMessage; import net.minecraft.sound.SoundEvents; +import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.GlobalPos; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.Difficulty; import net.minecraft.world.World; import org.slf4j.Logger; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @@ -29,6 +41,28 @@ //和源码构造方式一致,继承谁这里也跟着继承 public abstract class PlayerEntityMixin extends LivingEntity { + @Unique + public int test; + + @Unique + public int getTest(){ + return this.test; + } + + @Inject(method = "writeCustomDataToNbt",at = @At(value = "TAIL")) + public void writeCustomDataToNbt(NbtCompound nbt, CallbackInfo ci) { + super.writeCustomDataToNbt(nbt); + nbt.putInt("Test",this.test); + } + + @Inject(method = "readCustomDataFromNbt",at = @At(value = "TAIL")) + public void readCustomDataFromNbt(NbtCompound nbt, CallbackInfo ci) { + super.readCustomDataFromNbt(nbt); + this.test = nbt.getInt("Test"); + } + + + protected PlayerEntityMixin(EntityType entityType, World world) { @@ -42,6 +76,9 @@ public void PlayerEntity(World world, BlockPos pos, float yaw, GameProfile gameP @Inject(method = "jump", at = @At("TAIL")) public void jump(CallbackInfo ci) { + if(!this.getWorld().isClient){ + this.sendMessage(Text.of(""+ getTest())); + } } @@ -73,6 +110,15 @@ public void jump(CallbackInfo ci) { @Shadow public abstract boolean isCreative(); + @Shadow public abstract void sendMessage(Text message, boolean overlay); + + @Shadow public abstract void tickMovement(); + + @Shadow public abstract boolean damage(DamageSource source, float amount); + + + @Shadow public abstract void sendAbilitiesUpdate(); + //调用CallbackInfo类,修改返回值 //以下是修改方块交互距离 @Inject(method = "getBlockInteractionRange", at = @At("HEAD"), cancellable = true) @@ -84,7 +130,7 @@ public void getBlockInteractionRange(CallbackInfoReturnable cir) { //以下修改实体交互距离 @Inject(method = "getEntityInteractionRange", at = @At("HEAD"), cancellable = true) public void getEntityInteractionRange(CallbackInfoReturnable cir) { - cir.setReturnValue(8.0); + cir.setReturnValue(1.0); } //玩家基础属性 @@ -150,6 +196,7 @@ public void refreshPlayerFoodLevelAndMaxHealth(){ @Inject(method = "addExperienceLevels", at = @At("HEAD"), cancellable = true) public void addExperienceLevels(int levels, CallbackInfo ci) { + //触发器,用作增加经验值的后续处理,比如增加生命值和饥饿度等 //除了初始化会增加上限之外,只有该方法才能增加上限值 ci.cancel(); @@ -176,21 +223,30 @@ public void addExperienceLevels(int levels, CallbackInfo ci) { public void canFoodHeal(CallbackInfoReturnable cir){ cir.setReturnValue(false); } - @Inject(method = "tickMovement",at = @At("HEAD")) - public void tickMovement(CallbackInfo ci){ + + + + @Inject(method = "tick",at = @At("HEAD")) + public void tick(CallbackInfo ci) { //刷新上限值,和Hud保持同步,都是1s20次刷新 refreshPlayerFoodLevelAndMaxHealth(); if (this.getWorld().getDifficulty() != Difficulty.PEACEFUL){ //在tick中加入生命回复任务 int maxHealth= PlayerMaxHealthHelper.getMaxHealthLevel(); + if (this.getHealth() < maxHealth && this.age % 20 == 0) { this.heal(1.0F); LOGGER.info("Natural Regeneration +1 "); } } + ShouldSentText.count++; + test--; + } + @Inject(method = "tickMovement",at = @At("HEAD")) + public void tickMovement(CallbackInfo ci){ } @@ -205,6 +261,12 @@ public void setHealth(float health) { this.dataTracker.set(HEALTH, MathHelper.clamp(health, 0.0F, maxHealth)); } + + + + + + } diff --git a/src/main/java/com/equilibrium/mixin/PlayerManagerMixin.java b/src/main/java/com/equilibrium/mixin/player/PlayerManagerMixin.java similarity index 55% rename from src/main/java/com/equilibrium/mixin/PlayerManagerMixin.java rename to src/main/java/com/equilibrium/mixin/player/PlayerManagerMixin.java index a9bb23a..f9a94ac 100644 --- a/src/main/java/com/equilibrium/mixin/PlayerManagerMixin.java +++ b/src/main/java/com/equilibrium/mixin/player/PlayerManagerMixin.java @@ -1,11 +1,16 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.player; import com.equilibrium.util.PlayerMaxHealthHelper; import com.equilibrium.util.PlayerMaxHungerHelper; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffectUtil; +import net.minecraft.entity.effect.StatusEffects; import net.minecraft.network.ClientConnection; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.PlayerManager; import net.minecraft.server.network.ConnectedClientData; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import org.slf4j.Logger; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -20,6 +25,8 @@ public abstract class PlayerManagerMixin { @Shadow @Final private static Logger LOGGER; + @Shadow @Final private MinecraftServer server; + @Inject(method = "onPlayerConnect",at = @At(value = "TAIL")) public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData, CallbackInfo ci) { LOGGER.info("When finishing connect,the player xp level is "+player.experienceLevel); @@ -35,5 +42,18 @@ public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity play + StatusEffectInstance statusEffectInstance1 = new StatusEffectInstance(StatusEffects.BLINDNESS, 60,255, false,false,false); + StatusEffectUtil.addEffectToPlayersWithinDistance((ServerWorld) player.getWorld(), player, player.getPos(), 4, statusEffectInstance1,100); + StatusEffectInstance statusEffectInstance2 = new StatusEffectInstance(StatusEffects.NAUSEA,100,255, false,false,false); + StatusEffectUtil.addEffectToPlayersWithinDistance((ServerWorld) player.getWorld(), player, player.getPos(), 4, statusEffectInstance2,100); + StatusEffectInstance statusEffectInstance3 = new StatusEffectInstance(StatusEffects.WEAKNESS,100,255, false,false,false); + StatusEffectUtil.addEffectToPlayersWithinDistance((ServerWorld) player.getWorld(), player, player.getPos(), 4, statusEffectInstance3,100); + + + + player.setHealth(player.getHealth()-1); + + + } } diff --git a/src/main/java/com/equilibrium/mixin/AbstractFireBlockMixin.java b/src/main/java/com/equilibrium/mixin/portal/AbstractFireBlockMixin.java similarity index 97% rename from src/main/java/com/equilibrium/mixin/AbstractFireBlockMixin.java rename to src/main/java/com/equilibrium/mixin/portal/AbstractFireBlockMixin.java index 520df36..7f693a5 100644 --- a/src/main/java/com/equilibrium/mixin/AbstractFireBlockMixin.java +++ b/src/main/java/com/equilibrium/mixin/portal/AbstractFireBlockMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.portal; import net.minecraft.block.AbstractBlock; diff --git a/src/main/java/com/equilibrium/mixin/EnderEyeItemMixin.java b/src/main/java/com/equilibrium/mixin/portal/EnderEyeItemMixin.java similarity index 98% rename from src/main/java/com/equilibrium/mixin/EnderEyeItemMixin.java rename to src/main/java/com/equilibrium/mixin/portal/EnderEyeItemMixin.java index a4e2a51..25e1f3b 100644 --- a/src/main/java/com/equilibrium/mixin/EnderEyeItemMixin.java +++ b/src/main/java/com/equilibrium/mixin/portal/EnderEyeItemMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.portal; import net.minecraft.advancement.criterion.Criteria; import net.minecraft.block.Blocks; diff --git a/src/main/java/com/equilibrium/mixin/NetherPortalBlockMixin.java b/src/main/java/com/equilibrium/mixin/portal/NetherPortalBlockMixin.java similarity index 56% rename from src/main/java/com/equilibrium/mixin/NetherPortalBlockMixin.java rename to src/main/java/com/equilibrium/mixin/portal/NetherPortalBlockMixin.java index 0917529..ee380a0 100644 --- a/src/main/java/com/equilibrium/mixin/NetherPortalBlockMixin.java +++ b/src/main/java/com/equilibrium/mixin/portal/NetherPortalBlockMixin.java @@ -1,17 +1,31 @@ -package com.equilibrium.mixin; - +package com.equilibrium.mixin.portal; + +import com.equilibrium.MITEequilibrium; +import com.equilibrium.constant.ConstantString; +import com.equilibrium.util.ShouldSentText; +import com.mojang.brigadier.Message; +import net.fabricmc.fabric.api.client.message.v1.ClientSendMessageEvents; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; import net.minecraft.block.Block; +import net.minecraft.block.BlockState; import net.minecraft.block.NetherPortalBlock; import net.minecraft.block.Portal; +import net.minecraft.block.entity.VaultBlockEntity; +import net.minecraft.command.TranslatableBuiltInExceptions; import net.minecraft.enchantment.effect.AllOfEnchantmentEffects; import net.minecraft.entity.Entity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffectUtil; import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.network.message.SentMessage; +import net.minecraft.network.message.SignedMessage; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.server.world.ServerWorld; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; @@ -26,12 +40,17 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import java.util.Objects; import java.util.Set; +import static com.equilibrium.constant.ConstantString.*; + + @Mixin(NetherPortalBlock.class) -public abstract class NetherPortalBlockMixin extends Block implements Portal { +public abstract class NetherPortalBlockMixin extends Block implements Portal{ @Shadow @Nullable protected abstract TeleportTarget getOrCreateExitPortalTarget(ServerWorld world, Entity entity, BlockPos pos, BlockPos scaledPos, boolean inNether, WorldBorder worldBorder); @@ -42,12 +61,92 @@ public NetherPortalBlockMixin(Settings settings) { super(settings); } + + + + + private static String getTeleportWorld(World world, Entity entity) { + + //获取目前的世界类型(访问注册方法) + RegistryKey registryKey = world.getRegistryKey(); + //传送后的世界类型 + RegistryKey teleport; + //避免空指针错误 + + if (registryKey == null) { + return "Not an illegal transportation"; + } else { + boolean atBottom = Math.abs(entity.getY()-world.getBottomY())<5; + if(world.getRegistryKey()==overworld && atBottom){ + teleport=underworld; + } else if (world.getRegistryKey()==overworld && !atBottom) { + teleport=overworld; + } else if (world.getRegistryKey()==underworld && !atBottom) { + teleport=overworld; + } else if (world.getRegistryKey()==underworld && atBottom) { + teleport=nether; + } else if(world.getRegistryKey()==nether){ + teleport=underworld; + } + else { + teleport=world.getRegistryKey(); + } + String worldType; + if(teleport==underworld){ + worldType= TRANSPORT_TARGET2; + } else if (teleport==overworld) { + worldType= TRANSPORT_TARGET1; + } else if (teleport==nether) { + worldType= TRANSPORT_TARGET3; + }else{ + worldType="Not an illegal transportation"; + } + + return worldType; + } + + + } + + + + + @Inject(method = "onEntityCollision",at = @At(value = "HEAD"),cancellable = true) + protected void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity, CallbackInfo ci) { + ci.cancel(); + + if (entity.canUsePortals(false)) { + entity.tryUsePortal(this, pos); + if(ShouldSentText.count>=170) { + String teleport = getTeleportWorld(world, entity); + if (Objects.equals(teleport, TRANSPORT_TARGET1)){ + entity.sendMessage(Text.of(Text.translatable("teleport.overworld").formatted(Formatting.YELLOW))); + }else if(Objects.equals(teleport, TRANSPORT_TARGET2)){ + entity.sendMessage(Text.of(Text.translatable("teleport.underworld").formatted(Formatting.YELLOW))); + }else if(Objects.equals(teleport, TRANSPORT_TARGET3)) + entity.sendMessage(Text.of(Text.translatable("teleport.nether").formatted(Formatting.YELLOW))); + else{ + entity.sendMessage(Text.of("You shouldn't receive the mesaage, it might you will teleport to the wrong dimension that no supporting")); + } + ShouldSentText.count=0; + } + + } + } + + + + + private static RegistryKey overworld = World.OVERWORLD; + private static RegistryKey nether = World.NETHER; + private static RegistryKey underworld = RegistryKey.of(RegistryKeys.WORLD, Identifier.of("miteequilibrium", "underworld")); + + + @Inject(method = "createTeleportTarget",at=@At(value = "HEAD"),cancellable = true) public void createTeleportTarget(ServerWorld world, Entity entity, BlockPos pos, CallbackInfoReturnable cir) { cir.cancel(); - RegistryKey overworld = World.OVERWORLD; - RegistryKey nether = World.NETHER; - RegistryKey underworld = RegistryKey.of(RegistryKeys.WORLD, Identifier.of("miteequilibrium", "underworld")); + //获取目前的世界类型(访问注册方法) RegistryKey registryKey = world.getRegistryKey(); //传送后的世界类型 @@ -65,7 +164,7 @@ public void createTeleportTarget(ServerWorld world, Entity entity, BlockPos pos, double d = DimensionType.getCoordinateScaleFactor(world.getDimension(), world.getDimension()); BlockPos blockPos = worldBorder.clamp(entity.getX() * d, entity.getY(), entity.getZ() * d); - boolean atBottom = Math.abs(blockPos.getY()-world.getBottomY())<5; + boolean atBottom = Math.abs(entity.getY()-world.getBottomY())<5; @@ -116,13 +215,19 @@ public void createTeleportTarget(ServerWorld world, Entity entity, BlockPos pos, return; } - + else{ + teleport=underworld; + } } else if (world.getRegistryKey()==underworld && !atBottom) { teleport=overworld; + + + } else if (world.getRegistryKey()==underworld && atBottom) { teleport=nether; } else if(world.getRegistryKey()==nether){ teleport=underworld; + } else { teleport=world.getRegistryKey(); @@ -130,6 +235,9 @@ public void createTeleportTarget(ServerWorld world, Entity entity, BlockPos pos, serverWorld=world.getServer().getWorld(teleport); + + //传送信息冷却 + ShouldSentText.count=-100; cir.setReturnValue(this.getOrCreateExitPortalTarget(serverWorld, entity, pos, blockPos, inNether, worldBorder)); }} diff --git a/src/main/java/com/equilibrium/mixin/NetherPortalMixin.java b/src/main/java/com/equilibrium/mixin/portal/NetherPortalMixin.java similarity index 95% rename from src/main/java/com/equilibrium/mixin/NetherPortalMixin.java rename to src/main/java/com/equilibrium/mixin/portal/NetherPortalMixin.java index 3759595..89f8c3c 100644 --- a/src/main/java/com/equilibrium/mixin/NetherPortalMixin.java +++ b/src/main/java/com/equilibrium/mixin/portal/NetherPortalMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.portal; import com.equilibrium.block.ModBlocks; import com.equilibrium.block.UnderworldPortalBlock; @@ -6,7 +6,10 @@ import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.tag.BlockTags; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.command.CommandOutput; import net.minecraft.server.world.ServerWorld; +import net.minecraft.text.Text; import net.minecraft.util.Identifier; import net.minecraft.util.math.*; import net.minecraft.world.World; @@ -20,7 +23,44 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(NetherPortal.class) + + + + + + + public abstract class NetherPortalMixin { + + @Shadow + private BlockPos lowerCorner; + @Shadow + private int height; + @Shadow + @Final + private int width; + @Shadow + @Final + private WorldAccess world; + @Shadow + @Final + private Direction.Axis axis; + @Shadow + @Final + private Direction negativeDir; + + + + + + + + + + + + + // ///* 测试用 // @Inject(method = "getNewPortal",at = @At("HEAD")) diff --git a/src/main/java/com/equilibrium/mixin/PortalForcerMixin.java b/src/main/java/com/equilibrium/mixin/portal/PortalForcerMixin.java similarity index 90% rename from src/main/java/com/equilibrium/mixin/PortalForcerMixin.java rename to src/main/java/com/equilibrium/mixin/portal/PortalForcerMixin.java index 6c63d09..d14f7d0 100644 --- a/src/main/java/com/equilibrium/mixin/PortalForcerMixin.java +++ b/src/main/java/com/equilibrium/mixin/portal/PortalForcerMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.portal; import com.equilibrium.block.ModBlocks; import net.minecraft.block.Blocks; @@ -15,7 +15,7 @@ import net.minecraft.world.poi.PointOfInterest; import net.minecraft.world.poi.PointOfInterestStorage; import net.minecraft.world.poi.PointOfInterestType; -import net.minecraft.world.poi.PointOfInterestTypes; + import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mutable; @@ -37,10 +37,7 @@ public abstract class PortalForcerMixin { @Final @Shadow private ServerWorld world; - @Inject(method = "getPortalPos",at = @At("TAIL"),cancellable = true) - public void getPortalPos(BlockPos pos, boolean destIsNether, WorldBorder worldBorder, CallbackInfoReturnable> cir) { - System.out.println(cir.getReturnValue()); - } + // @Inject(method = "createPortal",at = @At("HEAD")) // public void createPortal(BlockPos pos, Direction.Axis axis, CallbackInfoReturnable> cir) { // System.out.println("getPortalPos"); diff --git a/src/main/java/com/equilibrium/mixin/recipeModifier.java b/src/main/java/com/equilibrium/mixin/recipeModifier.java new file mode 100644 index 0000000..23c8878 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/recipeModifier.java @@ -0,0 +1,91 @@ +package com.equilibrium.mixin; + +import com.equilibrium.register.BlockInit; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.CraftingResultInventory; +import net.minecraft.inventory.RecipeInputInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket; +import net.minecraft.recipe.CraftingRecipe; +import net.minecraft.recipe.RecipeEntry; +import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.input.CraftingRecipeInput; +import net.minecraft.screen.CraftingScreenHandler; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.Optional; + +@Mixin(CraftingScreenHandler.class) +public abstract class recipeModifier { + @Inject(method = "updateResult",at = @At(value = "HEAD"),cancellable = true) + private static void updateResult( + ScreenHandler handler, World world, PlayerEntity player, RecipeInputInventory craftingInventory, CraftingResultInventory resultInventory, @Nullable RecipeEntry recipe, CallbackInfo ci + ) { + + + ci.cancel(); + if (!world.isClient) { + CraftingRecipeInput craftingRecipeInput = craftingInventory.createRecipeInput(); + ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity)player; + ItemStack itemStack = ItemStack.EMPTY; + Optional> optional = world.getServer().getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftingRecipeInput, world, recipe); + if (optional.isPresent()) { + RecipeEntry recipeEntry = (RecipeEntry)optional.get(); + CraftingRecipe craftingRecipe = recipeEntry.value(); + if (resultInventory.shouldCraftRecipe(world, serverPlayerEntity, recipeEntry)) { + ItemStack itemStack2 = craftingRecipe.craft(craftingRecipeInput, world.getRegistryManager()); + if (itemStack2.isItemEnabled(world.getEnabledFeatures())) { + itemStack = itemStack2; + } + } + } + //合成表过滤器,按照物品频率排序 + if(itemStack.isOf(Items.WOODEN_SWORD)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.WOODEN_AXE)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.WOODEN_HOE)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.WOODEN_PICKAXE)){ + itemStack = ItemStack.EMPTY; + } + + if(itemStack.isOf(Items.STONE_SWORD)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.STONE_PICKAXE)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.STONE_AXE)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.STONE_HOE)){ + itemStack = ItemStack.EMPTY; + } + if(itemStack.isOf(Items.STONE_SHOVEL)){ + itemStack = ItemStack.EMPTY; + } + + + + + + + + resultInventory.setStack(0, itemStack); + handler.setPreviousTrackedSlot(0, itemStack); + serverPlayerEntity.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(handler.syncId, handler.nextRevision(), 0, itemStack)); + } + } +} diff --git a/src/main/java/com/equilibrium/mixin/render/DebugHudMixin.java b/src/main/java/com/equilibrium/mixin/render/DebugHudMixin.java new file mode 100644 index 0000000..7b1d98a --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/render/DebugHudMixin.java @@ -0,0 +1,319 @@ +package com.equilibrium.mixin.render; + +import com.google.common.base.Strings; +import com.google.common.collect.Lists; +import com.mojang.blaze3d.platform.GlDebugInfo; +import com.mojang.datafixers.DataFixUtils; +import it.unimi.dsi.fastutil.longs.LongSet; +import it.unimi.dsi.fastutil.longs.LongSets; +import net.minecraft.SharedConstants; +import net.minecraft.client.ClientBrandRetriever; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.hud.DebugHud; +import net.minecraft.client.network.ClientPlayNetworkHandler; +import net.minecraft.network.ClientConnection; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.server.ServerTickManager; +import net.minecraft.server.integrated.IntegratedServer; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.Util; +import net.minecraft.util.math.*; +import net.minecraft.world.*; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.ChunkStatus; +import net.minecraft.world.chunk.WorldChunk; +import net.minecraft.world.tick.TickManager; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.*; +import java.util.concurrent.CompletableFuture; + +@Mixin(DebugHud.class) + +public abstract class DebugHudMixin { + + @Shadow + @Final + private MinecraftClient client; +@Shadow + private boolean showDebugHud; +@Shadow + private boolean renderingChartVisible; +@Shadow + private boolean renderingAndTickChartsVisible; +@Shadow + private boolean packetSizeAndPingChartsVisible; + + +@Shadow +@Final + private TextRenderer textRenderer; + + + + + + + + + + + @Shadow + private ChunkPos pos; + @Shadow + private CompletableFuture chunkFuture; + @Shadow + private WorldChunk chunk; + + + + public void resetChunk() { + this.chunkFuture = null; + this.chunk = null; + } + + + private World getWorld() { + return DataFixUtils.orElse( + Optional.ofNullable(this.client.getServer()).flatMap(server -> Optional.ofNullable(server.getWorld(this.client.world.getRegistryKey()))), this.client.world + ); + } + + private String getServerWorldDebugString() { + ServerWorld serverWorld = this.getServerWorld(); + return serverWorld != null ? serverWorld.asString() : null; + } + + @Nullable + private ServerWorld getServerWorld() { + IntegratedServer integratedServer = this.client.getServer(); + return integratedServer != null ? integratedServer.getWorld(this.client.world.getRegistryKey()) : null; + } + + private WorldChunk getClientChunk() { + if (this.chunk == null) { + this.chunk = this.client.world.getChunk(this.pos.x, this.pos.z); + } + + return this.chunk; + } + + @Nullable + private WorldChunk getChunk() { + if (this.chunkFuture == null) { + ServerWorld serverWorld = this.getServerWorld(); + if (serverWorld == null) { + return null; + } + + this.chunkFuture = serverWorld.getChunkManager() + .getChunkFutureSyncOnMainThread(this.pos.x, this.pos.z, ChunkStatus.FULL, false) + .thenApply(optionalChunk -> (WorldChunk)optionalChunk.orElse(null)); + } + + return (WorldChunk)this.chunkFuture.getNow(null); + } + @Shadow + private static final Map HEIGHT_MAP_TYPES = Util.make(new EnumMap(Heightmap.Type.class), types -> { + types.put(Heightmap.Type.WORLD_SURFACE_WG, "SW"); + types.put(Heightmap.Type.WORLD_SURFACE, "S"); + types.put(Heightmap.Type.OCEAN_FLOOR_WG, "OW"); + types.put(Heightmap.Type.OCEAN_FLOOR, "O"); + types.put(Heightmap.Type.MOTION_BLOCKING, "M"); + types.put(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, "ML"); + }); + + + @Shadow + private static String getBiomeString(RegistryEntry biome) { + return biome.getKeyOrValue().map(biomeKey -> biomeKey.getValue().toString(), biome_ -> "[unregistered " + biome_ + "]"); + } + + public List getLeftText() { + + IntegratedServer integratedServer = this.client.getServer(); + ClientPlayNetworkHandler clientPlayNetworkHandler = this.client.getNetworkHandler(); + ClientConnection clientConnection = clientPlayNetworkHandler.getConnection(); + float f = clientConnection.getAveragePacketsSent(); + float g = clientConnection.getAveragePacketsReceived(); + TickManager tickManager = this.getWorld().getTickManager(); + String string; + if (tickManager.isStepping()) { + string = " (frozen - stepping)"; + } else if (tickManager.isFrozen()) { + string = " (frozen)"; + } else { + string = ""; + } + + String string3; + if (integratedServer != null) { + ServerTickManager serverTickManager = integratedServer.getTickManager(); + boolean bl = serverTickManager.isSprinting(); + if (bl) { + string = " (sprinting)"; + } + + String string2 = bl ? "-" : String.format(Locale.ROOT, "%.1f", tickManager.getMillisPerTick()); + string3 = String.format(Locale.ROOT, "Integrated server @ %.1f/%s ms%s, %.0f tx, %.0f rx", integratedServer.getAverageTickTime(), string2, string, f, g); + } else { + string3 = String.format(Locale.ROOT, "\"%s\" server%s, %.0f tx, %.0f rx", clientPlayNetworkHandler.getBrand(), string, f, g); + } + + BlockPos blockPos = this.client.getCameraEntity().getBlockPos(); + if (this.client.hasReducedDebugInfo()) { + return Lists.newArrayList( + "Minecraft " + SharedConstants.getGameVersion().getName() + " (" + this.client.getGameVersion() + "/" + ClientBrandRetriever.getClientModName() + ")", + this.client.fpsDebugString, + string3, + this.client.worldRenderer.getChunksDebugString(), + this.client.worldRenderer.getEntitiesDebugString(), + "P: " + this.client.particleManager.getDebugString() + ". T: " + this.client.world.getRegularEntityCount(), + this.client.world.asString(), + "", + String.format(Locale.ROOT, "Chunk-relative: %d %d %d", blockPos.getX() & 15, blockPos.getY() & 15, blockPos.getZ() & 15) + ); + } else { + World world = this.getWorld(); + LongSet longSet = (LongSet)(world instanceof ServerWorld ? ((ServerWorld)world).getForcedChunks() : LongSets.EMPTY_SET); + List list = Lists.newArrayList( + "Minecraft " + SharedConstants.getGameVersion().getName() + " (" + + this.client.getGameVersion() + + "/" + + ClientBrandRetriever.getClientModName() + + ("release".equalsIgnoreCase(this.client.getVersionType()) ? "" : "/" + this.client.getVersionType()) + + ")", + this.client.fpsDebugString, + string3 + + ); + list.add( + String.format( + Locale.ROOT, "X: %.1f",this.client.getCameraEntity().getX() + ) + + ); + list.add( + String.format( + Locale.ROOT, "Y: %.1f",this.client.getCameraEntity().getY() + ) + + ); + list.add( + String.format( + Locale.ROOT, "Z: %.1f", this.client.getCameraEntity().getZ() + ) + + ); + return list; + } + + } + + + public void drawText(DrawContext context, List text, boolean left) { + int i = 9; + + for (int j = 0; j < text.size(); j++) { + String string = (String)text.get(j); + if (!Strings.isNullOrEmpty(string)) { + int k = this.textRenderer.getWidth(string); + int l = left ? 2 : context.getScaledWindowWidth() - 2 - k; + int m = 2 + i * j; + context.fill(l - 1, m - 1, l + k + 1, m + i - 1, -1873784752); + } + } + + for (int jx = 0; jx < text.size(); jx++) { + String string = (String)text.get(jx); + if (!Strings.isNullOrEmpty(string)) { + int k = this.textRenderer.getWidth(string); + int l = left ? 2 : context.getScaledWindowWidth() - 2 - k; + int m = 2 + i * jx; + context.drawText(this.textRenderer, string, l, m, 14737632, false); + } + } + } + + + + + + + + + + + + + @Inject(method = "drawLeftText",at = @At(value = "HEAD"),cancellable = true) + protected void drawLeftText(DrawContext context, CallbackInfo ci) { + ci.cancel(); + + List list = this.getLeftText(); + this.drawText(context, list, true); + } + + + private static long toMiB(long bytes) { + return bytes / 1024L / 1024L; + } + + + +@Shadow +@Final +private DebugHud.AllocationRateCalculator allocationRateCalculator; + + @Inject(method = "getRightText",at = @At(value = "HEAD"),cancellable = true) + protected void getRightText(CallbackInfoReturnable> cir) { + cir.cancel(); + long l = Runtime.getRuntime().maxMemory(); + long m = Runtime.getRuntime().totalMemory(); + long n = Runtime.getRuntime().freeMemory(); + long o = m - n; + List list = Lists.newArrayList( + String.format(Locale.ROOT, "Java: %s", System.getProperty("java.version")), + String.format(Locale.ROOT, "Mem: %2d%% %03d/%03dMB", o * 100L / l, toMiB(o), toMiB(l)), + String.format(Locale.ROOT, "Allocation rate: %03dMB/s", toMiB(allocationRateCalculator.get(o))), + String.format(Locale.ROOT, "Allocated: %2d%% %03dMB", m * 100L / l, toMiB(m)), + "", + String.format(Locale.ROOT, "CPU: %s", GlDebugInfo.getCpuInfo()), + "", + String.format( + Locale.ROOT, + "Display: %dx%d (%s)", + MinecraftClient.getInstance().getWindow().getFramebufferWidth(), + MinecraftClient.getInstance().getWindow().getFramebufferHeight(), + GlDebugInfo.getVendor() + ), + GlDebugInfo.getRenderer(), + GlDebugInfo.getVersion() + ); + + cir.setReturnValue(list); + + + + } + + + + + + + + + +} + + diff --git a/src/main/java/com/equilibrium/mixin/InGameHudMixin.java b/src/main/java/com/equilibrium/mixin/render/InGameHudMixin.java similarity index 94% rename from src/main/java/com/equilibrium/mixin/InGameHudMixin.java rename to src/main/java/com/equilibrium/mixin/render/InGameHudMixin.java index 9626dc6..83e3810 100644 --- a/src/main/java/com/equilibrium/mixin/InGameHudMixin.java +++ b/src/main/java/com/equilibrium/mixin/render/InGameHudMixin.java @@ -1,9 +1,8 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.render; import com.equilibrium.util.PlayerMaxHealthHelper; import com.equilibrium.util.PlayerMaxHungerHelper; import com.mojang.blaze3d.systems.RenderSystem; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.hud.InGameHud; import net.minecraft.entity.effect.StatusEffects; @@ -12,8 +11,6 @@ import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; import net.minecraft.util.math.random.Random; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -21,8 +18,6 @@ import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import static com.equilibrium.MITEequilibrium.LOGGER; - @Mixin(InGameHud.class) public abstract class InGameHudMixin { @Shadow diff --git a/src/main/java/com/equilibrium/mixin/WorldRendererMixin.java b/src/main/java/com/equilibrium/mixin/render/WorldRendererMixin.java similarity index 99% rename from src/main/java/com/equilibrium/mixin/WorldRendererMixin.java rename to src/main/java/com/equilibrium/mixin/render/WorldRendererMixin.java index 85c580a..750f558 100644 --- a/src/main/java/com/equilibrium/mixin/WorldRendererMixin.java +++ b/src/main/java/com/equilibrium/mixin/render/WorldRendererMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.render; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; diff --git a/src/main/java/com/equilibrium/mixin/ConcentricRingsStructurePlacementMixin.java b/src/main/java/com/equilibrium/mixin/structure/ConcentricRingsStructurePlacementMixin.java similarity index 96% rename from src/main/java/com/equilibrium/mixin/ConcentricRingsStructurePlacementMixin.java rename to src/main/java/com/equilibrium/mixin/structure/ConcentricRingsStructurePlacementMixin.java index 48f7718..3b71c16 100644 --- a/src/main/java/com/equilibrium/mixin/ConcentricRingsStructurePlacementMixin.java +++ b/src/main/java/com/equilibrium/mixin/structure/ConcentricRingsStructurePlacementMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.structure; import net.minecraft.registry.Registerable; import net.minecraft.registry.RegistryBuilder; diff --git a/src/main/java/com/equilibrium/mixin/StrongholdGeneratorMixin.java b/src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorMixin.java similarity index 98% rename from src/main/java/com/equilibrium/mixin/StrongholdGeneratorMixin.java rename to src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorMixin.java index a6df0c5..3fbffee 100644 --- a/src/main/java/com/equilibrium/mixin/StrongholdGeneratorMixin.java +++ b/src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.structure; import net.minecraft.nbt.NbtCompound; import net.minecraft.structure.StrongholdGenerator; diff --git a/src/main/java/com/equilibrium/mixin/StrongholdGeneratorStartMixin.java b/src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorStartMixin.java similarity index 98% rename from src/main/java/com/equilibrium/mixin/StrongholdGeneratorStartMixin.java rename to src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorStartMixin.java index 4f244e0..1675b55 100644 --- a/src/main/java/com/equilibrium/mixin/StrongholdGeneratorStartMixin.java +++ b/src/main/java/com/equilibrium/mixin/structure/StrongholdGeneratorStartMixin.java @@ -1,4 +1,4 @@ -package com.equilibrium.mixin; +package com.equilibrium.mixin.structure; import net.minecraft.structure.StructurePieceType; import net.minecraft.util.math.Direction; diff --git a/src/main/java/com/equilibrium/mixin/tables/AbstractFurnaceEntityMixin.java b/src/main/java/com/equilibrium/mixin/tables/AbstractFurnaceEntityMixin.java new file mode 100644 index 0000000..44fb834 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/tables/AbstractFurnaceEntityMixin.java @@ -0,0 +1,382 @@ +package com.equilibrium.mixin.tables; + +import com.equilibrium.config.CommonConfig; + +import com.equilibrium.register.BlockInit; +import com.equilibrium.worklevel.FurnaceIngredients; +import com.google.common.collect.Maps; +import net.minecraft.SharedConstants; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.entity.AbstractFurnaceBlockEntity; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.component.DataComponentTypes; +import net.minecraft.component.type.FoodComponent; +import net.minecraft.item.Item; +import net.minecraft.item.ItemConvertible; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.recipe.AbstractCookingRecipe; +import net.minecraft.recipe.RecipeType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.tag.ItemTags; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Util; +import net.minecraft.util.collection.DefaultedList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.Iterator; +import java.util.Map; + +@Mixin(AbstractFurnaceBlockEntity.class) +public abstract class AbstractFurnaceEntityMixin extends BlockEntity { + + @Unique + int level0 = 0;//物品 + @Unique + int level = 0;//燃料 + @Shadow + int burnTime; + + @Shadow + protected abstract boolean isBurning(); + + @Shadow + protected DefaultedList inventory; + + private AbstractFurnaceEntityMixin(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + } + @Inject(at = @At("RETURN"), method = "") + public void Constructor(BlockEntityType blockEntityType, BlockPos pos, BlockState state, RecipeType recipeType, CallbackInfo info) { + + } + + @Inject(at = @At("HEAD"), method = "getFuelTime", cancellable = true) + public void getFuelTime(ItemStack fuel, CallbackInfoReturnable ca) { + //此处world必须判断是否为null,否则熔炉数据无法保存。 + if (this.getWorld() != null) { + Block block = this.world.getBlockState(this.pos).getBlock(); + + //物品 + ItemStack itemStack = (ItemStack) this.inventory.get(0); + Item item0 = itemStack.getItem(); + String name0 = Registries.ITEM.getId(item0).toString(); + //燃料 + Item item = fuel.getItem(); + String name = Registries.ITEM.getId(item).toString(); + level0 = 0;//物品 + level = 0;//燃料 + + if(FurnaceIngredients.modItem_ingredients.keySet().contains(name0)){ + level0 = FurnaceIngredients.modItem_ingredients.get(name0).workLevel; + }else { + //不是原版的矿石为一级,可能不准确 + if (name0.contains("ore") && !name0.contains("deepslate") && !name0.contains("minecraft")) { + level0 = 1; + }else if (name0.contains("aliveandwell") && name0.contains("deep_raw") && !name0.contains("minecraft:")) { + level0 = 2; + } + else if (name0.contains("raw_copper") && name0.contains("minecraft:")) { + level0 = 1; + } + else if (name0.contains("raw_iron") && name0.contains("minecraft:")) { + level0 = 1; + } + else if (name0.contains("raw_gold") && name0.contains("minecraft:")) { + level0 = 1; + } + else if (name0.contains("iron_block") || name0.contains("copper_block")) { + level0 = 2; + } + else if (name0.contains("deepslate") && name0.contains("ore") && !name0.contains("minecraft")) { + level0 = 2; + } + else if (name0.equals("gobber2:gobber2_ore") ) { + level0 = 2; + } + else if (name0.equals("minecraft:iron_ingot") ) { + level0 = 2; + } + else if (name0.equals("gobber2:gobber2_ore_nether") ) { + level0 = 3; + } + else if (name0.contains("_mithril") && name0.contains("aliveandwell:")) { + level0 = 2; + } + else if (name0.contains("_adamantium") && name0.contains("aliveandwell:")) { + level0 = 3; + } + else if(CommonConfig.itemFurnaceLevelMap.containsKey(name0)){ + level0 = CommonConfig.itemFurnaceLevelMap.get(name0); + } + + } +// //物品 +// for (String name01 : FurnaceIngredients.modItem_ingredients.keySet()) { +// if (name01.equals(name0)) { +// level0 = FurnaceIngredients.modItem_ingredients.get(name01).workLevel; +// } +// +// +// } + + if(FurnaceIngredients.modFuel_ingredients.containsKey(name)){ + level = FurnaceIngredients.modFuel_ingredients.get(name).workLevel; + } else if(name.contains("coal") && !name.contains("charcoal")){ + level = 1; + } else level = CommonConfig.fuelItemLevelMap.getOrDefault(name, 0); + + if (name.contains("coal") && !name.contains("charcoal")) { + ca.setReturnValue(801); + }else if(!(item==Items.LAVA_BUCKET || item==Items.BLAZE_ROD) && !name.contains("minecraft")){ + ca.setReturnValue(150);//其他一切不是原版的燃料为150. + } + + //燃料等级大于该熔炉等级不可燃烧:原版熔炉和高炉为一级熔炉 + if (block == BlockInit.CLAY_FURNACE) { + //燃料等级不够,或者燃料等级小于物品等级 + if (level > 0 || level0 > level) { + if (this.isBurning()) { + this.burnTime = 0; + } + ca.setReturnValue(0); + } + } + + if (block == Blocks.FURNACE || block==Blocks.BLAST_FURNACE) { + //燃料等级不够,或者燃料等级小于物品等级 + if (level > 1 || level0 > level) { + if (this.isBurning()) { + this.burnTime = 0; + } + ca.setReturnValue(0); + } + } + //燃料等级《小于该熔炉等级》或《大于该熔炉等级》不可燃烧 + if (block == BlockInit.OBSIDIAN_FURNACE) { + if (level > 2 || level0 > level) { + if (this.isBurning()) { + this.burnTime = 0; + } + ca.setReturnValue(0); + } + } + //燃料等级小于该熔炉等级不可燃烧 + if (block == BlockInit.NETHERRACK_FURNACE) { + if (level0 > level) { + if (this.isBurning()) { + this.burnTime = 0; + } + ca.setReturnValue(0); + } + } +// //工业电炉无法燃烧戈伯矿 +// if(Registry.BLOCK.getId(block).toString().equals("modern_industrialization:bronze_furnace") +// || Registry.BLOCK.getId(block).toString().equals("modern_industrialization:steel_furnace") +// || Registry.BLOCK.getId(block).toString().equals("modern_industrialization:electric_furnace")){ +// if (name.equals("gobber2:gobber2_ore") || name.equals("gobber2:gobber2_ore_nether") || name.equals("minecraft:ancient_debris")) { +// ca.setReturnValue(0); +// } +// } + + } + } + + @Inject(at = @At("HEAD"), method = "getCookTime", cancellable = true) + private static void getCookTime(World world, AbstractFurnaceBlockEntity furnace, CallbackInfoReturnable ca) { + Item item; + if (world != null) { + Block block = world.getBlockState(furnace.getPos()).getBlock(); + AbstractFurnaceEntityMixin mixin = (AbstractFurnaceEntityMixin) (Object) furnace; + //物品 + ItemStack itemStack0 = (ItemStack) mixin.inventory.get(0); + Item item0 = itemStack0.getItem(); + String name0 = Registries.ITEM.getId(item0).toString(); + + //燃料 + ItemStack itemStack = mixin.inventory.get(1); + item = itemStack.getItem(); + String name = Registries.ITEM.getId(item).toString(); + + int time =160; + + if (itemStack0.get(DataComponentTypes.FOOD) != null) { + time = 99; + } + + //不是原版的矿石为一级,可能不准确 + if (name0.contains("_ore") && !name0.contains("deepslate")) { + time=200;//煤800 + }else if (name0.contains("aliveandwell") && name0.contains("deep_raw") && !name0.contains("minecraft:")) { + time=802; //煤801 + } + else if (name0.contains("iron_block") || name0.contains("copper_block")) { + time=802; //煤801 + } + else if (name0.contains("deepslate") && name0.contains("_ore")) { + time=802; //煤801 + } + else if (name0.equals("minecraft:iron_ingot")) { + time=802; //煤801 + } + else if (name0.contains("minecraft:ancient_debris")) { + time=8010; //烈焰棒10000 + } + else if (name0.contains("gobber2_ore") && name0.contains("gobber2:")) { + time=8022;//岩浆桶1800 + } + else if (name0.contains("_mithril") && name0.contains("aliveandwell:")) { + time=802;//煤801 + } + else if (name0.contains("_adamantium") && name0.contains("aliveandwell:")) { + time=8022;//岩浆桶1800 + } + else if(CommonConfig.itemCooktimeMap.containsKey(name0)){ + time = CommonConfig.itemCooktimeMap.get(name0); + } + + + //燃料等级大于该熔炉等级不可燃烧 + if (block == Blocks.FURNACE || block == BlockInit.CLAY_FURNACE) { + ca.setReturnValue(time); + } + //燃料等级《小于该熔炉等级》或《大于该熔炉等级》不可燃烧 + if (block == BlockInit.OBSIDIAN_FURNACE) { + ca.setReturnValue(time/5); + } + //燃料等级小于该熔炉等级不可燃烧 + if (block == BlockInit.NETHERRACK_FURNACE) { + ca.setReturnValue(time/10); + } + +// //工业电炉无法燃烧戈伯矿 +// if(Registry.BLOCK.getId(block).toString().equals("modern_industrialization:bronze_furnace") +// || Registry.BLOCK.getId(block).toString().equals("modern_industrialization:steel_furnace") +// || Registry.BLOCK.getId(block).toString().equals("modern_industrialization:electric_furnace")){ +// if (name.equals("gobber2:gobber2_ore") || name.equals("gobber2:gobber2_ore_nether") || name.equals("minecraft:ancient_debris")) { +// ca.setReturnValue(0); +// } +// } + } + } + + /** + * @author + * @reason + */ + @Overwrite + public static Map createFuelTimeMap() { + Map map = Maps.newLinkedHashMap(); + addFuel(map, (ItemConvertible) Items.LAVA_BUCKET, 8021); + addFuel(map, (ItemConvertible) Items.BLAZE_ROD, 80221); +// addFuel(map, (ItemConvertible) Blocks.COAL_BLOCK, 800); + addFuel(map, (ItemConvertible) Items.COAL, 801); + addFuel(map, (ItemConvertible) Items.CHARCOAL, 199); + addFuel(map, (ItemConvertible) Items.TORCH, 198); + addFuel(map, (TagKey) ItemTags.LOGS, 150); + addFuel(map, (TagKey) ItemTags.PLANKS, 150); + addFuel(map, (TagKey) ItemTags.WOODEN_STAIRS, 150); + addFuel(map, (TagKey) ItemTags.WOODEN_SLABS, 100); + addFuel(map, (TagKey) ItemTags.WOODEN_TRAPDOORS, 150); + addFuel(map, (TagKey) ItemTags.WOODEN_PRESSURE_PLATES, 150); + addFuel(map, (ItemConvertible) Blocks.OAK_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.BIRCH_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.SPRUCE_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.JUNGLE_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.DARK_OAK_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.ACACIA_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.MANGROVE_FENCE, 150); + addFuel(map, (ItemConvertible) Blocks.OAK_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.BIRCH_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.SPRUCE_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.JUNGLE_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.DARK_OAK_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.ACACIA_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.MANGROVE_FENCE_GATE, 150); + addFuel(map, (ItemConvertible) Blocks.NOTE_BLOCK, 150); + addFuel(map, (ItemConvertible) Blocks.BOOKSHELF, 150); + addFuel(map, (ItemConvertible) Blocks.LECTERN, 150); + addFuel(map, (ItemConvertible) Blocks.JUKEBOX, 150); + addFuel(map, (ItemConvertible) Blocks.CHEST, 150); + addFuel(map, (ItemConvertible) Blocks.TRAPPED_CHEST, 150); + addFuel(map, (ItemConvertible) Blocks.CRAFTING_TABLE, 150); + addFuel(map, (ItemConvertible) Blocks.DAYLIGHT_DETECTOR, 150); + addFuel(map, (TagKey) ItemTags.BANNERS, 150); + addFuel(map, (ItemConvertible) Items.BOW, 150); + addFuel(map, (ItemConvertible) Items.FISHING_ROD, 150); + addFuel(map, (ItemConvertible) Blocks.LADDER, 150); + addFuel(map, (TagKey) ItemTags.SIGNS, 80); + addFuel(map, (ItemConvertible) Items.WOODEN_SHOVEL, 80); + addFuel(map, (ItemConvertible) Items.WOODEN_SWORD, 80); + addFuel(map, (ItemConvertible) Items.WOODEN_HOE, 80); + addFuel(map, (ItemConvertible) Items.WOODEN_AXE, 80); + addFuel(map, (ItemConvertible) Items.WOODEN_PICKAXE, 80); + addFuel(map, (TagKey) ItemTags.WOODEN_DOORS, 80); + addFuel(map, (TagKey) ItemTags.BOATS, 180); +// addFuel(map, (TagKey) ItemTags.WOOL, 150); + addFuel(map, (TagKey) ItemTags.WOODEN_BUTTONS, 150); + addFuel(map, (ItemConvertible) Items.STICK, 150); + addFuel(map, (TagKey) ItemTags.SAPLINGS, 150); + addFuel(map, (ItemConvertible) Items.BOWL, 150); +// addFuel(map, (TagKey) ItemTags.WOOL_CARPETS, 67); + addFuel(map, (ItemConvertible) Blocks.DRIED_KELP_BLOCK, 1001); + addFuel(map, (ItemConvertible) Items.CROSSBOW, 150); + addFuel(map, (ItemConvertible) Blocks.BAMBOO, 50); + addFuel(map, (ItemConvertible) Blocks.DEAD_BUSH, 150); + addFuel(map, (ItemConvertible) Blocks.SCAFFOLDING, 50); + addFuel(map, (ItemConvertible) Blocks.LOOM, 150); + addFuel(map, (ItemConvertible) Blocks.BARREL, 150); + addFuel(map, (ItemConvertible) Blocks.CARTOGRAPHY_TABLE, 150); + addFuel(map, (ItemConvertible) Blocks.FLETCHING_TABLE, 150); + addFuel(map, (ItemConvertible) Blocks.SMITHING_TABLE, 150); + addFuel(map, (ItemConvertible) Blocks.COMPOSTER, 150); + addFuel(map, (ItemConvertible) Blocks.AZALEA, 150); + addFuel(map, (ItemConvertible) Blocks.FLOWERING_AZALEA, 150); + addFuel(map, (ItemConvertible) Blocks.MANGROVE_ROOTS, 150); + return map; + } + + @Shadow + private static boolean isNonFlammableWood(Item item) { + return item.getRegistryEntry().isIn(ItemTags.NON_FLAMMABLE_WOOD); + } + + @Shadow + private static void addFuel(Map fuelTimes, TagKey tag, int fuelTime) { + Iterator var3 = Registries.ITEM.iterateEntries(tag).iterator(); + + while (var3.hasNext()) { + RegistryEntry registryEntry = (RegistryEntry) var3.next(); + if (!isNonFlammableWood((Item) registryEntry.value())) { + fuelTimes.put((Item) registryEntry.value(), fuelTime); + } + } + + } + + @Shadow + private static void addFuel(Map fuelTimes, ItemConvertible item, int fuelTime) { + Item item2 = item.asItem(); + if (isNonFlammableWood(item2)) { + if (SharedConstants.isDevelopment) { + throw (IllegalStateException) Util.throwOrPause(new IllegalStateException("A developer tried to explicitly make fire resistant item " + item2.getName((ItemStack) null).getString() + " a furnace fuel. That will not work!")); + } + } else { + fuelTimes.put(item2, fuelTime); + } + } +} + diff --git a/src/main/java/com/equilibrium/mixin/tables/CraftingScreenHandlerMixin.java b/src/main/java/com/equilibrium/mixin/tables/CraftingScreenHandlerMixin.java new file mode 100644 index 0000000..d1939c0 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/tables/CraftingScreenHandlerMixin.java @@ -0,0 +1,342 @@ +package com.equilibrium.mixin.tables; + +import com.equilibrium.config.CommonConfig; +import com.equilibrium.register.BlockInit; +import com.equilibrium.worklevel.CraftingIngredients; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.block.CraftingTableBlock; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.CraftingInventory; +import net.minecraft.inventory.CraftingResultInventory; +import net.minecraft.inventory.Inventory; +import net.minecraft.inventory.RecipeInputInventory; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket; +import net.minecraft.recipe.CraftingRecipe; +import net.minecraft.recipe.RecipeEntry; +import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.input.CraftingRecipeInput; +import net.minecraft.registry.Registries; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.screen.*; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.Optional; + +@Mixin(CraftingScreenHandler.class) +public abstract class CraftingScreenHandlerMixin extends AbstractRecipeScreenHandler { + @Final + @Shadow + private ScreenHandlerContext context; + @Final + @Shadow + private CraftingResultInventory result; + @Final + @Shadow + private RecipeInputInventory input; + @Final + @Shadow + private PlayerEntity player; + + public CraftingScreenHandlerMixin(ScreenHandlerType screenHandlerType, int i) { + super(screenHandlerType, i); + } + + + @Inject(at = @At("HEAD"), method = "canUse", cancellable = true) + public void canUse(PlayerEntity player, CallbackInfoReturnable info) { + context.run((world, blockPos) ->{ + if(world.getBlockState(blockPos).getBlock() instanceof CraftingTableBlock){ + info.setReturnValue(true); + } + }); + info.cancel(); + } + + /** + * @author + * @reason + */ + @Overwrite + public void onContentChanged(Inventory inventory) { + this.context.run((world, pos) -> { + CraftingRecipeInput craftingRecipeInput = input.createRecipeInput(); + ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity)player; + ItemStack itemStack = ItemStack.EMPTY; + Optional> optional = world.getServer().getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftingRecipeInput, world, (RecipeEntry)null); + if (optional.isPresent()) { + RecipeEntry recipeEntry = (RecipeEntry)optional.get(); + CraftingRecipe craftingRecipe = (CraftingRecipe)recipeEntry.value(); + if (this.result.shouldCraftRecipe(world, serverPlayerEntity, recipeEntry)) { + itemStack = craftingRecipe.craft(craftingRecipeInput,world.getRegistryManager()); + } + } + Item item = itemStack.getItem(); + String name = Registries.ITEM.getId(item).toString(); + int level = 0; + + int count2 = 0; + int count3 = 0; + int count4 = 0; + int count5 = 0; + + //输出结果检测 + for (String name1 : CraftingIngredients.mod_ingredients.keySet()){ + if(name1.equals(name)){ + level = CraftingIngredients.mod_ingredients.get(name1).workLevel; + } + + + if(item instanceof BlockItem blockItem){ + if(blockItem.getBlock().getDefaultState().isIn(BlockTags.LOGS) || blockItem.getBlock().getDefaultState().isIn(BlockTags.PLANKS)){ + level = 1; + } + } + if(name.contains("doom:") && name.contains("argent_block")){ + level = 3; + } + if(name.contains("doom:") && name.contains("argent_energy")){ + level = 3; + } + if(name.contains("doom:") && name.contains("argent_plate")){ + level = 5; + } + if(name.contains("doom:") && name.contains("helmet")){ + level = 5; + } + if(name.contains("doom:") && name.contains("chestplate")){ + level = 5; + } + if(name.contains("doom:") && name.contains("leggings")){ + level = 5; + } + if(name.contains("doom:") && name.contains("boots")){ + level = 5; + } + if(name.contains("aliveandwell:") ){ + if(name.contains("mithril") ){ + level = 4; + } + } + if(name.contains("aliveandwell:") ){ + if(name.contains("adamantium") ){ + level = 5; + } + } + + //输入物品 + int i; + int j; + for(i = 0; i < 3; ++i) { + for(j = 0; j < 3; ++j) { + Item inputItem = this.input.getStack(j + i * 3).getItem(); + String inputItemName = Registries.ITEM.getId(inputItem).toString(); + + //输入物品检测:一级除了“铜工作台”,包含铜为2 + if((inputItem== Items.COPPER_INGOT )){//!name.equals("aliveandwell:copper_crafting_table") && + count2++;//二级物品(铜工作台)2 + } + //输入物品检测:二级除了“铁工作台”,包含铁、金、红石的为3 !name.equals("aliveandwell:iron_crafting_table") && + if( (inputItem== Items.EMERALD_BLOCK || inputItem== Items.EMERALD || inputItem== Items.IRON_INGOT || inputItem== Items.IRON_BLOCK || inputItem== Items.IRON_AXE || inputItem== Items.IRON_PICKAXE || inputItem== Items.IRON_SWORD || inputItem== Items.IRON_HOE || inputItem== Items.IRON_SHOVEL|| inputItem== Items.IRON_BOOTS || inputItem== Items.IRON_CHESTPLATE || inputItem== Items.IRON_HELMET || inputItem== Items.IRON_LEGGINGS + || inputItem== Items.GOLD_INGOT || inputItem== Items.GOLD_BLOCK || inputItem== Items.GOLDEN_AXE || inputItem== Items.GOLDEN_PICKAXE || inputItem== Items.GOLDEN_SWORD || inputItem== Items.GOLDEN_HOE || inputItem== Items.GOLDEN_SHOVEL|| inputItem== Items.GOLDEN_BOOTS || inputItem== Items.GOLDEN_CHESTPLATE || inputItem== Items.GOLDEN_HELMET || inputItem== Items.GOLDEN_LEGGINGS + || inputItem== Items.REDSTONE || inputItem== Items.REDSTONE_BLOCK || inputItem== Items.OBSIDIAN + || (inputItemName.contains("ingot") && !inputItemName.contains("steel_ingot") && !inputItemName.contains("minecraft:") && !inputItemName.contains("flint_ingot")) + || (inputItemName.contains("doom:") && inputItemName.contains("argent_block")) + || (inputItemName.contains("doom:") && inputItemName.contains("argent_energy")) + )){ + count3++;//三级物品(铁工作台)3 + } + //输入物品检测:三级除了“钻石工作台”,包含绿宝石、青金石、钻石的为4 !name.equals("aliveandwell:diamond_crafting_table") && item != Items.ENCHANTING_TABLE && + if( ( inputItem== Items.LAPIS_LAZULI || inputItem== Items.LAPIS_BLOCK || inputItemName.contains("item_en_gemstone") + || inputItem== Items.DIAMOND || inputItem== Items.DIAMOND_BLOCK || inputItem== Items.DIAMOND_AXE || inputItem== Items.DIAMOND_PICKAXE || inputItem== Items.DIAMOND_SWORD || inputItem== Items.DIAMOND_HOE || inputItem== Items.DIAMOND_SHOVEL|| inputItem== Items.DIAMOND_BOOTS || inputItem== Items.DIAMOND_CHESTPLATE || inputItem== Items.DIAMOND_HELMET || inputItem== Items.DIAMOND_LEGGINGS + || inputItem== Items.AMETHYST_SHARD || inputItem== Items.AMETHYST_BLOCK || inputItem== Items.CRYING_OBSIDIAN + || inputItemName.contains("steel_ingot") + )){ + count4++;//四级物品(钻石工作台)4 + } + //输入物品检测:四级除了“下界合金工作台”,包含下界合金的为5 !name.equals("aliveandwell:netherite_crafting_table") && + if( (inputItem== Items.NETHERITE_INGOT + || inputItem== Items.NETHERITE_BLOCK || inputItem== Items.NETHERITE_AXE + || inputItem== Items.NETHERITE_PICKAXE || inputItem== Items.NETHERITE_SWORD + || inputItem== Items.NETHERITE_HOE || inputItem== Items.NETHERITE_SHOVEL + || inputItem== Items.NETHERITE_BOOTS || inputItem== Items.NETHERITE_CHESTPLATE + || inputItem== Items.NETHERITE_HELMET || inputItem== Items.NETHERITE_LEGGINGS + || (inputItemName.contains("doom:") && inputItemName.contains("argent_plate"))) + ){ + count5++;//五级物品(下界合金工作台)5 + } + + + if(CommonConfig.itemCrafttableLevelMap.containsKey(inputItemName)){ + int levelConfig = CommonConfig.itemCrafttableLevelMap.get(inputItemName); + if(levelConfig ==2){ + count2++; + } + if(levelConfig ==3){ + count3++; + } + if(levelConfig ==4){ + count4++; + } + if(levelConfig ==5){ + count5++; + } + } + } + } + + } + + if(item==Items.ENCHANTED_GOLDEN_APPLE || name.contains("aliveandwell:enchanted_golden_carrot")){ + return; + } + if(name.contains("aliveandwell:flint_and_steel")){ + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + return; + } + + //禁用配方:甘草块-小麦 + if(item == Items.WHEAT){ + return; + } + + + long time = world.getLevelProperties().getTimeOfDay(); + int day = (int)(time / 24000L)+1; + int structureUnderDay; + if(FabricLoader.getInstance().isModLoaded("aliveandwell")){ + structureUnderDay = 48; + }else { + structureUnderDay = 1; + } + + if(world.getBlockState(pos).getBlock() == BlockInit.FLINT_CRAFTING_TABLE){ + if(name.equals("crafttime:copper_crafting_table")){ + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + }else if(name.equals("minecraft:furnace")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info1").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(name.equals("soulsweapons:sting") || name.equals("soulsweapons:guts_sword") || name.equals("soulsweapons:holy_greatsword") || name.equals("soulsweapons:kirkhammer") || name.equals("soulsweapons:moonstone_axe") || name.equals("soulsweapons:moonstone_hoe")|| name.equals("soulsweapons:moonstone_pickaxe") || name.equals("soulsweapons:moonstone_shovel")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info3").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(day<=structureUnderDay && (name.equals("soulsweapons:boss_compass")|| name.equals("bosses_of_mass_destruction:void_lily"))){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info2").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(level > 1 || count2>0 || count3>0 || count4>0 || count5>0){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info1").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + } + if(world.getBlockState(pos).getBlock() == BlockInit.COPPER_CRAFTING_TABLE){ + if(name.equals("crafttime:iron_crafting_table")){ + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + }else if(name.equals("soulsweapons:sting") || name.equals("soulsweapons:guts_sword") || name.equals("soulsweapons:holy_greatsword") || name.equals("soulsweapons:kirkhammer") || name.equals("soulsweapons:moonstone_axe") || name.equals("soulsweapons:moonstone_hoe")|| name.equals("soulsweapons:moonstone_pickaxe") || name.equals("soulsweapons:moonstone_shovel")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info3").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(day<=structureUnderDay && (name.equals("soulsweapons:boss_compass")|| name.equals("bosses_of_mass_destruction:void_lily"))){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info2").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(level > 2 || count3>0 || count4>0 || count5>0){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info1").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + } + if(world.getBlockState(pos).getBlock() == BlockInit.IRON_CRAFTING_TABLE){ + if(name.equals("crafttime:diamond_crafting_table") || item == Items.ENCHANTING_TABLE){ + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + return; + }else if(name.equals("soulsweapons:sting") || name.equals("soulsweapons:guts_sword") || name.equals("soulsweapons:holy_greatsword") || name.equals("soulsweapons:kirkhammer") || name.equals("soulsweapons:moonstone_axe") || name.equals("soulsweapons:moonstone_hoe") || name.equals("soulsweapons:moonstone_pickaxe") || name.equals("soulsweapons:moonstone_shovel")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info3").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(day<=structureUnderDay && (name.equals("soulsweapons:boss_compass")|| name.equals("bosses_of_mass_destruction:void_lily"))){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info2").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + else if(level > 3 || count4>0 || count5>0){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info1").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + } + if(world.getBlockState(pos).getBlock() == BlockInit.DIAMOND_CRAFTING_TABLE){ + if(name.equals("crafttime:netherite_crafting_table")){ + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + }else if(name.equals("soulsweapons:sting") || name.equals("soulsweapons:guts_sword") || name.equals("soulsweapons:holy_greatsword") || name.equals("soulsweapons:kirkhammer") || name.equals("soulsweapons:moonstone_axe") || name.equals("soulsweapons:moonstone_hoe")|| name.equals("soulsweapons:moonstone_pickaxe") || name.equals("soulsweapons:moonstone_shovel")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info3").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(day<=structureUnderDay && (name.equals("soulsweapons:boss_compass")|| name.equals("bosses_of_mass_destruction:void_lily"))){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info2").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(level > 4 || count5>0){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info1").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + } + + if(world.getBlockState(pos).getBlock() == BlockInit.NETHERITE_CRAFTING_TABLE){ + if(name.equals("soulsweapons:sting") || name.equals("soulsweapons:guts_sword") || name.equals("soulsweapons:holy_greatsword") || name.equals("soulsweapons:kirkhammer") || name.equals("soulsweapons:moonstone_axe") || name.equals("soulsweapons:moonstone_hoe")|| name.equals("soulsweapons:moonstone_pickaxe") || name.equals("soulsweapons:moonstone_shovel")){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info3").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + }else if(day<=structureUnderDay && (name.equals("soulsweapons:boss_compass")|| name.equals("bosses_of_mass_destruction:void_lily"))){ + this.result.setStack(0, ItemStack.EMPTY); + serverPlayerEntity.sendMessage(Text.translatable("aliveandwell.crafttable.info2").formatted(Formatting.YELLOW,Formatting.BOLD)); + return; + } + } + + updateResult(this, world, this.player, this.input, this.result, (RecipeEntry)null); + }); + } + + @Shadow + public static void updateResult(ScreenHandler handler, World world, PlayerEntity player, RecipeInputInventory craftingInventory, CraftingResultInventory resultInventory, @Nullable RecipeEntry recipe) { + if (!world.isClient) { + CraftingRecipeInput craftingRecipeInput = craftingInventory.createRecipeInput(); + ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity)player; + ItemStack itemStack = ItemStack.EMPTY; + Optional> optional = world.getServer().getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftingRecipeInput, world,recipe); + if (optional.isPresent()) { + RecipeEntry recipeEntry = (RecipeEntry)optional.get(); + CraftingRecipe craftingRecipe = (CraftingRecipe)recipeEntry.value(); + if (resultInventory.shouldCraftRecipe(world, serverPlayerEntity, recipeEntry)) { + ItemStack itemStack2 = craftingRecipe.craft(craftingRecipeInput, world.getRegistryManager()); + if (itemStack2.isItemEnabled(world.getEnabledFeatures())) { + itemStack = itemStack2; + } + } + } + + resultInventory.setStack(0, itemStack); + handler.setPreviousTrackedSlot(0, itemStack); + serverPlayerEntity.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(handler.syncId, handler.nextRevision(), 0, itemStack)); + } + } +} diff --git a/src/main/java/com/equilibrium/mixin/tables/PlayerManagerMixin.java b/src/main/java/com/equilibrium/mixin/tables/PlayerManagerMixin.java new file mode 100644 index 0000000..e82a3ff --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/tables/PlayerManagerMixin.java @@ -0,0 +1,22 @@ +package com.equilibrium.mixin.tables; + +import com.equilibrium.MITEequilibrium; +import net.minecraft.network.ClientConnection; +import net.minecraft.server.PlayerManager; +import net.minecraft.server.network.ConnectedClientData; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; +import org.spongepowered.asm.mixin.*; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(PlayerManager.class) +public abstract class PlayerManagerMixin { + +// @Inject(at = @At("RETURN"), method = "onPlayerConnect") +// public void onPlayerConnect(ClientConnection connection, ServerPlayerEntity player, ConnectedClientData clientData, CallbackInfo ci){ +// player.sendMessage(Text.of(MITEequilibrium.MOD_ID).copy().append(Text.translatable("crafttime.join_info").formatted(Formatting.YELLOW))); +// } +} \ No newline at end of file diff --git a/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerAccessor.java b/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerAccessor.java new file mode 100644 index 0000000..1fb17fc --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerAccessor.java @@ -0,0 +1,12 @@ +package com.equilibrium.mixin.tables; + +import net.minecraft.inventory.RecipeInputInventory; +import net.minecraft.screen.PlayerScreenHandler; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(PlayerScreenHandler.class) +public interface PlayerScreenHandlerAccessor { + @Accessor("craftingInput") + RecipeInputInventory getCraftingInput(); +} diff --git a/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerMixin.java b/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerMixin.java new file mode 100644 index 0000000..21ed6a4 --- /dev/null +++ b/src/main/java/com/equilibrium/mixin/tables/PlayerScreenHandlerMixin.java @@ -0,0 +1,123 @@ +package com.equilibrium.mixin.tables; + +import com.equilibrium.register.BlockInit; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.block.PillarBlock; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.CraftingInventory; +import net.minecraft.inventory.CraftingResultInventory; +import net.minecraft.inventory.Inventory; +import net.minecraft.inventory.RecipeInputInventory; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.recipe.CraftingRecipe; +import net.minecraft.recipe.RecipeEntry; +import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.input.CraftingRecipeInput; +import net.minecraft.registry.Registries; +import net.minecraft.screen.AbstractRecipeScreenHandler; +import net.minecraft.screen.CraftingScreenHandler; +import net.minecraft.screen.PlayerScreenHandler; +import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.server.network.ServerPlayerEntity; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; + +import java.util.Optional; + +@Mixin(PlayerScreenHandler.class) +public abstract class PlayerScreenHandlerMixin extends AbstractRecipeScreenHandler { + @Shadow @Final private CraftingResultInventory craftingResult; + @Shadow @Final public boolean onServer; + @Final + @Shadow private PlayerEntity owner; + @Shadow public abstract int getCraftingResultSlotIndex(); + + @Shadow @Final private RecipeInputInventory craftingInput; + + public PlayerScreenHandlerMixin(ScreenHandlerType screenHandlerType, int i) { + super(screenHandlerType, i); + } + +// @Inject(at = @At("HEAD"), method = "onContentChanged", cancellable = true) +// public void onContentChanged(Inventory inventory, CallbackInfo ca) { +/** + * @author + * @reason + */ +@Overwrite + public void onContentChanged(Inventory inventory) { + if (this.onServer) { + //输出物品 + CraftingRecipeInput craftingRecipeInput = craftingInput.createRecipeInput(); + ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity)owner; + ItemStack itemStack = ItemStack.EMPTY; + Optional> optional = serverPlayerEntity.getWorld().getServer().getRecipeManager().getFirstMatch(RecipeType.CRAFTING, craftingRecipeInput, serverPlayerEntity.getWorld(),(RecipeEntry)null); + if (optional.isPresent()) { + RecipeEntry recipeEntry = (RecipeEntry)optional.get(); + CraftingRecipe craftingRecipe = (CraftingRecipe)recipeEntry.value(); + if (this.craftingResult.shouldCraftRecipe(serverPlayerEntity.getWorld(), serverPlayerEntity, recipeEntry)) { + itemStack = craftingRecipe.craft(craftingRecipeInput,owner.getWorld().getRegistryManager()); + } + } + + Item item = itemStack.getItem(); + String name = Registries.ITEM.getId(item).toString(); + //输入物品 + int count = 0; + int countHay = 0; + + int i; + int j; + for(i = 0; i < 2; ++i) { + for(j = 0; j < 2; ++j) { + Item inputItem = ((PlayerScreenHandlerAccessor)(Object)this).getCraftingInput().getStack(j + i * 2).getItem(); +// String inputItemName = Registry.ITEM.getId(inputItem).toString(); + //输入物品检测:铜,铁,金,红石,绿宝石,青金石,钻石,下界合金,黑曜石 + if(inputItem== Items.COPPER_INGOT || inputItem== Items.IRON_INGOT || inputItem== Items.IRON_BLOCK + || inputItem== Items.GOLD_INGOT || inputItem== Items.GOLD_BLOCK + || inputItem== Items.REDSTONE || inputItem== Items.REDSTONE_BLOCK || inputItem== Items.OBSIDIAN + || inputItem== Items.EMERALD || inputItem== Items.EMERALD_BLOCK || inputItem== Items.LAPIS_LAZULI || inputItem== Items.LAPIS_BLOCK + || inputItem== Items.DIAMOND || inputItem== Items.DIAMOND_BLOCK + || inputItem== Items.NETHERITE_INGOT || inputItem== Items.NETHERITE_BLOCK + || inputItem instanceof BlockItem blockItem && blockItem.getBlock() instanceof PillarBlock && (Registries.ITEM.getId(inputItem).toString().contains("_log") || Registries.ITEM.getId(inputItem).toString().contains("_stem")) + || inputItem instanceof BlockItem && (Registries.ITEM.getId(inputItem).toString().contains("_log") || Registries.ITEM.getId(inputItem).toString().contains("_stem") || Registries.ITEM.getId(inputItem).toString().contains("_wood")) + ){ + count++; + } + + if(inputItem == Items.HAY_BLOCK){ + countHay++; + } + } + } + + long time = this.owner.getWorld().getLevelProperties().getTimeOfDay(); + int day = (int)(time / 24000L)+1; + int structureUnderDay; + if(FabricLoader.getInstance().isModLoaded("aliveandwell")){ + structureUnderDay = 48; + }else { + structureUnderDay = 1; + } + + + if(item != BlockInit.FLINT_CRAFTING_TABLE.asItem() && count > 0 || item==Items.ENCHANTED_GOLDEN_APPLE + || name.contains("aliveandwell:enchanted_golden_carrot") + || day<=structureUnderDay && (name.equals("soulsweapons:boss_compass") + || name.equals("bosses_of_mass_destruction:void_lily"))){ + this.craftingResult.setStack(0, ItemStack.EMPTY); + }else if(countHay>0 && item == Items.WHEAT){ + this.craftingResult.setStack(0, ItemStack.EMPTY); + } else { + CraftingScreenHandler.updateResult(this, this.owner.getWorld(), this.owner, ((PlayerScreenHandlerAccessor)(Object)this).getCraftingInput(), this.craftingResult, (RecipeEntry)null); + } + } + } +} diff --git a/src/main/java/com/equilibrium/register/BlockEnityRegistry.java b/src/main/java/com/equilibrium/register/BlockEnityRegistry.java new file mode 100644 index 0000000..a85645c --- /dev/null +++ b/src/main/java/com/equilibrium/register/BlockEnityRegistry.java @@ -0,0 +1,29 @@ +package com.equilibrium.register; + + +import com.equilibrium.MITEequilibrium; + +import com.equilibrium.blockentity.TheFurnaceEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; +import net.minecraft.block.Block; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; + +public class BlockEnityRegistry { + + public static BlockEntityType THE_FURNACE = register( + "the_furnace", + FabricBlockEntityTypeBuilder.create(TheFurnaceEntity::new, + BlockInit.getFurnaces().toArray(new Block[0]) + ).build(null)); + + public static void init() { + } + + private static BlockEntityType register(String name, BlockEntityType type) { + return Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(MITEequilibrium.MOD_ID, name), type); + } +} diff --git a/src/main/java/com/equilibrium/register/BlockInit.java b/src/main/java/com/equilibrium/register/BlockInit.java new file mode 100644 index 0000000..db27b74 --- /dev/null +++ b/src/main/java/com/equilibrium/register/BlockInit.java @@ -0,0 +1,83 @@ +package com.equilibrium.register; + + +import com.equilibrium.MITEequilibrium; + +import com.equilibrium.block.TheCraftingTableBlock; + +import com.equilibrium.block.TheFurnace; +import net.fabricmc.fabric.api.registry.FuelRegistry; +import net.minecraft.block.*; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.state.property.Properties; +import net.minecraft.util.Identifier; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.ToIntFunction; + +public class BlockInit { + + //tables + public static final List allFurnaces = new ArrayList<>(); + public static Block FLINT_CRAFTING_TABLE = new TheCraftingTableBlock((AbstractBlock.Settings.create().strength(0.2F).sounds(BlockSoundGroup.WOOD)));//燧石工作台 + public static Block COPPER_CRAFTING_TABLE = new TheCraftingTableBlock((AbstractBlock.Settings.create().strength(0.2F).sounds(BlockSoundGroup.WOOD)));//铜工作台 + public static Block IRON_CRAFTING_TABLE = new TheCraftingTableBlock((AbstractBlock.Settings.create().strength(0.2F).sounds(BlockSoundGroup.WOOD)));//铁工作台 + public static Block DIAMOND_CRAFTING_TABLE = new TheCraftingTableBlock((AbstractBlock.Settings.create().strength(0.2F).sounds(BlockSoundGroup.WOOD)));//秘银工作台 + public static Block NETHERITE_CRAFTING_TABLE = new TheCraftingTableBlock((AbstractBlock.Settings.create().strength(0.2F).sounds(BlockSoundGroup.WOOD)));//下界合金工作台 + + public static Block CLAY_FURNACE = new TheFurnace((AbstractBlock.Settings.create().sounds(BlockSoundGroup.STONE).strength(0.2F).luminance(createLightLevelFromBlockState(12)).sounds(BlockSoundGroup.STONE)));//粘土熔炉 + public static Block OBSIDIAN_FURNACE = new TheFurnace((AbstractBlock.Settings.create().sounds(BlockSoundGroup.STONE).strength(0.2F).luminance(createLightLevelFromBlockState(11)).sounds(BlockSoundGroup.STONE)));//黑曜石熔炉 + public static Block NETHERRACK_FURNACE = new TheFurnace((AbstractBlock.Settings.create().sounds(BlockSoundGroup.STONE).strength(0.2F).luminance(createLightLevelFromBlockState(13)).sounds(BlockSoundGroup.STONE)));//地狱岩熔炉 + + public static void registerBlocks() { + //tables + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "flint_crafting_table"), FLINT_CRAFTING_TABLE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "copper_crafting_table"), COPPER_CRAFTING_TABLE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "iron_crafting_table"), IRON_CRAFTING_TABLE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "diamond_crafting_table"),DIAMOND_CRAFTING_TABLE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "netherite_crafting_table"), NETHERITE_CRAFTING_TABLE); + + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "clay_furnace"), CLAY_FURNACE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "obsidian_furnace"), OBSIDIAN_FURNACE); + Registry.register(Registries.BLOCK, Identifier.of(MITEequilibrium.MOD_ID, "netherrack_furnace"), NETHERRACK_FURNACE); + + allFurnaces.add(CLAY_FURNACE); + allFurnaces.add(OBSIDIAN_FURNACE); + allFurnaces.add(NETHERRACK_FURNACE); + } + + public static void registerBlockItems() { + //tables + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "flint_crafting_table"), new BlockItem(FLINT_CRAFTING_TABLE, new Item.Settings().fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "copper_crafting_table"), new BlockItem(COPPER_CRAFTING_TABLE, new Item.Settings().fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "iron_crafting_table"), new BlockItem(IRON_CRAFTING_TABLE, new Item.Settings().fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "diamond_crafting_table"), new BlockItem(DIAMOND_CRAFTING_TABLE, new Item.Settings().fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "netherite_crafting_table"), new BlockItem(NETHERITE_CRAFTING_TABLE, new Item.Settings().fireproof())); + + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "clay_furnace"), new BlockItem(CLAY_FURNACE, new Item.Settings().maxCount(1).fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "obsidian_furnace"), new BlockItem(OBSIDIAN_FURNACE, new Item.Settings().maxCount(1).fireproof())); + Registry.register(Registries.ITEM, Identifier.of( MITEequilibrium.MOD_ID, "netherrack_furnace"), new BlockItem(NETHERRACK_FURNACE, new Item.Settings().maxCount(1).fireproof())); + } + + public static void registerFuels() { + FuelRegistry.INSTANCE.add(FLINT_CRAFTING_TABLE, 300); + FuelRegistry.INSTANCE.add(COPPER_CRAFTING_TABLE, 300); + FuelRegistry.INSTANCE.add(IRON_CRAFTING_TABLE, 300); + FuelRegistry.INSTANCE.add(DIAMOND_CRAFTING_TABLE, 300); + FuelRegistry.INSTANCE.add(NETHERITE_CRAFTING_TABLE, 300); + } + + public static List getFurnaces() { + return allFurnaces; + } + + private static ToIntFunction createLightLevelFromBlockState(int litLevel) { + return (blockState) -> (Boolean)blockState.get(Properties.LIT) ? litLevel : 0; + } + +} diff --git a/src/main/java/com/equilibrium/register/UseBlock.java b/src/main/java/com/equilibrium/register/UseBlock.java new file mode 100644 index 0000000..c7c9fed --- /dev/null +++ b/src/main/java/com/equilibrium/register/UseBlock.java @@ -0,0 +1,40 @@ +package com.equilibrium.register; + +import net.fabricmc.fabric.api.event.player.UseBlockCallback; +import net.minecraft.block.*; +import net.minecraft.registry.Registries; +import net.minecraft.util.ActionResult; + +public class UseBlock { + public static void init(){ + + UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> { +// ItemStack itemStack = player.getStackInHand(hand); +// Item item = itemStack.getItem(); +// String name = Registry.ITEM.getId(item).toString();//获取物品注册名字========Test========== + + Block block = world.getBlockState(hitResult.getBlockPos()).getBlock(); + + if (!player.getWorld().isClient){ + if(!player.isCreative()){ +// player.sendMessage(Text.of(name)); + //无法使用原版工作台 + if(block == Blocks.CRAFTING_TABLE){ + world.removeBlock(hitResult.getBlockPos(),true); + } + + //禁用“你要去的生物群落”工作台 + if(Registries.BLOCK.getId(block).toString().contains("byg:") && Registries.BLOCK.getId(block).toString().contains("crafting_table")){ + world.removeBlock(hitResult.getBlockPos(),true); + } + + //合成蓝图 + if(Registries.BLOCK.getId(block).toString().contains("create:") && Registries.BLOCK.getId(block).toString().contains("crafting_blueprint")){ + world.removeBlock(hitResult.getBlockPos(),true); + } + } + } + return ActionResult.PASS; + }); + } +} diff --git a/src/main/java/com/equilibrium/sound/SoundEventRegistry.java b/src/main/java/com/equilibrium/sound/SoundEventRegistry.java new file mode 100644 index 0000000..ced0c32 --- /dev/null +++ b/src/main/java/com/equilibrium/sound/SoundEventRegistry.java @@ -0,0 +1,10 @@ +package com.equilibrium.sound; + +import net.minecraft.sound.SoundEvent; +import net.minecraft.util.Identifier; + +public class SoundEventRegistry { + public static final Identifier finishSoundID = Identifier.of("entity.experience_orb.pickup"); + public static SoundEvent finishSound = SoundEvent.of(finishSoundID); + +} diff --git a/src/main/java/com/equilibrium/util/ChangePortalColor.java b/src/main/java/com/equilibrium/util/ChangePortalColor.java new file mode 100644 index 0000000..d378894 --- /dev/null +++ b/src/main/java/com/equilibrium/util/ChangePortalColor.java @@ -0,0 +1,22 @@ +package com.equilibrium.util; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.BooleanProperty; + +public class ChangePortalColor extends Block { + public static final BooleanProperty CHANGE_PORTAL_COLOR_INTO_BLUE = BooleanProperty.of("change_portal_color_into_blue"); + + public ChangePortalColor(Settings settings) { + super(settings); + setDefaultState(getDefaultState().with(CHANGE_PORTAL_COLOR_INTO_BLUE, false)); + } + + + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(CHANGE_PORTAL_COLOR_INTO_BLUE); + } +} diff --git a/src/main/java/com/equilibrium/util/CraftingDifficultyHelper.java b/src/main/java/com/equilibrium/util/CraftingDifficultyHelper.java new file mode 100644 index 0000000..1c01bb0 --- /dev/null +++ b/src/main/java/com/equilibrium/util/CraftingDifficultyHelper.java @@ -0,0 +1,99 @@ +package com.equilibrium.util; + +import com.equilibrium.config.CommonConfig; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.gui.screen.ingame.CraftingScreen; +import net.minecraft.item.Item; +import net.minecraft.item.Items; +import net.minecraft.recipe.CraftingRecipe; +import net.minecraft.recipe.input.CraftingRecipeInput; +import net.minecraft.registry.Registries; +import net.minecraft.screen.AbstractRecipeScreenHandler; +import net.minecraft.screen.slot.Slot; +import net.minecraft.text.Text; + +import java.util.ArrayList; + +import static com.equilibrium.MITEequilibrium.LOGGER; + +public class CraftingDifficultyHelper { + + public static float getCraftingDifficultyFromMatrix(AbstractRecipeScreenHandler handler, boolean is_craft_table, Screen screen) { + ArrayList slots = new ArrayList(); + int index = is_craft_table? 10 : 5; + for (int i = 1; i < index; i++) { + slots.add(handler.getSlot(i)); + } + + Text text = screen.getTitle(); + float p = 1.0f; + if(text.equals(Text.translatable("container.copper_crafting"))){ + p -= 0.3f;//铜工作台减30% + } + if(text.equals(Text.translatable("container.iron_crafting"))){ + p -= 0.5f;//铁工作台减50% + } + if(text.equals(Text.translatable("container.diamond_crafting"))){ + p -= 0.7f;//钻石工作台减70% + } + if(text.equals(Text.translatable("container.netherite_crafting"))){ + p -= 0.9f;//下界合金工作台减90% + } + + return Math.max(getCraftingDifficultyFromMatrix(slots) * p, 15F); + } + + + public static float getCraftingDifficultyFromMatrix(ArrayList slots) { + float item_difficulty = 5F; + for (Slot s : slots) { + Item item = s.getStack().getItem(); + if (item == Items.AIR) + continue; + item_difficulty += getDifficulty(item); + } + int totalDifficulty1 = (int) item_difficulty; + int totalDifficulty2 = (int) item_difficulty; + + totalDifficulty1 = (int) Math.log(totalDifficulty1); + totalDifficulty2 = (int) Math.pow(totalDifficulty2,0.68); + + + return totalDifficulty1*totalDifficulty2; + } + + public static ArrayList getItemFromMatrix(AbstractRecipeScreenHandler handler, boolean is_craft_table) { + ArrayList items = new ArrayList(); + int index = is_craft_table ? 10 : 5; + for (int i = 1; i < index; i++) { + items.add(handler.getSlot(i).getStack().getItem()); + } + return items; + } + + public static float getDifficulty(Item item) { + String name = Registries.ITEM.getId(item).toString(); + if(item==Items.IRON_BLOCK){ + return 3200*9; + } + if(item==Items.IRON_INGOT){ + return 3200F; + } + if(item==Items.GOLD_INGOT){ + return 1600F; + } + if(item==Items.DIAMOND){ + return 25600F; + } + if(item==Items.NETHERITE_INGOT){ + return 25600*4F; + } + + + if(CommonConfig.craftItemTimeMap.containsKey(name)){ + return CommonConfig.craftItemTimeMap.get(name); + } + + return 20F; + } +} diff --git a/src/main/java/com/equilibrium/util/CreativeGroup.java b/src/main/java/com/equilibrium/util/CreativeGroup.java new file mode 100644 index 0000000..37c045e --- /dev/null +++ b/src/main/java/com/equilibrium/util/CreativeGroup.java @@ -0,0 +1,33 @@ +package com.equilibrium.util; + +import com.equilibrium.MITEequilibrium; +import com.equilibrium.register.BlockInit; +import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; + +public class CreativeGroup { + public static void addGroup() { + Registry.register(Registries.ITEM_GROUP, id("crafttime.group"), FabricItemGroup.builder() + .icon(() -> new ItemStack(BlockInit.DIAMOND_CRAFTING_TABLE)) + .displayName(Text.translatable("crafttime.group")) + .entries((context, entries) -> { + entries.add(BlockInit.FLINT_CRAFTING_TABLE); + entries.add(BlockInit.COPPER_CRAFTING_TABLE); + entries.add(BlockInit.IRON_CRAFTING_TABLE); + entries.add(BlockInit.DIAMOND_CRAFTING_TABLE); + entries.add(BlockInit.NETHERITE_CRAFTING_TABLE); + entries.add(BlockInit.CLAY_FURNACE); + entries.add(BlockInit.OBSIDIAN_FURNACE); + entries.add(BlockInit.NETHERRACK_FURNACE); + }) + .build()); + } + + public static Identifier id(String path) { + return Identifier.of(MITEequilibrium.MOD_ID, path); + } +} diff --git a/src/main/java/com/equilibrium/util/LootTableModifier.java b/src/main/java/com/equilibrium/util/LootTableModifier.java index f0c7c3a..2b8e3cd 100644 --- a/src/main/java/com/equilibrium/util/LootTableModifier.java +++ b/src/main/java/com/equilibrium/util/LootTableModifier.java @@ -1,35 +1,47 @@ package com.equilibrium.util; -import com.mojang.serialization.Codec; -import com.mojang.serialization.DataResult; -import com.mojang.serialization.JsonOps; import com.google.gson.JsonElement; -import com.google.gson.JsonParser; -import net.fabricmc.fabric.api.event.Event; -import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents; +import com.mojang.serialization.DynamicOps; +import com.mojang.serialization.JsonOps; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricLootTableProvider; +import net.fabricmc.fabric.api.datagen.v1.provider.SimpleFabricLootTableProvider; +import net.fabricmc.fabric.api.loot.v2.FabricLootTableBuilder; import net.fabricmc.fabric.api.loot.v2.LootTableEvents; +import net.fabricmc.fabric.api.loot.v2.LootTableSource; +import net.fabricmc.fabric.impl.loot.LootUtil; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Blocks; import net.minecraft.item.Items; import net.minecraft.loot.LootPool; import net.minecraft.loot.LootTable; -import net.minecraft.loot.condition.SurvivesExplosionLootCondition; -import net.minecraft.loot.context.LootContextTypes; -import net.minecraft.loot.entry.ItemEntry; +import net.minecraft.loot.context.LootContextType; +import net.minecraft.loot.function.LootFunction; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.util.Identifier; -import java.io.FileReader; -import java.io.IOException; +import java.util.List; -import static com.equilibrium.MITEequilibrium.LOGGER; - -public abstract class LootTableModifier { +public abstract class LootTableModifier{ public static void modifierLootTables() { + LootTableEvents.REPLACE.register((key, original, source) -> { if (Blocks.GRAVEL.getLootTableKey() == key && source.isBuiltin()) { LootTable lootTable = LootTable.builder().build(); return lootTable; } + + + + + + + + + + return original; }); } diff --git a/src/main/java/com/equilibrium/util/PlayerMaxHealthHelper.java b/src/main/java/com/equilibrium/util/PlayerMaxHealthHelper.java index aa69cdd..edc13e1 100644 --- a/src/main/java/com/equilibrium/util/PlayerMaxHealthHelper.java +++ b/src/main/java/com/equilibrium/util/PlayerMaxHealthHelper.java @@ -1,8 +1,6 @@ package com.equilibrium.util; -import static com.equilibrium.MITEequilibrium.LOGGER; - public class PlayerMaxHealthHelper { //一切生命上限的值都从这里取得,初始为20,是玩家能够获得的最大值,作为最初赋值setHealth最大值 private static int maxHealthLevel=20; diff --git a/src/main/java/com/equilibrium/util/PlayerMaxHungerHelper.java b/src/main/java/com/equilibrium/util/PlayerMaxHungerHelper.java index 97b654d..58f2ba1 100644 --- a/src/main/java/com/equilibrium/util/PlayerMaxHungerHelper.java +++ b/src/main/java/com/equilibrium/util/PlayerMaxHungerHelper.java @@ -1,11 +1,5 @@ package com.equilibrium.util; -import net.minecraft.entity.player.PlayerEntity; - -import java.util.logging.Logger; - -import static com.equilibrium.MITEequilibrium.LOGGER; - public class PlayerMaxHungerHelper { private static int maxFoodLevel=20; diff --git a/src/main/java/com/equilibrium/util/ShouldSentText.java b/src/main/java/com/equilibrium/util/ShouldSentText.java new file mode 100644 index 0000000..0b51cec --- /dev/null +++ b/src/main/java/com/equilibrium/util/ShouldSentText.java @@ -0,0 +1,7 @@ +package com.equilibrium.util; + +public class ShouldSentText { + //一次性触发器,互斥访问,是临界资源 + + public static int count = 170; +} diff --git a/src/main/java/com/equilibrium/util/WorldMoonPhasesSelector.java b/src/main/java/com/equilibrium/util/WorldMoonPhasesSelector.java index cd60ae8..b0087e8 100644 --- a/src/main/java/com/equilibrium/util/WorldMoonPhasesSelector.java +++ b/src/main/java/com/equilibrium/util/WorldMoonPhasesSelector.java @@ -1,7 +1,5 @@ package com.equilibrium.util; -import static com.equilibrium.MITEequilibrium.LOGGER; - public class WorldMoonPhasesSelector { private static String moonType=null; diff --git a/src/main/java/com/equilibrium/util/WorldTimeHelper.java b/src/main/java/com/equilibrium/util/WorldTimeHelper.java index 63b06e4..cdeac8d 100644 --- a/src/main/java/com/equilibrium/util/WorldTimeHelper.java +++ b/src/main/java/com/equilibrium/util/WorldTimeHelper.java @@ -1,15 +1,8 @@ package com.equilibrium.util; public class WorldTimeHelper { - private static long worldTime=0; - - public static void setWorldTime(long time) { - worldTime = time; - } - public static long getWorldTime() { - return worldTime; - } - public static int getMoonPhase(long time){ - return (int)(time / 24000L) % 128; + public static int getDay(long time){ + int day =(int)(time / 24000L); + return day; } } diff --git a/src/main/java/com/equilibrium/worklevel/CraftingIngredient.java b/src/main/java/com/equilibrium/worklevel/CraftingIngredient.java new file mode 100644 index 0000000..3a13e6b --- /dev/null +++ b/src/main/java/com/equilibrium/worklevel/CraftingIngredient.java @@ -0,0 +1,9 @@ +package com.equilibrium.worklevel; + +public class CraftingIngredient { + public static final int FLINT_CRAFTING_TABLE = 1, COPPER_CRAFTING_TABLE = 2, IRON_CRAFTING_TABLE = 3, DIAMOND_CRAFTING_TABLE = 4, NETHERITE_CRAFTING_TABLE = 5; + public int workLevel; + public CraftingIngredient(int workLevel) { + this.workLevel = workLevel; + } +} diff --git a/src/main/java/com/equilibrium/worklevel/CraftingIngredients.java b/src/main/java/com/equilibrium/worklevel/CraftingIngredients.java new file mode 100644 index 0000000..7dfb8a5 --- /dev/null +++ b/src/main/java/com/equilibrium/worklevel/CraftingIngredients.java @@ -0,0 +1,66 @@ +package com.equilibrium.worklevel; + +import java.util.HashMap; + +public class CraftingIngredients { + +// public static HashMap ingredients = new HashMap<>(); +// public static HashMap block_ingredients = new HashMap<>(); + public static HashMap mod_ingredients = new HashMap<>(); + + public static void init() { + //无等级 //五级工作台:下界合金工作台 + + //一级工作台:燧石工作台——铜质物品 + register("aliveandwell:copper_crafting_table", CraftingIngredient.FLINT_CRAFTING_TABLE); + register("aliveandwell:strings", CraftingIngredient.FLINT_CRAFTING_TABLE); + register("aliveandwell:flint_ingot", CraftingIngredient.FLINT_CRAFTING_TABLE); + register("minecraft:leather", CraftingIngredient.FLINT_CRAFTING_TABLE); + register("minecraft:stick", CraftingIngredient.FLINT_CRAFTING_TABLE); + + //二级工作台:铜工作台 + register("aliveandwell:iron_crafting_table", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_helmet", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_chestplate", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_leggings", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_boots", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_sword", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_knife", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_shove", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_pickaxe", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_axe", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_saw", CraftingIngredient.COPPER_CRAFTING_TABLE); +// register("earlygame:copper_hoe", CraftingIngredient.COPPER_CRAFTING_TABLE); + + //三级工作台:铁工作台 + register("aliveandwell:diamond_crafting_table", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); +// register("minecraft:iron_sword", CraftingIngredient.IRON_CRAFTING_TABLE); + + + //四级工作台:钻石工作台 + register("aliveandwell:netherite_crafting_table", CraftingIngredient.DIAMOND_CRAFTING_TABLE); +// register("minecraft:diamond_sword", CraftingIngredient.DIAMOND_CRAFTING_TABLE); + + } + +// public static void register(Material material, int workbench) { +// block_ingredients.put(material, new CraftingIngredient(workbench)); +// } + + +// public static void register(Item item, int workbench) { +// ingredients.put(item, new CraftingIngredient(workbench)); +// } + + public static void register(String name, int workbench) { + mod_ingredients.put(name, new CraftingIngredient(workbench)); + } +} + diff --git a/src/main/java/com/equilibrium/worklevel/FurnaceIngredient.java b/src/main/java/com/equilibrium/worklevel/FurnaceIngredient.java new file mode 100644 index 0000000..085b67d --- /dev/null +++ b/src/main/java/com/equilibrium/worklevel/FurnaceIngredient.java @@ -0,0 +1,10 @@ +package com.equilibrium.worklevel; + +public class FurnaceIngredient { + public static final int COBBLESTONE_FURNACE = 1, OBSIDIAN_FURNACE = 2, NETHERRACK_FURNACE = 3; + public int workLevel; + + public FurnaceIngredient(int workLevel) { + this.workLevel = workLevel; + } +} diff --git a/src/main/java/com/equilibrium/worklevel/FurnaceIngredients.java b/src/main/java/com/equilibrium/worklevel/FurnaceIngredients.java new file mode 100644 index 0000000..895a1fd --- /dev/null +++ b/src/main/java/com/equilibrium/worklevel/FurnaceIngredients.java @@ -0,0 +1,54 @@ +package com.equilibrium.worklevel; + +import java.util.HashMap; + +public class FurnaceIngredients { + + public static HashMap modFuel_ingredients = new HashMap<>(); + public static HashMap modItem_ingredients = new HashMap<>(); + + //不在该集合内的所有物品都为0级燃料,任何熔炉都可以烧 + public static void initFuel() { + //一级熔炉:石熔炉。 +// register("minecraft:coal", FurnaceIngredient.COBBLESTONE_FURNACE);//煤 + + //二级熔炉:黑曜石熔炉 + register("minecraft:lava_bucket", FurnaceIngredient.OBSIDIAN_FURNACE);//岩浆桶 + + //三级熔炉:地狱岩熔炉 + register("minecraft:blaze_rod", FurnaceIngredient.NETHERRACK_FURNACE);//烈焰棒 + + } + + //不在该集合内的所有物品都为0级物品,可以被任何燃料烧炼 + public static void initItem() { + //一级物品 + register1("minecraft:copper_ore", FurnaceIngredient.COBBLESTONE_FURNACE);//铜矿 + register1("minecraft:iron_ore", FurnaceIngredient.COBBLESTONE_FURNACE);// + register1("minecraft:gold_ore", FurnaceIngredient.COBBLESTONE_FURNACE);// + register1("minecraft:raw_copper", FurnaceIngredient.COBBLESTONE_FURNACE);//铜矿 + register1("minecraft:raw_iron", FurnaceIngredient.COBBLESTONE_FURNACE);// + register1("minecraft:raw_gold", FurnaceIngredient.COBBLESTONE_FURNACE);// + + //二级物品 + register1("minecraft:deepslate_iron_ore", FurnaceIngredient.OBSIDIAN_FURNACE);//铁矿 + register1("minecraft:deepslate_copper_ore", FurnaceIngredient.OBSIDIAN_FURNACE);// + register1("minecraft:deepslate_gold_ore", FurnaceIngredient.OBSIDIAN_FURNACE);// + register1("minecraft:nether_gold_ore", FurnaceIngredient.OBSIDIAN_FURNACE);// +// register1("tablesandfurnaces:deep_raw_copper", FurnaceIngredient.OBSIDIAN_FURNACE);// +// register1("tablesandfurnaces:deep_raw_iron", FurnaceIngredient.OBSIDIAN_FURNACE);// +// register1("tablesandfurnaces:deep_raw_gold", FurnaceIngredient.OBSIDIAN_FURNACE);// + + //三级物品 + register1("minecraft:ancient_debris", FurnaceIngredient.NETHERRACK_FURNACE);//远古残骸 + + } + + public static void register(String name, int workbench) { + modFuel_ingredients.put(name, new FurnaceIngredient(workbench)); + } + + public static void register1(String name, int workbench) { + modItem_ingredients.put(name, new FurnaceIngredient(workbench)); + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/clay_furnace.json b/src/main/resources/assets/miteequilibrium/blockstates/clay_furnace.json new file mode 100644 index 0000000..a8f6754 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/clay_furnace.json @@ -0,0 +1,12 @@ +{ + "variants": { + "facing=north,lit=false": {"model": "miteequilibrium:block/clay_furnace"}, + "facing=south,lit=false": {"model": "miteequilibrium:block/clay_furnace", "y": 180}, + "facing=west,lit=false": {"model": "miteequilibrium:block/clay_furnace", "y": 270}, + "facing=east,lit=false": {"model": "miteequilibrium:block/clay_furnace", "y": 90}, + "facing=north,lit=true": {"model": "miteequilibrium:block/clay_furnace_on"}, + "facing=south,lit=true": {"model": "miteequilibrium:block/clay_furnace_on", "y": 180}, + "facing=west,lit=true": {"model": "miteequilibrium:block/clay_furnace_on", "y": 270}, + "facing=east,lit=true": {"model": "miteequilibrium:block/clay_furnace_on", "y": 90} + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/copper_crafting_table.json b/src/main/resources/assets/miteequilibrium/blockstates/copper_crafting_table.json new file mode 100644 index 0000000..0bbcb02 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/copper_crafting_table.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "miteequilibrium:block/copper_crafting_table" } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/diamond_crafting_table.json b/src/main/resources/assets/miteequilibrium/blockstates/diamond_crafting_table.json new file mode 100644 index 0000000..b695788 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/diamond_crafting_table.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "miteequilibrium:block/diamond_crafting_table" } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/flint_crafting_table.json b/src/main/resources/assets/miteequilibrium/blockstates/flint_crafting_table.json new file mode 100644 index 0000000..ecd44da --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/flint_crafting_table.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "miteequilibrium:block/flint_crafting_table" } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/iron_crafting_table.json b/src/main/resources/assets/miteequilibrium/blockstates/iron_crafting_table.json new file mode 100644 index 0000000..6610be5 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/iron_crafting_table.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "miteequilibrium:block/iron_crafting_table" } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/netherite_crafting_table.json b/src/main/resources/assets/miteequilibrium/blockstates/netherite_crafting_table.json new file mode 100644 index 0000000..3608938 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/netherite_crafting_table.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "miteequilibrium:block/netherite_crafting_table" } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/netherrack_furnace.json b/src/main/resources/assets/miteequilibrium/blockstates/netherrack_furnace.json new file mode 100644 index 0000000..5d57676 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/netherrack_furnace.json @@ -0,0 +1,12 @@ +{ + "variants": { + "facing=north,lit=false": { "model": "miteequilibrium:block/netherrack_furnace" }, + "facing=south,lit=false": { "model": "miteequilibrium:block/netherrack_furnace", "y": 180 }, + "facing=west,lit=false": { "model": "miteequilibrium:block/netherrack_furnace", "y": 270 }, + "facing=east,lit=false": { "model": "miteequilibrium:block/netherrack_furnace", "y": 90 }, + "facing=north,lit=true": { "model": "miteequilibrium:block/netherrack_furnace_on" }, + "facing=south,lit=true": { "model": "miteequilibrium:block/netherrack_furnace_on", "y": 180 }, + "facing=west,lit=true": { "model": "miteequilibrium:block/netherrack_furnace_on", "y": 270 }, + "facing=east,lit=true": { "model": "miteequilibrium:block/netherrack_furnace_on", "y": 90 } + } +} diff --git a/src/main/resources/assets/miteequilibrium/blockstates/obsidian_furnace.json b/src/main/resources/assets/miteequilibrium/blockstates/obsidian_furnace.json new file mode 100644 index 0000000..5525c0d --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/blockstates/obsidian_furnace.json @@ -0,0 +1,12 @@ +{ + "variants": { + "facing=north,lit=false": { "model": "miteequilibrium:block/obsidian_furnace" }, + "facing=south,lit=false": { "model": "miteequilibrium:block/obsidian_furnace", "y": 180 }, + "facing=west,lit=false": { "model": "miteequilibrium:block/obsidian_furnace", "y": 270 }, + "facing=east,lit=false": { "model": "miteequilibrium:block/obsidian_furnace", "y": 90 }, + "facing=north,lit=true": { "model": "miteequilibrium:block/obsidian_furnace_on" }, + "facing=south,lit=true": { "model": "miteequilibrium:block/obsidian_furnace_on", "y": 180 }, + "facing=west,lit=true": { "model": "miteequilibrium:block/obsidian_furnace_on", "y": 270 }, + "facing=east,lit=true": { "model": "miteequilibrium:block/obsidian_furnace_on", "y": 90 } + } +} diff --git a/src/main/resources/assets/miteequilibrium/lang/en_us.json b/src/main/resources/assets/miteequilibrium/lang/en_us.json index f8bfe3c..b3f624e 100644 --- a/src/main/resources/assets/miteequilibrium/lang/en_us.json +++ b/src/main/resources/assets/miteequilibrium/lang/en_us.json @@ -1,6 +1,32 @@ { "item.miteequilibrium.test": "Test", "block.miteequilibrium.example_block": "TestBlock", - "itemgroup.testgroup": "MITEequilibrium" + "itemgroup.testgroup": "MITEequilibrium", + "teleport.overworld": "You will teleport to overworld if staying still now", + "teleport.underworld": "You will teleport to underworld if staying still now", + "teleport.nether": "You will teleport to nether if staying still now", -} + "block.miteequilibrium.flint_crafting_table": "Flint Crafting Table", + "block.miteequilibrium.copper_crafting_table": "Copper Crafting Table", + "block.miteequilibrium.iron_crafting_table": "Iron Crafting Table", + "block.miteequilibrium.diamond_crafting_table": "Diamond Crafting Table", + "block.miteequilibrium.netherite_crafting_table": "Netherite Crafting Table", + "container.flint_crafting": "Flint Crafting Table", + "container.copper_crafting": "Copper Crafting Table", + "container.iron_crafting": "Iron Crafting Table", + "container.diamond_crafting": "Diamond Crafting Table", + "container.netherite_crafting": "Netherite Crafting Table", + + "aliveandwell.crafttable.info1": "The workbench is not graded enough to synthesize!!!", + "aliveandwell.crafttable.info2": "This item could not be synthesized 32 days ago!!!", + "aliveandwell.crafttable.info3": "This item is disabled!!!", + + "block.miteequilibrium.clay_furnace": "Clay Furnace", + "block.miteequilibrium.obsidian_furnace": "Obsidian Furnace", + "block.miteequilibrium.netherrack_furnace": "Netherrack Furnace", + "container.clay_furnace": "Clay Furnace", + "container.netherrack_furnace": "Netherrack Furnace", + "container.obsidian_furnace": "Obsidian Furnace", + "crafttime.join_info": "Crafttable and Dnchantment tablecan be synthesized on low-level workbench.", + "crafttime.group": "Craft Time" +} \ No newline at end of file diff --git a/src/main/resources/assets/miteequilibrium/lang/zh_cn.json b/src/main/resources/assets/miteequilibrium/lang/zh_cn.json index 1dba04a..3355eed 100644 --- a/src/main/resources/assets/miteequilibrium/lang/zh_cn.json +++ b/src/main/resources/assets/miteequilibrium/lang/zh_cn.json @@ -1,5 +1,34 @@ { + "item.miteequilibrium.test": "测试物品", "block.miteequilibrium.example_block": "测试方块", - "itemgroup.testgroup": "测试物品栏" -} + "itemgroup.testgroup": "测试物品栏", + "teleport.overworld": "保持进入前的所处高度不变,你将会被传送至主世界", + "teleport.underworld": "保持进入前的所处高度不变,你将会被传送至地下世界", + "teleport.nether": "保持进入前的所处高度不变,你将会被传送至下界", + + + "block.miteequilibrium.flint_crafting_table": "燧石工作台", + "block.miteequilibrium.copper_crafting_table": "铜工作台", + "block.miteequilibrium.iron_crafting_table": "铁工作台", + "block.miteequilibrium.diamond_crafting_table": "钻石工作台", + "block.miteequilibrium.netherite_crafting_table": "下界合金工作台", + "aliveandwell.crafttable.info1": "该工作台等级不够,无法合成!!!", + "aliveandwell.crafttable.info2": "该物品在32天前无法合成!!!", + "aliveandwell.crafttable.info3": "该物品已禁用!!!", + + "container.flint_crafting": "燧石工作台", + "container.copper_crafting": "铜工作台", + "container.iron_crafting": "铁工作台", + "container.diamond_crafting": "钻石工作台", + "container.netherite_crafting": "下界合金工作台", + + "block.miteequilibrium.clay_furnace": "黏土熔炉", + "block.miteequilibrium.obsidian_furnace": "黑曜石熔炉", + "block.miteequilibrium.netherrack_furnace": "地狱岩熔炉", + "container.clay_furnace": "黏土熔炉", + "container.netherrack_furnace": "地狱岩熔炉", + "container.obsidian_furnace": "黑曜石熔炉", + "crafttime.join_info": "工作台和附魔台可越级合成。", + "crafttime.group": "合成耗时" +} \ No newline at end of file diff --git a/src/main/resources/assets/miteequilibrium/models/block/clay_furnace.json b/src/main/resources/assets/miteequilibrium/models/block/clay_furnace.json new file mode 100644 index 0000000..67f0b3b --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/clay_furnace.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/clay/top", + "front": "miteequilibrium:block/furnace/clay/front", + "side": "miteequilibrium:block/furnace/clay/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/clay_furnace_on.json b/src/main/resources/assets/miteequilibrium/models/block/clay_furnace_on.json new file mode 100644 index 0000000..d8c8bab --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/clay_furnace_on.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/clay/top", + "front": "miteequilibrium:block/furnace/clay/front_on", + "side": "miteequilibrium:block/furnace/clay/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/copper_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/block/copper_crafting_table.json new file mode 100644 index 0000000..e67e33b --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/copper_crafting_table.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "miteequilibrium:block/crafting_table/copper/front", + "down": "minecraft:block/oak_planks", + "up": "miteequilibrium:block/crafting_table/copper/top", + "north": "miteequilibrium:block/crafting_table/copper/front", + "east": "miteequilibrium:block/crafting_table/copper/side", + "south": "miteequilibrium:block/crafting_table/copper/side", + "west": "miteequilibrium:block/crafting_table/copper/front" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/diamond_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/block/diamond_crafting_table.json new file mode 100644 index 0000000..9979132 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/diamond_crafting_table.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "miteequilibrium:block/crafting_table/diamond/front", + "down": "minecraft:block/oak_planks", + "up": "miteequilibrium:block/crafting_table/diamond/top", + "north": "miteequilibrium:block/crafting_table/diamond/front", + "east": "miteequilibrium:block/crafting_table/diamond/side", + "south": "miteequilibrium:block/crafting_table/diamond/side", + "west": "miteequilibrium:block/crafting_table/diamond/front" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/flint_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/block/flint_crafting_table.json new file mode 100644 index 0000000..3e5058b --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/flint_crafting_table.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "minecraft:block/oak_log", + "down": "minecraft:block/oak_log_top", + "up": "miteequilibrium:block/crafting_table/flint/top", + "north": "minecraft:block/oak_log", + "east": "minecraft:block/oak_log", + "south": "minecraft:block/oak_log", + "west": "minecraft:block/oak_log" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/iron_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/block/iron_crafting_table.json new file mode 100644 index 0000000..7b47ee3 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/iron_crafting_table.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "miteequilibrium:block/crafting_table/iron/front", + "down": "minecraft:block/oak_planks", + "up": "miteequilibrium:block/crafting_table/iron/top", + "north": "miteequilibrium:block/crafting_table/iron/front", + "east": "miteequilibrium:block/crafting_table/iron/side", + "south": "miteequilibrium:block/crafting_table/iron/side", + "west": "miteequilibrium:block/crafting_table/iron/front" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/netherite_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/block/netherite_crafting_table.json new file mode 100644 index 0000000..2b7320f --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/netherite_crafting_table.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "particle": "miteequilibrium:block/crafting_table/netherite/front", + "down": "minecraft:block/oak_planks", + "up": "miteequilibrium:block/crafting_table/netherite/top", + "north": "miteequilibrium:block/crafting_table/netherite/front", + "east": "miteequilibrium:block/crafting_table/netherite/side", + "south": "miteequilibrium:block/crafting_table/netherite/side", + "west": "miteequilibrium:block/crafting_table/netherite/front" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace.json b/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace.json new file mode 100644 index 0000000..0309d39 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/netherrack/top", + "front": "miteequilibrium:block/furnace/netherrack/front", + "side": "miteequilibrium:block/furnace/netherrack/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace_on.json b/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace_on.json new file mode 100644 index 0000000..0f46c4c --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/netherrack_furnace_on.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/netherrack/top", + "front": "miteequilibrium:block/furnace/netherrack/front_on", + "side": "miteequilibrium:block/furnace/netherrack/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace.json b/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace.json new file mode 100644 index 0000000..08f22af --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/obsidian/top", + "front": "miteequilibrium:block/furnace/obsidian/front", + "side": "miteequilibrium:block/furnace/obsidian/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace_on.json b/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace_on.json new file mode 100644 index 0000000..3e0ffab --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/block/obsidian_furnace_on.json @@ -0,0 +1,8 @@ +{ + "parent": "block/orientable", + "textures": { + "top": "miteequilibrium:block/furnace/obsidian/top", + "front": "miteequilibrium:block/furnace/obsidian/front_on", + "side": "miteequilibrium:block/furnace/obsidian/side" + } +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/clay_furnace.json b/src/main/resources/assets/miteequilibrium/models/item/clay_furnace.json new file mode 100644 index 0000000..dccdae8 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/clay_furnace.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/clay_furnace" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/copper_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/item/copper_crafting_table.json new file mode 100644 index 0000000..3ecfaf8 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/copper_crafting_table.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/copper_crafting_table" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/diamond_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/item/diamond_crafting_table.json new file mode 100644 index 0000000..3009a57 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/diamond_crafting_table.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/diamond_crafting_table" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/flint_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/item/flint_crafting_table.json new file mode 100644 index 0000000..c707f7a --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/flint_crafting_table.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/flint_crafting_table" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/iron_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/item/iron_crafting_table.json new file mode 100644 index 0000000..6cbbd8e --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/iron_crafting_table.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/iron_crafting_table" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/netherite_crafting_table.json b/src/main/resources/assets/miteequilibrium/models/item/netherite_crafting_table.json new file mode 100644 index 0000000..116c4b6 --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/netherite_crafting_table.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/netherite_crafting_table" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/netherrack_furnace.json b/src/main/resources/assets/miteequilibrium/models/item/netherrack_furnace.json new file mode 100644 index 0000000..42b822b --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/netherrack_furnace.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/netherrack_furnace" +} diff --git a/src/main/resources/assets/miteequilibrium/models/item/obsidian_furnace.json b/src/main/resources/assets/miteequilibrium/models/item/obsidian_furnace.json new file mode 100644 index 0000000..64e923e --- /dev/null +++ b/src/main/resources/assets/miteequilibrium/models/item/obsidian_furnace.json @@ -0,0 +1,3 @@ +{ + "parent": "miteequilibrium:block/obsidian_furnace" +} diff --git a/src/main/resources/assets/miteequilibrium/sounds/finish.ogg b/src/main/resources/assets/miteequilibrium/sounds/finish.ogg new file mode 100644 index 0000000000000000000000000000000000000000..edf155fd3e4d6918eaad2d7563533b19884c7de8 GIT binary patch literal 20761 zcmeFZeO!`f`#*lEsA%c{!4S0&(Ezc5f|;#N2@nZP5E#-P6dyv2mP_02>fTJzA)<+C zx7x!L6yXxKFtJvxm7%k;mJc}7**4o+_OPw3THC$N-(|b+&*%I7e81n{>-YM7{{3Dr zJg@6IpU>kwuj6>1$8nr)*|seQ@CN>MCHT_bS$;&cjwgGq^4k5zo63@1%Msp{XO?gO zd7bgvvRv{%uH}+m(A$@=Px3=HF8vSJ8K1wZ35HSy`MZmmDQgqgucgyy%h@BLzoH!l zZxj~2xe-b%fD)OErJgt#{eKtO9-Ol z8HKS>zX1SW+gz<;m0nx-U5e^ZwMD!=%YThnbL<<7a>upx-yPZ2zkZux*R}P%q-|l< z#ZbQWYv`&&RnMNj%iO+dz`}>(wjJ4(iruCygYspTuIer>&_HqNr5)zm;_Xlg@s49t zx5ZE#RNudX-aTch{@-b#*EQ-lKKM4S94hUXTCM?;M@QJ@B$Fp`~vJ- zfmM&z<8&f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R2}gOT`dk>HUw%S6fqsFz%2DdJ?Kv-JH~ z(DJ(br%wm}5n8>tVn4#s5+kCrJc{d!k-QfY7J-#(u0lcllmoZfX}mGRf? zF?Jgmg1UbhaYjh37!Sj5G3@%$nUZ?45{5$Lfqs1;dn`|8AAe;Ko(Gy9d>MVE8})Ls zq{l|nH(ltig`tq79+_&5{94{S$LuSYu*}sN|5RdxEEQrNK?Ug;lp;c^e^ar=Q2Y{l5R%A^+R|zwZ7EEkX)Z literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/front.png b/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/front.png new file mode 100644 index 0000000000000000000000000000000000000000..144d4c5baa2575ea80f29fff944f53bafbad8d9d GIT binary patch literal 433 zcmV;i0Z#sjP)<@eaWURnm+P55x=KA*dGbJMS&GMDw20egtCYfTX-`$JH zD!4ga^*Gondk_Ss$45Na@2wZzd?6EnEfDl)R|ZO_0{OUjd$ti)LjWTVX&?gH;QV@B zGZkE(EL#l#j#y;~Bp|JQKP4U?SBbl8)_VkGM*|3?2Z%M`{PWo(*sqlaSAdfXng>4< ze{IqCzzPV)7(4ZhYC$?t1u;egu>%osp^(p*Ap%NbUV;Af_PcAd9@xf4hk^#eLNVtF zh)HSi-rfmQ$r@K6@SL=f(g1c5^beBC7YY5R=HS0clwSj8{)M>5PHQ{N0DA&rKlY<~ b#mvbsvPb)qSLpmG00000NkvXXu0mjf+OM&8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/side.png b/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/copper/side.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c8d4dfc5743224f4b1ba18e908bd6a27ade33d GIT binary patch literal 408 zcmV;J0cZY+P)QT!n&h9F2#5k$qr!p@&YETTe+ zh@hPi#6~*{OG~Y6^bJz_0KV0gZ{-ZLcW;VwXYcIn%$&2c+1&Ja{`qnmq1BkphmXh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n%w zNgp>IVs|-u5)!M2Hf*O(p9spX#e4hBeR~`|*OEbQ?#UCu6WtwMcivv#I8w50=y>O` z-0K;Q=DVkhlZLy#ukIf?&|3If=dp^OYYDCGhi9+r|9ZuxGrwM$I1tHPI{#kJf%h(U zH)OBcwB`Af!mIRx&gHY}c%``U?ZiBV9vNe*o?Yr?Bw+Kl`*_m}6Oq?P&h1oBsy5 CL4;ud literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/front.png b/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f71be781938f209fc2ce8bdfefe980d443e8da4b GIT binary patch literal 1991 zcmbVN4NMbP96vr{l!=PKWV*0&G6S;qu2-P+q$E=%15J{o7pb+?%sR%d%yqp z|2Cy0FZT7B=>tKKZ&IQn6}+dp#zar>+`7#e4PKM1i5VOOO*!ov9y=nY%z_~A0a~r$ zHL7Je$(Tiij?q#gyV(lR5EQ$>ZY9VZiWg`p18tGRgU&WsKEH$P1+jJ<5SS^R5ZKKo3y0g~@CYvs=B{l77K}jn962245-8B9QUnPM zO9`YRv5-VjR3Md!C>?=mCHnUS7>bDzF}NdzVhop{cqAqmyI>%W)#>q6#iB7`U?qo* zJa5Gj#AdUJY!VT}8W6EeCPPpR!7w2}2swv^C+tECH+!5xL2)EYTX~wX2waSWmdWMi zFi>^W2D8;oYvIQH1U!b=2`eHNp)Q+7fI8BRv*xm<5#c%#p-hySvhWMH6 z$ovDf`}0czfNxbQw~SZnVm7-)aJ(`Pm@(#%SE4z!!%88k6vyPUB&Ey)YR-09W5p9# zir^Vm%`m3%NTrOcEWjipu^=p+w&)le7yiNlNej{tk`CBcpK%_7W82jE>-m*MfBe=76UAByAe-dObiPI z1MMUuTBuZbl7-_53rQs@@Mq^T$ zo*F-|V8~ooWXI3z{^R-OEDcJFF#T^HSHZbb0#Bql5G==7MWj(5j?GN8U?dB0f^=oK z941|1rF8JvHvPXnFiLAPQh@Yd!aWM(7(H(zSSro{y!G02LV)s!s}4u)K>ljt$hQ}2 zb{q~Gfotk+L15u-Vw44RE*7*X$9=Ch2=XjQQpBmlwkgY)M1SJ#AKT^~>Am4NvSjd3 zUBqThc&A!>;SXia`b$~f@hd`=KbP*EF=xf3$I&6D`&G@g>rlUv2VJFE^*0;*_F2A> z`IdE8I3*qP7-^UD@$Ws)jyr;@?>up|_6?ruYT0FYXDISUf$#h`p4fudM2VT*w{H!d zY2DVfg|P)N&VjZ%$Zn6zK5C4gu4x+9FCDzlKvY2a#riePPoq>zm(Rb}?atXvH}^R+;0FUS6Ru%&vf^mzZb^VVinU%kBHQhAI2;yHSFLv>$EfGY9S zmqjO7WwZX508LZAA-r%?`9w(eRUkAK@%H)-ni!&NK1OUTc@|ya@XvBi%V_j%@62e* zreg!ry3cEapjihj=LY%?*B&VQNLPQQy>b05bzDeLy?N@>M@5y#A6F8_f=`^++P6D* z->$3p?DOK_OrL94_a5Hf_ZR{(_guHiheey4kUd-2A48JrjFe58n$ar=}NxKz2Y}w%=t}K4T#i^x}6TGYw zwiI|Ay7xn+Wb&S1Rbruc_Wg6MAMZ-@TH5Bb&~R@Bbay{lc3D+k@d>u)@`die>s6oj))G;|MFss%MGg}f z5*ohAv(qnLRP6_CRw2FN9nrxh9%0n?4>IR&R}<>~((v)4kXT literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/side.png b/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/diamond/side.png new file mode 100644 index 0000000000000000000000000000000000000000..16c34823f1eb4837bcc8ba09c841c133d7938a56 GIT binary patch literal 1952 zcmbVN3ry5z9IrY>L3s?4IUlpu7X$9v-to9=JQX>VlN|#*2WW8i+8*5KwYRpwfir?& zrqMZJG6j|35>XdrL86-y!6DNi%GkuyL6j|Q5{Ls)0gbPH<#Ex?&CE+5U)$gJ`~QFc z*KLiBSw6*mnmYtRQw&l1cyRZY&xvEfb!S0pD7a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zK~aIg!d!=)Kt3CJo?`&8ayAd`HKbZhsRov{q#6LAIRj_4*~|c#J)C!1-+70~mT8&o zJJ0>k^K)e$wHEL{H;>kET1hZDyn>Qd5$%Zi@ZIRj&*PCQU;wLCx1C_Mv_g)EZu8F_ zfnM5R2}Gp-k?vlYB6`&zkYT0|MeCX6L?Yu!tq*(sAphxNMD|$E_QBC0(3Y_ggg#)T2_t**GZy{9Zy_ihHdc1%CB?KQNY8J=B>Z$(nM z?G9C7rYOB$YTti#clp;#q>&S{Lza8%k>t}a7I$^r9$|dv)n&)_oLrckoP6T2ulx3u zRR@z6)@?cV=Yn-Y)nDKHC$|hO{qks2Q)PR2L`LG!`PofV$U}}%vyxj9Iv$NrD+}ir zI9E=*^2xPXx3(wTPJi#grf|+2eP@#X(%CEI*z~HMzdYdXpW8USu%URjf8UPeVUC}3 z<}8c+J_@bdU^{i{{@+C_KHVnwls@oE$(`9}4+uJ{s-`HE({p0D* zb0eD;4XHlAsFtb@&#Jl9)zvInxzM?gESFY+g bUyNZDjVHE&i&x*${@-%5^BfJYyFdIJugIe< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/netherite/front.png b/src/main/resources/assets/miteequilibrium/textures/block/crafting_table/netherite/front.png new file mode 100644 index 0000000000000000000000000000000000000000..89e1f0d2e904c18bcfaae1016d895861b1f1d470 GIT binary patch literal 1982 zcmbVNe^3-v9A8jT2#E^KAZ=$g2GG0R+XIeU?(62)*7$0YzE5u9d`bV$s?^ic*4BTzhR5n0X*dl*R_XA{*3 zP<7Y_lf_GG7DoI8Jcc?*3o4Uh9-D@MH08xvY`k$uI8C99kufo5Q2u-sG-nqgA3DHjNRd$^AZoZohDk6*7KmDmoWK<`u{Z+5 zhM`)HX7$d;LKTEO?hz=+8JZNyCxU5;&~veMH-))$5U{glpvB=0R+oAQW2Sqb!28_;h`)bNXnDlYJ~EH zm7$T5ZT6`>FidMVFo5(w!aWQVIK5~md1h`N@YWO42?ffdo;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 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/front_on.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..7d6d17b7576739638d1ee6b7f3b53c01a1830259 GIT binary patch literal 706 zcmV;z0zLhSP)G*Q4rnVP@(z*qL9>YXf)9md!dwz7VQW0#W$?I z(e|{^(hDiARVb8$zyW%=7AT0;HX4m48b63+b)fYlWZy{g4=q12IC-Z z8M-jSXuQqqyCyTMil{m(m|gTic;*$TsXE>r=@_%QFfd?%;X1J&L~0zoBg=DfKd4-< z5`>_UQPb#rN)tTni#Fu{0B6JASz~zJvX)f|`6ddE^S`uueXQ-8GH25cn<8wRYD_CL@Bh-r$K* z`8!-4N|!ue)NRpzghC*3f~)vEA66p_5c6?07*qoM6N<$f|M0Xng9R* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/side.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/side.png new file mode 100644 index 0000000000000000000000000000000000000000..ac67245c6ac2d82e8e5b82bc22275582691d202a GIT binary patch literal 689 zcmV;i0#5yjP)BG+6dw2Kj+1j}LA~GlE*f$GEAD3`+T2Wit zEU9hpFt4`V%$eE^8k5S)fw$aMKDFvKlrP=FNC}lji-8d=Zz#q9win~Z z78X{*qH!N;Rs!9*13go3rH)~kXH|6|`kSUWUXsz3%-45GMzUzwLtNBdO|qLlg|R0L zY|Y%0I{&Jp8_a}F49l5lIo)WfrCi>$6IQ~G47T^PFt$=AYuZ%PYB)>rewyLgTr#N3(Z!nVC_ z@uI1t`&?_ikDGsnzKk_U!<3b!=0u8@HrUvmbPn0Gnl|dRaE<+=LbBpq_t&-GImqE3 XGf3qT%nA%Y00000NkvXXu0mjfYv)0o literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/top.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/clay/top.png new file mode 100644 index 0000000000000000000000000000000000000000..bdcc47fb13c1346379f5c047dd8afcc376ff32e5 GIT binary patch literal 661 zcmV;G0&4w&caqB0X~|qo5@tn`*_y=7vLrH9Nf#P?OPE!@J)}x} zizbVFH}E*}LUE=?@nCo7P?y&zDjIus+Oq*yKjL$QOcdR&PUyvV>&Dr~L7 znykqRpt1kVJ=RDpBZgUQ(gEn#73Kw+(O1m9v1Wt{%h^h+?~^2&D2VZ(6gXsFsyzSE z(O)K(=Z7qJFpm}+FPq9c{IBPi^B vA}_gOhlMJXdlFBV^@wBKzsCOlF)#lCPJ-O{U@Y1KIqEP)X{9T4p)I8pfs_hF zY=EE^7jO*%8Uu+-LZb137ZZ&M#+dkEd@;uO?~XHHsSk7KTV~F8X3kux5s#r392K@O zGK@whf~?z(=s-Ur{VgjQWwhgR9=ABFhl1iv;?MDP4o$i|$Y#(8jpEM4WxSa!C(!-Lv;f!) zhp?AS;3ff8hKC{LeO~NP5(n|cNg9R*@yWG-dD97|cugvOTU$X>ae>R1c&ZM( z9(=6N7_?Y0WNrBhfn@0Xv|PliLJm(zW>!UFDc0NyJ}oby>K}yH zY=(=Juu|tO)VQ`+j7BmUwb2m)z&S%!OKX(hRp*c;AcdM@qE2(SImt{4n7dnhn_dqK zd1k~cPi7`tbFi66;CZotGL_ML5oDuR%@?u>76L#g0GUyVSXX%>1+O>7C`$~_7XL9XD2jdT^$`zkyn$~(-7$iMBUW| komwSgdI==ZYZJfoKe48bl2hTO-~a#s07*qoM6N<$g3iff3;+NC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/front_on.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..0348b576416e12136a8d59aa31f14f611b01c9d0 GIT binary patch literal 753 zcmV0C z6hlGey#vyw`}QpmcU1&{4Havk7`!!s(D_1)o=*34ZL2B~YT5+wmBRz5(1E zzJQk#8XgULrN80r$Kzx|u6HT!UP!?mHHgBHA0lYA;z2YllUMwMxG}8ALAm4Fq$51U~X*9esD>w`$TU0A0i4&oR4sU#vct1NZQZHLm)j$mgehT6~Lsxl-i zdZuNtGw4IeW`kJIM&;Lb6A=l>xZUV7o29iI&%k0b!A?F~(&3x5)^>lIa(CD>RI!R1LSpy>hwS)+$}tTEPET z3HGnkS&*xOZd6EjL(%9;9p*EGS;&y4^UwJd1o7d%zlE+^g{a1Fiww|;gY7)dL jDDB&5GJD(3$=~@mU*OTMOZ>IM00000NkvXXu0mjfFr`rb literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/side.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/side.png new file mode 100644 index 0000000000000000000000000000000000000000..96e5498bf89dce2c47194d8698d053eea0fb8808 GIT binary patch literal 791 zcmV+y1L*vTP)(R5;5;Q&~?_Q4qe*7D0i43D5VgU{7zhzHCYl&uj4}SZ&zVzhd^nxcIWymU^UYi-@AD$-u#3}Y zvmzgIBWyCkbFCik`tpfaUWOhQF`I-h=X404#6R2J5ftcgEgVALX~(_J4m?jLu-fJj z_XURy8)`(@C5l`2c~F$S$hEs5c^ew=Q0WrMldd+*b$Uc111wU)1l?~D=t@8l0Fy2! z7Q1BJA)u7i3Q29YV3v|Nh#z*MDwYXwE830SWCYW07v?%VB5}skE*L#c#IfGygs-s? z(rii*)gDLu0zll=usF9bKsO^HY!JikSQG`18#{?GR*0G0L;!AsK?FbWcZuL-zl`FA z9$cNPz3xq8H53#&Y^v0X?87*LH&<1W28K%_m~~))1z)ESl9T6&Zjk_4xZQY6#1$!- z?S0atwZZ_2N2UunPsv-vhTGs?nJ$A)Im&?gB=~-peCeu6NFk$9(D{$ar~W{z_;NcoDcNjjLvay3U5;h(N-bphZM6|Fh%qHG?K$n(2o*P-X_sb z`ZL&5WPG0)!yy5m-yA@xCx&MWc-?Mu8>YZfz3a=kdpq;Zh!!5Zno0DRYd zTy>rNr9=$-(Fh*VMyh5rBp$_>$%xaT0UTyDl;Tkls3(3P+H5z23bx4qk=kJZ&S|N> zT3+QhX{{U(4hqWvuV{QPsGU7pbN^5&*sjy$1OtUo`mZ-5LzLcU2Qf$DEYVW2NKBIjX8V3r!y?&zErloD zDzZ0P$^iPO94Cjpwg$f1D`=>wfQ4pkqebDj5w9Jtx;ki9Gg_;wVXLV@E5&mA{{SfA V(guQGF?Ij|002ovPDHLkV1k-_U@HIs literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/top.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/netherrack/top.png new file mode 100644 index 0000000000000000000000000000000000000000..5b9f11e7e687990e452e6b867eafd201bd79d858 GIT binary patch literal 735 zcmV<50wDc~P)^8?@2Y^hM70&uvDIN z%WB-U+wfv&0NYYmkvk*M*@=T_M2n~Tda>qvpoIk3l!A#KC(;6X9FHkLv9||X!yzmP zP|od!k&uL{Af@Gi7uOR7?2Sb6VR8aD^LdorF02YD3+KHao#^Xq1*cLM?COHCk&9@z zH|eMX@cnHzqfem@`Yw~kSt^Ok=^~bd`_*g~$1-K8TLAnPize?!!kWAn9>z{x4|Zp_ z-z&>_H9n>~oaf`%3CQ}CjYz#d@RywozseceV0!ZOLm1Z>WxfC-} z4_A`~23N*|q6qj*iZ7%KX^<<&-4=kEI-t1;zAs8Fv^2wr*=#xvyT2A;xB-fHQ5@Ix zeyNm|9;aCr(9-=r#3i4!*0W(4NvE^1_Y(ow6685i+w{ht{Z-TwqxilutxcW?(68!} zPD1(yU3Dm3FDsdb7F;O-On)#Q#zs^dQewjcnIhqEz~CxqitCwaoXD!S0z;Z;7G8)S z80mwuoPV2}RRGrXwch=2Wla!q7zwZ|yg6o7OvL}B_|jo-0Mj?>gVj(7wd6Q<1nB4D zV;l*cD{&+Fnn3SmL!Zkf1>{7GM`CTAAR;L2Iw{FFvTOREW?~Y@G{@y;=!f%s4yR)Y z-G%~~pK?kLylqwl+wP#VsR>Tmu}6%;ySacDzV>$H-43`~Tj8-<;gVd^{|lr^zx@|@ Rll1@q002ovPDHLkV1gPRN)iA7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front.png new file mode 100644 index 0000000000000000000000000000000000000000..bc62b0fa60a34000773d28abbb5107dca44f69c2 GIT binary patch literal 539 zcmV+$0_6RPP)0a7Eb&#}0Kxsv5?c*uu^LMGQ2}Dwrn%X6=A8E6{Ni>ojExQdo$9kb(`P^e50n zRf3h;Hdh96X!x;MG!LMX6~`*nu<@0I!P&OA8Mz`K#Me}6zjFn>IMXfSnfCAZh8RN* zUGT&D<{NI8pKvvQCER6Sd-oTCH^^qsaI^Rz9b0zY2#3g_)lA`hyb*ZVo*VEQ2?V?k zT%5cf!*slc$?zU#=_5=>Ys%T~0n-Lk0p5ry`Lx0W96BpyMkZdPOL3_%+B1kD@CGFA z64}8ZPf8W7^LhtX^LOaAm%B||q)!m}W2m0Gzg|HZl!|5IXyS<~qi`%=!L}1B$LBpA zggE93c*jbka4Lt0``l_yz^ZY2=R%=)1Otr1;X+|-6i%R8^<)dUQMj`CydhBd2YJmg dR{p))@B_=hOEeV=Hu3-f002ovPDHLkV1i0t?OXr= literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front_on.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/front_on.png new file mode 100644 index 0000000000000000000000000000000000000000..a16828381253b1c945aafa0821b339c07fc7585d GIT binary patch literal 530 zcmV+t0`2{YP)ng(nYeJIuFNa&s1rqMfMi0V(en>PM?YK#Z+DnEc4x%*+k9&sUfl{m0xk-&- zcg-YIcXQNnY=WtK`9yLW!|-W^!ho7YRMje|X9%@+kQZw z$V5&;lj^!94aB9<;mL`504bI^O(8Fvz7iU=vfbwFO8FqX;ZggYYv_eZz9PlAzbRc} z2nxB-!S?nW?pB|0y?ABZCts!d1@Q*S{26YSAKa&v>-B&x(SoKQ!{vB~c*x=o>_!Bx z)dvfsbrHgJyoJed1M~P1rlT!uvUgzQ22+I92w9ve3j82sBon*QWnPR%C4&%Ld%#T+ z{z&1zh|)wDbzr@ChhBSCyu@Yv1c5VVA`A9~FilH&1{OHr6R1{gu>!p)da`M0=Ukv1nPN>`@%L`SF94*H UNGtkb`v3p{07*qoM6N<$f=u1&c>n+a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/side.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/side.png new file mode 100644 index 0000000000000000000000000000000000000000..73e6c08194ef279026607d3ad070ae39b873f14b GIT binary patch literal 527 zcmV+q0`UEbP))hYYOm{1m)d2<5Y=L34ST~F|+oV^k2I_6p9jMnmlx_A=tU?8&VFGSH z%n_kYNDKec&sZ0v>|0GwLO>rXT1_9=N$>_SLnThU9T)!hSymS+wOWInlnf;Kogh5lIH)V`+&lREUKF+5QJ^lP}mr zZ;ZS2yJWv2-XUGTz&`$DKXuk<^k|7qaO?nR=T>+v$^b!YMyOw;3bC_$1Qan?goKqt~JbX-V!-GwZX?z3ah znS|ORNw7OpOq%m}o)d9Qf#MXqx@yS?bfZM}`GL?C)z6%42j%r2zdY{&`~nNQaWEVe Rn%e*X002ovPDHLkV1m5&=t=+p literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/top.png b/src/main/resources/assets/miteequilibrium/textures/block/furnace/obsidian/top.png new file mode 100644 index 0000000000000000000000000000000000000000..deff5c610d4754b686da5aa461eccb191d2b3a6f GIT binary patch literal 492 zcmVahxYCcMUx*;6ZsQjxzz2cX;gdjEo(|G_!m+;`pT!}cM3(d>7?|&;!rATi zbP+&(dZl1g0DD`02!}B~(p~NQeufs1;6j(U#GVYVVV|ds@+Wz(Q^_Ve3xbSW(1Eys zWXwlRD<|oVuML>zg*rh?M47Yccf$)~JU*Qq*nXdb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Sa_lvfSK3I0zoC5{_J9n5|9I=IQ?&~Hj&9!aMZw1bEn=Iqqn=haeaISO2_%`f7W zbMs<#p=2Q2Fo04(8QogVsrqq(eZs2cqQv7<@I2}$8ntxQgrI>;225Sk0XA(7=tM)7 zVVRIpI+8C3q?=a3NS<&Rfx`Xo0kv&W&#yy4S<=( zfQGS34MG%x@W}g|eb#siN*fQU4pK&qcSQEX;F1>hn~aYNSvtBuhwHA}va#QXaX8j zy7Q48^QWub%7tUk?Ri{fm45)*6P-!` literal 0 HcmV?d00001 diff --git a/src/main/resources/miteequilibrium.mixins.json b/src/main/resources/miteequilibrium.mixins.json index a5fc1f2..f6b1302 100644 --- a/src/main/resources/miteequilibrium.mixins.json +++ b/src/main/resources/miteequilibrium.mixins.json @@ -3,30 +3,44 @@ "package": "com.equilibrium.mixin", "compatibilityLevel": "JAVA_21", "mixins": [ - "AbstractFireBlockMixin", "BiomeMixin", - "ConcentricRingsStructurePlacementMixin", - "EnderEyeItemMixin", "GrassColorsMixin", - "HungerManagerMixin", "IdentifierMixin", "MITEequilibriumMixin", - "NetherPortalBlockMixin", - "NetherPortalMixin", - "PlayerEntityMixin", - "PlayerManagerMixin", - "PortalForcerMixin", - "StrongholdGeneratorMixin", - "StrongholdGeneratorStartMixin", - "loot_table.BlockLootTableMixin" + "recipeModifier", + "crafttime.ScreenHandlerMixin", + "entitymixin.CowEntityMixin", + "loot_table.BlockLootTableMixin", + "oreGenerator.OreGeneratorModifiy", + "player.HungerManagerMixin", + "player.PlayerEntityMixin", + "player.PlayerManagerMixin", + "portal.AbstractFireBlockMixin", + "portal.EnderEyeItemMixin", + "portal.NetherPortalBlockMixin", + "portal.NetherPortalMixin", + "portal.PortalForcerMixin", + "structure.ConcentricRingsStructurePlacementMixin", + "structure.StrongholdGeneratorMixin", + "structure.StrongholdGeneratorStartMixin", + "tables.AbstractFurnaceEntityMixin", + "tables.CraftingScreenHandlerMixin", + "tables.PlayerManagerMixin", + "tables.PlayerScreenHandlerAccessor", + "tables.PlayerScreenHandlerMixin" ], "injectors": { "defaultRequire": 1 }, "client": [ "BlockModelRendererMixin", - "InGameHudMixin", - "WorldRendererMixin", - "color.LightmapTextureManagerMixin" + "color.LightmapTextureManagerMixin", + "crafttime.MixinClientPlayerEntity", + "crafttime.MixinCraftingScreen", + "crafttime.MixinInventoryScreen", + "player.ClientPlayerEntityMixin", + "render.DebugHudMixin", + "render.InGameHudMixin", + "render.WorldRendererMixin" ] } \ No newline at end of file diff --git a/src/main/resources/name.accesswidener b/src/main/resources/name.accesswidener index 79fbf81..32e91ca 100644 --- a/src/main/resources/name.accesswidener +++ b/src/main/resources/name.accesswidener @@ -1,5 +1,16 @@ accessWidener v1 named + + + + + + +accessible field net/minecraft/entity/LivingEntity lastDamageSource Lnet/minecraft/entity/damage/DamageSource; +accessible field net/minecraft/entity/LivingEntity lastDamageTime J +accessible method net/minecraft/screen/CraftingScreenHandler updateResult (Lnet/minecraft/screen/ScreenHandler;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/inventory/RecipeInputInventory;Lnet/minecraft/inventory/CraftingResultInventory;Lnet/minecraft/recipe/RecipeEntry;)V +accessible method net/minecraft/client/gui/hud/DebugHud$AllocationRateCalculator get (J)J +accessible class net/minecraft/client/gui/hud/DebugHud$AllocationRateCalculator accessible field net/minecraft/entity/LivingEntity HEALTH Lnet/minecraft/entity/data/TrackedData; accessible method net/minecraft/block/NetherPortalBlock getOrCreateExitPortalTarget (Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/world/border/WorldBorder;)Lnet/minecraft/world/TeleportTarget; accessible method net/minecraft/world/dimension/NetherPortal validStateInsidePortal (Lnet/minecraft/block/BlockState;)Z @@ -22,4 +33,12 @@ accessible field net/minecraft/structure/StrongholdGenerator$PieceData weight I accessible field net/minecraft/structure/StrongholdGenerator$PieceData pieceType Ljava/lang/Class; accessible field net/minecraft/structure/StrongholdGenerator$PieceData generatedCount I accessible method net/minecraft/structure/StrongholdGenerator createPiece (Ljava/lang/Class;Lnet/minecraft/structure/StructurePiecesHolder;Lnet/minecraft/util/math/random/Random;IIILnet/minecraft/util/math/Direction;I)Lnet/minecraft/structure/StrongholdGenerator$Piece; -accessible method net/minecraft/structure/StrongholdGenerator pickPiece (Lnet/minecraft/structure/StrongholdGenerator$Start;Lnet/minecraft/structure/StructurePiecesHolder;Lnet/minecraft/util/math/random/Random;IIILnet/minecraft/util/math/Direction;I)Lnet/minecraft/structure/StrongholdGenerator$Piece; \ No newline at end of file +accessible method net/minecraft/structure/StrongholdGenerator pickPiece (Lnet/minecraft/structure/StrongholdGenerator$Start;Lnet/minecraft/structure/StructurePiecesHolder;Lnet/minecraft/util/math/random/Random;IIILnet/minecraft/util/math/Direction;I)Lnet/minecraft/structure/StrongholdGenerator$Piece; + + + + + + +accessible method net/minecraft/client/gui/hud/DebugHud drawText (Lnet/minecraft/client/gui/DrawContext;Ljava/util/List;Z)V +accessible method net/minecraft/client/gui/hud/DebugHud getLeftText ()Ljava/util/List; \ No newline at end of file