Skip to content

Commit

Permalink
细节修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Lithewings committed Aug 13, 2024
1 parent 9be3970 commit 3dd7c82
Show file tree
Hide file tree
Showing 35 changed files with 903 additions and 217 deletions.
107 changes: 0 additions & 107 deletions src/main/generated/.cache/04fb54d911b9daf8fa33d64269c96354f0dfbd70

This file was deleted.

15 changes: 15 additions & 0 deletions src/main/generated/.cache/989b3cf8180962d37095898428e6f4e61e71ed5f
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 1.21 2024-08-13T11:58:37.6138784 MITEequilibrium/Block Loot Tables
18dfe9df43acfd4e4f7cbd7d7a1ee198e2ae1c6e data\miteequilibrium\loot_table\blocks\clay_furnace.json
ba09d87d8bb27fd2a12e4cbcee7e719b17bdcf72 data\miteequilibrium\loot_table\blocks\ancient_metal_block.json
ef3263d20056864fd710407829b71bbc38b96d5f data\miteequilibrium\loot_table\blocks\silver_block.json
8e8c646ea6d4cb6b47b8a4fd0767c6db66a171af data\miteequilibrium\loot_table\blocks\netherite_crafting_table.json
1f6e15b5d48226cd2901836d775b61a56493681c data\miteequilibrium\loot_table\blocks\netherrack_furnace.json
b5d17c0d7b02f43e433f07e34cfb26f9ff12a721 data\miteequilibrium\loot_table\blocks\adamantium_block.json
09df54b63eee7c56451204e15da7d3a0ef8954e5 data\miteequilibrium\loot_table\blocks\copper_block.json
9b6c5e429cd11872c02e31e2ab989f807075024f data\miteequilibrium\loot_table\blocks\mithril_block.json
cc315be0afde647f078b580c11b174c450138dd2 data\miteequilibrium\loot_table\blocks\gold_block.json
8e5a64d8ba4adfcc524096e0af003bbe3be7e9aa data\miteequilibrium\loot_table\blocks\iron_crafting_table.json
92bc2c56572c2aa42b2deb2a93fb6547a38f98c3 data\miteequilibrium\loot_table\blocks\obsidian_furnace.json
a3005cab40ed6506c3ec2208959d2b7b5b70c9d6 data\miteequilibrium\loot_table\blocks\copper_crafting_table.json
77e5eec468a13dcbb022eae8a7f74d4f50c0655a data\miteequilibrium\loot_table\blocks\diamond_crafting_table.json
eee242b8227d576e4e3dcdd48775aecc4818a7a0 data\miteequilibrium\loot_table\blocks\flint_crafting_table.json
16 changes: 16 additions & 0 deletions src/main/java/com/equilibrium/MITEequilibrium.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.equilibrium.craft_time_register.BlockInit;
import com.equilibrium.craft_time_register.UseBlock;
import com.equilibrium.entity.goal.BreakBlockGoal;
import com.equilibrium.event.BreakBlockEvent;
import com.equilibrium.item.Metal;
import com.equilibrium.item.ModItemGroup;
Expand All @@ -30,6 +31,10 @@
import com.equilibrium.craft_time_worklevel.FurnaceIngredients;


import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

import static com.equilibrium.entity.ModEntities.registerModEntities;


Expand All @@ -49,10 +54,21 @@ public class MITEequilibrium implements ModInitializer {

public static Config config;

private static final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

public static void init() {
// 任务在mod加载时初始化,初始化僵尸破坏的方块进度
scheduler.scheduleAtFixedRate(() -> {
synchronized (BreakBlockGoal.blockBreakProgressMap) {
BreakBlockGoal.blockBreakProgressMap.clear();
System.out.println("Progress map cleared.");
}
}, 240, 240, TimeUnit.SECONDS); // 30秒后首次运行,以后每隔30秒执行一次
}

@Override
public void onInitialize() {
init();
//物品栏添加
ModItemGroup.registerModItemGroup();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class MITEequilibriumDataGenerator implements DataGeneratorEntrypoint {
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator){
FabricDataGenerator.Pack pack=fabricDataGenerator.createPack();
pack.addProvider(ModRecipeGenerator::new);
// pack.addProvider(ModRecipeGenerator::new);
// pack.addProvider(ModModelProvider::new);
// pack.addProvider(ModLanguageTranslatorZhCn::new);
// pack.addProvider(TagsProvider::new);
// pack.addProvider(ModLootTableProvider::new);
pack.addProvider(ModLootTableProvider::new);

}
}
Loading

0 comments on commit 3dd7c82

Please sign in to comment.