fix build with newer yarn mappings

This commit is contained in:
Bixilon 2022-04-24 20:53:05 +02:00
parent 3b848ed2ab
commit d79c326307
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -30,7 +30,7 @@ object EntitySpawner {
private val POTION_ENTITY_ENTITY_CLASS = getClass("net.minecraft.entity.thrown.ThrownPotionEntity", "net.minecraft.entity.projectile.thrown.PotionEntity")!!
private val ATOMIC_RANDOM_CLASS = getClass("net.minecraft.world.gen.random.AtomicSimpleRandom")
private val ATOMIC_RANDOM_CLASS = getClass("net.minecraft.util.math.random.AtomicSimpleRandom", "net.minecraft.world.gen.random.AtomicSimpleRandom")
fun summonEntity(entityType: EntityType<*>): Entity {
when (entityType) {
@ -81,12 +81,6 @@ object EntitySpawner {
null
}
private val LEGACY_ENTITY_CREATE_METHOD = try {
getClass("net.minecraft.entity.EntityType\$EntityFactory")?.getDeclaredMethod("create", EntityType::class.java, World::class.java)
} catch (exception: Exception) {
null
}
var OBJENSIS: Objenesis = ObjenesisStd()
val CLIENT_LEVEL = OBJENSIS.newInstance(levelClass) as ClientWorld