Depend on PacketEvents-OG installed on server (v2.9.6) and PacketEvents API v2.9.5
This commit is contained in:
1 parent
3e0139e6ea
commit
0fc4555a80
3 files changed
+10
-7
No files matched your search
+1
-1
@@ -36,7 +36,7 @@ dependencies {
|
||||
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
|
||||
|
||||
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
implementation("com.github.retrooper:packetevents-spigot:2.11.1")
|
||||
compileOnly("com.github.retrooper:packetevents-spigot:2.9.5")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
}
|
||||
|
||||
|
||||
@@ -130,11 +130,12 @@ class BlockEntityHider {
|
||||
val direction = blockLoc.toVector().subtract(offsetEye.toVector()).normalize()
|
||||
val eyeFacing = offsetEye.clone().setDirection(direction)
|
||||
val maxDistance = min(ceil(eyeFacing.distance(blockLoc)).toInt(), 140)
|
||||
val blockIterator = try {
|
||||
BlockIterator(eyeFacing, 0.0, maxDistance)
|
||||
} catch (_: IllegalStateException) {
|
||||
return null
|
||||
}
|
||||
val blockIterator =
|
||||
try {
|
||||
BlockIterator(eyeFacing, 0.0, maxDistance)
|
||||
} catch (_: IllegalStateException) {
|
||||
return null
|
||||
}
|
||||
|
||||
var visible = true
|
||||
while (blockIterator.hasNext()) {
|
||||
|
||||
@@ -2,4 +2,6 @@ name: AntiPieRay-OG
|
||||
version: '${version}'
|
||||
main: net.trueog.antipierayog.AntiPieRay
|
||||
api-version: '${apiVersion}'
|
||||
author: "SKBotNL"
|
||||
author: "SKBotNL"
|
||||
depend:
|
||||
- PacketEvents-OG
|
||||
Reference in new issue
Block a user