Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ef6f03244 | |||
| 9e9c4d28d6 | |||
| d0ae2916ad | |||
| 7bd578797b | |||
| 93bb4afb97 | |||
| 0fa495474b | |||
| bca6034dd7 | |||
| 4b9a4b0a05 | |||
| b636fd4295 | |||
| 1030689b64 | |||
| 734f89a720 | |||
| d64792d3d3 | |||
| 8699a36294 | |||
| 0d3805f654 | |||
| 613d679525 | |||
| 140b1f9111 | |||
| 93cfa0dfe3 | |||
| 11d596b788 |
@@ -15,7 +15,27 @@
|
|||||||
"WebSearch",
|
"WebSearch",
|
||||||
"Bash(git add:*)",
|
"Bash(git add:*)",
|
||||||
"Bash(git commit:*)",
|
"Bash(git commit:*)",
|
||||||
"Bash(git push)"
|
"Bash(git push)",
|
||||||
|
"Bash(wc:*)",
|
||||||
|
"Bash(git checkout:*)",
|
||||||
|
"mcp__zread__read_file",
|
||||||
|
"Bash(del:*)",
|
||||||
|
"Bash(export:*)",
|
||||||
|
"Bash(unset:*)",
|
||||||
|
"Bash(\"/c/Program Files/JetBrains/CLion 2025.2.1/jbr/bin/java.exe\" -version)",
|
||||||
|
"Bash(java:*)",
|
||||||
|
"Bash(where:*)",
|
||||||
|
"Bash(taskkill:*)",
|
||||||
|
"Bash(dir:*)",
|
||||||
|
"Bash(dir \"C:\\\\Program Files\\\\Eclipse Adoptium\")",
|
||||||
|
"Bash(\"C:\\\\Program Files\\\\Java\\\\latest\\\\bin\\\\java.exe\":*)",
|
||||||
|
"Bash(/c/Program Files/Java/latest/bin/java.exe:*)",
|
||||||
|
"Bash(/c/Program Files/Java/jdk-24/bin/java.exe:*)",
|
||||||
|
"Bash(git show:*)",
|
||||||
|
"Bash(git fetch:*)",
|
||||||
|
"Bash(git pull:*)",
|
||||||
|
"Bash(set:*)",
|
||||||
|
"Bash(JAVA_HOME=/c/Program Files/Java/jdk-24 ./gradlew:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
run/
|
||||||
|
build/
|
||||||
|
.gradle/
|
||||||
|
bin/
|
||||||
|
*.log
|
||||||
|
*.log.gz
|
||||||
|
.DS_Store
|
||||||
|
nul
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
#Fri Jan 02 13:19:24 CET 2026
|
#Mon Feb 02 10:25:07 CET 2026
|
||||||
gradle.version=8.8
|
gradle.version=8.11.1
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>custom_ore_gem</name>
|
||||||
|
<comment>Project custom_ore_gem created by Buildship.</comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1770104171004</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
arguments=--init-script C\:\\Users\\felden.r\\.local\\share\\opencode\\bin\\jdtls\\config_win\\org.eclipse.osgi\\58\\0\\.cp\\gradle\\init\\init.gradle
|
||||||
|
auto.sync=false
|
||||||
|
build.scans.enabled=false
|
||||||
|
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
||||||
|
connection.project.dir=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
gradle.user.home=
|
||||||
|
java.home=C\:/Program Files/Java/jdk-1.8
|
||||||
|
jvm.arguments=
|
||||||
|
offline.mode=false
|
||||||
|
override.workspace.settings=true
|
||||||
|
show.console.view=true
|
||||||
|
show.executions.view=true
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
# Custom Ore Gem - Developer Guide for Agents
|
||||||
|
|
||||||
|
This repository is a Minecraft **NeoForge 1.21.1** mod created with **MCreator**. Agents must follow these strict guidelines to ensure build stability and code preservation.
|
||||||
|
|
||||||
|
## 1. Build & Test Commands
|
||||||
|
|
||||||
|
Use the Gradle wrapper for all operations. Ensure you are using Java 21 (NeoForge 1.21.1 requirement).
|
||||||
|
|
||||||
|
- **Build Mod:**
|
||||||
|
```bash
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
- Generates the mod JAR in `build/libs/`.
|
||||||
|
- Always run this after making changes to verify compilation.
|
||||||
|
|
||||||
|
- **Run Client:**
|
||||||
|
```bash
|
||||||
|
./gradlew runClient
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Run Server:**
|
||||||
|
```bash
|
||||||
|
./gradlew runServer
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Run Data Generation:**
|
||||||
|
```bash
|
||||||
|
./gradlew runData
|
||||||
|
```
|
||||||
|
- This generates resources (blockstates, models, loot tables) into `src/generated/resources`.
|
||||||
|
|
||||||
|
- **Run All Tests:**
|
||||||
|
```bash
|
||||||
|
./gradlew test
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Run Single Test Class:**
|
||||||
|
```bash
|
||||||
|
./gradlew test --tests "net.mcreator.customoregen.OresCommandTest"
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Run Single Test Method:**
|
||||||
|
```bash
|
||||||
|
./gradlew test --tests "net.mcreator.customoregen.OresCommandTest.testCommandRegistration_ShouldRegisterOresCommand"
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Clean Project:**
|
||||||
|
```bash
|
||||||
|
./gradlew clean
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. MCreator & Code Preservation
|
||||||
|
|
||||||
|
**CRITICAL:** This project is partially generated by MCreator.
|
||||||
|
- **Generated Files:** Many files in `src/main/java` are regenerated on every build or MCreator export.
|
||||||
|
- **User Code Blocks:** You **MUST** only edit code within designated user code blocks in these files.
|
||||||
|
```java
|
||||||
|
// Start of user code block [block_name]
|
||||||
|
// ... YOUR CODE HERE ...
|
||||||
|
// End of user code block [block_name]
|
||||||
|
```
|
||||||
|
- If a file does not have these blocks, assume it is **UNSAFE** to edit unless you created it yourself.
|
||||||
|
|
||||||
|
- **Safe Files:**
|
||||||
|
- Files strictly created by you (e.g., in `src/test/java`).
|
||||||
|
- New utility classes or event handlers not managed by MCreator.
|
||||||
|
|
||||||
|
- **Do NOT** directly modify the following unless inside a user block:
|
||||||
|
- `CustomOreGenModBlocks.java`
|
||||||
|
- `CustomOreGenModItems.java`
|
||||||
|
- `CustomOreGenModTabs.java`
|
||||||
|
- Any file in `net.mcreator.customoregen.procedures` (unless explicitly safe).
|
||||||
|
|
||||||
|
## 3. Code Style & Conventions
|
||||||
|
|
||||||
|
### Formatting
|
||||||
|
- **Indentation:**
|
||||||
|
- **Source Code (`src/main`):** Use **TABS** (default MCreator style).
|
||||||
|
- **Tests (`src/test`):** Use **4 SPACES** (typical for JUnit tests).
|
||||||
|
- **Consistency:** Always check the current file's indentation before editing.
|
||||||
|
- **Encoding:** UTF-8.
|
||||||
|
|
||||||
|
### Naming
|
||||||
|
- **Classes:** PascalCase (e.g., `CustomOreGenMod`).
|
||||||
|
- **Methods:** camelCase (e.g., `queueServerWork`).
|
||||||
|
- **Constants:** UPPER_SNAKE_CASE (e.g., `MODID`, `COLD_BIOMES_TAG`).
|
||||||
|
- **Fields:** camelCase (e.g., `workQueue`, `oreGenConfig`).
|
||||||
|
- **Packages:** `net.mcreator.customoregen` (lowercase).
|
||||||
|
|
||||||
|
### Imports
|
||||||
|
- Group imports in this specific order:
|
||||||
|
1. Java/Standard Libraries (`java.*`, `javax.*`)
|
||||||
|
2. Third-party Libraries (e.g., `org.apache.logging.log4j.*`)
|
||||||
|
3. Minecraft/NeoForge (`net.minecraft.*`, `net.neoforged.*`)
|
||||||
|
4. Project Classes (`net.mcreator.customoregen.*`)
|
||||||
|
- Avoid `import *` unless there are many imports from the same package (e.g., `java.util.*` is acceptable if heavily used, but explicit imports are preferred for clarity).
|
||||||
|
|
||||||
|
### Logging
|
||||||
|
- Use `LogManager.getLogger(Class.class)` for loggers.
|
||||||
|
- Field name: `LOGGER`.
|
||||||
|
- Log levels: Use `debug` for dev info, `info` for general status, `error` for exceptions.
|
||||||
|
|
||||||
|
## 4. Architecture & Patterns
|
||||||
|
|
||||||
|
- **Framework:** NeoForge 1.21.1 (Java 21).
|
||||||
|
- **Registries:** Use `DeferredRegister` for all registries (Blocks, Items, Tabs, SoundEvents).
|
||||||
|
- Example: `public static final DeferredRegister.Blocks REGISTRY = DeferredRegister.createBlocks(CustomOreGenMod.MODID);`
|
||||||
|
|
||||||
|
- **Event Bus:**
|
||||||
|
- The `@Mod` class registers the `IEventBus`.
|
||||||
|
- Use `@SubscribeEvent` for event handling.
|
||||||
|
- Event handlers often reside in `net.mcreator.customoregen.event` or static inner classes annotated with `@EventBusSubscriber`.
|
||||||
|
|
||||||
|
- **Configuration:**
|
||||||
|
- Located in `net.mcreator.customoregen.config.ModConfigs`.
|
||||||
|
- Uses `ModConfig.Type.COMMON` built with `ModConfigSpec`.
|
||||||
|
- Access configs via the public static fields (e.g., `ModConfigs.ORE_GEN.shardDiamondOreCount.get()`).
|
||||||
|
|
||||||
|
- **Commands:**
|
||||||
|
- Registered via `RegisterCommandsEvent`.
|
||||||
|
- Use Brigadier (`CommandDispatcher`, `CommandContext`).
|
||||||
|
- See `OresCommand.java` for the reference implementation.
|
||||||
|
|
||||||
|
## 5. Testing Guidelines
|
||||||
|
|
||||||
|
- **Framework:** JUnit 5 (Jupiter) + Mockito.
|
||||||
|
- **Location:** `src/test/java`.
|
||||||
|
- **Mocking Strategy:**
|
||||||
|
- Since a full Minecraft environment is not available in unit tests, you **MUST** mock Minecraft classes.
|
||||||
|
- Use `@ExtendWith(MockitoExtension.class)`.
|
||||||
|
- Mock critical classes: `@Mock ServerPlayer player`, `@Mock Level level`, `@Mock BlockPos pos`.
|
||||||
|
- Stub methods: `when(level.getBiome(pos)).thenReturn(biomeHolder);`.
|
||||||
|
- **Assertions:** Use `org.junit.jupiter.api.Assertions` (e.g., `assertEquals`, `assertDoesNotThrow`).
|
||||||
|
|
||||||
|
## 6. Common Tasks
|
||||||
|
|
||||||
|
- **Adding a New Ore:**
|
||||||
|
1. Create Block & Item (MCreator/Manual).
|
||||||
|
2. Add JSONs: Loot Table, Configured Feature, Placed Feature, Biome Modifier.
|
||||||
|
3. Register in `CustomOreGenModBlocks` and `CustomOreGenModItems`.
|
||||||
|
4. Update `OresCommand.java` lists (e.g., `COLD_ORES`, `HOT_ORES`) to make it discoverable.
|
||||||
|
5. Update `OreBreakEventHandler.java` if it has custom drops logic.
|
||||||
|
6. Add to `ModConfigs.java` for generation parameters (vein size, count, etc.).
|
||||||
|
|
||||||
|
- **Modifying Logic:**
|
||||||
|
- Check `procedures/` for game logic (often MCreator generated).
|
||||||
|
- Check `event/` for event-driven logic.
|
||||||
|
- Always verify if logic changes need a corresponding test update.
|
||||||
|
|
||||||
|
## 7. Safety & Verification
|
||||||
|
|
||||||
|
- **Backups:** If you are unsure about MCreator regeneration, backup the file before editing.
|
||||||
|
- **Verification:**
|
||||||
|
- Always run `./gradlew build` after changes to ensure no compilation errors.
|
||||||
|
- If you touch config files, ensure `ModConfigsTest` still passes.
|
||||||
|
- If you touch commands, ensure `OresCommandTest` still passes.
|
||||||
|
|
||||||
|
## 8. Directory Structure
|
||||||
|
```
|
||||||
|
src/
|
||||||
|
├── main/
|
||||||
|
│ ├── java/net/mcreator/customoregen/
|
||||||
|
│ │ ├── block/ # Block definitions
|
||||||
|
│ │ ├── config/ # Configuration classes
|
||||||
|
│ │ ├── event/ # Event handlers
|
||||||
|
│ │ ├── init/ # Registration (Blocks, Items, Tabs)
|
||||||
|
│ │ ├── item/ # Item definitions
|
||||||
|
│ │ └── procedures/ # Game logic procedures
|
||||||
|
│ └── resources/ # Assets and data (textures, models, lang)
|
||||||
|
└── test/
|
||||||
|
└── java/net/mcreator/customoregen/ # Unit tests
|
||||||
|
```
|
||||||
@@ -4,9 +4,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
## Project Overview
|
## Project Overview
|
||||||
|
|
||||||
Custom Ore Gem is a Minecraft Forge 1.20.1 mod (mod ID: `custom_ore_gen`) that modifies ore distribution and adds Diamond Shard-tier tools and armor. This is an **MCreator project** - code in `src/main/java` is partially regenerated on each build.
|
Custom Ore Gem is a Minecraft **NeoForge** 1.21.1 mod (mod ID: `custom_ore_gen`) that modifies ore distribution and adds Diamond Shard-tier tools and armor. This is an **MCreator project** - code in `src/main/java` is partially regenerated on each build.
|
||||||
|
|
||||||
**Key**: This mod is designed to work with KubeJS and is not meant to be used standalone.
|
**Note**: This mod replaces vanilla ore distribution with custom biome-based ore generation. For full functionality, it's recommended to use with KubeJS to remove vanilla ores (manual setup required).
|
||||||
|
|
||||||
## Build Commands
|
## Build Commands
|
||||||
|
|
||||||
@@ -22,6 +22,9 @@ Custom Ore Gem is a Minecraft Forge 1.20.1 mod (mod ID: `custom_ore_gen`) that m
|
|||||||
|
|
||||||
# Clean build artifacts
|
# Clean build artifacts
|
||||||
./gradlew clean
|
./gradlew clean
|
||||||
|
|
||||||
|
# Generate resources (data generation for assets/resources)
|
||||||
|
./gradlew runData
|
||||||
```
|
```
|
||||||
|
|
||||||
The built JAR is named `custom_ore_gen-{version}.jar` and appears in `build/libs/`.
|
The built JAR is named `custom_ore_gen-{version}.jar` and appears in `build/libs/`.
|
||||||
@@ -30,14 +33,19 @@ The built JAR is named `custom_ore_gen-{version}.jar` and appears in `build/libs
|
|||||||
|
|
||||||
### MCreator Workflow
|
### MCreator Workflow
|
||||||
|
|
||||||
This project uses MCreator. Important files contain regeneration markers:
|
This project uses MCreator. Files marked with `MCreator note: This file will be REGENERATED on each build.` at the top will be completely overwritten on each build. These include:
|
||||||
|
- `src/main/java/net/mcreator/customoregen/init/CustomOreGenModBlocks.java`
|
||||||
|
- `src/main/java/net/mcreator/customoregen/init/CustomOreGenModItems.java`
|
||||||
|
- `src/main/java/net/mcreator/customoregen/init/CustomOreGenModTabs.java`
|
||||||
|
|
||||||
|
**Protected User Code Blocks**: Only `CustomOreGenModItems.java` contains protected user code blocks:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// Start of user code block [name]
|
// Start of user code block custom items
|
||||||
// End of user code block [name]
|
// End of user code block custom items
|
||||||
```
|
```
|
||||||
|
|
||||||
**Always preserve code between these markers** when editing. The file header notes which files are regenerated (e.g., `CustomOreGenModItems.java`).
|
**Always preserve code between these markers** when editing. All custom items (Ore Biome Finder, Shard Diamond armor, Paxel) are registered in this section.
|
||||||
|
|
||||||
### Package Structure
|
### Package Structure
|
||||||
|
|
||||||
@@ -45,9 +53,11 @@ This project uses MCreator. Important files contain regeneration markers:
|
|||||||
net.mcreator.customoregen/
|
net.mcreator.customoregen/
|
||||||
├── CustomOreGenMod.java # Main mod class, registers event bus
|
├── CustomOreGenMod.java # Main mod class, registers event bus
|
||||||
├── OresCommand.java # /ores command implementation
|
├── OresCommand.java # /ores command implementation
|
||||||
├── block/ # Ore block classes (16 blocks)
|
├── ShardDiamondArmorMaterial.java # Armor material class for Shard Diamond armor
|
||||||
|
├── block/ # Ore block classes (17 blocks)
|
||||||
├── item/ # Items (Diamond Shard, tools, armor, Paxel, OreBiomeFinder)
|
├── item/ # Items (Diamond Shard, tools, armor, Paxel, OreBiomeFinder)
|
||||||
├── config/ # Forge configuration system (ModConfigs.java)
|
├── config/ # NeoForge configuration system (ModConfigs.java)
|
||||||
|
├── event/ # Event handlers (OreBreakEventHandler, EnchantabilityFix)
|
||||||
├── procedures/ # Game logic (ConfigurableOreDropsProcedure, OreexperienceProcedure)
|
├── procedures/ # Game logic (ConfigurableOreDropsProcedure, OreexperienceProcedure)
|
||||||
└── init/
|
└── init/
|
||||||
├── CustomOreGenModBlocks.java # Block registry (deferred register)
|
├── CustomOreGenModBlocks.java # Block registry (deferred register)
|
||||||
@@ -57,7 +67,7 @@ net.mcreator.customoregen/
|
|||||||
|
|
||||||
### Ore Generation System
|
### Ore Generation System
|
||||||
|
|
||||||
The mod uses Forge biome modifiers to distribute ores based on biome temperature tags. The architecture:
|
The mod uses **NeoForge** biome modifiers to distribute ores based on biome temperature tags. The architecture:
|
||||||
|
|
||||||
1. **Biome Tags** (`src/main/resources/data/custom_ore_gen/tags/worldgen/biome/`):
|
1. **Biome Tags** (`src/main/resources/data/custom_ore_gen/tags/worldgen/biome/`):
|
||||||
- `cold_biomes.json` - Cold biomes (lapis, concentrated diamond)
|
- `cold_biomes.json` - Cold biomes (lapis, concentrated diamond)
|
||||||
@@ -65,14 +75,24 @@ The mod uses Forge biome modifiers to distribute ores based on biome temperature
|
|||||||
- `mountain_biomes.json` - Mountain biomes (high emerald)
|
- `mountain_biomes.json` - Mountain biomes (high emerald)
|
||||||
- `rare_biomes.json` - Rare biomes (lower emerald)
|
- `rare_biomes.json` - Rare biomes (lower emerald)
|
||||||
- `tempered_biomes.json` - Temperate biomes (iron, concentrated coal)
|
- `tempered_biomes.json` - Temperate biomes (iron, concentrated coal)
|
||||||
|
- BOP biomes are included with `"required": false` for optional compatibility
|
||||||
|
|
||||||
2. **Biome Modifiers** (`src/main/resources/data/custom_ore_gen/forge/biome_modifier/`):
|
2. **Biome Modifiers** (`src/main/resources/data/custom_ore_gen/neoforge/biome_modifier/`):
|
||||||
- Each ore has a JSON file linking it to biome tags
|
- Each ore has a JSON file linking it to biome tags
|
||||||
- Special case: `deepslatesharddiamondore_biome_modifier.json` uses `forge:any` for all biomes
|
- Special case: `deepslatesharddiamondore_biome_modifier.json` uses `"type": "forge:any"` for all biomes
|
||||||
|
- **JSON Structure**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "neoforge:add_features",
|
||||||
|
"biomes": "custom_ore_gen:cold_biomes", // or {"type": "forge:any"} for all biomes
|
||||||
|
"features": "custom_ore_gen:deepslatesharddiamondore",
|
||||||
|
"step": "underground_ores"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
3. **Worldgen Features** (`src/main/resources/data/custom_ore_gen/worldgen/`):
|
3. **Worldgen Features** (`src/main/resources/data/custom_ore_gen/worldgen/`):
|
||||||
- `configured_feature/` - Defines ore vein size and height range
|
- `configured_feature/` - Defines ore vein size and height range
|
||||||
- `placed_feature/` - Places the feature in the world
|
- `placed_feature/` - Places the feature in the world with vertical anchors
|
||||||
|
|
||||||
### Diamond Shard Progression Tier
|
### Diamond Shard Progression Tier
|
||||||
|
|
||||||
@@ -87,29 +107,39 @@ Diamond Shards are an intermediate tier between Iron and Diamond:
|
|||||||
|
|
||||||
Located in `src/main/java/net/mcreator/customoregen/config/`:
|
Located in `src/main/java/net/mcreator/customoregen/config/`:
|
||||||
|
|
||||||
- `ModConfigs.java` - Forge configuration with 4 sections: `ore_generation`, `tool_stats`, `drops`, `features`
|
- `ModConfigs.java` - NeoForge configuration with 4 nested config classes: `OreGenConfig`, `ToolStatsConfig`, `DropsConfig`, `FeatureToggleConfig`
|
||||||
|
- `ConfigHelper.java` - Utility class for accessing config values
|
||||||
- Generated config file: `config/custom_ore_gen-common.toml` (created on first run)
|
- Generated config file: `config/custom_ore_gen-common.toml` (created on first run)
|
||||||
|
|
||||||
**Note**: As documented in `CONFIG_INTEGRATION_GUIDE.md`, the configuration system is partially implemented. Tool stats read from config, but ore drops require MCreator procedure integration to fully use config values.
|
**Current Implementation Status**:
|
||||||
|
- **✅ Ore Drops**: Fully implemented via `OreBreakEventHandler.java` which listens to `BlockEvent.BreakEvent` and calls `ConfigurableOreDropsProcedure.execute()` for all custom ores
|
||||||
|
- **⚠️ Tool Stats**: Config classes exist in `ModConfigs.java`, but tools currently have hardcoded values (e.g., `SharddiamondpickaxeItem.java:18` has `return 200` for durability). Config reading not yet implemented.
|
||||||
|
- **⚠️ Feature Toggles**: Defined in `FeatureToggleConfig` but not yet wired to block/item registration conditional logic
|
||||||
|
- **⚠️ Ore Generation**: Config values exist but worldgen JSON files still use hardcoded values
|
||||||
|
- **⚠️ Enchantability**: `EnchantabilityFix.java` exists but is commented out - enchantment values not yet applied to items
|
||||||
|
|
||||||
### Ore Biome Finder
|
### Ore Biome Finder
|
||||||
|
|
||||||
The `OreBiomeFinderItem` (`item/OreBiomeFinderItem.java`) and `/ores` command (`OresCommand.java`) detect which mod tags apply to the current biome and list findable ores. This works by checking if the biome is in any of the custom biome tags.
|
The `OreBiomeFinderItem` (`item/OreBiomeFinderItem.java`) and `/ores` command (`OresCommand.java`) detect which mod tags apply to the current biome and list findable ores.
|
||||||
|
|
||||||
|
**Implementation Details**:
|
||||||
|
- Uses `TagKey.create(Registries.BIOME, ResourceLocation.fromNamespaceAndPath("custom_ore_gen", "..."))` to define biome tags
|
||||||
|
- Checks `level.getBiome(pos()).is()` to test tag membership
|
||||||
|
- Displays biome ID, applicable tags, and ore list with height ranges
|
||||||
|
- Hardcoded ore lists by category (COLD_ORES, HOT_ORES, etc.) in `OreBiomeFinderItem.java`
|
||||||
|
|
||||||
## Adding a New Ore
|
## Adding a New Ore
|
||||||
|
|
||||||
To add a new ore type (requires MCreator for full integration):
|
To add a new ore type (requires MCreator for full integration):
|
||||||
|
|
||||||
1. **Create the block** in MCreator
|
1. **Create the block** in MCreator with proper properties (sound type, harvest level, etc.)
|
||||||
2. **Add loot table** at `src/main/resources/data/custom_ore_gen/loot_tables/blocks/{orename}.json`
|
2. **Add loot table** at `src/main/resources/data/custom_ore_gen/loot_table/blocks/{orename}.json` (note: `loot_table` not `loot_tables`)
|
||||||
3. **Add configured_feature** JSON in `worldgen/configured_feature/`
|
3. **Add configured_feature** JSON in `src/main/resources/data/custom_ore_gen/worldgen/configured_feature/`
|
||||||
4. **Add placed_feature** JSON in `worldgen/placed_feature/`
|
4. **Add placed_feature** JSON in `src/main/resources/data/custom_ore_gen/worldgen/placed_feature/`
|
||||||
5. **Create biome_modifier** JSON linking to a biome tag (or create a new tag in `tags/worldgen/biome/`)
|
5. **Create biome_modifier** JSON in `src/main/resources/data/custom_ore_gen/neoforge/biome_modifier/` linking to a biome tag (or create a new tag in `tags/worldgen/biome/`)
|
||||||
6. **Register** in `CustomOreGenModBlocks.java`
|
6. **Add BOP entries** (optional) to appropriate biome tag JSON files with `"required": false` wrapper
|
||||||
|
7. **Update `OreBiomeFinderItem.java`** to add the new ore to the appropriate category list
|
||||||
## Biomes O' Plenty Integration
|
8. **Add ore type mapping** in `OreBreakEventHandler.java` if you want configurable drops via `ConfigurableOreDropsProcedure`
|
||||||
|
|
||||||
The mod includes BOP biome support through additional biome tags. When adding BOP biomes, add them to the appropriate category tag JSON files in `tags/worldgen/biome/`.
|
|
||||||
|
|
||||||
## User Code Sections
|
## User Code Sections
|
||||||
|
|
||||||
@@ -119,12 +149,58 @@ When editing MCreator-generated files, only modify code between:
|
|||||||
// End of user code block [section_name]
|
// End of user code block [section_name]
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, in `CustomOreGenModItems.java`:
|
For example, in `CustomOreGenModItems.java` (lines 67-78):
|
||||||
```java
|
```java
|
||||||
// Start of user code block custom items
|
// Start of user code block custom items
|
||||||
|
public static final Supplier<Item> ORE_BIOME_FINDER = REGISTRY.register("ore_biome_finder", () -> new OreBiomeFinderItem());
|
||||||
|
// ... armor, paxel registrations
|
||||||
// End of user code block custom items
|
// End of user code block custom items
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Important**: Custom items like the Ore Biome Finder, Shard Diamond armor, and Paxel are registered in this protected section and will survive MCreator rebuilds.
|
||||||
|
|
||||||
|
## Event Handlers
|
||||||
|
|
||||||
|
The mod uses NeoForge's event system for ore processing:
|
||||||
|
|
||||||
|
### OreBreakEventHandler
|
||||||
|
- Listens to `BlockEvent.BreakEvent` with `@SubscribeEvent`
|
||||||
|
- Maps custom ore blocks to ore type strings (`shard_diamond`, `concentrated_coal`, `pure_golden`, etc.)
|
||||||
|
- Calls `ConfigurableOreDropsProcedure.execute()` with ore type when player breaks ore with correct tool
|
||||||
|
- Supports 10 ore types: shard_diamond, concentrated_coal, pure_golden, impure_iron, concentrated_diamond, lapis, redstone, emerald, copper
|
||||||
|
|
||||||
|
### EnchantabilityFix
|
||||||
|
- Uses `ModifyDefaultComponentsEvent` to set enchantability values on tools and armor
|
||||||
|
- Currently **commented out** - enchantability not yet applied
|
||||||
|
- When active, should set `DataComponents.ENCHANTABLE` with value 9 (tools) or 14 (armor)
|
||||||
|
|
||||||
|
## Loot Table Format
|
||||||
|
|
||||||
|
NeoForge 1.21 uses `loot_table` (singular) instead of `loot_tables` (plural):
|
||||||
|
- Location: `src/main/resources/data/custom_ore_gen/loot_table/blocks/{orename}.json`
|
||||||
|
- Includes Silk Touch support via `match_tool` condition
|
||||||
|
- Uses `random_sequence` for loot table randomization
|
||||||
|
- Example structure in `deepslatesharddiamondore.json` shows Silk Touch → drop block, otherwise drops handled by `OreBreakEventHandler`
|
||||||
|
|
||||||
|
## Vanilla Ore Removal
|
||||||
|
|
||||||
|
The mod removes vanilla ores via NeoForge biome modifiers (NOT KubeJS anymore):
|
||||||
|
- `src/main/resources/data/custom_ore_gen/neoforge/biome_modifier/remove_vanilla_ores.json`
|
||||||
|
- Uses `neoforge:remove_features` type to remove vanilla ore generation
|
||||||
|
- This replaces the old KubeJS automatic script system from Forge 1.20.1
|
||||||
|
|
||||||
|
## Biomes O' Plenty Integration
|
||||||
|
|
||||||
|
The mod includes BOP biome support through biome tag entries. BOP biomes are wrapped with:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "biomesoplenty:biome_name",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The `"required": false` flag ensures the game doesn't crash if BOP isn't installed. When adding new BOP biomes, add them to the appropriate category tag JSON files in `tags/worldgen/biome/`.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
After making changes:
|
After making changes:
|
||||||
@@ -132,9 +208,51 @@ After making changes:
|
|||||||
2. Run `./gradlew runClient` to test in-game
|
2. Run `./gradlew runClient` to test in-game
|
||||||
3. Check logs in `run/logs/` for errors
|
3. Check logs in `run/logs/` for errors
|
||||||
|
|
||||||
## Version Info
|
## Enchantment Tags
|
||||||
|
|
||||||
- Minecraft: 1.20.1
|
The mod includes enchantment tags at `src/main/resources/data/minecraft/tags/item/enchantable/`:
|
||||||
- Forge: 47.3.0
|
- **armor.json** - Marks Shard Diamond armor pieces as enchantable
|
||||||
- Java: 17
|
- **durability.json** - Marks tools and armor for durability enchantments
|
||||||
- Current mod version: 2.0.8 (defined in `build.gradle`)
|
- **mining.json** - Marks pickaxes, shovels, and paxel as mining tools
|
||||||
|
- **weapon.json** - Marks axes as weapons
|
||||||
|
|
||||||
|
These tags enable proper enchantment behavior for custom items in the enchanting table and anvil.
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
### README Disclaimer
|
||||||
|
The `README.md` file contains outdated information referring to Forge 1.20.1. The current codebase uses **NeoForge 1.21.1**. Always trust `gradle.properties` and this file for accurate version information.
|
||||||
|
|
||||||
|
### Recipe Compatibility
|
||||||
|
The mod includes recipes for:
|
||||||
|
- **Mekanism**: Enriching recipes for concentrated ores and shard diamond
|
||||||
|
- **Create**: Crushing and milling recipes for ore processing
|
||||||
|
- **Sculk Catalyst**: Diamond shard to sculk catalyst conversion
|
||||||
|
|
||||||
|
### Version Information
|
||||||
|
- **Minecraft**: 1.21.1
|
||||||
|
- **NeoForge**: 21.1.219 (defined in `gradle.properties` as `neo_version`)
|
||||||
|
- **Java**: 21 (configured via Java toolchain in build.gradle)
|
||||||
|
- **Mod Version**: 3.0 (defined in `gradle.properties` as `mod_version`)
|
||||||
|
|
||||||
|
### Mod Registration Order
|
||||||
|
In `CustomOreGenMod` constructor, registration order is:
|
||||||
|
1. `CustomOreGenModBlocks.REGISTRY.register(modEventBus)` - Blocks must be registered first
|
||||||
|
2. `CustomOreGenModItems.REGISTRY.register(modEventBus)` - Items depend on blocks for BlockItems
|
||||||
|
3. `CustomOreGenModTabs.REGISTRY.register(modEventBus)` - Creative tabs depend on items
|
||||||
|
|
||||||
|
### Server Work Queue Pattern
|
||||||
|
The mod includes a server tick work queue (`CustomOreGenMod.java:52-69`) for deferring execution:
|
||||||
|
- `queueServerWork(int tick, Runnable action)` - Schedule work to run after N server ticks
|
||||||
|
- Only executes on server thread (`SidedThreadGroups.SERVER`)
|
||||||
|
- Processed during `ServerTickEvent.Post`
|
||||||
|
- Use this for operations that need to happen after a delay or during gameplay
|
||||||
|
|
||||||
|
### DeferredRegister Pattern
|
||||||
|
All registries use NeoForge's `DeferredRegister.create(Registries.X, CustomOreGenMod.MODID)` pattern. This is the modern NeoForge 1.21 registration method replacing the old Forge registry system.
|
||||||
|
|
||||||
|
### NeoForge 1.21 Tool Tier Implementation
|
||||||
|
When creating custom tool items (Tier), you must implement `getIncorrectBlocksForDrops()`:
|
||||||
|
- Returns `TagKey<Block>` or `null`
|
||||||
|
- If `null`, all blocks can be dropped (current implementation in `SharddiamondpickaxeItem.java:38-40`)
|
||||||
|
- This replaces the old Forge 1.20 `getTier()` and incorrect blocks logic
|
||||||
|
|||||||
@@ -12,57 +12,64 @@ Custom Ore Gem est un mod Minecraft développé avec MCreator pour Forge 1.20.1.
|
|||||||
- **Mod Loader** : Forge (version 47.3.0)
|
- **Mod Loader** : Forge (version 47.3.0)
|
||||||
- **Version de Java** : Java 17
|
- **Version de Java** : Java 17
|
||||||
- **Mod ID** : `custom_ore_gen`
|
- **Mod ID** : `custom_ore_gen`
|
||||||
- **Version** : 1.0.0
|
- **Version** : 2.1.5
|
||||||
- **Auteur** : Aulyrius (créé via MCreator)
|
- **Auteur** : Aulyrius (créé via MCreator)
|
||||||
- **Site web** : https://lanro.eu
|
- **Site web** : https://lanro.eu
|
||||||
|
|
||||||
|
|
||||||
## Avant garde
|
## Avant garde
|
||||||
|
|
||||||
Il est recommandé pour la bonne utilisation du mods d'utilisé des mods complémentaire :
|
### Dépendances Requises
|
||||||
|
|
||||||
* **Biomes O' Plenty** - Pour profiter des biomes supplémentaires (69 biomes BOP supportés)
|
* **KubeJS** (OBLIGATOIRE) - Ce mod ne peut pas fonctionner sans KubeJS installé
|
||||||
* **Biome Replacer** pour supprimer les biomes caves, qui n'ont pas de sens de température et d'un point de vue joueur est pas logique.
|
- Le mod refusera de se lancer si KubeJS n'est pas présent
|
||||||
|
- Le mod crée automatiquement le script de suppression des minerais vanilla au premier lancement dans `kubejs/startup_scripts/custom_ore_gen_remove_vanilla_ores.js`
|
||||||
|
|
||||||
biome_replacer.properties :
|
* **Biomes O' Plenty** (Recommandé) - Pour profiter des biomes supplémentaires (69 biomes BOP supportés)
|
||||||
|
|
||||||
```javascript
|
* **Biome Replacer** (Optionnel) - Pour supprimer les biomes caves qui n'ont pas de sens de température
|
||||||
|
|
||||||
|
```properties
|
||||||
|
biome_replacer.properties:
|
||||||
minecraft:deep_dark > null
|
minecraft:deep_dark > null
|
||||||
minecraft:dripstone_caves > null
|
minecraft:dripstone_caves > null
|
||||||
minecraft:lush_caves > null
|
minecraft:lush_caves > null
|
||||||
```
|
```
|
||||||
* KubeJS pour supprimer la génération de base avec le script suivant :
|
|
||||||
|
|
||||||
*remove.js*
|
### Script KubeJS Automatique
|
||||||
|
|
||||||
```javascript
|
Le mod crée automatiquement le script suivant au premier lancement dans `kubejs/startup_scripts/custom_ore_gen_remove_vanilla_ores.js` :
|
||||||
// priority: 0
|
|
||||||
|
```javascript
|
||||||
WorldgenEvents.remove(event => {
|
// priority: 0
|
||||||
var minecraftOreList = [
|
|
||||||
'minecraft:coal_ore',
|
WorldgenEvents.remove(event => {
|
||||||
'minecraft:deepslate_coal_ore',
|
var minecraftOreList = [
|
||||||
'minecraft:copper_ore',
|
'minecraft:coal_ore',
|
||||||
'minecraft:deepslate_copper_ore',
|
'minecraft:deepslate_coal_ore',
|
||||||
'minecraft:iron_ore',
|
'minecraft:copper_ore',
|
||||||
'minecraft:deepslate_iron_ore',
|
'minecraft:deepslate_copper_ore',
|
||||||
'minecraft:gold_ore',
|
'minecraft:iron_ore',
|
||||||
'minecraft:deepslate_gold_ore',
|
'minecraft:deepslate_iron_ore',
|
||||||
'minecraft:redstone_ore',
|
'minecraft:gold_ore',
|
||||||
'minecraft:deepslate_redstone_ore',
|
'minecraft:deepslate_gold_ore',
|
||||||
'minecraft:emerald_ore',
|
'minecraft:redstone_ore',
|
||||||
'minecraft:deepslate_emerald_ore',
|
'minecraft:deepslate_redstone_ore',
|
||||||
'minecraft:diamond_ore',
|
'minecraft:emerald_ore',
|
||||||
'minecraft:deepslate_diamond_ore',
|
'minecraft:deepslate_emerald_ore',
|
||||||
'minecraft:lapis_ore',
|
'minecraft:diamond_ore',
|
||||||
'minecraft:deepslate_lapis_ore'
|
'minecraft:deepslate_diamond_ore',
|
||||||
];
|
'minecraft:lapis_ore',
|
||||||
|
'minecraft:deepslate_lapis_ore'
|
||||||
event.removeOres(props => {
|
];
|
||||||
props.blocks = minecraftOreList
|
|
||||||
});
|
event.removeOres(props => {
|
||||||
});
|
props.blocks = minecraftOreList
|
||||||
```
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note** : Le script n'est recréé que s'il n'existe pas déjà. Vous pouvez le modifier manuellement sans risque.
|
||||||
## Fonctionnalités Principales
|
## Fonctionnalités Principales
|
||||||
|
|
||||||
### Nouveaux Minerais (16 blocs)
|
### Nouveaux Minerais (16 blocs)
|
||||||
@@ -79,6 +86,8 @@ Le mod ajoute plusieurs variantes de minerais personnalisés :
|
|||||||
- Se génère dans les biomes froids (cold_biomes)
|
- Se génère dans les biomes froids (cold_biomes)
|
||||||
- Drop : 1-2 Diamants (Fortune supporté)
|
- Drop : 1-2 Diamants (Fortune supporté)
|
||||||
|
|
||||||
|
> **Note** : La version surface du minerai Shard Diamond a été désactivée dans la version 2.1.5. Seule la version deepslate est disponible.
|
||||||
|
|
||||||
#### Variantes d'Or
|
#### Variantes d'Or
|
||||||
- **Pure Golden Ore** (`puregoldenore`) : Un minerai d'or pur de haute qualité
|
- **Pure Golden Ore** (`puregoldenore`) : Un minerai d'or pur de haute qualité
|
||||||
- Se génère dans les biomes chauds (hot_biomes)
|
- Se génère dans les biomes chauds (hot_biomes)
|
||||||
@@ -531,10 +540,16 @@ Minerais trouvables:
|
|||||||
## Intégration
|
## Intégration
|
||||||
|
|
||||||
### Mode Créatif
|
### Mode Créatif
|
||||||
Les items sont organisés dans les onglets créatifs via `CustomOreGenModTabs` :
|
Le mod ajoute un onglet créatif personnalisé **"Custom Ore Gen"** contenant tous les items du mod :
|
||||||
- **INGREDIENTS** : Diamond Shards et blocs de minerais
|
- Tous les minerais (15 blocs - le minerai surface Shard Diamond est désactivé)
|
||||||
- **TOOLS_AND_UTILITIES** : Pioche, pelle, hache, paxel et Ore Biome Finder
|
- Diamond Shards et Ore Biome Finder
|
||||||
- **COMBAT** : Armure complète en Diamond Shard (casque, plastron, jambières, bottes)
|
- Tous les outils Diamond Shard (pioche, pelle, hache, paxel)
|
||||||
|
- Toute l'armure Diamond Shard (casque, plastron, jambières, bottes)
|
||||||
|
|
||||||
|
Les items restent également disponibles dans les onglets vanilla Minecraft :
|
||||||
|
- **INGREDIENTS** : Diamond Shards
|
||||||
|
- **TOOLS_AND_UTILITIES** : Outils et Ore Biome Finder
|
||||||
|
- **COMBAT** : Armure Diamond Shard
|
||||||
|
|
||||||
### Langue
|
### Langue
|
||||||
Le mod inclut des fichiers de localisation en anglais (`en_us.json`) avec des noms descriptifs pour tous les blocs et objets.
|
Le mod inclut des fichiers de localisation en anglais (`en_us.json`) avec des noms descriptifs pour tous les blocs et objets.
|
||||||
@@ -587,10 +602,12 @@ config/custom_ore_gen-common.toml
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Assurez-vous d'avoir Minecraft 1.20.1 installé avec Forge 47.3.0+
|
1. Assurez-vous d'avoir Minecraft 1.20.1 installé avec Forge 47.3.0+
|
||||||
2. Placez le fichier .jar du mod dans le dossier `mods` de votre installation Minecraft
|
2. **Installez KubeJS** (OBLIGATOIRE) - Le mod ne fonctionnera pas sans KubeJS
|
||||||
3. Lancez le jeu avec le profil Forge
|
3. Placez le fichier `.jar` du mod dans le dossier `mods` de votre installation Minecraft
|
||||||
|
4. Lancez le jeu avec le profil Forge
|
||||||
|
5. Le mod créera automatiquement le script KubeJS nécessaire au premier lancement
|
||||||
|
|
||||||
> **Important** : Ce mod est conçu pour être utilisé avec KubeJS et ne doit pas être utilisé seul.
|
> **Important** : Ce mod nécessite KubeJS pour fonctionner. Le script de suppression des minerais vanilla sera créé automatiquement dans `kubejs/startup_scripts/custom_ore_gen_remove_vanilla_ores.js`.
|
||||||
|
|
||||||
## Architecture du Code
|
## Architecture du Code
|
||||||
|
|
||||||
@@ -600,7 +617,9 @@ config/custom_ore_gen-common.toml
|
|||||||
net.mcreator.customoregen/
|
net.mcreator.customoregen/
|
||||||
├── CustomOreGenMod.java # Classe principale du mod
|
├── CustomOreGenMod.java # Classe principale du mod
|
||||||
├── OresCommand.java # Commande /ores pour détecter les minerais
|
├── OresCommand.java # Commande /ores pour détecter les minerais
|
||||||
├── block/ # Classes des blocs (16 minerais)
|
├── KubeJSIntegration.java # Création automatique du script KubeJS
|
||||||
|
├── ShardDiamondArmorMaterial.java # Classe de matériau d'armure Diamond Shard
|
||||||
|
├── block/ # Classes des blocs (15 minerais)
|
||||||
│ ├── SharddiamondblockoreBlock.java
|
│ ├── SharddiamondblockoreBlock.java
|
||||||
│ ├── ConcentrateddiamondoreBlock.java
|
│ ├── ConcentrateddiamondoreBlock.java
|
||||||
│ ├── ConcentratedcoaloreBlock.java
|
│ ├── ConcentratedcoaloreBlock.java
|
||||||
@@ -635,7 +654,7 @@ net.mcreator.customoregen/
|
|||||||
│ ├── ConfigurableOreDropsProcedure.java # Drops configurables
|
│ ├── ConfigurableOreDropsProcedure.java # Drops configurables
|
||||||
│ └── OreexperienceProcedure.java # Drops d'XP
|
│ └── OreexperienceProcedure.java # Drops d'XP
|
||||||
└── init/ # Registres Forge
|
└── init/ # Registres Forge
|
||||||
├── CustomOreGenModBlocks.java # 16 blocs
|
├── CustomOreGenModBlocks.java # 15 blocs
|
||||||
├── CustomOreGenModItems.java # Items + BlockItems
|
├── CustomOreGenModItems.java # Items + BlockItems
|
||||||
└── CustomOreGenModTabs.java # Onglets créatifs
|
└── CustomOreGenModTabs.java # Onglets créatifs
|
||||||
```
|
```
|
||||||
@@ -643,6 +662,8 @@ net.mcreator.customoregen/
|
|||||||
### Classes Principales
|
### Classes Principales
|
||||||
|
|
||||||
- **CustomOreGenMod** : Point d'entrée du mod, gère l'initialisation et le réseau
|
- **CustomOreGenMod** : Point d'entrée du mod, gère l'initialisation et le réseau
|
||||||
|
- **KubeJSIntegration** : Crée automatiquement le script KubeJS de suppression des minerais vanilla au premier lancement du jeu
|
||||||
|
- **ShardDiamondArmorMaterial** : Classe de matériau d'armure Diamond Shard avec gestion des textures
|
||||||
- **OresCommand** : Commande `/ores` pour identifier les minerais du biome actuel
|
- **OresCommand** : Commande `/ores` pour identifier les minerais du biome actuel
|
||||||
- **OreBiomeFinderItem** : Item utilisable pour détecter les minerais du biome (clic droit)
|
- **OreBiomeFinderItem** : Item utilisable pour détecter les minerais du biome (clic droit)
|
||||||
- **SharddiamondpaxelItem** : Paxel combinant pioche + pelle + hache en un seul outil
|
- **SharddiamondpaxelItem** : Paxel combinant pioche + pelle + hache en un seul outil
|
||||||
@@ -653,15 +674,29 @@ net.mcreator.customoregen/
|
|||||||
|
|
||||||
## Philosophie du Mod
|
## Philosophie du Mod
|
||||||
|
|
||||||
Custom Ore Gem est conçu pour :
|
Custom Ore Gen est conçu pour :
|
||||||
- **Modifier la distribution des ressources** Minecraft avec de nouvelles variantes de minerais
|
- **Modifier la distribution des ressources** Minecraft avec de nouvelles variantes de minerais basées sur la température des biomes
|
||||||
- **Fournir un système de drops configurable** pour les pack makers et moddeurs
|
- **Fournir une dépendance obligatoire à KubeJS** avec création automatique du script de suppression des minerais vanilla
|
||||||
- **Introduire une progression intermédiaire** à travers les Diamond Shards (outils et armure)
|
- **Introduire une progression intermédiaire** à travers les Diamond Shards (outils et armure entre fer et diamant)
|
||||||
- **Offrir des outils d'exploration** avec l'Ore Biome Finder et la commande `/ores`
|
- **Offrir des outils d'exploration** avec l'Ore Biome Finder et la commande `/ores`
|
||||||
- **Proposer un outil tout-en-un** avec le Paxel en Diamond Shard (1000 durabilité)
|
- **Proposer un outil tout-en-un** avec le Paxel en Diamond Shard (1000 durabilité)
|
||||||
- **Fournir une armure intermédiaire** entre fer et diamant (17 protection, 1060 durabilité)
|
- **Fournir une armure intermédiaire** entre fer et diamant (17 protection, 1060 durabilité)
|
||||||
- **S'intégrer avec KubeJS** pour permettre des modifications avancées
|
- **Faciliter l'installation** avec création automatique des scripts KubeJS nécessaires
|
||||||
- **Supporter Biomes O' Plenty** avec 69 biomes supplémentaires classés par température
|
- **Supporter Biomes O' Plenty** avec 69 biomes supplémentaires classés par température
|
||||||
|
- **Fournir un onglet créatif dédié** regroupant tous les items du mod
|
||||||
|
|
||||||
|
## Changements de Version
|
||||||
|
|
||||||
|
### Version 2.1.5
|
||||||
|
- ✅ Ajout de l'armure complète Diamond Shard (casque, plastron, jambières, bottes)
|
||||||
|
- ✅ Ajout du Paxel Diamond Shard (outil tout-en-un : pioche + pelle + hache)
|
||||||
|
- ✅ Création d'un onglet créatif personnalisé "Custom Ore Gen"
|
||||||
|
- ✅ KubeJS est maintenant une dépendance obligatoire (le mod refuse de se lancer sans KubeJS)
|
||||||
|
- ✅ Création automatique du script KubeJS de suppression des minerais vanilla au premier lancement
|
||||||
|
- ✅ Nouvelle texture Diamond Shard (32x32 pixels)
|
||||||
|
- ✅ Correction des textures d'armure (plus de texture violette)
|
||||||
|
- ✅ Désactivation du minerai Shard Diamond en surface (seulement la version deepslate reste disponible)
|
||||||
|
- ✅ Amélioration du système de matériau d'armure avec `ShardDiamondArmorMaterial`
|
||||||
|
|
||||||
## Crédits
|
## Crédits
|
||||||
|
|
||||||
|
|||||||
@@ -1,54 +1,113 @@
|
|||||||
plugins {
|
plugins {
|
||||||
|
id 'java-library'
|
||||||
id 'eclipse'
|
id 'eclipse'
|
||||||
id 'net.minecraftforge.gradle' version '[6.0.16,6.2)'
|
id 'idea'
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'net.neoforged.moddev' version '2.0.123'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = '2.1.0'
|
tasks.named('wrapper', Wrapper).configure {
|
||||||
group = 'com.aulyrius.custom_ore_gen'
|
distributionType = Wrapper.DistributionType.BIN
|
||||||
archivesBaseName = 'custom_ore_gen'
|
}
|
||||||
|
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
version = mod_version
|
||||||
|
group = mod_group_id
|
||||||
|
|
||||||
minecraft {
|
repositories {
|
||||||
mappings channel: 'official', version: '1.20.1'
|
mavenLocal()
|
||||||
|
maven {
|
||||||
|
name = "Jared's maven"
|
||||||
|
url = "https://maven.blamejared.com/"
|
||||||
|
}
|
||||||
|
maven {
|
||||||
|
name = "ModMaven"
|
||||||
|
url = "https://modmaven.dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
base {
|
||||||
|
archivesName = mod_id
|
||||||
|
}
|
||||||
|
|
||||||
copyIdeResources = true
|
// NeoForge requires Java 21 - Gradle will automatically download it if needed
|
||||||
|
java {
|
||||||
|
toolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
neoForge {
|
||||||
|
version = project.neo_version
|
||||||
|
|
||||||
|
// Default run configurations.
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
def mcreatorJvmOptions = System.getenv('MCREATOR_JVM_OPTIONS')
|
client()
|
||||||
if (mcreatorJvmOptions) {
|
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
||||||
jvmArgs += mcreatorJvmOptions.split("\\s+").findAll { it.trim() }.toList()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
server()
|
||||||
|
programArgument '--nogui'
|
||||||
|
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
||||||
|
}
|
||||||
|
|
||||||
|
data {
|
||||||
|
data()
|
||||||
|
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
|
||||||
}
|
}
|
||||||
|
|
||||||
configureEach {
|
configureEach {
|
||||||
workingDirectory project.file('run')
|
systemProperty 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
logLevel = org.slf4j.event.Level.DEBUG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
property 'forge.logging.markers', 'REGISTRIES'
|
mods {
|
||||||
property 'forge.logging.console.level', 'debug'
|
"${mod_id}" {
|
||||||
|
sourceSet(sourceSets.main)
|
||||||
mods {
|
|
||||||
examplemod {
|
|
||||||
source sourceSets.main
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
runtimeClasspath.extendsFrom localRuntime
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft 'net.minecraftforge:forge:1.20.1-47.3.0'
|
// KubeJS dependency - version will need to be updated for 1.21
|
||||||
|
// localRuntime "dev.latvian.mods:kubejs-neoforge:${kubejs_version}"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(ProcessResources).configureEach {
|
||||||
|
var replaceProperties = [
|
||||||
|
minecraft_version : minecraft_version,
|
||||||
|
minecraft_version_range : minecraft_version_range,
|
||||||
|
neo_version : neo_version,
|
||||||
|
neo_version_range : neo_version_range,
|
||||||
|
loader_version_range : loader_version_range,
|
||||||
|
mod_id : mod_id,
|
||||||
|
mod_name : mod_name,
|
||||||
|
mod_license : mod_license,
|
||||||
|
mod_version : mod_version,
|
||||||
|
mod_authors : mod_authors,
|
||||||
|
mod_description : mod_description
|
||||||
|
]
|
||||||
|
inputs.properties replaceProperties
|
||||||
|
filesMatching(['META-INF/neoforge.mods.toml']) {
|
||||||
|
expand replaceProperties
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
options.encoding = 'UTF-8'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: 'mcreator.gradle'
|
idea {
|
||||||
|
module {
|
||||||
|
downloadSources = true
|
||||||
|
downloadJavadoc = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": {
|
|
||||||
"model": "custom_ore_gen:block/concentrateddiamondore"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "custom_ore_gen:block/deepslatediamondore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"block.custom_ore_gen.deepslateironore": "Deepslate iron ore",
|
"block.custom_ore_gen.deepslateironore": "Deepslate iron ore",
|
||||||
"item.custom_ore_gen.sharddiamondaxe": "Sharddiamondaxe",
|
"item.custom_ore_gen.sharddiamondaxe": "Sharddiamondaxe",
|
||||||
"block.custom_ore_gen.deepslatesharddiamondore": "Deepslate shard diamond ore",
|
"block.custom_ore_gen.deepslatesharddiamondore": "Deepslate shard diamond ore",
|
||||||
"block.custom_ore_gen.concentrateddiamondore": "Concentrated diamond ore",
|
"block.custom_ore_gen.deepslatediamondore": "Deepslate diamond ore",
|
||||||
"item.custom_ore_gen.shardironore": "Shard iron ore",
|
"item.custom_ore_gen.shardironore": "Shard iron ore",
|
||||||
"item.custom_ore_gen.diamondshard": "Diamond shard",
|
"item.custom_ore_gen.diamondshard": "Diamond shard",
|
||||||
"block.custom_ore_gen.deepslatepuregoldenore": "Deepslate pure golden ore",
|
"block.custom_ore_gen.deepslatepuregoldenore": "Deepslate pure golden ore",
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"block.custom_ore_gen.lapisore": "Minerai de lapis",
|
||||||
|
"block.custom_ore_gen.sharddiamondblockore": "Bloc de minerai d'éclat de diamant",
|
||||||
|
"block.custom_ore_gen.concentratedcoalore": "Minerai de charbon concentré",
|
||||||
|
"block.custom_ore_gen.ironore": "Minerai de fer",
|
||||||
|
"block.custom_ore_gen.redstoneore": "Minerai de redstone",
|
||||||
|
"block.custom_ore_gen.deepslatelapisore": "Minerai de lapis des abîmes",
|
||||||
|
"item.custom_ore_gen.sharddiamondpickaxe": "Pioche en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.diamondshard.description_0": "Éclat de diamant, pour créer des outils ou assembler un diamant",
|
||||||
|
"block.custom_ore_gen.copperhighore": "Minerai de cuivre riche",
|
||||||
|
"block.custom_ore_gen.copperlowerore": "Minerai de cuivre des abîmes",
|
||||||
|
"block.custom_ore_gen.loweremeraldore": "Minerai d'émeraude pauvre",
|
||||||
|
"block.custom_ore_gen.deepslateredstoneore": "Minerai de redstone des abîmes",
|
||||||
|
"block.custom_ore_gen.deepslateironore": "Minerai de fer des abîmes",
|
||||||
|
"item.custom_ore_gen.sharddiamondaxe": "Hache en éclat de diamant",
|
||||||
|
"block.custom_ore_gen.deepslatesharddiamondore": "Minerai d'éclat de diamant des abîmes",
|
||||||
|
"block.custom_ore_gen.deepslatediamondore": "Minerai de diamant des abîmes",
|
||||||
|
"item.custom_ore_gen.shardironore": "Minerai d'éclat de fer",
|
||||||
|
"item.custom_ore_gen.diamondshard": "Éclat de diamant",
|
||||||
|
"block.custom_ore_gen.deepslatepuregoldenore": "Minerai d'or pur des abîmes",
|
||||||
|
"block.custom_ore_gen.puregoldenore": "Minerai d'or pur",
|
||||||
|
"block.custom_ore_gen.highemeraldore": "Minerai d'émeraude",
|
||||||
|
"item.custom_ore_gen.sharddiamondshovel": "Pelle en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.ore_biome_finder": "Détecteur de minerai",
|
||||||
|
"item.custom_ore_gen.sharddiamondhelmet": "Casque en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.sharddiamondchestplate": "Plastron en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.sharddiamondleggings": "Jambières en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.sharddiamondboots": "Bottes en éclat de diamant",
|
||||||
|
"item.custom_ore_gen.sharddiamondpaxel": "Paxel en éclat de diamant",
|
||||||
|
"itemGroup.custom_ore_gen": "Custom Ore Gen"
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"parent": "custom_ore_gen:block/concentrateddiamondore",
|
"parent": "custom_ore_gen:block/deepslatediamondore",
|
||||||
"display": {
|
"display": {
|
||||||
"thirdperson": {
|
"thirdperson": {
|
||||||
"rotation": [
|
"rotation": [
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "custom_ore_gen:item/sharddiamondboots"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "custom_ore_gen:item/sharddiamondchestplate"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "custom_ore_gen:item/sharddiamondhelmet"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "custom_ore_gen:item/sharddiamondleggings"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/handheld",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "custom_ore_gen:item/sharddiamondpaxel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 860 B |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 160 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 869 B |
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:tempered_biomes",
|
|
||||||
"features": "custom_ore_gen:concentratedcoalore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:cold_biomes",
|
|
||||||
"features": "custom_ore_gen:concentrateddiamondore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:hot_biomes",
|
|
||||||
"features": "custom_ore_gen:copperhighore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:hot_biomes",
|
|
||||||
"features": "custom_ore_gen:copperlowerore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:tempered_biomes",
|
|
||||||
"features": "custom_ore_gen:deepslateironore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:cold_biomes",
|
|
||||||
"features": "custom_ore_gen:deepslatelapisore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "forge:add_features",
|
|
||||||
"biomes": "#custom_ore_gen:hot_biomes",
|
|
||||||
"features": "custom_ore_gen:deepslatepuregoldenore",
|
|
||||||
"step": "underground_ores"
|
|
||||||
}
|
|
||||||