-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
664970f
commit 5a4f51f
Showing
22 changed files
with
139 additions
and
190 deletions.
There are no files selected for viewing
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,3 +1,3 @@ | ||
### 4.0.1 | ||
### 4.1.0 | ||
|
||
- Fix Dependencies | ||
- Add Support for Mekanism and Immersive Engineering ores |
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
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
38 changes: 36 additions & 2 deletions
38
common/src/main/java/com/unrealdinnerbone/jamd/command/JamdCommand.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,25 +1,59 @@ | ||
package com.unrealdinnerbone.jamd.command; | ||
|
||
import com.mojang.brigadier.Command; | ||
import com.mojang.brigadier.CommandDispatcher; | ||
import com.mojang.brigadier.arguments.StringArgumentType; | ||
import com.mojang.brigadier.context.CommandContext; | ||
import com.mojang.brigadier.exceptions.CommandSyntaxException; | ||
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; | ||
import com.mojang.brigadier.suggestion.SuggestionProvider; | ||
import com.mojang.brigadier.suggestion.Suggestions; | ||
import com.unrealdinnerbone.jamd.WorldType; | ||
import com.unrealdinnerbone.jamd.util.OreRegistry; | ||
import net.minecraft.commands.CommandSourceStack; | ||
import net.minecraft.commands.Commands; | ||
import net.minecraft.commands.SharedSuggestionProvider; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.server.packs.repository.Pack; | ||
import net.minecraft.server.packs.repository.PackRepository; | ||
import net.minecraft.world.flag.FeatureFlagSet; | ||
|
||
import java.io.IOException; | ||
import java.util.Collection; | ||
|
||
public class JamdCommand { | ||
|
||
private static final DynamicCommandExceptionType INVALID_WORLD_TYPE = new DynamicCommandExceptionType((object) -> Component.translatable("commands.jamd.invalid_world_type", object)); | ||
|
||
public static void register(CommandDispatcher<CommandSourceStack> commandDispatcher) { | ||
commandDispatcher.register(Commands.literal("jamd") | ||
.then(Commands.literal("export") | ||
.then(Commands.argument("type", StringArgumentType.string()) | ||
.suggests((context, builder) -> SharedSuggestionProvider.suggest(WorldType.TYPES.stream().map(WorldType::getName), builder)) | ||
.executes(JamdCommand::export) | ||
.then(Commands.literal("reload") | ||
.executes(JamdCommand::reload))); | ||
.executes(JamdCommand::reload))))); | ||
|
||
} | ||
|
||
private static int export(CommandContext<CommandSourceStack> stackCommandContext) throws CommandSyntaxException { | ||
String string = StringArgumentType.getString(stackCommandContext, "type"); | ||
WorldType worldType = WorldType.TYPES.stream() | ||
.filter(theWorldType -> theWorldType.getName().equalsIgnoreCase(string)) | ||
.findFirst() | ||
.orElseThrow(() -> INVALID_WORLD_TYPE.create(string)); | ||
try { | ||
worldType.export(stackCommandContext.getSource().getLevel().getServer()); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
stackCommandContext.getSource().sendSuccess(() -> Component.literal("Exported Biomes Data"), true); | ||
return Command.SINGLE_SUCCESS; | ||
} | ||
|
||
private static int reload(CommandContext<CommandSourceStack> stackCommandContext) throws CommandSyntaxException { | ||
OreRegistry.REGISTERED_FEATURES.clear(); | ||
stackCommandContext.getSource().sendSuccess(() -> Component.literal("Reloaded Biomes Data"), true); | ||
return 0; | ||
return Command.SINGLE_SUCCESS; | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
...com/unrealdinnerbone/jamd/JAMDFabric.java → ...ealdinnerbone/jamd/fabric/JAMDFabric.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
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
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
43 changes: 0 additions & 43 deletions
43
forge/src/main/java/com/unrealdinnerbone/jamd/JAMDDataForge.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
forge/src/main/java/com/unrealdinnerbone/jamd/JAMDForgeRegistry.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
forge/src/main/java/com/unrealdinnerbone/jamd/biome/JAMDBiomeModifier.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
forge/src/main/java/com/unrealdinnerbone/jamd/compact/MekenismOreCompact.java
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
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
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
28 changes: 0 additions & 28 deletions
28
neo/src/main/java/com/unrealdinnerbone/jamd/compact/MekenismOreCompact.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.