Skip to content

Commit 63ecfc1

Browse files
committed
First version
0 parents  commit 63ecfc1

File tree

17 files changed

+736
-0
lines changed

17 files changed

+736
-0
lines changed

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# BetterSlowdown
2+
This plugin fixes an issue on 1.8.9 where players skip the hit slowdown, or get a hit slowdown while not sprinting.
3+
4+
## Slowdown
5+
A hit slowdown happens every time you are hitting while doing either:
6+
7+
- **Sprinting**
8+
- Using a knockback sword
9+
10+
Now when you hit someone while meeting one of these conditions you will have a **40% motion** reduction
11+
12+
## The issue
13+
14+
When you hit someone internal server code will do **EntityPlayer#setSprinting(false)**, this causes your metadata to be updated, which in turn causes a new **metadata packet** to be sent.
15+
16+
This metadata packet causes your sprinting value to be overriden for a single tick for hit slowdown. (It does not override other parts of the code as the sprinting is set afterwards by key input). Due to latency this packet can arrive on any client tick and is completely inaccurate.
17+
18+
Another issue with the internal server code is when you send START_SPRINTING or STOP_SPRINTING to the server, it sends another metadata packet to you with your claimed sprint metadata. This is also completely inaccurate due to latency.
19+
20+
## The fix
21+
22+
The plugin will cancel / remove any metadata updates for sprint.
23+
Due to the sprint state being stored in a bitmask the plugin can't always cancel / remove it, there is however a config option to select what strategy to follow if the plugin can't do the cancellation.
24+
25+
Doing this fix should make hit slowdown **less latency** dependant.
26+
27+
**Warning:** This plugin will make hit slowdown happen completely different to most servers (To compare: minemen.club has fixed this issue partly by not doing setSprinting(false) internally, it still has the other issue, of when the client sends START_SPRINTING / STOP_SPRINTING)
28+
29+
## Dependencies
30+
31+
This plugin uses, and depends on [PacketEvents](https://github.com/retrooper/packetevents)

build.gradle.kts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
plugins {
2+
id("java")
3+
}
4+
5+
group = "me.beanes"
6+
version = "1.0-SNAPSHOT"
7+
8+
9+
repositories {
10+
mavenCentral()
11+
maven {
12+
name = "spigotmc-repo"
13+
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
14+
}
15+
maven {
16+
name = "codemc-release"
17+
url = uri("https://repo.codemc.io/repository/maven-releases/")
18+
}
19+
maven {
20+
name = "sonatype"
21+
url = uri("https://oss.sonatype.org/content/groups/public/")
22+
}
23+
}
24+
25+
dependencies {
26+
compileOnly("org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT")
27+
compileOnly("com.github.retrooper:packetevents-spigot:2.7.0")
28+
}
29+
30+
tasks.test {
31+
useJUnitPlatform()
32+
}

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Jan 21 22:56:34 CET 2025
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)