2 Commits
Author SHA1 Message Date
Martin Robertz cca754773a update 2024-06-28 21:59:47 +02:00
Jason Mitchell ebc1762cb6 Try a thread safe client map, and guard against a null world (#6) 2024-02-19 20:36:33 -08:00
7 changed files with 12 additions and 9 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
dependencies {
api 'com.github.GTNewHorizons:MrTJPCore:1.1.6:dev'
api 'com.github.GTNewHorizons:MrTJPCore:1.2.0:dev'
}
+1 -1
View File
@@ -117,7 +117,7 @@ minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.23'
}
@@ -17,17 +17,18 @@ import net.minecraft.client.Minecraft
import net.minecraft.init.Blocks
import net.minecraft.world.{ChunkCoordIntPair, World}
import net.minecraftforge.common.DimensionManager
import scala.collection.concurrent.TrieMap
import scala.collection.mutable.{
HashMap => MHashMap,
MultiMap => MMultiMap,
Set => MSet
}
import scala.ref.WeakReference
object MovementManager2 {
val serverRelocations = MHashMap[Int, WorldStructs]()
val clientRelocations = MHashMap[Int, WorldStructs]()
val clientRelocations = TrieMap[Int, WorldStructs]()
def relocationMap(isClient: Boolean) =
if (isClient) clientRelocations else serverRelocations
@@ -106,8 +107,10 @@ object MovementManager2 {
RelocationSPH.forceSendData()
}
def isMoving(w: World, x: Int, y: Int, z: Int) =
getWorldStructs(w).contains(x, y, z)
def isMoving(w: World, x: Int, y: Int, z: Int) = {
if (w == null) false
else getWorldStructs(w).contains(x, y, z)
}
def addStructToWorld(w: World, b: BlockStruct) {
getWorldStructs(w).addStruct(b)