Files
Mekanism-Community-Edition/src/main/java/mekanism/common/base/IBoundingBlock.java
T
Richard Freimer c3be258c46 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
2019-06-29 12:12:58 +08:00

37 lines
1.0 KiB
Java

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.
*
* @author AidanBrady
*/
public interface IBoundingBlock {
/**
* Called when the main block is placed.
*/
void onPlace();
/**
* 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;
}
}