From 2632368e002a1fd190623b6461cd7dda0b11f7b4 Mon Sep 17 00:00:00 2001 From: MrSlimeDiamond Date: Mon, 3 Jul 2023 19:05:49 +1200 Subject: [PATCH] Use org.galliumpowered for package --- GalliumLib | 2 +- build.gradle.kts | 2 +- .../java/net/minecraft/commands/Commands.java | 10 +---- src/main/java/net/minecraft/server/Main.java | 3 +- .../net/minecraft/server/MinecraftServer.java | 6 +-- .../server/dedicated/DedicatedServer.java | 4 +- .../server/level/ServerPlayerGameMode.java | 8 ++-- .../network/ServerGamePacketListenerImpl.java | 9 ++--- .../minecraft/server/players/PlayerList.java | 8 ++-- .../net/minecraft/world/item/BlockItem.java | 6 +-- .../galliumpowered}/Config.java | 2 +- .../gallium => org/galliumpowered}/Main.java | 2 +- .../gallium => org/galliumpowered}/Mod.java | 20 +++++----- .../galliumpowered}/ServerImpl.java | 6 +-- .../api/world/entity/player/PlayerImpl.java | 9 ++--- .../galliumpowered}/bridge/BridgeImpl.java | 24 ++++++------ .../commandsys/CommandCallerImpl.java | 6 +-- .../commandsys/CommandContextImpl.java | 4 +- .../commandsys/args/ArgsTypeTranslator.java | 2 +- .../event/EventDispatcherImpl.java | 15 +++----- .../galliumpowered}/util/TextTransformer.java | 2 +- .../world/block/BlockImpl.java | 5 +-- .../world/block/WorldBlockImpl.java | 38 +++++++++++++++++++ 23 files changed, 107 insertions(+), 86 deletions(-) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/Config.java (97%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/Main.java (93%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/Mod.java (81%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/ServerImpl.java (81%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/api/world/entity/player/PlayerImpl.java (85%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/bridge/BridgeImpl.java (91%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/commandsys/CommandCallerImpl.java (78%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/commandsys/CommandContextImpl.java (94%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/commandsys/args/ArgsTypeTranslator.java (89%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/event/EventDispatcherImpl.java (68%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/util/TextTransformer.java (95%) rename src/main/java/{net/zenoc/gallium => org/galliumpowered}/world/block/BlockImpl.java (77%) create mode 100644 src/main/java/org/galliumpowered/world/block/WorldBlockImpl.java diff --git a/GalliumLib b/GalliumLib index 069ccb8..0e2db7a 160000 --- a/GalliumLib +++ b/GalliumLib @@ -1 +1 @@ -Subproject commit 069ccb8816d8338c4d369a52e0dd693e154f969b +Subproject commit 0e2db7a7b627ff8d2a786659e7b1705b7030d440 diff --git a/build.gradle.kts b/build.gradle.kts index 40c30c2..43fc57b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { group = "net.zenoc" version = "1.17.1-1.1.0-beta.3" -var mainClass = "net.zenoc.gallium.Main" +var mainClass = "org.galliumpowered.Main" repositories { mavenCentral() diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java index 16e1f89..759ebb5 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java @@ -21,14 +21,12 @@ import net.minecraft.ChatFormatting; import net.minecraft.SharedConstants; -import net.minecraft.Util; import net.minecraft.commands.synchronization.ArgumentTypes; import net.minecraft.commands.synchronization.SuggestionProviders; import net.minecraft.gametest.framework.TestCommand; import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentUtils; -import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; @@ -54,7 +52,6 @@ import net.minecraft.server.commands.FillCommand; import net.minecraft.server.commands.ForceLoadCommand; import net.minecraft.server.commands.FunctionCommand; -import net.minecraft.server.commands.GameModeCommand; import net.minecraft.server.commands.GameRuleCommand; import net.minecraft.server.commands.GiveCommand; import net.minecraft.server.commands.HelpCommand; @@ -104,13 +101,10 @@ import net.minecraft.server.commands.WorldBorderCommand; import net.minecraft.server.commands.data.DataCommands; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -import net.zenoc.gallium.api.chat.Colors; -import net.zenoc.gallium.util.TextTransformer; -import org.apache.commons.lang3.exception.ExceptionUtils; +import org.galliumpowered.api.chat.Colors; +import org.galliumpowered.util.TextTransformer; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jetbrains.annotations.NotNull; public class Commands { private static final Logger LOGGER = LogManager.getLogger(); diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java index 38c76d0..ac0cc15 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -26,7 +26,6 @@ import net.minecraft.DefaultUncaughtExceptionHandler; import net.minecraft.SharedConstants; import net.minecraft.Util; -import net.minecraft.advancements.critereon.PlayerInteractTrigger; import net.minecraft.commands.Commands.CommandSelection; import net.minecraft.core.RegistryAccess; import net.minecraft.nbt.NbtOps; @@ -59,7 +58,7 @@ import net.minecraft.world.level.storage.LevelSummary; import net.minecraft.world.level.storage.PrimaryLevelData; import net.minecraft.world.level.storage.WorldData; -import net.zenoc.gallium.Gallium; +import org.galliumpowered.Gallium; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 1d20233..a406d0f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -156,9 +156,9 @@ import net.minecraft.world.level.storage.loot.PredicateManager; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; -import net.zenoc.gallium.Gallium; -import net.zenoc.gallium.Mod; -import net.zenoc.gallium.api.event.system.ServerShutdownEvent; +import org.galliumpowered.Gallium; +import org.galliumpowered.Mod; +import org.galliumpowered.api.event.system.ServerShutdownEvent; import org.apache.commons.lang3.Validate; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java index 56e9403..009d4e6 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -66,8 +66,8 @@ import net.minecraft.world.level.block.entity.SkullBlockEntity; import net.minecraft.world.level.storage.LevelStorageSource; import net.minecraft.world.level.storage.WorldData; -import net.zenoc.gallium.Gallium; -import net.zenoc.gallium.api.event.system.ServerStartEvent; +import org.galliumpowered.Gallium; +import org.galliumpowered.api.event.system.ServerStartEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java index 8b2a3bd..37f2a5a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -27,9 +27,9 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.zenoc.gallium.api.event.player.PlayerBreakBlockEvent; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; -import net.zenoc.gallium.world.block.BlockImpl; +import org.galliumpowered.api.event.player.PlayerBreakBlockEvent; +import org.galliumpowered.api.world.entity.player.PlayerImpl; +import org.galliumpowered.world.block.WorldBlockImpl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -245,7 +245,7 @@ public boolean destroyBlock(BlockPos blockPos) { boolean bl = this.level.removeBlock(blockPos, false); if (bl) { // Gallium start: block break event - PlayerBreakBlockEvent event = (PlayerBreakBlockEvent) new PlayerBreakBlockEvent(new PlayerImpl(player), new BlockImpl(block)).call(); + PlayerBreakBlockEvent event = (PlayerBreakBlockEvent) new PlayerBreakBlockEvent(new PlayerImpl(player), new WorldBlockImpl(block, blockPos)).call(); if (!event.isCancelled) { block.destroy(this.level, blockPos, blockState); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 25cc9c2..ace3976 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -146,7 +146,6 @@ import net.minecraft.world.level.GameType; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; -import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.CommandBlock; import net.minecraft.world.level.block.entity.BlockEntity; @@ -163,11 +162,9 @@ import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.zenoc.gallium.api.event.player.PlayerBreakBlockEvent; -import net.zenoc.gallium.api.event.player.PlayerChatEvent; -import net.zenoc.gallium.api.event.player.PlayerDisconnectEvent; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; -import net.zenoc.gallium.world.block.BlockImpl; +import org.galliumpowered.api.event.player.PlayerChatEvent; +import org.galliumpowered.api.event.player.PlayerDisconnectEvent; +import org.galliumpowered.api.world.entity.player.PlayerImpl; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java index 1cf157c..ef0e253 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -97,9 +97,9 @@ import net.minecraft.world.scores.Objective; import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.Team; -import net.zenoc.gallium.Gallium; -import net.zenoc.gallium.api.event.player.PlayerJoinEvent; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; +import org.galliumpowered.Gallium; +import org.galliumpowered.api.event.player.PlayerJoinEvent; +import org.galliumpowered.api.world.entity.player.PlayerImpl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -205,7 +205,7 @@ public void placeNewPlayer(Connection connection, ServerPlayer serverPlayer) { } // Gallium start: player join event - net.zenoc.gallium.world.entity.Player player = new PlayerImpl(serverPlayer); + org.galliumpowered.world.entity.Player player = new PlayerImpl(serverPlayer); PlayerJoinEvent event = (PlayerJoinEvent) new PlayerJoinEvent(player).call(); if (event.isCancelled()) { player.disconnect(); diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java index 329062f..e571c50 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java @@ -37,9 +37,9 @@ import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.phys.shapes.CollisionContext; -import net.zenoc.gallium.api.event.player.PlayerPlaceBlockEvent; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; -import net.zenoc.gallium.world.block.BlockImpl; +import org.galliumpowered.api.event.player.PlayerPlaceBlockEvent; +import org.galliumpowered.api.world.entity.player.PlayerImpl; +import org.galliumpowered.world.block.BlockImpl; public class BlockItem extends Item { public static final String BLOCK_ENTITY_TAG = "BlockEntityTag"; diff --git a/src/main/java/net/zenoc/gallium/Config.java b/src/main/java/org/galliumpowered/Config.java similarity index 97% rename from src/main/java/net/zenoc/gallium/Config.java rename to src/main/java/org/galliumpowered/Config.java index d3f8cfa..c05e9fd 100644 --- a/src/main/java/net/zenoc/gallium/Config.java +++ b/src/main/java/org/galliumpowered/Config.java @@ -1,4 +1,4 @@ -package net.zenoc.gallium; +package org.galliumpowered; import java.io.File; import java.io.FileReader; diff --git a/src/main/java/net/zenoc/gallium/Main.java b/src/main/java/org/galliumpowered/Main.java similarity index 93% rename from src/main/java/net/zenoc/gallium/Main.java rename to src/main/java/org/galliumpowered/Main.java index 558e6ee..bf6e77d 100644 --- a/src/main/java/net/zenoc/gallium/Main.java +++ b/src/main/java/org/galliumpowered/Main.java @@ -1,4 +1,4 @@ -package net.zenoc.gallium; +package org.galliumpowered; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/zenoc/gallium/Mod.java b/src/main/java/org/galliumpowered/Mod.java similarity index 81% rename from src/main/java/net/zenoc/gallium/Mod.java rename to src/main/java/org/galliumpowered/Mod.java index 76daba9..6f19fd2 100644 --- a/src/main/java/net/zenoc/gallium/Mod.java +++ b/src/main/java/org/galliumpowered/Mod.java @@ -1,15 +1,15 @@ -package net.zenoc.gallium; +package org.galliumpowered; import net.minecraft.server.MinecraftServer; -import net.zenoc.gallium.bridge.BridgeImpl; -import net.zenoc.gallium.commandsys.CommandManager; -import net.zenoc.gallium.database.Database; -import net.zenoc.gallium.event.EventDispatcherImpl; -import net.zenoc.gallium.eventsys.EventManager; -import net.zenoc.gallium.exceptions.GalliumDatabaseException; -import net.zenoc.gallium.permissionsys.GroupManager; -import net.zenoc.gallium.permissionsys.PermissionManager; -import net.zenoc.gallium.plugin.PluginManager; +import org.galliumpowered.bridge.BridgeImpl; +import org.galliumpowered.commandsys.CommandManager; +import org.galliumpowered.database.Database; +import org.galliumpowered.event.EventDispatcherImpl; +import org.galliumpowered.eventsys.EventManager; +import org.galliumpowered.exceptions.GalliumDatabaseException; +import org.galliumpowered.permissionsys.GroupManager; +import org.galliumpowered.permissionsys.PermissionManager; +import org.galliumpowered.plugin.PluginManager; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/net/zenoc/gallium/ServerImpl.java b/src/main/java/org/galliumpowered/ServerImpl.java similarity index 81% rename from src/main/java/net/zenoc/gallium/ServerImpl.java rename to src/main/java/org/galliumpowered/ServerImpl.java index 54a30d9..30c5a7b 100644 --- a/src/main/java/net/zenoc/gallium/ServerImpl.java +++ b/src/main/java/org/galliumpowered/ServerImpl.java @@ -1,7 +1,7 @@ -package net.zenoc.gallium; +package org.galliumpowered; -import net.zenoc.gallium.world.entity.Player; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; +import org.galliumpowered.world.entity.Player; +import org.galliumpowered.api.world.entity.player.PlayerImpl; import java.util.ArrayList; diff --git a/src/main/java/net/zenoc/gallium/api/world/entity/player/PlayerImpl.java b/src/main/java/org/galliumpowered/api/world/entity/player/PlayerImpl.java similarity index 85% rename from src/main/java/net/zenoc/gallium/api/world/entity/player/PlayerImpl.java rename to src/main/java/org/galliumpowered/api/world/entity/player/PlayerImpl.java index e0eab4b..50c34c0 100644 --- a/src/main/java/net/zenoc/gallium/api/world/entity/player/PlayerImpl.java +++ b/src/main/java/org/galliumpowered/api/world/entity/player/PlayerImpl.java @@ -1,13 +1,12 @@ -package net.zenoc.gallium.api.world.entity.player; +package org.galliumpowered.api.world.entity.player; import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.event.HoverEvent; import net.minecraft.Util; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.GameType; -import net.zenoc.gallium.api.Gamemode; -import net.zenoc.gallium.world.entity.Player; -import net.zenoc.gallium.util.TextTransformer; +import org.galliumpowered.api.Gamemode; +import org.galliumpowered.world.entity.Player; +import org.galliumpowered.util.TextTransformer; import javax.annotation.Nullable; diff --git a/src/main/java/net/zenoc/gallium/bridge/BridgeImpl.java b/src/main/java/org/galliumpowered/bridge/BridgeImpl.java similarity index 91% rename from src/main/java/net/zenoc/gallium/bridge/BridgeImpl.java rename to src/main/java/org/galliumpowered/bridge/BridgeImpl.java index 5372bad..5bbe660 100644 --- a/src/main/java/net/zenoc/gallium/bridge/BridgeImpl.java +++ b/src/main/java/org/galliumpowered/bridge/BridgeImpl.java @@ -1,4 +1,4 @@ -package net.zenoc.gallium.bridge; +package org.galliumpowered.bridge; import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; @@ -7,19 +7,19 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.suggestion.Suggestions; import com.mojang.brigadier.suggestion.SuggestionsBuilder; -import com.mojang.brigadier.tree.ArgumentCommandNode; -import com.mojang.brigadier.tree.CommandNode; -import com.mojang.brigadier.tree.LiteralCommandNode; import net.minecraft.commands.CommandSourceStack; import net.minecraft.server.level.ServerPlayer; -import net.zenoc.gallium.Gallium; -import net.zenoc.gallium.Mod; -import net.zenoc.gallium.api.annotations.Args; -import net.zenoc.gallium.commandsys.args.ArgsTypeTranslator; -import net.zenoc.gallium.world.entity.Player; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; -import net.zenoc.gallium.commandsys.*; -import net.zenoc.gallium.exceptions.CommandException; +import org.galliumpowered.Gallium; +import org.galliumpowered.Mod; +import org.galliumpowered.api.annotations.Args; +import org.galliumpowered.commandsys.args.ArgsTypeTranslator; +import org.galliumpowered.world.entity.Player; +import org.galliumpowered.api.world.entity.player.PlayerImpl; +import org.galliumpowered.exceptions.CommandException; +import org.galliumpowered.commandsys.CommandCaller; +import org.galliumpowered.commandsys.CommandCallerImpl; +import org.galliumpowered.commandsys.CommandContextImpl; +import org.galliumpowered.commandsys.MCommand; import java.lang.reflect.Method; import java.util.Arrays; diff --git a/src/main/java/net/zenoc/gallium/commandsys/CommandCallerImpl.java b/src/main/java/org/galliumpowered/commandsys/CommandCallerImpl.java similarity index 78% rename from src/main/java/net/zenoc/gallium/commandsys/CommandCallerImpl.java rename to src/main/java/org/galliumpowered/commandsys/CommandCallerImpl.java index abe7b0e..c72a765 100644 --- a/src/main/java/net/zenoc/gallium/commandsys/CommandCallerImpl.java +++ b/src/main/java/org/galliumpowered/commandsys/CommandCallerImpl.java @@ -1,8 +1,8 @@ -package net.zenoc.gallium.commandsys; +package org.galliumpowered.commandsys; import net.minecraft.server.level.ServerPlayer; -import net.zenoc.gallium.world.entity.Player; -import net.zenoc.gallium.api.world.entity.player.PlayerImpl; +import org.galliumpowered.world.entity.Player; +import org.galliumpowered.api.world.entity.player.PlayerImpl; import javax.annotation.Nullable; import java.util.Optional; diff --git a/src/main/java/net/zenoc/gallium/commandsys/CommandContextImpl.java b/src/main/java/org/galliumpowered/commandsys/CommandContextImpl.java similarity index 94% rename from src/main/java/net/zenoc/gallium/commandsys/CommandContextImpl.java rename to src/main/java/org/galliumpowered/commandsys/CommandContextImpl.java index a874ae8..527e3a2 100644 --- a/src/main/java/net/zenoc/gallium/commandsys/CommandContextImpl.java +++ b/src/main/java/org/galliumpowered/commandsys/CommandContextImpl.java @@ -1,6 +1,6 @@ -package net.zenoc.gallium.commandsys; +package org.galliumpowered.commandsys; -import net.zenoc.gallium.world.entity.Player; +import org.galliumpowered.world.entity.Player; import org.checkerframework.checker.nullness.qual.NonNull; import javax.annotation.Nullable; diff --git a/src/main/java/net/zenoc/gallium/commandsys/args/ArgsTypeTranslator.java b/src/main/java/org/galliumpowered/commandsys/args/ArgsTypeTranslator.java similarity index 89% rename from src/main/java/net/zenoc/gallium/commandsys/args/ArgsTypeTranslator.java rename to src/main/java/org/galliumpowered/commandsys/args/ArgsTypeTranslator.java index 129fe8d..3a3f257 100644 --- a/src/main/java/net/zenoc/gallium/commandsys/args/ArgsTypeTranslator.java +++ b/src/main/java/org/galliumpowered/commandsys/args/ArgsTypeTranslator.java @@ -1,4 +1,4 @@ -package net.zenoc.gallium.commandsys.args; +package org.galliumpowered.commandsys.args; import com.mojang.brigadier.arguments.StringArgumentType; diff --git a/src/main/java/net/zenoc/gallium/event/EventDispatcherImpl.java b/src/main/java/org/galliumpowered/event/EventDispatcherImpl.java similarity index 68% rename from src/main/java/net/zenoc/gallium/event/EventDispatcherImpl.java rename to src/main/java/org/galliumpowered/event/EventDispatcherImpl.java index c122e3d..d6ff935 100644 --- a/src/main/java/net/zenoc/gallium/event/EventDispatcherImpl.java +++ b/src/main/java/org/galliumpowered/event/EventDispatcherImpl.java @@ -1,17 +1,14 @@ -package net.zenoc.gallium.event; +package org.galliumpowered.event; -import net.zenoc.gallium.Gallium; -import net.zenoc.gallium.api.event.Event; -import net.zenoc.gallium.eventsys.EventDispatcher; -import net.zenoc.gallium.eventsys.EventManager; -import net.zenoc.gallium.eventsys.MListener; +import org.galliumpowered.Gallium; +import org.galliumpowered.api.event.Event; +import org.galliumpowered.eventsys.EventDispatcher; +import org.galliumpowered.eventsys.EventManager; +import org.galliumpowered.eventsys.MListener; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.EventListener; -import java.util.Iterator; public class EventDispatcherImpl implements EventDispatcher { private static final Logger log = LogManager.getLogger(); diff --git a/src/main/java/net/zenoc/gallium/util/TextTransformer.java b/src/main/java/org/galliumpowered/util/TextTransformer.java similarity index 95% rename from src/main/java/net/zenoc/gallium/util/TextTransformer.java rename to src/main/java/org/galliumpowered/util/TextTransformer.java index 7ba6c1f..ce62f94 100644 --- a/src/main/java/net/zenoc/gallium/util/TextTransformer.java +++ b/src/main/java/org/galliumpowered/util/TextTransformer.java @@ -1,4 +1,4 @@ -package net.zenoc.gallium.util; +package org.galliumpowered.util; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; diff --git a/src/main/java/net/zenoc/gallium/world/block/BlockImpl.java b/src/main/java/org/galliumpowered/world/block/BlockImpl.java similarity index 77% rename from src/main/java/net/zenoc/gallium/world/block/BlockImpl.java rename to src/main/java/org/galliumpowered/world/block/BlockImpl.java index 232b401..6a5e68c 100644 --- a/src/main/java/net/zenoc/gallium/world/block/BlockImpl.java +++ b/src/main/java/org/galliumpowered/world/block/BlockImpl.java @@ -1,7 +1,4 @@ -package net.zenoc.gallium.world.block; - -import net.minecraft.core.Registry; -import net.minecraft.world.level.block.Blocks; +package org.galliumpowered.world.block; public class BlockImpl implements Block { private net.minecraft.world.level.block.Block nmsBlock; diff --git a/src/main/java/org/galliumpowered/world/block/WorldBlockImpl.java b/src/main/java/org/galliumpowered/world/block/WorldBlockImpl.java new file mode 100644 index 0000000..b6f4afa --- /dev/null +++ b/src/main/java/org/galliumpowered/world/block/WorldBlockImpl.java @@ -0,0 +1,38 @@ +package org.galliumpowered.world.block; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.Block; + +public class WorldBlockImpl implements WorldBlock { + private Block nmsBlock; + private BlockPos pos; + + public WorldBlockImpl(Block nmsBlock, BlockPos pos) { + this.nmsBlock = nmsBlock; + this.pos = pos; + } + @Override + public String getId() { + return nmsBlock.getDescriptionId(); + } + + @Override + public String getName() { + return "FIXME"; + } + + @Override + public int getX() { + return pos.getX(); + } + + @Override + public int getY() { + return pos.getY(); + } + + @Override + public int getZ() { + return pos.getZ(); + } +}