From e887e2f61e6f54b3ccfffb87b11f1c86cbfe5dee Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 4 Nov 2023 20:06:39 +0100 Subject: [PATCH] wip --- .../portablegrid/PortableGridBlock.java | 32 +++++++++++++++++++ .../common/portablegrid/package-info.java | 7 ++++ 2 files changed, 39 insertions(+) create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/PortableGridBlock.java create mode 100644 refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/package-info.java diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/PortableGridBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/PortableGridBlock.java new file mode 100644 index 000000000..9b5046997 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/PortableGridBlock.java @@ -0,0 +1,32 @@ +package com.refinedmods.refinedstorage2.platform.common.portablegrid; + +import com.refinedmods.refinedstorage2.platform.common.content.BlockConstants; +import com.refinedmods.refinedstorage2.platform.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage2.platform.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage2.platform.common.support.direction.DirectionType; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +public class PortableGridBlock extends AbstractDirectionalBlock { + private static final VoxelShape SHAPE = box(0, 0, 0, 16, 13.2, 16); + + public PortableGridBlock() { + super(BlockConstants.PROPERTIES); + } + + @Override + protected DirectionType getDirectionType() { + return BiDirectionType.INSTANCE; + } + + @Override + public VoxelShape getShape(final BlockState $$0, final BlockGetter $$1, final BlockPos $$2, + final CollisionContext $$3) { + return super.getShape($$0, $$1, $$2, $$3); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/package-info.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/package-info.java new file mode 100644 index 000000000..cc5747491 --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/portablegrid/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage2.platform.common.portablegrid; + +import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault;