Skip to content

Commit

Permalink
refactor: flatten single component impl
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Jul 14, 2024
1 parent 49d8c01 commit 52aad77
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.barrel;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.annotation.RequireBlockProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.chest;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.annotation.RequireBlockProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.craftingtable;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.common.PlayerInteractInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.glass;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.data.BlockStateWithPos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.grassblock;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.data.BlockStateWithPos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.leaves;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.data.BlockStateWithPos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.sand;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.annotation.RequireBlockProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.shulkerbox;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.common.BlockEntityHolderComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.stairs;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.component.annotation.RequireBlockProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.block.component.stone;
package org.allaymc.server.block.component;

import org.allaymc.api.block.BlockBehavior;
import org.allaymc.api.block.data.BlockStateWithPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
import org.allaymc.api.data.VanillaBlockId;
import org.allaymc.api.data.VanillaBlockPropertyTypes;
import org.allaymc.api.math.voxelshape.CommonShapes;
import org.allaymc.server.block.component.barrel.BlockBarrelBaseComponentImpl;
import org.allaymc.server.block.component.chest.BlockChestBaseComponentImpl;
import org.allaymc.server.block.component.BlockBarrelBaseComponentImpl;
import org.allaymc.server.block.component.BlockChestBaseComponentImpl;
import org.allaymc.server.block.component.common.BlockFallableBaseComponentImpl;
import org.allaymc.server.block.component.common.BlockStateDataComponentImpl;
import org.allaymc.server.block.component.common.BlockTallWheatSeedDropableBaseComponentImpl;
import org.allaymc.server.block.component.common.BlockWheatSeedDropableBaseComponentImpl;
import org.allaymc.server.block.component.craftingtable.BlockCraftingTableBaseComponentImpl;
import org.allaymc.server.block.component.glass.BlockGlassBaseComponentImpl;
import org.allaymc.server.block.component.grassblock.BlockGrassBlockBaseComponentImpl;
import org.allaymc.server.block.component.leaves.BlockLeavesBaseComponentImpl;
import org.allaymc.server.block.component.sand.BlockSandBaseComponentImpl;
import org.allaymc.server.block.component.shulkerbox.BlockShulkerBoxBaseComponentImpl;
import org.allaymc.server.block.component.stairs.BlockStairsBaseComponentImpl;
import org.allaymc.server.block.component.stone.BlockStoneBaseComponentImpl;
import org.allaymc.server.block.component.BlockCraftingTableBaseComponentImpl;
import org.allaymc.server.block.component.BlockGlassBaseComponentImpl;
import org.allaymc.server.block.component.BlockGrassBlockBaseComponentImpl;
import org.allaymc.server.block.component.BlockLeavesBaseComponentImpl;
import org.allaymc.server.block.component.BlockSandBaseComponentImpl;
import org.allaymc.server.block.component.BlockShulkerBoxBaseComponentImpl;
import org.allaymc.server.block.component.BlockStairsBaseComponentImpl;
import org.allaymc.server.block.component.BlockStoneBaseComponentImpl;
import org.allaymc.server.block.component.torch.BlockColoredTorchBaseComponentImpl;
import org.allaymc.server.block.component.torch.BlockTorchBaseComponentImpl;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.blockentity.component.barrel;
package org.allaymc.server.blockentity.component;

import org.allaymc.api.block.type.BlockTypes;
import org.allaymc.api.blockentity.component.common.BlockEntityContainerHolderComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.blockentity.component.chest;
package org.allaymc.server.blockentity.component;

import org.allaymc.api.blockentity.component.common.BlockEntityContainerHolderComponent;
import org.allaymc.api.blockentity.init.BlockEntityInitInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import org.allaymc.api.container.impl.BarrelContainer;
import org.allaymc.api.container.impl.ChestContainer;
import org.allaymc.api.data.VanillaBlockEntityId;
import org.allaymc.server.blockentity.component.barrel.BlockEntityBarrelBaseComponentImpl;
import org.allaymc.server.blockentity.component.chest.BlockEntityChestBaseComponentImpl;
import org.allaymc.server.blockentity.component.BlockEntityBarrelBaseComponentImpl;
import org.allaymc.server.blockentity.component.BlockEntityChestBaseComponentImpl;
import org.allaymc.server.blockentity.component.common.BlockEntityContainerHolderComponentImpl;
import org.allaymc.server.blockentity.component.shulkerbox.BlockEntityShulkerBoxBaseComponentImpl;
import org.allaymc.server.blockentity.component.shulkerbox.BlockEntityShulkerBoxContainerHolderComponentImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.entity.component.fallingblock;
package org.allaymc.server.entity.component;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.entity.component.item;
package org.allaymc.server.entity.component;

