Commits

Luis Benavides-Naranjo authored and md_5 committed 624c810c36a
#982: Add API to copy BlockState to a new Location
No tags

src/main/java/org/bukkit/block/BlockState.java

Modified
50 50
51 51 /**
52 52 * Returns a copy of this BlockState as an unplaced BlockState.
53 53 *
54 54 * @return a copy of the block state
55 55 */
56 56 @NotNull
57 57 @ApiStatus.Experimental
58 58 BlockState copy();
59 59
60 + /**
61 + * Copies the state to another block as an unplaced BlockState.
62 + *
63 + * @param location the location to copy the block state to
64 + * @return the new block state
65 + */
66 + @NotNull
67 + @ApiStatus.Experimental
68 + BlockState copy(@NotNull Location location);
69 +
60 70 /**
61 71 * Gets the type of this block state.
62 72 *
63 73 * @return block type
64 74 */
65 75 @NotNull
66 76 Material getType();
67 77
68 78 /**
69 79 * Gets the current light level of the block represented by this block state.

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut