Update references after merge
This commit is contained in:
parent
5b463e8adb
commit
74d48a7dc3
@ -29,20 +29,20 @@ import ru.dbotthepony.mc.otm.util.math.Decimal
|
||||
import ru.dbotthepony.mc.otm.data.world.BooleanProvider
|
||||
import ru.dbotthepony.mc.otm.data.world.OneOfFloatProvider
|
||||
import ru.dbotthepony.mc.otm.registry.MRegistries
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.StandardDeviationHeightProvider
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.StandardDeviationHeightProvider
|
||||
import ru.dbotthepony.mc.otm.registry.game.MBlocks
|
||||
import ru.dbotthepony.mc.otm.registry.data.MWorldGenFeatures
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.BlackHolePlacerFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EllipsoidPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedChainPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedCountPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedSplitPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.WormPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.wrap
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EllipsoidPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedChainPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedCountPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedSplitPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.WormPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.wrap
|
||||
|
||||
private object ConfiguredFeatures {
|
||||
val TRITANIUM_ORE = key("tritanium_ore")
|
||||
|
@ -94,8 +94,8 @@ import ru.dbotthepony.mc.otm.registry.data.MWorldGenFeatures
|
||||
import ru.dbotthepony.mc.otm.server.MCommands
|
||||
import ru.dbotthepony.mc.otm.storage.StorageStack
|
||||
import ru.dbotthepony.mc.otm.server.triggers.KillAsAndroidTrigger
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
import thedarkcolour.kotlinforforge.neoforge.forge.DIST
|
||||
import thedarkcolour.kotlinforforge.neoforge.forge.FORGE_BUS
|
||||
import thedarkcolour.kotlinforforge.neoforge.forge.LOADING_CONTEXT
|
||||
|
@ -14,8 +14,8 @@ import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType
|
||||
import ru.dbotthepony.mc.otm.player.android.AndroidResearchDescription
|
||||
import ru.dbotthepony.mc.otm.player.android.AndroidResearchResult
|
||||
import ru.dbotthepony.mc.otm.storage.StorageStack
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
|
||||
object MRegistries {
|
||||
private fun <T> k(name: String): ResourceKey<Registry<T>> {
|
||||
|
@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.registry.data
|
||||
import net.minecraft.core.registries.BuiltInRegistries
|
||||
import net.minecraft.world.level.levelgen.heightproviders.HeightProviderType
|
||||
import net.neoforged.bus.api.IEventBus
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.StandardDeviationHeightProvider
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.StandardDeviationHeightProvider
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
|
||||
object MHeightProviders {
|
||||
|
@ -5,14 +5,14 @@ import net.minecraft.world.level.levelgen.placement.PlacementModifierType
|
||||
import net.neoforged.bus.api.IEventBus
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
import ru.dbotthepony.mc.otm.registry.MRegistries
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.ChainPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EllipsoidPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedChainPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedCountPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedSplitPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.SplitPlacement
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.WormPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.ChainPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EllipsoidPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedChainPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedCountPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedSplitPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.SplitPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.WormPlacement
|
||||
|
||||
object MPlacementModifiers {
|
||||
private val registry = MDeferredRegister(BuiltInRegistries.PLACEMENT_MODIFIER_TYPE)
|
||||
|
@ -4,9 +4,9 @@ import net.minecraft.core.registries.BuiltInRegistries
|
||||
import net.neoforged.bus.api.IEventBus
|
||||
import ru.dbotthepony.kommons.util.getValue
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.BlackHolePlacerFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.DebugPlacerFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.DebugPlacerFeature
|
||||
|
||||
object MWorldGenFeatures {
|
||||
private val registry = MDeferredRegister(BuiltInRegistries.FEATURE)
|
||||
|
@ -27,7 +27,7 @@ class HurtTrigger(id: ResourceLocation) : MCriterionTrigger<HurtTrigger.Instance
|
||||
ContextAwarePredicate.CODEC.optionalFieldOf("predicate").forGetter(Instance::predicate),
|
||||
DamagePredicateCodec.optionalFieldOf("damagePredicate").forGetter(Instance::damagePredicate),
|
||||
ContextAwarePredicate.CODEC.optionalFieldOf("player").forGetter(Instance::playerPredicate)
|
||||
).apply(it, HurtTrigger::Instance)
|
||||
).apply(it, ::Instance)
|
||||
}
|
||||
|
||||
inner class Instance(
|
||||
|
@ -19,7 +19,7 @@ class ItemTrigger(id: ResourceLocation) : MCriterionTrigger<ItemTrigger.Instance
|
||||
ItemPredicate.CODEC.fieldOf("predicate").forGetter(Instance::predicate),
|
||||
Codec.BOOL.optionalFieldOf("invert", false).forGetter(Instance::invert),
|
||||
ContextAwarePredicate.CODEC.optionalFieldOf("player").forGetter(Instance::playerPredicate)
|
||||
).apply(it, ItemTrigger::Instance)
|
||||
).apply(it, ::Instance)
|
||||
}
|
||||
|
||||
inner class Instance(val predicate: ItemPredicate, val invert: Boolean = false, player: Optional<ContextAwarePredicate> = Optional.empty()) : AbstractInstance(player)
|
||||
|
@ -11,7 +11,7 @@ class SingletonTrigger(id: ResourceLocation) : MCriterionTrigger<SingletonTrigge
|
||||
override val codec: Codec<Instance> = RecordCodecBuilder.create {
|
||||
it.group(
|
||||
ContextAwarePredicate.CODEC.optionalFieldOf("player").forGetter(Instance::playerPredicate)
|
||||
).apply(it, SingletonTrigger::Instance)
|
||||
).apply(it, ::Instance)
|
||||
}
|
||||
|
||||
val empty = Instance()
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen
|
||||
package ru.dbotthepony.mc.otm.server.world
|
||||
|
||||
import com.github.benmanes.caffeine.cache.Cache
|
||||
import com.github.benmanes.caffeine.cache.Caffeine
|
||||
@ -25,8 +25,8 @@ import ru.dbotthepony.mc.otm.THREAD_LOCAL_RANDOM
|
||||
import ru.dbotthepony.mc.otm.data.codec.minRange
|
||||
import ru.dbotthepony.mc.otm.util.GJRAND64RandomSource
|
||||
import ru.dbotthepony.mc.otm.util.shuffle
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
import java.io.DataOutputStream
|
||||
import java.time.Duration
|
||||
import java.util.*
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen
|
||||
package ru.dbotthepony.mc.otm.server.world
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.util.RandomSource
|
||||
@ -8,7 +8,7 @@ import net.minecraft.world.level.chunk.ChunkGenerator
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration
|
||||
import net.minecraft.world.level.levelgen.placement.PlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import java.util.*
|
||||
|
||||
class EnhancedPlacementContext {
|
||||
|
@ -1,12 +1,12 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen
|
||||
package ru.dbotthepony.mc.otm.server.world
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Holder
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature
|
||||
import net.minecraft.world.level.levelgen.placement.PlacementModifier
|
||||
import ru.dbotthepony.mc.otm.util.collect.Vec3iHashStrategy
|
||||
import ru.dbotthepony.mc.otm.worldgen.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.feature.EnhancedFeature
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
|
||||
fun PlacementModifier.wrap(): EnhancedPlacement {
|
||||
return EnhancedPlacement.Wrapper(this)
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen
|
||||
package ru.dbotthepony.mc.otm.server.world
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen
|
||||
package ru.dbotthepony.mc.otm.server.world
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectAVLTreeMap
|
||||
import ru.dbotthepony.kommons.util.KOptional
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.feature
|
||||
package ru.dbotthepony.mc.otm.server.world.feature
|
||||
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.feature
|
||||
package ru.dbotthepony.mc.otm.server.world.feature
|
||||
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
@ -11,9 +11,9 @@ import net.neoforged.neoforge.registries.DataPackRegistryEvent
|
||||
import ru.dbotthepony.mc.otm.registry.MBuiltInRegistries
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
import ru.dbotthepony.mc.otm.registry.MRegistries
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.worldgen.placement.EnhancedPlacement
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.placement.EnhancedPlacement
|
||||
|
||||
abstract class EnhancedFeature<FC>(codec: Codec<FC>) {
|
||||
abstract fun place(context: EnhancedPlacementContext, config: FC, positions: Set<PlacementPos>, allPositions: Set<PlacementPos>): Boolean
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.google.common.collect.ImmutableList
|
||||
import com.mojang.serialization.Codec
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
@ -20,8 +20,8 @@ import ru.dbotthepony.mc.otm.util.math.Vector
|
||||
import ru.dbotthepony.mc.otm.util.math.rotate
|
||||
import ru.dbotthepony.mc.otm.util.math.rotateAroundThis
|
||||
import ru.dbotthepony.mc.otm.util.nextDouble
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
import java.util.*
|
||||
import java.util.stream.Stream
|
||||
import kotlin.math.PI
|
||||
|
@ -1,10 +1,10 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.google.common.collect.ImmutableList
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
|
||||
/**
|
||||
* Chains placements, feeding results from one placement into next
|
||||
|
@ -1,9 +1,9 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.mojang.serialization.MapCodec
|
||||
import net.minecraft.util.valueproviders.IntProvider
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
|
||||
class EnhancedCountPlacement(val provider: IntProvider) : EnhancedPlacement {
|
||||
override fun evaluate(context: EnhancedPlacementContext, positions: List<PlacementPos>): List<PlacementPos> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
@ -7,8 +7,8 @@ import net.neoforged.bus.api.IEventBus
|
||||
import ru.dbotthepony.mc.otm.registry.MBuiltInRegistries
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
import ru.dbotthepony.mc.otm.registry.MRegistries
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
import java.util.stream.Collectors
|
||||
|
||||
interface EnhancedPlacement {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.google.common.collect.ImmutableList
|
||||
import com.mojang.serialization.Codec
|
||||
@ -6,8 +6,8 @@ import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.util.StringRepresentable
|
||||
import net.minecraft.world.level.levelgen.placement.PlacementModifier
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
|
||||
/**
|
||||
* Or "shard" placement, if you will.
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.google.common.collect.ImmutableList
|
||||
import com.mojang.serialization.Codec
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.worldgen.placement
|
||||
package ru.dbotthepony.mc.otm.server.world.placement
|
||||
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
@ -22,8 +22,8 @@ import ru.dbotthepony.mc.otm.util.math.normalizeAngle
|
||||
import ru.dbotthepony.mc.otm.util.math.plus
|
||||
import ru.dbotthepony.mc.otm.util.math.toBlockPos
|
||||
import ru.dbotthepony.mc.otm.util.nextDouble
|
||||
import ru.dbotthepony.mc.otm.worldgen.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.worldgen.PlacementPos
|
||||
import ru.dbotthepony.mc.otm.server.world.EnhancedPlacementContext
|
||||
import ru.dbotthepony.mc.otm.server.world.PlacementPos
|
||||
import java.util.stream.Stream
|
||||
import kotlin.math.PI
|
||||
import kotlin.math.absoluteValue
|
||||
|
Loading…
Reference in New Issue
Block a user