RichBoundsLocation - 1.13 Swimming (Kelp Plants)
Checks slightly lower for the block since swimming above water may exceed +1 y
This commit is contained in:
parent
f91edebd70
commit
29d7015d3c
|
@ -483,6 +483,17 @@ public class RichBoundsLocation implements IGetBukkitLocation, IGetBlockPosition
|
|||
}
|
||||
return nodeBelow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get existing or create.
|
||||
* @return
|
||||
*/
|
||||
public IBlockCacheNode getOrCreateBlockCacheNodeBelowLiq() {
|
||||
if (nodeBelow == null) {
|
||||
nodeBelow = blockCache.getOrCreateBlockCacheNode(blockX, blockY - 1.2, blockZ, false);
|
||||
}
|
||||
return nodeBelow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type id.
|
||||
|
@ -507,6 +518,18 @@ public class RichBoundsLocation implements IGetBukkitLocation, IGetBlockPosition
|
|||
}
|
||||
return nodeBelow.getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type id slighly lower.
|
||||
*
|
||||
* @return the type id below
|
||||
*/
|
||||
public Material getTypeIdBelowLiq() {
|
||||
if (nodeBelow == null) {
|
||||
getOrCreateBlockCacheNodeBelowLiq();
|
||||
}
|
||||
return nodeBelow.getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data.
|
||||
|
|
Loading…
Reference in New Issue