Fix: Honey block don't have same ability as slime block (#576)

This commit is contained in:
Snownee 2020-12-24 18:15:36 +08:00
parent 32b0a01c3a
commit 01602c8e77

View File

@ -297,14 +297,14 @@ public abstract class Contraption {
Map<Direction, SuperGlueEntity> superglue = SuperGlueHandler.gatherGlue(world, pos);
// Slime blocks and super glue drag adjacent blocks if possible
boolean isSlimeBlock = state.getBlock() instanceof SlimeBlock;
boolean isStickyBlock = state.isStickyBlock();
for (Direction offset : Iterate.directions) {
BlockPos offsetPos = pos.offset(offset);
BlockState blockState = world.getBlockState(offsetPos);
if (isAnchoringBlockAt(offsetPos))
continue;
if (!movementAllowed(world, offsetPos)) {
if (offset == forcedDirection && isSlimeBlock)
if (offset == forcedDirection && isStickyBlock)
return false;
continue;
}
@ -315,7 +315,7 @@ public abstract class Contraption {
BlockMovementTraits.isBlockAttachedTowards(world, offsetPos, blockState, offset.getOpposite());
boolean brittle = BlockMovementTraits.isBrittle(blockState);
if (!wasVisited && ((isSlimeBlock && !brittle) || blockAttachedTowardsFace || faceHasGlue))
if (!wasVisited && ((isStickyBlock && !brittle) || blockAttachedTowardsFace || faceHasGlue))
frontier.add(offsetPos);
if (faceHasGlue)
addGlue(superglue.get(offset));