Skip to content

Commit

Permalink
i cant do this anymore i cant do this anymore i cant do this anymore …
Browse files Browse the repository at this point in the history
…i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore i cant do this anymore
  • Loading branch information
TheZoidMaster committed Nov 11, 2024
1 parent 3458f42 commit 82578ff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 50 deletions.
4 changes: 0 additions & 4 deletions src/main/java/astrinox/stellum/Stellum.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.minecraft.resource.ResourceType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import astrinox.stellum.command.StellumDebugCommand;
import astrinox.stellum.resource.StellumResourceReloadListener;

public class Stellum implements ModInitializer {
public static final String MOD_ID = "stellum";
Expand All @@ -20,6 +17,5 @@ public void onInitialize() {
LOGGER.info("✨");

CommandRegistrationCallback.EVENT.register(StellumDebugCommand::register);
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(new StellumResourceReloadListener());
}
}
17 changes: 9 additions & 8 deletions src/main/java/astrinox/stellum/command/StellumDebugCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import com.mojang.serialization.JsonOps;

import astrinox.stellum.Stellum;
import astrinox.stellum.handlers.explosion.BurnMap;
import astrinox.stellum.handlers.explosion.BurnZone;
import astrinox.stellum.handlers.explosion.Burnable;
import astrinox.stellum.handlers.explosion.BurnableIO;
import astrinox.stellum.handlers.explosion.ExplosionHandler;
import astrinox.stellum.handlers.screenshake.Screenshake;
import astrinox.stellum.handlers.screenshake.ScreenshakeHandler;
import astrinox.stellum.registry.BurnMapRegistry;
import astrinox.stellum.util.PerlinNoiseHelper;
import net.minecraft.block.Blocks;
import net.minecraft.command.CommandRegistryAccess;
Expand Down Expand Up @@ -211,10 +214,9 @@ public static int executeBurnzone(CommandContext<ServerCommandSource> context) t
.getDefaultState())))
.addBurnables(
new BurnableIO(
new Burnable().addTag(
BlockTags.BASE_STONE_OVERWORLD),
new Burnable().addBlock(Blocks.COBBLESTONE
.getDefaultState())
new Burnable().addTag(BlockTags.BASE_STONE_OVERWORLD),
new Burnable().addBlock(
Blocks.COBBLESTONE.getDefaultState())
.addBlock(Blocks.COBBLED_DEEPSLATE
.getDefaultState())
.addBlock(Blocks.MAGMA_BLOCK
Expand All @@ -227,9 +229,8 @@ public static int executeBurnzone(CommandContext<ServerCommandSource> context) t
.addBurnables(
new BurnableIO(
new Burnable().addTag(BlockTags.DIRT),
new Burnable().addBlock(
Blocks.DEAD_FIRE_CORAL_BLOCK
.getDefaultState())
new Burnable().addBlock(Blocks.DEAD_FIRE_CORAL_BLOCK
.getDefaultState())
.addBlock(Blocks.COARSE_DIRT
.getDefaultState())
.addBlock(Blocks.MAGMA_BLOCK
Expand Down Expand Up @@ -263,7 +264,7 @@ public static int executeBurnzone(CommandContext<ServerCommandSource> context) t
burnzone.trigger(world);
} catch (Exception e) {
source.sendError(Text.literal(
"An error occurred while executing the burnzone command: " + e.getMessage()));
"An error occurred while executing the burnzone command: " + e.toString()));
}

return 1;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/astrinox/stellum/registry/BurnMapRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import java.util.HashMap;
import java.util.Map;

import astrinox.stellum.Stellum;
import astrinox.stellum.handlers.explosion.BurnMap;

public class BurnMapRegistry {
private static final Map<String, BurnMap> burnMapRegistry = new HashMap<>();

public static void registerBurnMap(String id, BurnMap burnMap) {
burnMapRegistry.put(id, burnMap);
Stellum.LOGGER.info("Registered burnmap: " + id);
}

public static BurnMap getBurnMap(String id) {
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/resources/data/stellum/burnmap/test.json

This file was deleted.

0 comments on commit 82578ff

Please sign in to comment.