mirror of
https://gitlab.bixilon.de/bixilon/pixlyzer.git
synced 2025-09-08 14:45:35 -04:00
physics submodule
This commit is contained in:
parent
65bcdb91a5
commit
0dbad55eaa
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
|||||||
[submodule "wrapper/data"]
|
[submodule "wrapper/data"]
|
||||||
path = wrapper/data
|
path = wrapper/data
|
||||||
url = ssh://git@gitlab.bixilon.de:222/bixilon/pixlyzer-data.git
|
url = ssh://git@gitlab.bixilon.de:222/bixilon/pixlyzer-data.git
|
||||||
|
[submodule "pixlyzer-physics"]
|
||||||
|
path = pixlyzer-physics
|
||||||
|
url = ssh://git@gitlab.bixilon.de:222/bixilon/pixlyzer-physics.git
|
||||||
|
1
pixlyzer-physics
Submodule
1
pixlyzer-physics
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 04c31297179487ac728e97df5e7108a316516838
|
5
pom.xml
5
pom.xml
@ -99,6 +99,11 @@
|
|||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>2.13.3</version>
|
<version>2.13.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.bixilon</groupId>
|
||||||
|
<artifactId>kutil</artifactId>
|
||||||
|
<version>1.17.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.oshi</groupId>
|
<groupId>com.github.oshi</groupId>
|
||||||
|
@ -91,6 +91,20 @@ object EntitySpawner {
|
|||||||
|
|
||||||
val CLIENT_LEVEL = OBJENSIS.newInstance(levelClass) as ClientWorld
|
val CLIENT_LEVEL = OBJENSIS.newInstance(levelClass) as ClientWorld
|
||||||
|
|
||||||
|
fun World.setDimension() {
|
||||||
|
getClass("net.minecraft.world.dimension.OverworldDimension", "net.minecraft.world.dimension.DimensionType")?.let {
|
||||||
|
val dimension = OBJENSIS.newInstance(it)
|
||||||
|
getField(DimensionType::class.java, "minimumY")?.set(dimension, 0)
|
||||||
|
getField(World::class.java, "dimensionEntry")?.let {
|
||||||
|
setFinalField(getField(World::class.java, "dimensionEntry")!!, this, getClass("net.minecraft.util.registry.RegistryEntry\$Direct")!!.getConstructor(Any::class.java).newInstance(dimension))
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
setFinalField(getField(World::class.java, "dimension")!!, this, dimension)
|
||||||
|
} catch (ignored: Throwable) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val randomField = getField(World::class.java, "random")!!
|
val randomField = getField(World::class.java, "random")!!
|
||||||
@ -98,17 +112,8 @@ object EntitySpawner {
|
|||||||
setFinalField(getField(World::class.java, "border")!!, CLIENT_LEVEL, WorldBorder())
|
setFinalField(getField(World::class.java, "border")!!, CLIENT_LEVEL, WorldBorder())
|
||||||
setFinalField(getField(World::class.java, "properties")!!, CLIENT_LEVEL, OBJENSIS.newInstance(getClass("net.minecraft.world.level.LevelProperties")))
|
setFinalField(getField(World::class.java, "properties")!!, CLIENT_LEVEL, OBJENSIS.newInstance(getClass("net.minecraft.world.level.LevelProperties")))
|
||||||
setFinalField(getField(levelClass, "scoreboard")!!, CLIENT_LEVEL, Scoreboard())
|
setFinalField(getField(levelClass, "scoreboard")!!, CLIENT_LEVEL, Scoreboard())
|
||||||
getClass("net.minecraft.world.dimension.OverworldDimension", "net.minecraft.world.dimension.DimensionType")?.let {
|
CLIENT_LEVEL.setDimension()
|
||||||
val dimension = OBJENSIS.newInstance(it)
|
|
||||||
getField(DimensionType::class.java, "minimumY")?.set(dimension, 0)
|
|
||||||
getField(World::class.java, "dimensionEntry")?.let {
|
|
||||||
setFinalField(getField(World::class.java, "dimensionEntry")!!, CLIENT_LEVEL, getClass("net.minecraft.util.registry.RegistryEntry\$Direct")!!.getConstructor(Any::class.java).newInstance(dimension))
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
setFinalField(getField(World::class.java, "dimension")!!, CLIENT_LEVEL, dimension)
|
|
||||||
} catch (ignored: Throwable) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val networkHandler = OBJENSIS.newInstance(ClientPlayNetworkHandler::class.java)
|
val networkHandler = OBJENSIS.newInstance(ClientPlayNetworkHandler::class.java)
|
||||||
networkHandler.recipeManager = RecipeManager()
|
networkHandler.recipeManager = RecipeManager()
|
||||||
getField(ClientWorld::class.java, "networkHandler", "netHandler")!!.set(CLIENT_LEVEL, networkHandler)
|
getField(ClientWorld::class.java, "networkHandler", "netHandler")!!.set(CLIENT_LEVEL, networkHandler)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.bixilon.pixlyzer
|
package de.bixilon.pixlyzer
|
||||||
|
|
||||||
|
import de.bixilon.kutil.reflection.ReflectionUtil.forceInit
|
||||||
import de.bixilon.mbf.MBFBinaryWriter
|
import de.bixilon.mbf.MBFBinaryWriter
|
||||||
import de.bixilon.mbf.MBFCompressionTypes
|
import de.bixilon.mbf.MBFCompressionTypes
|
||||||
import de.bixilon.mbf.MBFData
|
import de.bixilon.mbf.MBFData
|
||||||
@ -76,6 +77,14 @@ object PixLyzer {
|
|||||||
println("Class loading done in ${System.currentTimeMillis() - classesLoadStartTime}ms")
|
println("Class loading done in ${System.currentTimeMillis() - classesLoadStartTime}ms")
|
||||||
|
|
||||||
|
|
||||||
|
val physics = getClass("de.bixilon.pixlyzer.physics.PhysicsExtractor")
|
||||||
|
if (physics == null) {
|
||||||
|
println("Physics module not found, ignoring")
|
||||||
|
} else {
|
||||||
|
physics.forceInit()
|
||||||
|
physics.getDeclaredMethod("start").invoke(null)
|
||||||
|
}
|
||||||
|
|
||||||
val all: MutableMap<String, Any> = mutableMapOf()
|
val all: MutableMap<String, Any> = mutableMapOf()
|
||||||
for (generator in Generators.GENERATORS) {
|
for (generator in Generators.GENERATORS) {
|
||||||
val startTime = System.currentTimeMillis()
|
val startTime = System.currentTimeMillis()
|
||||||
|
@ -42,6 +42,7 @@ LIBRARIES = [
|
|||||||
("com.fasterxml.jackson.core", "jackson-annotations", JACKSON_VERSION),
|
("com.fasterxml.jackson.core", "jackson-annotations", JACKSON_VERSION),
|
||||||
("com.github.luben", "zstd-jni", "1.5.2-3"),
|
("com.github.luben", "zstd-jni", "1.5.2-3"),
|
||||||
("de.bixilon", "mbf-kotlin", "0.2.1"),
|
("de.bixilon", "mbf-kotlin", "0.2.1"),
|
||||||
|
("de.bixilon", "kutil", "1.17.1"),
|
||||||
]
|
]
|
||||||
|
|
||||||
VERSION_MANIFEST_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
VERSION_MANIFEST_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user