Refactor Carpet's sticky blocks code (#1505)
refactor sticky blocks code
This commit is contained in:
1 parent
fce4918c87
commit
c528695d1a
9 files changed
+290
-315
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public interface BlockBehaviourInterface {
|
||||
|
||||
/**
|
||||
* @return whether this block is sticky in any way when moved by pistons
|
||||
*/
|
||||
public boolean isSticky(BlockState state);
|
||||
|
||||
/**
|
||||
* @return whether the neighboring block is pulled along if this block is moved by pistons
|
||||
*/
|
||||
public boolean isStickyToNeighbor(Level level, BlockPos pos, BlockState state, BlockPos neighborPos, BlockState neighborState, Direction dir, Direction moveDir);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user