mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 15:23:16 +00:00
Overwrite getBlockFaceShape for various blocks (#5539)
* Return block face shape data for various blocks. Fixes #5530 * Allow for bounding block tile owners to control the face shape
This commit is contained in:
1 parent
de705af546
commit
c3be258c46
9 files changed
+134
-10
No files matched your search
@@ -1,5 +1,10 @@
|
||||
package mekanism.common.base;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
/**
|
||||
* Internal interface. A bounding block is not actually a 'bounding' block, it is really just a fake block that is used to mimic actual block bounds.
|
||||
*
|
||||
@@ -16,4 +21,17 @@ public interface IBoundingBlock {
|
||||
* Called when any part of the structure is broken.
|
||||
*/
|
||||
void onBreak();
|
||||
|
||||
/**
|
||||
* Used for getting the proper BlockFaceShape for the bounding block.
|
||||
*
|
||||
* @param face The face of the block at the offset that the shape is needed for.
|
||||
* @param offset Offset from the implementation of IBoundingBlock
|
||||
*
|
||||
* @return A BlockFaceShape
|
||||
*/
|
||||
@Nonnull
|
||||
default BlockFaceShape getOffsetBlockFaceShape(@Nonnull EnumFacing face, @Nonnull Vec3i offset) {
|
||||
return BlockFaceShape.UNDEFINED;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user