import lombok.Getter;
import lombok.Setter;
Expand All @@ -18,7 +18,6 @@
import org.joml.primitives.AABBfc;

import static org.allaymc.api.item.ItemHelper.fromNBT;
import static org.allaymc.api.item.component.common.ItemBaseComponent.EMPTY_STACK_NETWORK_ID;

/**
* Allay Project 2023/9/23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public void initializePlayer() {
startGamePacket.setWorldEditor(false);
startGamePacket.setChatRestrictionLevel(ChatRestrictionLevel.NONE);
startGamePacket.setSpawnBiomeType(SpawnBiomeType.DEFAULT);
startGamePacket.setCustomBiomeName("");
startGamePacket.setCustomBiomeName("plains");
startGamePacket.setEducationProductionId("");
startGamePacket.setForceExperimentalGameplay(OptionalBoolean.empty());
startGamePacket.setBlockNetworkIdsHashed(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import org.allaymc.api.entity.type.EntityTypes;
import org.allaymc.server.entity.component.common.EntityAttributeComponentImpl;
import org.allaymc.server.entity.component.common.EntityDamageComponentImpl;
import org.allaymc.server.entity.component.fallingblock.EntityFallingBlockBaseComponentImpl;
import org.allaymc.server.entity.component.item.EntityItemBaseComponentImpl;
import org.allaymc.server.entity.component.EntityFallingBlockBaseComponentImpl;
import org.allaymc.server.entity.component.EntityItemBaseComponentImpl;
import org.allaymc.server.entity.component.player.*;

import static org.allaymc.api.entity.component.common.EntityAttributeComponent.basicEntityAttributes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.item.component.air;
package org.allaymc.server.item.component;

import org.allaymc.api.component.interfaces.ComponentInitInfo;
import org.allaymc.api.item.init.SimpleItemStackInitInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.item.component.armor;
package org.allaymc.server.item.component;

import org.allaymc.api.block.component.common.PlayerInteractInfo;
import org.allaymc.api.container.FullContainerType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.allaymc.server.item.component.cauldron;
package org.allaymc.server.item.component;

import org.allaymc.api.block.component.common.PlayerInteractInfo;
import org.allaymc.api.item.init.ItemStackInitInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
import org.allaymc.api.item.interfaces.egg.*;
import org.allaymc.api.item.interfaces.helmet.*;
import org.allaymc.api.item.interfaces.hoe.*;
import org.allaymc.api.item.interfaces.leaves.ItemAcaciaLeavesStack;
import org.allaymc.api.item.interfaces.leggings.*;
import org.allaymc.api.item.interfaces.pickaxe.*;
import org.allaymc.api.item.interfaces.shovel.*;
import org.allaymc.api.item.interfaces.shulkerbox.*;
import org.allaymc.api.item.interfaces.sword.*;
import org.allaymc.api.item.type.ItemTypeBuilder;
import org.allaymc.api.item.type.ItemTypes;
import org.allaymc.server.item.component.air.ItemAirBaseComponentImpl;
import org.allaymc.server.item.component.armor.ItemArmorBaseComponentImpl;
import org.allaymc.server.item.component.cauldron.ItemCauldronBaseComponentImpl;
import org.allaymc.server.item.component.ItemAirBaseComponentImpl;
import org.allaymc.server.item.component.ItemArmorBaseComponentImpl;
import org.allaymc.server.item.component.ItemCauldronBaseComponentImpl;
import org.allaymc.server.item.component.common.ItemItemStorableComponentImpl;
import org.allaymc.server.item.component.food.*;
import org.allaymc.server.item.component.spawnegg.ItemEvokerSpawnEggBaseComponentImpl;
Expand Down

0 comments on commit 52aad77

Please sign in to comment.