target handler: respect camera debug view

This commit is contained in:
Bixilon 2022-06-09 11:35:08 +02:00
parent e0dd37212f
commit 6e8b1a775c
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 6 additions and 2 deletions

View File

@ -46,8 +46,8 @@ class TargetHandler(
fun raycast() { fun raycast() {
val eyePosition = camera.matrixHandler.eyePosition.toVec3d val eyePosition = camera.matrixHandler.entity.eyePosition.toVec3d
val cameraFront = camera.matrixHandler.cameraFront.toVec3d val cameraFront = camera.matrixHandler.entity.rotation.front.toVec3d
target = raycast(eyePosition, cameraFront, blocks = true, fluids = false, entities = true) target = raycast(eyePosition, cameraFront, blocks = true, fluids = false, entities = true)
fluidTarget = raycast(eyePosition, cameraFront, blocks = false, fluids = true, entities = false) as FluidTarget? fluidTarget = raycast(eyePosition, cameraFront, blocks = false, fluids = true, entities = false) as FluidTarget?

View File

@ -16,3 +16,7 @@
# You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. # You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
# #
# This software is not affiliated with Mojang AB, the original developer of Minecraft. # This software is not affiliated with Mojang AB, the original developer of Minecraft.
def stripe_model(data):
for property in data:
if property is list: