Logic sensor (#10795)
* Add `selectedBlock` logic sensor * Add `buildX`/`buildY`/`building` logic sensors * Change `building` from boolean to the building * `breaking` * Make `breaking`/`building` more consistent * Allow blocks/content to be null * Change `selectedBlock` from air to null * Change `selectedBlock` from air to null * Make `selectedBlock` SyncLocal * Add `selectedRotation`
This commit is contained in:
@@ -392,11 +392,12 @@ public class TypeIO{
|
||||
}
|
||||
|
||||
public static void writeBlock(Writes write, Block block){
|
||||
write.s(block.id);
|
||||
write.s(block == null ? -1 : block.id);
|
||||
}
|
||||
|
||||
public static Block readBlock(Reads read){
|
||||
return content.block(read.s());
|
||||
short id = read.s();
|
||||
return id == -1 ? null : content.block(id);
|
||||
}
|
||||
|
||||
/** @return the maximum acceptable amount of plans to send over the network */
|
||||
|
||||
Reference in New Issue
Block a user