Deprecate the non-Pattern methods in EditSession and fix a recursion loop (#1535)

This commit is contained in:
Matthew Miller 2020-09-21 20:50:20 +10:00 committed by GitHub
parent 204ef7a708
commit eca310cf8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1203,9 +1203,11 @@ public int center(Region region, Pattern pattern) throws MaxChangedBlocksExcepti
* @param block the block to place
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
* @deprecated Use {@link EditSession#makeCuboidFaces(Region, Pattern)}.
*/
@Deprecated
public <B extends BlockStateHolder<B>> int makeCuboidFaces(Region region, B block) throws MaxChangedBlocksException {
return makeCuboidFaces(region, block);
return makeCuboidFaces(region, (Pattern) block);
}
/**
@ -1320,7 +1322,9 @@ protected BaseBlock getMaterial(int x, int y, int z, BaseBlock defaultMaterial)
* @param block the placed block
* @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed
* @deprecated Use {@link EditSession#overlayCuboidBlocks(Region, Pattern)}.
*/
@Deprecated
public <B extends BlockStateHolder<B>> int overlayCuboidBlocks(Region region, B block) throws MaxChangedBlocksException {
checkNotNull(block);