-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master—' into master—
- Loading branch information
1 parent
27fff45
commit 16a290e
Showing
121 changed files
with
4,058 additions
and
203 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/main/generated/.cache/684a20b6ff997062e678180dff3c571444f18410
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// 1.21 2024-07-21T05:39:39.9208483 MITEequilibrium/Language (zh_cn) | ||
582122e265b4c630127b356fab100a52fa8e8686 assets\miteequilibrium\lang\zh_cn.json |
40 changes: 0 additions & 40 deletions
40
src/main/generated/.cache/8ce55c2d46c78681d7eebf7cad72e9c2de67a045
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
src/main/java/com/equilibrium/MITEequilibriumDataGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
src/main/java/com/equilibrium/block/TheCraftingTableBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
Oops, something went wrong.