Skip to content

Commit

Permalink
Refactor pylon package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahwinsley committed Jun 11, 2023
1 parent 99c89e8 commit c37ae5b
Show file tree
Hide file tree
Showing 30 changed files with 76 additions and 73 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package net.permutated.pylons.client;
package net.permutated.pylons;

import net.minecraft.client.gui.screens.MenuScreens;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.client.gui.ExpulsionPylonScreen;
import net.permutated.pylons.client.gui.HarvesterPylonScreen;
import net.permutated.pylons.client.gui.InfusionPylonScreen;
import net.permutated.pylons.client.gui.InterdictionPylonScreen;
import net.permutated.pylons.machines.expulsion.ExpulsionPylonScreen;
import net.permutated.pylons.machines.harvester.HarvesterPylonScreen;
import net.permutated.pylons.machines.infusion.InfusionPylonScreen;
import net.permutated.pylons.machines.interdiction.InterdictionPylonScreen;

public class ClientSetup {
private ClientSetup() {
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/net/permutated/pylons/ModRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.block.ExpulsionPylonBlock;
import net.permutated.pylons.block.HarvesterPylonBlock;
import net.permutated.pylons.block.InfusionPylonBlock;
import net.permutated.pylons.block.InterdictionPylonBlock;
import net.permutated.pylons.inventory.container.ExpulsionPylonContainer;
import net.permutated.pylons.inventory.container.HarvesterPylonContainer;
import net.permutated.pylons.inventory.container.InfusionPylonContainer;
import net.permutated.pylons.inventory.container.InterdictionPylonContainer;
import net.permutated.pylons.machines.expulsion.ExpulsionPylonBlock;
import net.permutated.pylons.machines.harvester.HarvesterPylonBlock;
import net.permutated.pylons.machines.infusion.InfusionPylonBlock;
import net.permutated.pylons.machines.interdiction.InterdictionPylonBlock;
import net.permutated.pylons.machines.expulsion.ExpulsionPylonContainer;
import net.permutated.pylons.machines.harvester.HarvesterPylonContainer;
import net.permutated.pylons.machines.infusion.InfusionPylonContainer;
import net.permutated.pylons.machines.interdiction.InterdictionPylonContainer;
import net.permutated.pylons.item.MobFilterCard;
import net.permutated.pylons.item.PlayerFilterCard;
import net.permutated.pylons.item.PotionFilterCard;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.tile.ExpulsionPylonTile;
import net.permutated.pylons.tile.HarvesterPylonTile;
import net.permutated.pylons.tile.InfusionPylonTile;
import net.permutated.pylons.tile.InterdictionPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonTile;
import net.permutated.pylons.machines.expulsion.ExpulsionPylonTile;
import net.permutated.pylons.machines.harvester.HarvesterPylonTile;
import net.permutated.pylons.machines.infusion.InfusionPylonTile;
import net.permutated.pylons.machines.interdiction.InterdictionPylonTile;
import net.permutated.pylons.util.Constants;
import net.permutated.pylons.util.TranslationKey;

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/permutated/pylons/Pylons.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.permutated.pylons.block.AbstractPylonBlock;
import net.permutated.pylons.client.ClientSetup;
import net.permutated.pylons.machines.base.AbstractPylonBlock;
import net.permutated.pylons.item.MobFilterCard;
import net.permutated.pylons.item.PlayerFilterCard;
import net.permutated.pylons.network.NetworkDispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.Pylons;
import net.permutated.pylons.block.AbstractPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonBlock;

import javax.annotation.Nullable;
import java.util.concurrent.CompletableFuture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.block;
package net.permutated.pylons.machines.base;

import io.netty.buffer.Unpooled;
import net.minecraft.ChatFormatting;
Expand Down Expand Up @@ -33,8 +33,6 @@
import net.minecraftforge.network.IContainerFactory;
import net.minecraftforge.network.NetworkHooks;
import net.permutated.pylons.Pylons;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.util.TranslationKey;

import javax.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.base;

import net.minecraft.client.gui.components.Button;
import net.minecraft.core.BlockPos;
Expand All @@ -20,7 +20,6 @@
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.network.NetworkDispatcher;
import net.permutated.pylons.network.PacketButtonClicked;
import net.permutated.pylons.tile.AbstractPylonTile;

import javax.annotation.Nullable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.base;

import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
Expand All @@ -9,7 +9,6 @@
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.util.Constants;
import net.permutated.pylons.util.ResourceUtil;
import net.permutated.pylons.util.TranslationKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.base;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package net.permutated.pylons.block;
package net.permutated.pylons.machines.base;

import net.minecraft.MethodsReturnNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.block;
package net.permutated.pylons.machines.expulsion;

import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
Expand All @@ -12,10 +12,9 @@
import net.minecraftforge.network.IContainerFactory;
import net.permutated.pylons.ConfigManager;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.inventory.container.ExpulsionPylonContainer;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.tile.ExpulsionPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonTile;

import javax.annotation.Nullable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.expulsion;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.machines.base.AbstractPylonContainer;

public class ExpulsionPylonContainer extends AbstractPylonContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.expulsion;

import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.permutated.pylons.inventory.container.ExpulsionPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonScreen;

@SuppressWarnings("java:S110") // inheritance required
public class ExpulsionPylonScreen extends AbstractPylonScreen<ExpulsionPylonContainer> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.expulsion;

import com.google.common.collect.ImmutableList;
import net.minecraft.ChatFormatting;
Expand All @@ -25,6 +25,7 @@
import net.permutated.pylons.ConfigManager;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.Pylons;
import net.permutated.pylons.machines.base.AbstractPylonTile;
import net.permutated.pylons.item.PlayerFilterCard;
import net.permutated.pylons.util.Constants;
import net.permutated.pylons.util.TranslationKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.expulsion;

import net.minecraft.MethodsReturnNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.block;
package net.permutated.pylons.machines.harvester;

import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
Expand All @@ -18,10 +18,9 @@
import net.minecraft.world.level.material.Fluids;
import net.minecraftforge.network.IContainerFactory;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.inventory.container.HarvesterPylonContainer;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.tile.HarvesterPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonTile;

import javax.annotation.Nullable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.harvester;

import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.tile.HarvesterPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonContainer;

public class HarvesterPylonContainer extends AbstractPylonContainer {
private final HarvesterPylonTile.Status workStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.harvester;

import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.permutated.pylons.inventory.container.HarvesterPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonScreen;

@SuppressWarnings("java:S110") // inheritance required
public class HarvesterPylonScreen extends AbstractPylonScreen<HarvesterPylonContainer> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.harvester;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
Expand All @@ -15,7 +15,7 @@
import net.permutated.pylons.ConfigManager;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.Pylons;
import net.permutated.pylons.block.HarvesterPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonTile;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.harvester;

import net.minecraft.MethodsReturnNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.block;
package net.permutated.pylons.machines.infusion;

import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntityType;
Expand All @@ -10,11 +10,10 @@
import net.minecraft.world.level.BlockGetter;
import net.minecraftforge.network.IContainerFactory;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonContainer;

import net.permutated.pylons.inventory.container.InfusionPylonContainer;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.tile.InfusionPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonTile;

import javax.annotation.Nullable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.infusion;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.machines.base.AbstractPylonContainer;

public class InfusionPylonContainer extends AbstractPylonContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.infusion;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.permutated.pylons.inventory.container.InfusionPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonScreen;

@SuppressWarnings("java:S110") // inheritance required
public class InfusionPylonScreen extends AbstractPylonScreen<InfusionPylonContainer> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.infusion;

import net.minecraft.core.BlockPos;
import net.minecraft.server.MinecraftServer;
Expand All @@ -9,6 +9,7 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.state.BlockState;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.machines.base.AbstractPylonTile;
import net.permutated.pylons.item.PotionFilterCard;
import net.permutated.pylons.util.ChunkManager;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.infusion;

import net.minecraft.MethodsReturnNonnullByDefault;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.block;
package net.permutated.pylons.machines.interdiction;

import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
Expand All @@ -10,10 +10,9 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.network.IContainerFactory;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.inventory.container.AbstractPylonContainer;
import net.permutated.pylons.inventory.container.InterdictionPylonContainer;
import net.permutated.pylons.tile.AbstractPylonTile;
import net.permutated.pylons.tile.InterdictionPylonTile;
import net.permutated.pylons.machines.base.AbstractPylonBlock;
import net.permutated.pylons.machines.base.AbstractPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonTile;

import javax.annotation.Nullable;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.permutated.pylons.inventory.container;
package net.permutated.pylons.machines.interdiction;

import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.registries.RegistryObject;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.machines.base.AbstractPylonContainer;

public class InterdictionPylonContainer extends AbstractPylonContainer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package net.permutated.pylons.client.gui;
package net.permutated.pylons.machines.interdiction;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.permutated.pylons.inventory.container.InterdictionPylonContainer;
import net.permutated.pylons.machines.base.AbstractPylonScreen;

@SuppressWarnings("java:S110") // inheritance required
public class InterdictionPylonScreen extends AbstractPylonScreen<InterdictionPylonContainer> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.permutated.pylons.tile;
package net.permutated.pylons.machines.interdiction;

import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -7,6 +7,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.permutated.pylons.ModRegistry;
import net.permutated.pylons.Pylons;
import net.permutated.pylons.machines.base.AbstractPylonTile;
import net.permutated.pylons.item.MobFilterCard;
import net.permutated.pylons.util.Constants;
import net.permutated.pylons.util.SpawnManager;
Expand Down
Loading

0 comments on commit c37ae5b

Please sign in to comment.