Skip to content
Success

Changes

Summary

  1. Entity helper cleanup (#2505) (commit: 207edc3) (details)
Commit 207edc3b9d52919c4dcedf1be1802b8338d9f886 by noreply
Entity helper cleanup (#2505)

* Initial cleanup/update

* Update some code to pattern matching

* Cleanup `sendHide/ShowPacket`

* `look`: early return + pattern matching

* Remove redundant `yHeadRot` set in `setHeadAngle`

* Minor `internalLook` cleanup

* Update `getSourceFor` to modern switch syntax

* `getSourceFor`: add some missing sources

* Fix `BLOCK_EXPLOSION` handling

* Minor `getSourceFor` cleanups

* Use modern switch statements in `EntityHelper`

* Better `setFallingBlockType` param name

* Minor `damage` cleanup

Pattern matching, remove redundant variable

* `setUUID`: pattern matching, remove reflection

* Remove `TODO`

* Don't re-grab the instance in `setSneaking`

* use `CraftLocation#toBlockPosition`

* More `instanceof` pattern matching

* Correct param types

* Improve naming

* Meta fix

* `setUUID`: bring back `remove` reflection

* More `instanceof` pattern matching

* `setFallingBlockType`: don't need a `final` setter

* Add comment to `PLAYERLIST_REMOVE`
(commit: 207edc3)
The file was modifiedv1_18/src/main/java/com/denizenscript/denizen/nms/v1_18/helpers/EntityHelperImpl.java
The file was modifiedv1_19/src/main/java/com/denizenscript/denizen/nms/v1_19/helpers/EntityHelperImpl.java
The file was modifiedplugin/src/main/java/com/denizenscript/denizen/nms/interfaces/EntityHelper.java
The file was modifiedv1_17/src/main/java/com/denizenscript/denizen/nms/v1_17/helpers/EntityHelperImpl.java
The file was modifiedplugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java
The file was modifiedv1_20/src/main/java/com/denizenscript/denizen/nms/v1_20/helpers/EntityHelperImpl.java