From 4dbd6c20f78207427b3821617ef4d33f515f33ad Mon Sep 17 00:00:00 2001 From: Leclowndu93150 Date: Sat, 28 Dec 2024 11:36:17 +0100 Subject: [PATCH] rebranding --- gradle.properties | 4 +-- .../plonk/common/networking/PayloadBase.java | 5 --- .../plonk/data/DataGenUtils.java | 18 ----------- .../Plonk.java => stickit/StickIt.java} | 29 +++++++++--------- .../client/ClientEvents.java | 27 +++++++--------- .../client/command/CommandClientPlonk.java | 8 ++--- .../command/CommandDumpRenderTypes.java | 12 ++++---- .../client/registry/RegistryTESRs.java | 6 ++-- .../client/render/tile/TESRPlacedItems.java | 16 +++++----- .../client/util/RenderUtils.java | 2 +- .../common/block/BlockPlacedItems.java | 12 +++----- .../common/command/IPlonkCommand.java | 2 +- .../common/config/PlonkConfig.java | 16 +++++----- .../common/item/ItemBlockPlacedItems.java | 10 +++--- .../common/networking/CustomCodecs.java | 4 +-- .../common/networking/NetworkEvents.java | 8 ++--- .../common/networking/PayloadBase.java | 5 +++ .../common/networking/PlaceItemPayload.java | 10 +++--- .../common/networking/RotateTilePayload.java | 8 ++--- .../common/registry/RegistryBlocks.java | 8 ++--- .../common/registry/RegistryItems.java | 8 ++--- .../common/registry/RegistryTileEntities.java | 8 ++--- .../common/tag/StickItTags.java} | 8 ++--- .../common/tile/TilePlacedItems.java | 19 +++++------- .../common/util/EntityUtils.java | 2 +- .../common/util/ItemUtils.java | 3 +- .../common/util/MatrixUtils.java | 2 +- .../common/util/WorldUtils.java | 2 +- .../common/util/bound/Box.java | 2 +- .../common/util/bound/BoxCollection.java | 2 +- .../{plonk => stickit}/data/BlockStates.java | 15 +++++---- .../{plonk => stickit}/data/BlockTags.java | 8 ++--- .../stickit/data/DataGenUtils.java | 18 +++++++++++ .../data/DataGenerators.java | 2 +- .../{plonk => stickit}/data/ItemTags.java | 16 +++++----- .../data/StickItDataComponents.java | 6 ++-- .../resources/assets/plonk/lang/en_us.json | 6 ---- .../resources/assets/stickit/lang/en_us.json | 6 ++++ .../textures/block/placed_items.png | Bin src/main/resources/pack.mcmeta | 2 +- 40 files changed, 165 insertions(+), 180 deletions(-) delete mode 100644 src/main/java/com/portingdeadmods/plonk/common/networking/PayloadBase.java delete mode 100644 src/main/java/com/portingdeadmods/plonk/data/DataGenUtils.java rename src/main/java/com/portingdeadmods/{plonk/Plonk.java => stickit/StickIt.java} (59%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/ClientEvents.java (82%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/command/CommandClientPlonk.java (83%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/command/CommandDumpRenderTypes.java (95%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/registry/RegistryTESRs.java (54%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/render/tile/TESRPlacedItems.java (94%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/client/util/RenderUtils.java (90%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/block/BlockPlacedItems.java (96%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/command/IPlonkCommand.java (95%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/config/PlonkConfig.java (81%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/item/ItemBlockPlacedItems.java (93%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/networking/CustomCodecs.java (93%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/networking/NetworkEvents.java (74%) create mode 100644 src/main/java/com/portingdeadmods/stickit/common/networking/PayloadBase.java rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/networking/PlaceItemPayload.java (90%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/networking/RotateTilePayload.java (89%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/registry/RegistryBlocks.java (89%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/registry/RegistryItems.java (84%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/registry/RegistryTileEntities.java (86%) rename src/main/java/com/portingdeadmods/{plonk/common/tag/PlonkTags.java => stickit/common/tag/StickItTags.java} (78%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/tile/TilePlacedItems.java (97%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/EntityUtils.java (97%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/ItemUtils.java (97%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/MatrixUtils.java (99%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/WorldUtils.java (97%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/bound/Box.java (99%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/common/util/bound/BoxCollection.java (99%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/data/BlockStates.java (81%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/data/BlockTags.java (75%) create mode 100644 src/main/java/com/portingdeadmods/stickit/data/DataGenUtils.java rename src/main/java/com/portingdeadmods/{plonk => stickit}/data/DataGenerators.java (96%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/data/ItemTags.java (64%) rename src/main/java/com/portingdeadmods/{plonk => stickit}/data/StickItDataComponents.java (84%) delete mode 100644 src/main/resources/assets/plonk/lang/en_us.json create mode 100644 src/main/resources/assets/stickit/lang/en_us.json rename src/main/resources/assets/{plonk => stickit}/textures/block/placed_items.png (100%) diff --git a/gradle.properties b/gradle.properties index 855fe6a..31fe38a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,9 +28,9 @@ loader_version_range=[4,) # The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63} # Must match the String constant located in the main mod class annotated with @Mod. -mod_id=plonk +mod_id=stickit # The human-readable display name for the mod. -mod_name=Plonk +mod_name=Stick It! # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ diff --git a/src/main/java/com/portingdeadmods/plonk/common/networking/PayloadBase.java b/src/main/java/com/portingdeadmods/plonk/common/networking/PayloadBase.java deleted file mode 100644 index b853155..0000000 --- a/src/main/java/com/portingdeadmods/plonk/common/networking/PayloadBase.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.portingdeadmods.plonk.common.networking; - -public interface PayloadBase { - -} diff --git a/src/main/java/com/portingdeadmods/plonk/data/DataGenUtils.java b/src/main/java/com/portingdeadmods/plonk/data/DataGenUtils.java deleted file mode 100644 index 99ff4e1..0000000 --- a/src/main/java/com/portingdeadmods/plonk/data/DataGenUtils.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.portingdeadmods.plonk.data; - -import com.portingdeadmods.plonk.Plonk; -import net.minecraft.resources.ResourceLocation; - -public class DataGenUtils { - public static ResourceLocation minecraft(String path) { - return ResourceLocation.fromNamespaceAndPath("minecraft", path); - } - - public static ResourceLocation plonk(String path) { - return ResourceLocation.fromNamespaceAndPath(Plonk.MOD_ID, path); - } - - public static ResourceLocation carryOn(String path) { - return ResourceLocation.fromNamespaceAndPath(Plonk.CARRY_ON_MOD_ID, path); - } -} diff --git a/src/main/java/com/portingdeadmods/plonk/Plonk.java b/src/main/java/com/portingdeadmods/stickit/StickIt.java similarity index 59% rename from src/main/java/com/portingdeadmods/plonk/Plonk.java rename to src/main/java/com/portingdeadmods/stickit/StickIt.java index e3ebbe2..6d14096 100644 --- a/src/main/java/com/portingdeadmods/plonk/Plonk.java +++ b/src/main/java/com/portingdeadmods/stickit/StickIt.java @@ -1,29 +1,28 @@ -package com.portingdeadmods.plonk; +package com.portingdeadmods.stickit; -import com.portingdeadmods.plonk.client.ClientEvents; -import com.portingdeadmods.plonk.common.config.PlonkConfig; -import com.portingdeadmods.plonk.common.registry.RegistryBlocks; -import com.portingdeadmods.plonk.common.registry.RegistryItems; -import com.portingdeadmods.plonk.common.registry.RegistryTileEntities; -import com.portingdeadmods.plonk.common.tag.PlonkTags; -import com.portingdeadmods.plonk.data.StickItDataComponents; +import com.portingdeadmods.stickit.client.ClientEvents; +import com.portingdeadmods.stickit.common.config.PlonkConfig; +import com.portingdeadmods.stickit.common.registry.RegistryBlocks; +import com.portingdeadmods.stickit.common.registry.RegistryItems; +import com.portingdeadmods.stickit.common.registry.RegistryTileEntities; +import com.portingdeadmods.stickit.common.tag.StickItTags; +import com.portingdeadmods.stickit.data.StickItDataComponents; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.neoforged.bus.api.IEventBus; import net.neoforged.fml.ModContainer; import net.neoforged.fml.common.Mod; import net.neoforged.fml.config.ModConfig; -import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; import net.neoforged.fml.loading.FMLEnvironment; import net.neoforged.neoforge.registries.RegisterEvent; -@Mod(Plonk.MOD_ID) -public class Plonk { - public static final String MOD_ID = "plonk"; - public static final String NAME = "Plonk"; +@Mod(StickIt.MOD_ID) +public class StickIt { + public static final String MOD_ID = "stickit"; + public static final String NAME = "Stick It!"; public static final String CARRY_ON_MOD_ID = "carryon"; - public Plonk(IEventBus modEventBus, ModContainer modContainer) { + public StickIt(IEventBus modEventBus, ModContainer modContainer) { StickItDataComponents.COMPONENTS.register(modEventBus); modEventBus.addListener(this::onRegister); @@ -32,7 +31,7 @@ public Plonk(IEventBus modEventBus, ModContainer modContainer) { } modContainer.registerConfig(ModConfig.Type.SERVER, PlonkConfig.SPEC); - PlonkTags.init(); + StickItTags.init(); } public void onRegister(RegisterEvent event) { diff --git a/src/main/java/com/portingdeadmods/plonk/client/ClientEvents.java b/src/main/java/com/portingdeadmods/stickit/client/ClientEvents.java similarity index 82% rename from src/main/java/com/portingdeadmods/plonk/client/ClientEvents.java rename to src/main/java/com/portingdeadmods/stickit/client/ClientEvents.java index d4b6c4e..e89017a 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/ClientEvents.java +++ b/src/main/java/com/portingdeadmods/stickit/client/ClientEvents.java @@ -1,17 +1,15 @@ -package com.portingdeadmods.plonk.client; +package com.portingdeadmods.stickit.client; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.client.command.CommandClientPlonk; -import com.portingdeadmods.plonk.client.registry.RegistryTESRs; -import com.portingdeadmods.plonk.client.render.tile.TESRPlacedItems; -import com.portingdeadmods.plonk.common.networking.PlaceItemPayload; -import com.portingdeadmods.plonk.common.networking.RotateTilePayload; -import com.portingdeadmods.plonk.common.registry.RegistryItems; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; -import com.portingdeadmods.plonk.common.util.EntityUtils; +import com.portingdeadmods.stickit.client.command.CommandClientPlonk; +import com.portingdeadmods.stickit.client.registry.RegistryTESRs; +import com.portingdeadmods.stickit.client.render.tile.TESRPlacedItems; +import com.portingdeadmods.stickit.common.networking.PlaceItemPayload; +import com.portingdeadmods.stickit.common.networking.RotateTilePayload; +import com.portingdeadmods.stickit.common.registry.RegistryItems; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.common.util.EntityUtils; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.ParticleEngine; import net.minecraft.client.player.LocalPlayer; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; @@ -19,15 +17,12 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.neoforged.bus.api.IEventBus; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.neoforge.client.event.InputEvent; import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; -import net.neoforged.neoforge.client.extensions.common.IClientBlockExtensions; -import net.neoforged.neoforge.client.extensions.common.RegisterClientExtensionsEvent; import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.event.server.ServerStartingEvent; import net.neoforged.neoforge.network.PacketDistributor; @@ -39,7 +34,7 @@ import static org.lwjgl.glfw.GLFW.GLFW_KEY_P; public class ClientEvents { - public static final KeyMapping KEY_PLACE = new KeyMapping("key.plonk.place", IN_GAME, KEYSYM, GLFW_KEY_P, "key.categories.plonk"); + public static final KeyMapping KEY_PLACE = new KeyMapping("key.stickit.place", IN_GAME, KEYSYM, GLFW_KEY_P, "key.categories.stickit"); public static void init(IEventBus modEventBus) { modEventBus.addListener(ClientEvents::setupClient); @@ -59,7 +54,7 @@ public static void onRegisterKeyMappings(RegisterKeyMappingsEvent event) { /** * TODO: Switch over to this over: - * {@link com.portingdeadmods.plonk.common.block.BlockPlacedItems#initializeClient(Consumer)} + * {@link com.portingdeadmods.stickit.common.block.BlockPlacedItems#initializeClient(Consumer)} */ // public static void onClientExtensions(RegisterClientExtensionsEvent event) { // event.registerBlock(new IClientBlockExtensions() { diff --git a/src/main/java/com/portingdeadmods/plonk/client/command/CommandClientPlonk.java b/src/main/java/com/portingdeadmods/stickit/client/command/CommandClientPlonk.java similarity index 83% rename from src/main/java/com/portingdeadmods/plonk/client/command/CommandClientPlonk.java rename to src/main/java/com/portingdeadmods/stickit/client/command/CommandClientPlonk.java index 3b18efe..b120059 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/command/CommandClientPlonk.java +++ b/src/main/java/com/portingdeadmods/stickit/client/command/CommandClientPlonk.java @@ -1,6 +1,6 @@ -package com.portingdeadmods.plonk.client.command; +package com.portingdeadmods.stickit.client.command; -import com.portingdeadmods.plonk.common.command.IPlonkCommand; +import com.portingdeadmods.stickit.common.command.IPlonkCommand; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; import net.minecraft.commands.CommandSourceStack; @@ -22,12 +22,12 @@ private void addSubcommand(IPlonkCommand command) { @Override public String getName() { - return "cplonk"; + return "cstickit"; } @Override public String getUsage(CommandSourceStack source) { - return "/cplonk - Client Plonk Commands"; + return "/cstickit - Client Stick It! Commands"; } @Override diff --git a/src/main/java/com/portingdeadmods/plonk/client/command/CommandDumpRenderTypes.java b/src/main/java/com/portingdeadmods/stickit/client/command/CommandDumpRenderTypes.java similarity index 95% rename from src/main/java/com/portingdeadmods/plonk/client/command/CommandDumpRenderTypes.java rename to src/main/java/com/portingdeadmods/stickit/client/command/CommandDumpRenderTypes.java index d095f7c..b675271 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/command/CommandDumpRenderTypes.java +++ b/src/main/java/com/portingdeadmods/stickit/client/command/CommandDumpRenderTypes.java @@ -1,9 +1,9 @@ -package com.portingdeadmods.plonk.client.command; +package com.portingdeadmods.stickit.client.command; -import com.portingdeadmods.plonk.client.render.tile.TESRPlacedItems; -import com.portingdeadmods.plonk.client.util.RenderUtils; -import com.portingdeadmods.plonk.common.command.IPlonkCommand; -import com.portingdeadmods.plonk.common.util.MatrixUtils; +import com.portingdeadmods.stickit.client.render.tile.TESRPlacedItems; +import com.portingdeadmods.stickit.client.util.RenderUtils; +import com.portingdeadmods.stickit.common.command.IPlonkCommand; +import com.portingdeadmods.stickit.common.util.MatrixUtils; import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.Multimap; import com.mojang.brigadier.builder.LiteralArgumentBuilder; @@ -127,7 +127,7 @@ public String getName() { @Override public String getUsage(CommandSourceStack sender) { - return "/cplonk dumprt - Dumps render type information"; + return "/cstickit dumprt - Dumps render type information"; } @Override diff --git a/src/main/java/com/portingdeadmods/plonk/client/registry/RegistryTESRs.java b/src/main/java/com/portingdeadmods/stickit/client/registry/RegistryTESRs.java similarity index 54% rename from src/main/java/com/portingdeadmods/plonk/client/registry/RegistryTESRs.java rename to src/main/java/com/portingdeadmods/stickit/client/registry/RegistryTESRs.java index 9869c9f..287918e 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/registry/RegistryTESRs.java +++ b/src/main/java/com/portingdeadmods/stickit/client/registry/RegistryTESRs.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.client.registry; +package com.portingdeadmods.stickit.client.registry; -import com.portingdeadmods.plonk.client.render.tile.TESRPlacedItems; -import com.portingdeadmods.plonk.common.registry.RegistryTileEntities; +import com.portingdeadmods.stickit.client.render.tile.TESRPlacedItems; +import com.portingdeadmods.stickit.common.registry.RegistryTileEntities; import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; public class RegistryTESRs { diff --git a/src/main/java/com/portingdeadmods/plonk/client/render/tile/TESRPlacedItems.java b/src/main/java/com/portingdeadmods/stickit/client/render/tile/TESRPlacedItems.java similarity index 94% rename from src/main/java/com/portingdeadmods/plonk/client/render/tile/TESRPlacedItems.java rename to src/main/java/com/portingdeadmods/stickit/client/render/tile/TESRPlacedItems.java index 295a5d0..a50fce1 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/render/tile/TESRPlacedItems.java +++ b/src/main/java/com/portingdeadmods/stickit/client/render/tile/TESRPlacedItems.java @@ -1,10 +1,10 @@ -package com.portingdeadmods.plonk.client.render.tile; +package com.portingdeadmods.stickit.client.render.tile; -import com.portingdeadmods.plonk.client.util.RenderUtils; -import com.portingdeadmods.plonk.common.block.BlockPlacedItems; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems.ItemMeta; -import com.portingdeadmods.plonk.common.util.MatrixUtils; +import com.portingdeadmods.stickit.client.util.RenderUtils; +import com.portingdeadmods.stickit.common.block.BlockPlacedItems; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems.ItemMeta; +import com.portingdeadmods.stickit.common.util.MatrixUtils; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Axis; import net.minecraft.client.Minecraft; @@ -27,8 +27,8 @@ import javax.annotation.Nullable; -import static com.portingdeadmods.plonk.common.tile.TilePlacedItems.RENDER_TYPE_BLOCK; -import static com.portingdeadmods.plonk.common.tile.TilePlacedItems.RENDER_TYPE_ITEM; +import static com.portingdeadmods.stickit.common.tile.TilePlacedItems.RENDER_TYPE_BLOCK; +import static com.portingdeadmods.stickit.common.tile.TilePlacedItems.RENDER_TYPE_ITEM; public class TESRPlacedItems implements BlockEntityRenderer { diff --git a/src/main/java/com/portingdeadmods/plonk/client/util/RenderUtils.java b/src/main/java/com/portingdeadmods/stickit/client/util/RenderUtils.java similarity index 90% rename from src/main/java/com/portingdeadmods/plonk/client/util/RenderUtils.java rename to src/main/java/com/portingdeadmods/stickit/client/util/RenderUtils.java index bf2eb42..9860b85 100644 --- a/src/main/java/com/portingdeadmods/plonk/client/util/RenderUtils.java +++ b/src/main/java/com/portingdeadmods/stickit/client/util/RenderUtils.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.client.util; +package com.portingdeadmods.stickit.client.util; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.resources.model.BakedModel; diff --git a/src/main/java/com/portingdeadmods/plonk/common/block/BlockPlacedItems.java b/src/main/java/com/portingdeadmods/stickit/common/block/BlockPlacedItems.java similarity index 96% rename from src/main/java/com/portingdeadmods/plonk/common/block/BlockPlacedItems.java rename to src/main/java/com/portingdeadmods/stickit/common/block/BlockPlacedItems.java index 2a4b473..9e8f3a2 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/block/BlockPlacedItems.java +++ b/src/main/java/com/portingdeadmods/stickit/common/block/BlockPlacedItems.java @@ -1,11 +1,10 @@ -package com.portingdeadmods.plonk.common.block; +package com.portingdeadmods.stickit.common.block; import com.mojang.serialization.MapCodec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import com.portingdeadmods.plonk.common.registry.RegistryTileEntities; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; -import com.portingdeadmods.plonk.common.util.ItemUtils; -import com.portingdeadmods.plonk.common.util.WorldUtils; +import com.portingdeadmods.stickit.common.registry.RegistryTileEntities; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.common.util.ItemUtils; +import com.portingdeadmods.stickit.common.util.WorldUtils; import net.minecraft.client.particle.ParticleEngine; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -47,7 +46,6 @@ import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; import net.neoforged.neoforge.client.extensions.common.IClientBlockExtensions; -import net.neoforged.neoforge.common.NeoForgeMod; import javax.annotation.Nullable; import java.util.Objects; diff --git a/src/main/java/com/portingdeadmods/plonk/common/command/IPlonkCommand.java b/src/main/java/com/portingdeadmods/stickit/common/command/IPlonkCommand.java similarity index 95% rename from src/main/java/com/portingdeadmods/plonk/common/command/IPlonkCommand.java rename to src/main/java/com/portingdeadmods/stickit/common/command/IPlonkCommand.java index 4cb127e..aacc2e3 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/command/IPlonkCommand.java +++ b/src/main/java/com/portingdeadmods/stickit/common/command/IPlonkCommand.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.command; +package com.portingdeadmods.stickit.common.command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.builder.LiteralArgumentBuilder; diff --git a/src/main/java/com/portingdeadmods/plonk/common/config/PlonkConfig.java b/src/main/java/com/portingdeadmods/stickit/common/config/PlonkConfig.java similarity index 81% rename from src/main/java/com/portingdeadmods/plonk/common/config/PlonkConfig.java rename to src/main/java/com/portingdeadmods/stickit/common/config/PlonkConfig.java index 6fff12c..237316b 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/config/PlonkConfig.java +++ b/src/main/java/com/portingdeadmods/stickit/common/config/PlonkConfig.java @@ -1,8 +1,8 @@ -package com.portingdeadmods.plonk.common.config; +package com.portingdeadmods.stickit.common.config; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.tag.PlonkTags; -import com.portingdeadmods.plonk.common.util.ItemUtils; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.tag.StickItTags; +import com.portingdeadmods.stickit.common.util.ItemUtils; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.neoforged.bus.api.SubscribeEvent; @@ -15,7 +15,7 @@ import java.util.Set; import java.util.stream.Collectors; -@EventBusSubscriber(modid = Plonk.MOD_ID, bus = EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid = StickIt.MOD_ID, bus = EventBusSubscriber.Bus.MOD) public class PlonkConfig { public static final ModConfigSpec.Builder BUILDER = new ModConfigSpec.Builder(); public static final ModConfigSpec SPEC; @@ -25,7 +25,7 @@ public class PlonkConfig { private static Set unplaceableItemsSet = Collections.emptySet(); static { - BUILDER.comment("Plonk Configuration"); + BUILDER.comment("StickIt Configuration"); MAX_STACK_SIZE = BUILDER .comment("Max stack size per slot (-1 or 0 to use default). Going above 64 needs a mod like StackUp!.") @@ -33,7 +33,7 @@ public class PlonkConfig { UNPLACEABLE_ITEMS = BUILDER .comment("Items that cannot be placed down, in the format \"mod_id:item_id\" e.g. [\"minecraft:carrot\"]", - "You can also use the " + PlonkTags.Items.UNPLACEABLE.location() + " item tag as well.") + "You can also use the " + StickItTags.Items.UNPLACEABLE.location() + " item tag as well.") .defineList("unplaceableItems", Collections.emptyList(), o -> o instanceof String && ResourceLocation.tryParse((String) o) != null); @@ -46,7 +46,7 @@ public static int getInventoryStackLimit() { } public static boolean canPlace(ItemStack stack) { - if (stack.is(PlonkTags.Items.UNPLACEABLE)) + if (stack.is(StickItTags.Items.UNPLACEABLE)) return false; return !unplaceableItemsSet.contains(ItemUtils.getIdentifier(stack)); } diff --git a/src/main/java/com/portingdeadmods/plonk/common/item/ItemBlockPlacedItems.java b/src/main/java/com/portingdeadmods/stickit/common/item/ItemBlockPlacedItems.java similarity index 93% rename from src/main/java/com/portingdeadmods/plonk/common/item/ItemBlockPlacedItems.java rename to src/main/java/com/portingdeadmods/stickit/common/item/ItemBlockPlacedItems.java index 893b19d..3fb425e 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/item/ItemBlockPlacedItems.java +++ b/src/main/java/com/portingdeadmods/stickit/common/item/ItemBlockPlacedItems.java @@ -1,9 +1,9 @@ -package com.portingdeadmods.plonk.common.item; +package com.portingdeadmods.stickit.common.item; -import com.portingdeadmods.plonk.common.config.PlonkConfig; -import com.portingdeadmods.plonk.common.registry.RegistryBlocks; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; -import com.portingdeadmods.plonk.data.StickItDataComponents; +import com.portingdeadmods.stickit.common.config.PlonkConfig; +import com.portingdeadmods.stickit.common.registry.RegistryBlocks; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.data.StickItDataComponents; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.NonNullList; diff --git a/src/main/java/com/portingdeadmods/plonk/common/networking/CustomCodecs.java b/src/main/java/com/portingdeadmods/stickit/common/networking/CustomCodecs.java similarity index 93% rename from src/main/java/com/portingdeadmods/plonk/common/networking/CustomCodecs.java rename to src/main/java/com/portingdeadmods/stickit/common/networking/CustomCodecs.java index 77806de..b49288d 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/networking/CustomCodecs.java +++ b/src/main/java/com/portingdeadmods/stickit/common/networking/CustomCodecs.java @@ -1,7 +1,5 @@ -package com.portingdeadmods.plonk.common.networking; +package com.portingdeadmods.stickit.common.networking; -import com.jcraft.jorbis.Block; -import io.netty.buffer.ByteBuf; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.FriendlyByteBuf; diff --git a/src/main/java/com/portingdeadmods/plonk/common/networking/NetworkEvents.java b/src/main/java/com/portingdeadmods/stickit/common/networking/NetworkEvents.java similarity index 74% rename from src/main/java/com/portingdeadmods/plonk/common/networking/NetworkEvents.java rename to src/main/java/com/portingdeadmods/stickit/common/networking/NetworkEvents.java index 977d96e..0d460a7 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/networking/NetworkEvents.java +++ b/src/main/java/com/portingdeadmods/stickit/common/networking/NetworkEvents.java @@ -1,16 +1,16 @@ -package com.portingdeadmods.plonk.common.networking; +package com.portingdeadmods.stickit.common.networking; -import com.portingdeadmods.plonk.Plonk; +import com.portingdeadmods.stickit.StickIt; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent; import net.neoforged.neoforge.network.registration.PayloadRegistrar; -@EventBusSubscriber(modid = Plonk.MOD_ID, bus = EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid = StickIt.MOD_ID, bus = EventBusSubscriber.Bus.MOD) public class NetworkEvents { @SubscribeEvent public static void registerPayloads(final RegisterPayloadHandlersEvent event) { - final PayloadRegistrar registrar = event.registrar(Plonk.MOD_ID); + final PayloadRegistrar registrar = event.registrar(StickIt.MOD_ID); registrar.playToServer( PlaceItemPayload.TYPE, PlaceItemPayload.STREAM_CODEC, diff --git a/src/main/java/com/portingdeadmods/stickit/common/networking/PayloadBase.java b/src/main/java/com/portingdeadmods/stickit/common/networking/PayloadBase.java new file mode 100644 index 0000000..50553c7 --- /dev/null +++ b/src/main/java/com/portingdeadmods/stickit/common/networking/PayloadBase.java @@ -0,0 +1,5 @@ +package com.portingdeadmods.stickit.common.networking; + +public interface PayloadBase { + +} diff --git a/src/main/java/com/portingdeadmods/plonk/common/networking/PlaceItemPayload.java b/src/main/java/com/portingdeadmods/stickit/common/networking/PlaceItemPayload.java similarity index 90% rename from src/main/java/com/portingdeadmods/plonk/common/networking/PlaceItemPayload.java rename to src/main/java/com/portingdeadmods/stickit/common/networking/PlaceItemPayload.java index 72cad32..48d1207 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/networking/PlaceItemPayload.java +++ b/src/main/java/com/portingdeadmods/stickit/common/networking/PlaceItemPayload.java @@ -1,8 +1,8 @@ -package com.portingdeadmods.plonk.common.networking; +package com.portingdeadmods.stickit.common.networking; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.registry.RegistryItems; -import com.portingdeadmods.plonk.common.util.EntityUtils; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.registry.RegistryItems; +import com.portingdeadmods.stickit.common.util.EntityUtils; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.network.codec.ByteBufCodecs; @@ -21,7 +21,7 @@ * @see ServerboundUseItemOnPacket */ public record PlaceItemPayload(BlockHitResult result, int renderType) implements CustomPacketPayload, PayloadBase { - public static final Type TYPE = new Type<>(Plonk.rl("place_item_payload")); + public static final Type TYPE = new Type<>(StickIt.rl("place_item_payload")); public @NotNull Type type() { return TYPE; diff --git a/src/main/java/com/portingdeadmods/plonk/common/networking/RotateTilePayload.java b/src/main/java/com/portingdeadmods/stickit/common/networking/RotateTilePayload.java similarity index 89% rename from src/main/java/com/portingdeadmods/plonk/common/networking/RotateTilePayload.java rename to src/main/java/com/portingdeadmods/stickit/common/networking/RotateTilePayload.java index f49dacc..b02eb28 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/networking/RotateTilePayload.java +++ b/src/main/java/com/portingdeadmods/stickit/common/networking/RotateTilePayload.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.common.networking; +package com.portingdeadmods.stickit.common.networking; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; import net.minecraft.core.BlockPos; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; @@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull; public record RotateTilePayload(BlockPos pos) implements CustomPacketPayload, PayloadBase { - public static final Type TYPE = new Type<>(Plonk.rl("rotate_tile_payload")); + public static final Type TYPE = new Type<>(StickIt.rl("rotate_tile_payload")); public @NotNull Type type() { return TYPE; diff --git a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryBlocks.java b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryBlocks.java similarity index 89% rename from src/main/java/com/portingdeadmods/plonk/common/registry/RegistryBlocks.java rename to src/main/java/com/portingdeadmods/stickit/common/registry/RegistryBlocks.java index 305f46f..50eb72a 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryBlocks.java +++ b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryBlocks.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.common.registry; +package com.portingdeadmods.stickit.common.registry; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.block.BlockPlacedItems; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.block.BlockPlacedItems; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -37,7 +37,7 @@ public static void init(RegisterEvent.RegisterHelper helper) { try { if (Modifier.isStatic(f.getModifiers())) { if (Block.class.isAssignableFrom(f.getType())) { - ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(Plonk.MOD_ID, f.getName()); + ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(StickIt.MOD_ID, f.getName()); LOG.info("Registering block: {}", rl); Block block = (Block) f.get(null); helper.register(rl, block); diff --git a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryItems.java b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryItems.java similarity index 84% rename from src/main/java/com/portingdeadmods/plonk/common/registry/RegistryItems.java rename to src/main/java/com/portingdeadmods/stickit/common/registry/RegistryItems.java index c5e6b2d..b4d7244 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryItems.java +++ b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryItems.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.common.registry; +package com.portingdeadmods.stickit.common.registry; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.item.ItemBlockPlacedItems; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.item.ItemBlockPlacedItems; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.neoforged.neoforge.registries.RegisterEvent; @@ -21,7 +21,7 @@ public static void init(RegisterEvent.RegisterHelper helper) { try { if (Modifier.isStatic(f.getModifiers())) { if (Item.class.isAssignableFrom(f.getType())) { - ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(Plonk.MOD_ID, f.getName()); + ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(StickIt.MOD_ID, f.getName()); LOG.info("Registering item: {}", rl); Item item = (Item) f.get(null); helper.register(rl, item); diff --git a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryTileEntities.java b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryTileEntities.java similarity index 86% rename from src/main/java/com/portingdeadmods/plonk/common/registry/RegistryTileEntities.java rename to src/main/java/com/portingdeadmods/stickit/common/registry/RegistryTileEntities.java index 4ba92a1..452ac91 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/registry/RegistryTileEntities.java +++ b/src/main/java/com/portingdeadmods/stickit/common/registry/RegistryTileEntities.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.common.registry; +package com.portingdeadmods.stickit.common.registry; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.tile.TilePlacedItems; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.tile.TilePlacedItems; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntityType; import net.neoforged.neoforge.registries.RegisterEvent; @@ -21,7 +21,7 @@ public static void init(RegisterEvent.RegisterHelper> helper) try { if (Modifier.isStatic(f.getModifiers())) { if (f.getType() == BlockEntityType.class) { - ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(Plonk.MOD_ID, f.getName()); + ResourceLocation rl = ResourceLocation.fromNamespaceAndPath(StickIt.MOD_ID, f.getName()); LOG.info("Registering tile entity: {}", rl); BlockEntityType type = (BlockEntityType) f.get(null); helper.register(rl, type); diff --git a/src/main/java/com/portingdeadmods/plonk/common/tag/PlonkTags.java b/src/main/java/com/portingdeadmods/stickit/common/tag/StickItTags.java similarity index 78% rename from src/main/java/com/portingdeadmods/plonk/common/tag/PlonkTags.java rename to src/main/java/com/portingdeadmods/stickit/common/tag/StickItTags.java index b2543e2..696acc1 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/tag/PlonkTags.java +++ b/src/main/java/com/portingdeadmods/stickit/common/tag/StickItTags.java @@ -1,12 +1,12 @@ -package com.portingdeadmods.plonk.common.tag; +package com.portingdeadmods.stickit.common.tag; -import com.portingdeadmods.plonk.Plonk; +import com.portingdeadmods.stickit.StickIt; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; -public class PlonkTags { +public class StickItTags { public static void init() { Items.init(); } @@ -20,7 +20,7 @@ public static void init() { @SuppressWarnings("SameParameterValue") private static TagKey tag(String name) { - return ItemTags.create(ResourceLocation.fromNamespaceAndPath(Plonk.MOD_ID, name)); + return ItemTags.create(ResourceLocation.fromNamespaceAndPath(StickIt.MOD_ID, name)); } } } diff --git a/src/main/java/com/portingdeadmods/plonk/common/tile/TilePlacedItems.java b/src/main/java/com/portingdeadmods/stickit/common/tile/TilePlacedItems.java similarity index 97% rename from src/main/java/com/portingdeadmods/plonk/common/tile/TilePlacedItems.java rename to src/main/java/com/portingdeadmods/stickit/common/tile/TilePlacedItems.java index 8e46fad..493c65b 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/tile/TilePlacedItems.java +++ b/src/main/java/com/portingdeadmods/stickit/common/tile/TilePlacedItems.java @@ -1,13 +1,13 @@ -package com.portingdeadmods.plonk.common.tile; +package com.portingdeadmods.stickit.common.tile; import com.google.common.collect.ImmutableMap; -import com.portingdeadmods.plonk.common.block.BlockPlacedItems; -import com.portingdeadmods.plonk.common.config.PlonkConfig; -import com.portingdeadmods.plonk.common.registry.RegistryBlocks; -import com.portingdeadmods.plonk.common.registry.RegistryTileEntities; -import com.portingdeadmods.plonk.common.util.ItemUtils; -import com.portingdeadmods.plonk.common.util.bound.Box; -import com.portingdeadmods.plonk.common.util.bound.BoxCollection; +import com.portingdeadmods.stickit.common.block.BlockPlacedItems; +import com.portingdeadmods.stickit.common.config.PlonkConfig; +import com.portingdeadmods.stickit.common.registry.RegistryBlocks; +import com.portingdeadmods.stickit.common.registry.RegistryTileEntities; +import com.portingdeadmods.stickit.common.util.ItemUtils; +import com.portingdeadmods.stickit.common.util.bound.Box; +import com.portingdeadmods.stickit.common.util.bound.BoxCollection; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.HolderLookup; @@ -27,9 +27,6 @@ import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraft.world.phys.AABB; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/EntityUtils.java b/src/main/java/com/portingdeadmods/stickit/common/util/EntityUtils.java similarity index 97% rename from src/main/java/com/portingdeadmods/plonk/common/util/EntityUtils.java rename to src/main/java/com/portingdeadmods/stickit/common/util/EntityUtils.java index ff2a57c..0498392 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/EntityUtils.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/EntityUtils.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.util; +package com.portingdeadmods.stickit.common.util; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.EquipmentSlot; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/ItemUtils.java b/src/main/java/com/portingdeadmods/stickit/common/util/ItemUtils.java similarity index 97% rename from src/main/java/com/portingdeadmods/plonk/common/util/ItemUtils.java rename to src/main/java/com/portingdeadmods/stickit/common/util/ItemUtils.java index a427759..6fe8ebf 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/ItemUtils.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/ItemUtils.java @@ -1,7 +1,6 @@ -package com.portingdeadmods.plonk.common.util; +package com.portingdeadmods.stickit.common.util; import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.Container; import net.minecraft.world.entity.LivingEntity; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/MatrixUtils.java b/src/main/java/com/portingdeadmods/stickit/common/util/MatrixUtils.java similarity index 99% rename from src/main/java/com/portingdeadmods/plonk/common/util/MatrixUtils.java rename to src/main/java/com/portingdeadmods/stickit/common/util/MatrixUtils.java index be8c63d..34153bd 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/MatrixUtils.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/MatrixUtils.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.util; +package com.portingdeadmods.stickit.common.util; import org.joml.Matrix3f; import org.joml.Matrix4f; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/WorldUtils.java b/src/main/java/com/portingdeadmods/stickit/common/util/WorldUtils.java similarity index 97% rename from src/main/java/com/portingdeadmods/plonk/common/util/WorldUtils.java rename to src/main/java/com/portingdeadmods/stickit/common/util/WorldUtils.java index 602fe5b..8666dd0 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/WorldUtils.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/WorldUtils.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.util; +package com.portingdeadmods.stickit.common.util; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/bound/Box.java b/src/main/java/com/portingdeadmods/stickit/common/util/bound/Box.java similarity index 99% rename from src/main/java/com/portingdeadmods/plonk/common/util/bound/Box.java rename to src/main/java/com/portingdeadmods/stickit/common/util/bound/Box.java index d14d748..26611d6 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/bound/Box.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/bound/Box.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.util.bound; +package com.portingdeadmods.stickit.common.util.bound; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; diff --git a/src/main/java/com/portingdeadmods/plonk/common/util/bound/BoxCollection.java b/src/main/java/com/portingdeadmods/stickit/common/util/bound/BoxCollection.java similarity index 99% rename from src/main/java/com/portingdeadmods/plonk/common/util/bound/BoxCollection.java rename to src/main/java/com/portingdeadmods/stickit/common/util/bound/BoxCollection.java index 5f3169a..72778de 100644 --- a/src/main/java/com/portingdeadmods/plonk/common/util/bound/BoxCollection.java +++ b/src/main/java/com/portingdeadmods/stickit/common/util/bound/BoxCollection.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.common.util.bound; +package com.portingdeadmods.stickit.common.util.bound; import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.Shapes; diff --git a/src/main/java/com/portingdeadmods/plonk/data/BlockStates.java b/src/main/java/com/portingdeadmods/stickit/data/BlockStates.java similarity index 81% rename from src/main/java/com/portingdeadmods/plonk/data/BlockStates.java rename to src/main/java/com/portingdeadmods/stickit/data/BlockStates.java index 0158bbf..3b6f9d6 100644 --- a/src/main/java/com/portingdeadmods/plonk/data/BlockStates.java +++ b/src/main/java/com/portingdeadmods/stickit/data/BlockStates.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.data; +package com.portingdeadmods.stickit.data; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.registry.RegistryBlocks; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.registry.RegistryBlocks; import net.minecraft.core.Direction; import net.minecraft.data.PackOutput; import net.minecraft.world.level.block.state.properties.BlockStateProperties; @@ -12,19 +12,18 @@ import javax.annotation.Nonnull; -import static com.portingdeadmods.plonk.data.DataGenUtils.minecraft; -import static com.portingdeadmods.plonk.data.DataGenUtils.plonk; +import static com.portingdeadmods.stickit.data.DataGenUtils.*; public class BlockStates extends BlockStateProvider { public BlockStates(PackOutput output, ExistingFileHelper existingFileHelper) { - super(output, Plonk.MOD_ID, existingFileHelper); + super(output, StickIt.MOD_ID, existingFileHelper); } @Override protected void registerStatesAndModels() { final BlockModelBuilder placed_items_model = models().withExistingParent("placed_items", minecraft("block/block")) .renderType("cutout") - .texture("all", plonk("block/placed_items")) + .texture("all", stickit("block/placed_items")) .texture("particle", "#all") .element() .from(0, -0.01f, 0) @@ -48,7 +47,7 @@ protected void registerStatesAndModels() { @Nonnull @Override public String getName() { - return Plonk.NAME + " Block States"; + return StickIt.NAME + " Block States"; } } diff --git a/src/main/java/com/portingdeadmods/plonk/data/BlockTags.java b/src/main/java/com/portingdeadmods/stickit/data/BlockTags.java similarity index 75% rename from src/main/java/com/portingdeadmods/plonk/data/BlockTags.java rename to src/main/java/com/portingdeadmods/stickit/data/BlockTags.java index 8824dc5..7ca71b4 100644 --- a/src/main/java/com/portingdeadmods/plonk/data/BlockTags.java +++ b/src/main/java/com/portingdeadmods/stickit/data/BlockTags.java @@ -1,6 +1,6 @@ -package com.portingdeadmods.plonk.data; +package com.portingdeadmods.stickit.data; -import com.portingdeadmods.plonk.Plonk; +import com.portingdeadmods.stickit.StickIt; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.neoforged.neoforge.common.data.BlockTagsProvider; @@ -11,7 +11,7 @@ public class BlockTags extends BlockTagsProvider { public BlockTags(PackOutput output, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { - super(output, lookupProvider, Plonk.MOD_ID, existingFileHelper); + super(output, lookupProvider, StickIt.MOD_ID, existingFileHelper); } @Override @@ -20,6 +20,6 @@ protected void addTags(HolderLookup.Provider lookupProvider) { @Override public String getName() { - return Plonk.NAME + " Block Tags"; + return StickIt.NAME + " Block Tags"; } } diff --git a/src/main/java/com/portingdeadmods/stickit/data/DataGenUtils.java b/src/main/java/com/portingdeadmods/stickit/data/DataGenUtils.java new file mode 100644 index 0000000..9b8c112 --- /dev/null +++ b/src/main/java/com/portingdeadmods/stickit/data/DataGenUtils.java @@ -0,0 +1,18 @@ +package com.portingdeadmods.stickit.data; + +import com.portingdeadmods.stickit.StickIt; +import net.minecraft.resources.ResourceLocation; + +public class DataGenUtils { + public static ResourceLocation minecraft(String path) { + return ResourceLocation.fromNamespaceAndPath("minecraft", path); + } + + public static ResourceLocation stickit(String path) { + return ResourceLocation.fromNamespaceAndPath(StickIt.MOD_ID, path); + } + + public static ResourceLocation carryOn(String path) { + return ResourceLocation.fromNamespaceAndPath(StickIt.CARRY_ON_MOD_ID, path); + } +} diff --git a/src/main/java/com/portingdeadmods/plonk/data/DataGenerators.java b/src/main/java/com/portingdeadmods/stickit/data/DataGenerators.java similarity index 96% rename from src/main/java/com/portingdeadmods/plonk/data/DataGenerators.java rename to src/main/java/com/portingdeadmods/stickit/data/DataGenerators.java index fa000bc..9189078 100644 --- a/src/main/java/com/portingdeadmods/plonk/data/DataGenerators.java +++ b/src/main/java/com/portingdeadmods/stickit/data/DataGenerators.java @@ -1,4 +1,4 @@ -package com.portingdeadmods.plonk.data; +package com.portingdeadmods.stickit.data; import net.minecraft.core.HolderLookup; import net.minecraft.data.DataGenerator; diff --git a/src/main/java/com/portingdeadmods/plonk/data/ItemTags.java b/src/main/java/com/portingdeadmods/stickit/data/ItemTags.java similarity index 64% rename from src/main/java/com/portingdeadmods/plonk/data/ItemTags.java rename to src/main/java/com/portingdeadmods/stickit/data/ItemTags.java index 42df77d..2d5dc9e 100644 --- a/src/main/java/com/portingdeadmods/plonk/data/ItemTags.java +++ b/src/main/java/com/portingdeadmods/stickit/data/ItemTags.java @@ -1,8 +1,8 @@ -package com.portingdeadmods.plonk.data; +package com.portingdeadmods.stickit.data; -import com.portingdeadmods.plonk.Plonk; -import com.portingdeadmods.plonk.common.registry.RegistryItems; -import com.portingdeadmods.plonk.common.tag.PlonkTags; +import com.portingdeadmods.stickit.StickIt; +import com.portingdeadmods.stickit.common.registry.RegistryItems; +import com.portingdeadmods.stickit.common.tag.StickItTags; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.ItemTagsProvider; @@ -11,16 +11,16 @@ import java.util.concurrent.CompletableFuture; -import static com.portingdeadmods.plonk.data.DataGenUtils.carryOn; +import static com.portingdeadmods.stickit.data.DataGenUtils.carryOn; public class ItemTags extends ItemTagsProvider { public ItemTags(PackOutput output, CompletableFuture lookupProvider, CompletableFuture> blockTagProvider, ExistingFileHelper existingFileHelper) { - super(output, lookupProvider, blockTagProvider, Plonk.MOD_ID, existingFileHelper); + super(output, lookupProvider, blockTagProvider, StickIt.MOD_ID, existingFileHelper); } @Override protected void addTags(HolderLookup.Provider lookupProvider) { - tag(PlonkTags.Items.UNPLACEABLE) + tag(StickItTags.Items.UNPLACEABLE) .add(RegistryItems.placed_items) .addOptional(carryOn("entity_item")) .addOptional(carryOn("tile_item")) @@ -29,6 +29,6 @@ protected void addTags(HolderLookup.Provider lookupProvider) { @Override public String getName() { - return Plonk.NAME + " Item Tags"; + return StickIt.NAME + " Item Tags"; } } diff --git a/src/main/java/com/portingdeadmods/plonk/data/StickItDataComponents.java b/src/main/java/com/portingdeadmods/stickit/data/StickItDataComponents.java similarity index 84% rename from src/main/java/com/portingdeadmods/plonk/data/StickItDataComponents.java rename to src/main/java/com/portingdeadmods/stickit/data/StickItDataComponents.java index 72d98d0..4970a1f 100644 --- a/src/main/java/com/portingdeadmods/plonk/data/StickItDataComponents.java +++ b/src/main/java/com/portingdeadmods/stickit/data/StickItDataComponents.java @@ -1,7 +1,7 @@ -package com.portingdeadmods.plonk.data; +package com.portingdeadmods.stickit.data; import com.mojang.serialization.Codec; -import com.portingdeadmods.plonk.Plonk; +import com.portingdeadmods.stickit.StickIt; import net.minecraft.core.component.DataComponentType; import net.minecraft.network.codec.ByteBufCodecs; import net.neoforged.neoforge.registries.DeferredRegister; @@ -10,7 +10,7 @@ public class StickItDataComponents { - public static final DeferredRegister.DataComponents COMPONENTS = DeferredRegister.createDataComponents(Plonk.MOD_ID); + public static final DeferredRegister.DataComponents COMPONENTS = DeferredRegister.createDataComponents(StickIt.MOD_ID); public static final Supplier> TAG_HELD = COMPONENTS.registerComponentType("held", builder -> builder.persistent(Codec.BOOL).networkSynchronized(ByteBufCodecs.BOOL)); diff --git a/src/main/resources/assets/plonk/lang/en_us.json b/src/main/resources/assets/plonk/lang/en_us.json deleted file mode 100644 index dbac91b..0000000 --- a/src/main/resources/assets/plonk/lang/en_us.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "block.plonk.placed_items": "Placed Items", - "key.categories.plonk": "Plonk", - "key.plonk.place": "Place Item", - "placeholder.plonk": "PLACEHOLDER" -} diff --git a/src/main/resources/assets/stickit/lang/en_us.json b/src/main/resources/assets/stickit/lang/en_us.json new file mode 100644 index 0000000..63a8fdd --- /dev/null +++ b/src/main/resources/assets/stickit/lang/en_us.json @@ -0,0 +1,6 @@ +{ + "block.stickit.placed_items": "Placed Items", + "key.categories.stickit": "Stick It!", + "key.stickit.place": "Place Item", + "placeholder.stickit": "PLACEHOLDER" +} diff --git a/src/main/resources/assets/plonk/textures/block/placed_items.png b/src/main/resources/assets/stickit/textures/block/placed_items.png similarity index 100% rename from src/main/resources/assets/plonk/textures/block/placed_items.png rename to src/main/resources/assets/stickit/textures/block/placed_items.png diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index f037359..29c5d27 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "Plonk resources", + "description": "Stick It! resources", "pack_format": 9, "forge:resource_pack_format": 9, "forge:data_pack_format": 10