mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
Added missing BlockState functions. Addresses BUKKIT-807
By: TomyLobo <stabelweb@gmx.de>
This commit is contained in:
parent
3b9e2f4a67
commit
445baa7607
@ -1,6 +1,7 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.material.MaterialData;
|
||||
@ -78,6 +79,13 @@ public interface BlockState {
|
||||
*/
|
||||
int getZ();
|
||||
|
||||
/**
|
||||
* Gets the location of this block
|
||||
*
|
||||
* @return location
|
||||
*/
|
||||
Location getLocation();
|
||||
|
||||
/**
|
||||
* Gets the chunk which contains this block
|
||||
*
|
||||
@ -109,8 +117,8 @@ public interface BlockState {
|
||||
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to the
|
||||
* new values as defined by this state. <br />
|
||||
* <br />
|
||||
* new values as defined by this state.
|
||||
* <p />
|
||||
* This has the same effect as calling update(false). That is to say,
|
||||
* this will not modify the state of a block if it is no longer the same
|
||||
* type as it was when this state was taken. It will return false in this
|
||||
@ -123,12 +131,12 @@ public interface BlockState {
|
||||
|
||||
/**
|
||||
* Attempts to update the block represented by this state, setting it to the
|
||||
* new values as defined by this state. <br />
|
||||
* <br />
|
||||
* new values as defined by this state.
|
||||
* <p />
|
||||
* Unless force is true, this will not modify the state of a block if it is
|
||||
* no longer the same type as it was when this state was taken. It will return
|
||||
* false in this eventuality.<br />
|
||||
* <br />
|
||||
* false in this eventuality.
|
||||
* <p />
|
||||
* If force is true, it will set the type of the block to match the new state,
|
||||
* set the state data and then return true.
|
||||
*
|
||||
@ -138,4 +146,6 @@ public interface BlockState {
|
||||
boolean update(boolean force);
|
||||
|
||||
public byte getRawData();
|
||||
|
||||
public void setRawData(byte data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user