Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
DevMunky authored and gabber235 committed Jan 22, 2025
1 parent 42f6298 commit f4d942e
Show file tree
Hide file tree
Showing 73 changed files with 11 additions and 3,155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class JumpHandler(override val player: Player, override val block: () -> Unit) :

override fun initialize() {
super.initialize()
player.getAttribute(Attribute.JUMP_STRENGTH)?.let { attribute ->
player.getAttribute(Attribute.GENERIC_JUMP_STRENGTH)?.let { attribute ->
attribute.removeModifier(key)
attribute.addModifier(AttributeModifier(key, -0.999, AttributeModifier.Operation.MULTIPLY_SCALAR_1))
}
Expand All @@ -95,7 +95,7 @@ class JumpHandler(override val player: Player, override val block: () -> Unit) :

override fun dispose() {
super.dispose()
player.getAttribute(Attribute.JUMP_STRENGTH)?.removeModifier(key)
player.getAttribute(Attribute.GENERIC_JUMP_STRENGTH)?.removeModifier(key)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class PlayerRadiusInteractionBound(
val zoom = calculateZoom(distance)
val modifier = AttributeModifier(key, zoom, AttributeModifier.Operation.MULTIPLY_SCALAR_1)

player.getAttribute(Attribute.MOVEMENT_SPEED)?.let { attribute ->
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)?.let { attribute ->
attribute.removeModifier(key)

attribute.addModifier(modifier)
Expand Down Expand Up @@ -106,7 +106,7 @@ class PlayerRadiusInteractionBound(

override suspend fun teardown() {
if (zoom) {
player.getAttribute(Attribute.MOVEMENT_SPEED)?.removeModifier(key)
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)?.removeModifier(key)
}
super.teardown()
}
Expand Down
32 changes: 0 additions & 32 deletions extensions/CitizensExtension/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class LookAtNpcInteractionBound(
val zoom = calculateZoom(distance)
val modifier = AttributeModifier(key, zoom, AttributeModifier.Operation.MULTIPLY_SCALAR_1)

player.getAttribute(Attribute.MOVEMENT_SPEED)?.let { attribute ->
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)?.let { attribute ->
attribute.removeModifier(key)

attribute.addModifier(modifier)
Expand Down Expand Up @@ -171,8 +171,8 @@ class LookAtNpcInteractionBound(
}
}

override suspend fun teardown() {
player.getAttribute(Attribute.MOVEMENT_SPEED)?.removeModifier(key)
override fun teardown() {
player.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED)?.removeModifier(key)
super.teardown()
}
}
Expand Down
30 changes: 0 additions & 30 deletions extensions/MythicMobsExtension/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f4d942e

Please sign in to comment.