Skip to content

Commit

Permalink
rebranding
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed Dec 28, 2024
1 parent 4cf1f02 commit 4dbd6c2
Show file tree
Hide file tree
Showing 40 changed files with 165 additions and 180 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions src/main/java/com/portingdeadmods/plonk/data/DataGenUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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);

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
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;
import net.minecraft.world.item.ItemStack;
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;
Expand All @@ -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);
Expand All @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 <subcommand> - Client Plonk Commands";
return "/cstickit <subcommand> - Client Stick It! Commands";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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<TilePlacedItems> {

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -25,15 +25,15 @@ public class PlonkConfig {
private static Set<ResourceLocation> 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!.")
.defineInRange("maxStackSize", -1, -1, Integer.MAX_VALUE);

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);

Expand All @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.portingdeadmods.stickit.common.networking;

public interface PayloadBase {

}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -21,7 +21,7 @@
* @see ServerboundUseItemOnPacket
*/
public record PlaceItemPayload(BlockHitResult result, int renderType) implements CustomPacketPayload, PayloadBase {
public static final Type<PlaceItemPayload> TYPE = new Type<>(Plonk.rl("place_item_payload"));
public static final Type<PlaceItemPayload> TYPE = new Type<>(StickIt.rl("place_item_payload"));

public @NotNull Type<? extends CustomPacketPayload> type() {
return TYPE;
Expand Down
Loading

0 comments on commit 4dbd6c2

Please sign in to comment.