11.0.33-35 patch notes (1.18.2 - 2022/03/08)

Status
Not open for further replies.

rickyboy320

Administrator
Op
Nov 18, 2013
2,178
1,583
Hi everyone, a new update just went live during scheduled restart. These are the items that have been updated:

Update
Updated to 1.18.2
Updated all plugins to their latest 1.18.2 versions.

Misc
Checkpoint join signs now show your completion info for the map on left click. Joining can still be done with right click.

Scripts
The Player type has received a number of new methods:

"Gets the blockface of the block that the living entity has likely clicked, ignoring fluids. Null if no block is targeted within 5 blocks distance. Identical to getTargetBlockFace(5)."
String getClickedBlockFace()

"Gets the blockface of that block that the living entity has targeted, ignoring fluids. Null if no block is targeted within distance."
String getTargetBlockFace(Int distance)

"Gets the block that the living entity has targeted, ignoring fluids. Null if no block is targeted within distance."
Block getTargetBlock(Int distance)
"Gets the entity being targeted. Null if no entity is targeted within distance."
Entity getTargetEntity(Int distance)
"Returns whether gravity applies to this entity."
Boolean hasGravity()
"Sets whether gravity applies to this entity. (Please unset this when you are done :) )"
Void setGravity(Boolean gravity)
"Checks to see if an entity is gliding, such as using an Elytra."
Boolean isGliding()
"Returns the type of weather the player is currently experiencing."
String getPlayerWeather()
"Sets the type of weather the player will see. When used, the weather status of the player is locked until resetPlayerWeather() is used."
Void setPlayerWeather(String weather)
"Restores the normal condition where the player's weather is controlled by server conditions."
Void resetPlayerWeather()
"Returns the player's current timestamp."
Long getPlayerTime()
"Returns the player's current time offset relative to server time, or the current player's fixed time if the player's time is absolute."
Long getPlayerTimeOffset()
"Sets the current time on the player's client. When using non relative time the player's time will stay fixed at the specified time parameter. It's up to the caller to continue updating the player's time. To restore player time to normal use resetPlayerTime()."
Void setPlayerTime(Long time, Boolean serverRelative)
"Restores the normal condition where the player's time is synchronized with the server time. "
Void resetPlayerTime()
"Make the entity drop the item in their hand. This will force the entity to drop the item they are holding with an option to drop the entire ItemStack or just 1 of the items."
Boolean dropItem(Boolean dropAll)
 

Mercata

Nightmare Connoisseur
Greenie
Jul 20, 2020
200
390
Thank you for continuing to give the community yet more ways to make our maps cooler!

"Gets the blockface of that block that the living entity has targeted, ignoring fluids. Null if no block is targeted within distance."
String getTargetBlockFace(Int distance)
Does this mean what I think it means? Does "Target" mean the block that a player is looking at (with their cursor hovered over it) at the time the script is executed? If so, that would be a really great QoL fix for a janky script I currently have in place...
 

Hex

Board Grandpa
Op
Board
Jul 26, 2016
1,365
1,311
Thank you for continuing to give the community yet more ways to make our maps cooler!



Does this mean what I think it means? Does "Target" mean the block that a player is looking at (with their cursor hovered over it) at the time the script is executed? If so, that would be a really great QoL fix for a janky script I currently have in place...
getTargetBlockFace returns the cardinal direction of the block the player is targeting within the specified range as a string (north, west, up, down, east, west)
getTargetBlock returns the Block type variable of the block the player is targeting, and from that you can pull the X, Y, Z, block type, etc.

So to answer your question, it does indeed do that, yes. It doesn't even have to be within player reach (it can return a block 20 blocks away). Block probably has to be loaded, but I can't say for certain). Quite a useful method that opens up a lot of possibilities.
 

CreepaShadowz

Maze Connoisseur
Op
Apr 21, 2014
1,473
762
It has a range of ~120 blocks I believe.
 

rickyboy320

Administrator
Op
Nov 18, 2013
2,178
1,583
Note, the following functions have been disabled while we figure a way around the time/weather issues.

Void setPlayerWeather(String weather)
Void resetPlayerWeather()
Void setPlayerTime(Long time, Boolean serverRelative)
Void resetPlayerTime()
 
Status
Not open for further replies.
Top