From c4692bdec4579eaba0e29d07fec86b6cee6f1e73 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 14 Jan 2023 15:02:56 +0700 Subject: [PATCH] Sort core package --- .../dbotthepony/mc/otm/datagen/MatterData.kt | 2 +- .../otm/datagen/models/MatteryModelBuilder.kt | 1 + .../recipes/PlatePressFinishedRecipe.kt | 1 + .../mc/otm/OverdriveThatMatters.java | 4 +- .../ru/dbotthepony/mc/otm/ServerConfig.kt | 4 +- .../ru/dbotthepony/mc/otm/SystemTime.kt | 2 +- .../mc/otm/android/AndroidFeature.kt | 2 +- .../mc/otm/android/AndroidResearch.kt | 4 +- .../mc/otm/android/AndroidResearchType.kt | 3 +- .../otm/android/AndroidSwitchableFeature.kt | 2 +- .../android/feature/EnderTeleporterFeature.kt | 22 +- .../otm/android/feature/ItemMagnetFeature.kt | 10 +- .../otm/android/feature/JumpBoostFeature.kt | 6 +- .../android/feature/NanobotsArmorFeature.kt | 4 +- .../feature/NanobotsRegenerationFeature.kt | 2 +- .../otm/android/feature/ShockwaveFeature.kt | 14 +- .../mc/otm/block/ChemicalGeneratorBlock.kt | 2 +- .../otm/block/GravitationStabilizerBlock.kt | 4 +- .../mc/otm/block/LaboratoryLamp.kt | 6 +- .../dbotthepony/mc/otm/block/MatteryBlock.kt | 6 +- .../mc/otm/block/PhantomAttractorBlock.kt | 5 +- .../block/entity/AndroidStationBlockEntity.kt | 6 +- .../block/entity/BatteryBankBlockEntity.kt | 6 +- .../otm/block/entity/CargoCrateBlockEntity.kt | 4 +- .../entity/ChemicalGeneratorBlockEntity.kt | 11 +- .../block/entity/EnergyCounterBlockEntity.kt | 7 + .../block/entity/EnergyServoBlockEntity.kt | 6 +- .../GravitationStabilizerBlockEntity.kt | 4 +- .../mc/otm/block/entity/MatteryBlockEntity.kt | 13 +- .../block/entity/MatteryPoweredBlockEntity.kt | 9 +- .../block/entity/MatteryWorkerBlockEntity.kt | 9 +- .../otm/block/entity/PlatePressBlockEntity.kt | 6 +- .../entity/blackhole/BlackHoleBlockEntity.kt | 11 +- .../blackhole/ExplosionDebuggerBlockEntity.kt | 4 +- .../otm/block/entity/blackhole/Explosions.kt | 10 +- .../entity/matter/MatterBottlerBlockEntity.kt | 5 + .../matter/MatterCapacitorBankBlockEntity.kt | 12 +- .../matter/MatterDecomposerBlockEntity.kt | 7 + .../matter/MatterRecyclerBlockEntity.kt | 13 +- .../matter/MatterReplicatorBlockEntity.kt | 7 + .../entity/matter/MatterScannerBlockEntity.kt | 8 +- .../matter/PatternStorageBlockEntity.kt | 6 +- .../entity/storage/DriveRackBlockEntity.kt | 4 +- .../entity/storage/DriveViewerBlockEntity.kt | 4 +- .../entity/storage/ItemMonitorBlockEntity.kt | 4 +- .../entity/storage/StorageBusBlockEntity.kt | 6 + .../block/entity/storage/StorageInterfaces.kt | 6 + .../StoragePowerSupplierBlockEntity.kt | 6 +- .../mc/otm/block/storage/StorageBusBlock.kt | 2 +- .../mc/otm/block/storage/StorageInterfaces.kt | 2 +- .../ru/dbotthepony/mc/otm/capability/Ext.kt | 9 +- .../otm/capability/MatteryPlayerCapability.kt | 9 + .../capability/drive/AbstractMatteryDrive.kt | 8 +- .../otm/capability/drive/ItemMatteryDrive.kt | 7 +- .../capability/energy/AndroidPowerSource.kt | 8 +- .../energy/BlockEnergyStorageImpl.kt | 10 +- .../capability/energy/IEnergyStorageImpl.kt | 5 +- .../energy/IMatteryEnergyStorage.kt | 4 +- .../energy/ItemEnergyStorageImpl.kt | 6 +- .../otm/capability/matter/IMatterStorage.kt | 4 +- .../otm/capability/matter/IPatternStorage.kt | 3 +- .../capability/matter/MatterStorageImpl.kt | 4 +- .../mc/otm/capability/matter/PatternState.kt | 2 + .../otm/capability/matter/ReplicationTask.kt | 2 +- .../mc/otm/client/AndroidAbilityKeyMapping.kt | 3 +- .../mc/otm/client/AndroidMenuKeyMapping.kt | 9 +- .../mc/otm/client/ClientEventHandler.kt | 2 +- .../dbotthepony/mc/otm/client/MatteryGUI.kt | 4 +- .../client/render/AbstractMatterySprite.kt | 4 +- .../dbotthepony/mc/otm/client/render/Ext.kt | 9 +- .../mc/otm/client/render/GlitchRenderer.kt | 2 +- .../mc/otm/client/render/RenderHelper.kt | 2 +- .../mc/otm/client/render/ShockwaveRenderer.kt | 12 +- .../mc/otm/client/render/SpriteType.kt | 1 + .../client/render/blockentity/BankRenderer.kt | 2 +- .../render/blockentity/BlackHoleRenderer.kt | 12 +- .../blockentity/EnergyCounterRenderer.kt | 9 +- .../GravitationStabilizerRenderer.kt | 12 +- .../blockentity/MatterReplicatorRenderer.kt | 10 +- .../render/entity/PlasmaProjectileRenderer.kt | 3 +- .../otm/client/screen/AndroidStationScreen.kt | 3 +- .../mc/otm/client/screen/DriveViewerScreen.kt | 2 +- .../otm/client/screen/EnergyCounterScreen.kt | 2 +- .../client/screen/ExoPackInventoryScreen.kt | 2 +- .../mc/otm/client/screen/ItemMonitorScreen.kt | 6 +- .../mc/otm/client/screen/MatterPanelScreen.kt | 2 +- .../mc/otm/client/screen/MatteryScreen.kt | 3 +- .../screen/StoragePowerSupplierScreen.kt | 2 +- .../client/screen/panels/AbstractSlotPanel.kt | 2 +- .../screen/panels/AnalogScrollBarPanel.kt | 2 +- .../client/screen/panels/EffectListPanel.kt | 6 +- .../mc/otm/client/screen/panels/Label.kt | 4 +- .../screen/panels/buttons/ButtonPanel.kt | 2 +- .../client/screen/widget/MatterGaugePanel.kt | 2 +- .../client/screen/widget/PowerGaugePanel.kt | 2 +- .../mc/otm/compat/cos/CosmeticArmorCompat.kt | 2 +- .../mc/otm/compat/curios/CuriosCompat.kt | 2 +- .../compat/jei/PlatePressRecipeCategory.kt | 2 +- .../mc/otm/compat/mekanism/Conversions.kt | 2 +- .../mc/otm/compat/mekanism/Power.kt | 2 +- .../dbotthepony/mc/otm/compat/mekanism/QIO.kt | 2 +- .../mc/otm/container/ContainerIterator.kt | 4 +- .../mc/otm/container/ContainerSpliterator.kt | 4 +- .../ru/dbotthepony/mc/otm/container/Ext.kt | 4 +- .../mc/otm/container/ItemFilter.kt | 5 +- .../otm/container/ItemHandlerSpliterator.kt | 4 +- .../mc/otm/container/MatteryContainer.kt | 4 +- .../kotlin/ru/dbotthepony/mc/otm/core/Ext.kt | 147 +------ .../ru/dbotthepony/mc/otm/core/LevelExt.kt | 2 + .../otm/core/{ => collect}/AwareItemStack.kt | 3 +- .../core/{ => collect}/CapabilityIterators.kt | 3 +- .../otm/core/{ => collect}/ConditionalSet.kt | 2 +- .../{ => collect}/ConditionalSupplierSet.kt | 2 +- .../core/{ => collect}/ItemStackIterators.kt | 2 +- .../mc/otm/core/{ => collect}/ListSet.kt | 4 +- .../core/{ => collect}/PredicateIterator.kt | 2 +- .../mc/otm/core/{ => collect}/ProxiedMap.kt | 2 +- .../mc/otm/core/{ => collect}/SlotIterator.kt | 2 +- .../mc/otm/core/{ => collect}/SupplierList.kt | 2 +- .../mc/otm/core/{ => collect}/SupplierMap.kt | 2 +- .../core/{ => collect}/UUIDIntModifiersMap.kt | 3 +- .../mc/otm/core/{ => math}/Decimal.kt | 6 +- .../mc/otm/core/{ => math}/EuclidMath.kt | 9 +- .../mc/otm/core/{ => math}/Math.kt | 2 +- .../mc/otm/core/{ => math}/MatrixExt.kt | 9 +- .../dbotthepony/mc/otm/core/math/NumberExt.kt | 147 +++++++ .../mc/otm/core/{ => math}/RGBAColor.kt | 2 +- .../core/{ => nbt}/CompoundTagDelegates.kt | 3 +- .../mc/otm/core/{ => nbt}/CompoundTagExt.kt | 2 +- .../mc/otm/core/{ => util}/DataStreams.kt | 4 +- .../mc/otm/core/{ => util}/FriendlyStreams.kt | 2 +- .../core/{Formatting.kt => util/SiPrefix.kt} | 13 +- .../dbotthepony/mc/otm/data/ItemStackCodec.kt | 1 + .../mc/otm/data/SerializedFunctionRegistry.kt | 10 +- .../mc/otm/data/condition/ChanceCondition.kt | 1 + .../condition/ChanceWithPlaytimeCondition.kt | 1 + .../condition/ItemInInventoryCondition.kt | 1 + .../mc/otm/data/loot/RandomizerFunction.kt | 1 + .../mc/otm/entity/PlasmaProjectile.kt | 1 - .../mc/otm/graph/Abstract6Graph.kt | 2 +- .../mc/otm/graph/matter/MatterNetworkGraph.kt | 2 +- .../ru/dbotthepony/mc/otm/item/BatteryItem.kt | 4 +- .../mc/otm/item/EnergySwordItem.kt | 6 +- .../mc/otm/item/MatterCapacitorItem.kt | 10 +- .../dbotthepony/mc/otm/item/MatterDustItem.kt | 5 +- .../mc/otm/item/PatternStorageItem.kt | 4 +- .../otm/item/PortableCondensationDriveItem.kt | 5 +- .../item/ProceduralExoPackSlotUpgradeItem.kt | 2 +- .../mc/otm/item/QuantumBatteryItem.kt | 11 +- .../mc/otm/item/SingleUseBatteryItem.kt | 1 + .../mc/otm/item/weapon/AbstractWeaponItem.kt | 23 +- .../mc/otm/item/weapon/PlasmaRifleItem.kt | 5 +- .../mc/otm/item/weapon/PlasmaWeaponItem.kt | 6 + .../mc/otm/item/weapon/VelocityCalculation.kt | 4 +- .../mc/otm/matter/AbstractRegistryAction.kt | 3 +- .../mc/otm/matter/BlacklistAction.kt | 1 + .../mc/otm/matter/BoundMatterFunction.kt | 3 +- .../mc/otm/matter/ComputeAction.kt | 3 +- .../dbotthepony/mc/otm/matter/DeleteAction.kt | 1 + .../dbotthepony/mc/otm/matter/IMatterValue.kt | 6 +- .../dbotthepony/mc/otm/matter/InsertAction.kt | 3 +- .../mc/otm/matter/MatterDataProvider.kt | 388 ++++++++++++------ .../mc/otm/matter/MatterFunction.kt | 6 +- .../mc/otm/matter/MatterManager.kt | 12 +- .../dbotthepony/mc/otm/matter/UpdateAction.kt | 3 +- .../mc/otm/menu/EnergyCounterMenu.kt | 2 +- .../mc/otm/menu/ItemMonitorMenu.kt | 2 +- .../mc/otm/menu/MatterCapacitorBankMenu.kt | 2 +- .../mc/otm/menu/MatterScannerMenu.kt | 2 +- .../mc/otm/menu/PatternStorageMenu.kt | 2 +- .../mc/otm/menu/widget/LevelGaugeWidget.kt | 8 +- .../mc/otm/network/FieldSynchronizer.kt | 19 + .../network/MatteryPlayerNetworkChannel.kt | 2 +- .../ru/dbotthepony/mc/otm/recipe/Helpers.kt | 1 + .../ru/dbotthepony/mc/otm/registry/Ext.kt | 2 +- .../ru/dbotthepony/mc/otm/registry/MItems.kt | 2 +- .../dbotthepony/mc/otm/registry/MRegistry.kt | 2 +- .../objects/ColoredDecorativeBlock.kt | 3 +- .../otm/registry/objects/DecorativeBlock.kt | 4 +- .../objects/StripedColoredDecorativeBlock.kt | 5 +- .../mc/otm/saveddata/SavedCountingMap.kt | 4 +- .../mc/otm/storage/ItemStackWrapper.kt | 2 + .../ru/dbotthepony/mc/otm/storage/Registry.kt | 2 +- .../mc/otm/storage/VirtualComponent.kt | 5 +- .../mc/otm/triggers/AndroidBatteryTrigger.kt | 1 + .../mc/otm/triggers/AndroidResearchTrigger.kt | 1 + .../mc/otm/triggers/NanobotsArmorTrigger.kt | 1 + .../otm/triggers/ShockwaveDamageMobTrigger.kt | 2 +- .../dbotthepony/mc/otm/tests/DecimalTests.kt | 2 +- .../mc/otm/tests/FormattingTests.kt | 6 +- .../mc/otm/tests/FriendlyStreams.kt | 14 +- .../ru/dbotthepony/mc/otm/tests/MathTests.kt | 4 +- 192 files changed, 940 insertions(+), 634 deletions(-) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/AwareItemStack.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/CapabilityIterators.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/ConditionalSet.kt (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/ConditionalSupplierSet.kt (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/ItemStackIterators.kt (83%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/ListSet.kt (96%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/PredicateIterator.kt (97%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/ProxiedMap.kt (99%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/SlotIterator.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/SupplierList.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/SupplierMap.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => collect}/UUIDIntModifiersMap.kt (95%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => math}/Decimal.kt (98%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => math}/EuclidMath.kt (98%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => math}/Math.kt (97%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => math}/MatrixExt.kt (86%) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/core/math/NumberExt.kt rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => math}/RGBAColor.kt (99%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => nbt}/CompoundTagDelegates.kt (97%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => nbt}/CompoundTagExt.kt (99%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => util}/DataStreams.kt (98%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{ => util}/FriendlyStreams.kt (98%) rename src/main/kotlin/ru/dbotthepony/mc/otm/core/{Formatting.kt => util/SiPrefix.kt} (95%) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/MatterData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/MatterData.kt index f02e26d98..d441ceef3 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/MatterData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/MatterData.kt @@ -4,7 +4,7 @@ import net.minecraft.tags.ItemTags import net.minecraft.world.item.Item import net.minecraft.world.item.Items import net.minecraftforge.common.Tags -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.matter.MatterDataProvider import ru.dbotthepony.mc.otm.registry.MItemTags import ru.dbotthepony.mc.otm.registry.MItems diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelBuilder.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelBuilder.kt index 9c69f35ba..e1b04a422 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelBuilder.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelBuilder.kt @@ -10,6 +10,7 @@ import net.minecraftforge.client.model.generators.ModelBuilder import net.minecraftforge.common.data.ExistingFileHelper import org.joml.Vector3f import ru.dbotthepony.mc.otm.container.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set data class TextureSize(val width: Float, val height: Float) { diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/PlatePressFinishedRecipe.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/PlatePressFinishedRecipe.kt index 948b8ac53..996211d7f 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/PlatePressFinishedRecipe.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/PlatePressFinishedRecipe.kt @@ -8,6 +8,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer import ru.dbotthepony.mc.otm.recipe.PlatePressRecipe import ru.dbotthepony.mc.otm.recipe.PlatePressRecipeFactory import ru.dbotthepony.mc.otm.container.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set class PlatePressFinishedRecipe(private val recipe: PlatePressRecipe) : FinishedRecipe { diff --git a/src/main/java/ru/dbotthepony/mc/otm/OverdriveThatMatters.java b/src/main/java/ru/dbotthepony/mc/otm/OverdriveThatMatters.java index 46e9e034f..9fc842ee9 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/OverdriveThatMatters.java +++ b/src/main/java/ru/dbotthepony/mc/otm/OverdriveThatMatters.java @@ -4,8 +4,6 @@ import kotlin.KotlinVersion; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; -import net.minecraft.world.item.CreativeModeTab; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.eventbus.api.EventPriority; @@ -35,7 +33,7 @@ import ru.dbotthepony.mc.otm.client.model.TritaniumArmorModel; import ru.dbotthepony.mc.otm.client.render.ShockwaveRenderer; import ru.dbotthepony.mc.otm.compat.mekanism.QIOKt; import ru.dbotthepony.mc.otm.compat.mekanism.TooltipsKt; -import ru.dbotthepony.mc.otm.core.Decimal; +import ru.dbotthepony.mc.otm.core.math.Decimal; import ru.dbotthepony.mc.otm.item.ItemTritaniumArmor; import ru.dbotthepony.mc.otm.item.QuantumBatteryItem; import ru.dbotthepony.mc.otm.item.weapon.AbstractWeaponItem; diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/ServerConfig.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/ServerConfig.kt index 38d82e1ab..b7be90abd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/ServerConfig.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/ServerConfig.kt @@ -11,8 +11,8 @@ import ru.dbotthepony.mc.otm.block.entity.matter.MatterRecyclerBlockEntity import ru.dbotthepony.mc.otm.block.entity.matter.MatterReplicatorBlockEntity import ru.dbotthepony.mc.otm.block.entity.matter.MatterScannerBlockEntity import ru.dbotthepony.mc.otm.capability.energy.BlockEnergyStorageImpl -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.defineDecimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.defineDecimal import ru.dbotthepony.mc.otm.item.EnergySwordItem import ru.dbotthepony.mc.otm.registry.MNames diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/SystemTime.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/SystemTime.kt index bd8a5b7ee..2f831c00b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/SystemTime.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/SystemTime.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.mc.otm import net.minecraft.util.TimeSource -import ru.dbotthepony.mc.otm.core.formatTickDuration +import ru.dbotthepony.mc.otm.core.util.formatTickDuration import java.util.function.LongSupplier /** diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt index 663e21ba5..51010446e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt @@ -5,7 +5,7 @@ import net.minecraft.nbt.CompoundTag import net.minecraftforge.common.util.INBTSerializable import net.minecraftforge.event.entity.living.LivingHurtEvent import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.network.FieldSynchronizer import java.io.InputStream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt index 20466b6a5..03553c2d2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt @@ -16,9 +16,9 @@ import ru.dbotthepony.mc.otm.capability.awareItemsStream import ru.dbotthepony.mc.otm.core.TextComponent import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.addAll -import ru.dbotthepony.mc.otm.core.getCompoundList +import ru.dbotthepony.mc.otm.core.nbt.getCompoundList import ru.dbotthepony.mc.otm.core.registryName -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.milliTime import ru.dbotthepony.mc.otm.network.FieldSynchronizer import ru.dbotthepony.mc.otm.registry.MRegistry diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt index 7d400ffb5..3dd3c0c58 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt @@ -23,10 +23,11 @@ import net.minecraft.world.level.ItemLike import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite import ru.dbotthepony.mc.otm.client.render.SpriteType -import ru.dbotthepony.mc.otm.core.ListSet +import ru.dbotthepony.mc.otm.core.collect.ListSet import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.isActuallyEmpty import ru.dbotthepony.mc.otm.core.registryName +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.core.toImmutableList import ru.dbotthepony.mc.otm.data.stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt index 10611e63c..2fa707c29 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.android import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.nbt.CompoundTag import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set abstract class AndroidSwitchableFeature(type: AndroidFeatureType<*>, android: MatteryPlayerCapability) : AndroidFeature(type, android) { var isActive by synchronizer.bool(setter = setter@{ value, access, setByRemote -> diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt index 546170a85..c2d188d86 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt @@ -36,19 +36,19 @@ import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource import ru.dbotthepony.mc.otm.client.render.ResearchIcons import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.render.linesIgnoreZRenderType -import ru.dbotthepony.mc.otm.core.Vector -import ru.dbotthepony.mc.otm.core.asVector -import ru.dbotthepony.mc.otm.core.component1 -import ru.dbotthepony.mc.otm.core.component2 -import ru.dbotthepony.mc.otm.core.component3 -import ru.dbotthepony.mc.otm.core.formatPower +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.asVector +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.core.genericPositions import ru.dbotthepony.mc.otm.core.holder -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.rotateXDegrees -import ru.dbotthepony.mc.otm.core.rotateYDegrees -import ru.dbotthepony.mc.otm.core.shortestDistanceBetween -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.rotateXDegrees +import ru.dbotthepony.mc.otm.core.math.rotateYDegrees +import ru.dbotthepony.mc.otm.core.math.shortestDistanceBetween +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.milliTime import ru.dbotthepony.mc.otm.registry.AndroidFeatures import ru.dbotthepony.mc.otm.registry.MNames diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt index af0d7921f..50ad23633 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt @@ -16,13 +16,13 @@ import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.ResearchIcons -import ru.dbotthepony.mc.otm.core.Vector -import ru.dbotthepony.mc.otm.core.formatPower +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.core.getEntitiesInEllipsoid -import ru.dbotthepony.mc.otm.core.minus -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.minus +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.core.position -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.network.WorldNetworkChannel import ru.dbotthepony.mc.otm.network.packetHandled diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt index b057ebfda..b45f18fbe 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt @@ -17,9 +17,9 @@ import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.ResearchIcons -import ru.dbotthepony.mc.otm.core.Vector -import ru.dbotthepony.mc.otm.core.formatPower -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.util.formatPower +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import ru.dbotthepony.mc.otm.network.enqueueWork diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt index 364b7912b..4ecedb8c3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt @@ -9,10 +9,10 @@ import ru.dbotthepony.mc.otm.android.AndroidFeature import ru.dbotthepony.mc.otm.android.AndroidResearchManager import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.registry.AndroidFeatures import ru.dbotthepony.mc.otm.registry.StatNames -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.onceServer import ru.dbotthepony.mc.otm.triggers.NanobotsArmorTrigger import kotlin.math.roundToInt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt index cfb8d3545..7af4d40aa 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.android.AndroidFeature import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.registry.AndroidFeatures import ru.dbotthepony.mc.otm.registry.StatNames -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import kotlin.math.roundToInt class NanobotsRegenerationFeature(android: MatteryPlayerCapability) : AndroidFeature(AndroidFeatures.NANOBOTS_REGENERATION, android) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt index 5e6431028..214c7f7ab 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt @@ -19,16 +19,16 @@ import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.render.ResearchIcons -import ru.dbotthepony.mc.otm.core.Vector -import ru.dbotthepony.mc.otm.core.formatPower -import ru.dbotthepony.mc.otm.core.getEllipsoidBlockPositions +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.util.formatPower +import ru.dbotthepony.mc.otm.core.math.getEllipsoidBlockPositions import ru.dbotthepony.mc.otm.core.getEntitiesInEllipsoid import ru.dbotthepony.mc.otm.core.getExplosionResistance -import ru.dbotthepony.mc.otm.core.minus -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.minus +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.core.position -import ru.dbotthepony.mc.otm.core.roundToIntVector -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.roundToIntVector +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.network.MatteryPacket diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/ChemicalGeneratorBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/ChemicalGeneratorBlock.kt index 8adae472c..b9cbe031f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/ChemicalGeneratorBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/ChemicalGeneratorBlock.kt @@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.capability.energy.GeneratorEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.ItemEnergyStorageImpl import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.map +import ru.dbotthepony.mc.otm.core.nbt.map import ru.dbotthepony.mc.otm.oncePre import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.shapes.BlockShapes diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/GravitationStabilizerBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/GravitationStabilizerBlock.kt index 09fa3929d..ca8d0ce25 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/GravitationStabilizerBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/GravitationStabilizerBlock.kt @@ -25,8 +25,8 @@ import net.minecraft.world.phys.shapes.VoxelShape import ru.dbotthepony.mc.otm.block.entity.GravitationStabilizerBlockEntity import ru.dbotthepony.mc.otm.block.entity.blackhole.BlackHoleBlockEntity import ru.dbotthepony.mc.otm.block.entity.WorkerState -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.oncePre import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MBlocks diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt index 63e4ad9ee..a3ec37fbd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt @@ -23,9 +23,9 @@ import net.minecraft.world.phys.shapes.VoxelShape import ru.dbotthepony.mc.otm.ServerConfig import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.get -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.times -import ru.dbotthepony.mc.otm.core.unaryMinus +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.times +import ru.dbotthepony.mc.otm.core.math.unaryMinus import ru.dbotthepony.mc.otm.once import ru.dbotthepony.mc.otm.registry.MBlocks diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/MatteryBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/MatteryBlock.kt index 6d1a6700c..578fa6590 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/MatteryBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/MatteryBlock.kt @@ -25,9 +25,9 @@ import net.minecraft.world.level.material.MaterialColor import net.minecraft.world.phys.BlockHitResult import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity import ru.dbotthepony.mc.otm.block.entity.WorkerState -import ru.dbotthepony.mc.otm.core.component1 -import ru.dbotthepony.mc.otm.core.component2 -import ru.dbotthepony.mc.otm.core.component3 +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 import ru.dbotthepony.mc.otm.core.get interface IDroppableContainer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/PhantomAttractorBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/PhantomAttractorBlock.kt index a85210898..65ac7a89a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/PhantomAttractorBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/PhantomAttractorBlock.kt @@ -12,7 +12,6 @@ import net.minecraft.world.item.ItemStack import net.minecraft.world.item.context.BlockPlaceContext import net.minecraft.world.level.BlockGetter import net.minecraft.world.level.Level -import net.minecraft.world.level.LevelReader import net.minecraft.world.level.NaturalSpawner import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.Blocks @@ -27,8 +26,8 @@ import net.minecraft.world.phys.shapes.CollisionContext import net.minecraft.world.phys.shapes.VoxelShape import net.minecraftforge.common.ForgeHooks import ru.dbotthepony.mc.otm.core.get -import ru.dbotthepony.mc.otm.core.minus -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.minus +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.once import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.shapes.BlockShapes diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/AndroidStationBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/AndroidStationBlockEntity.kt index 5d0babbf2..d59942492 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/AndroidStationBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/AndroidStationBlockEntity.kt @@ -13,9 +13,9 @@ import net.minecraft.world.phys.AABB import net.minecraftforge.common.ForgeConfigSpec import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.DecimalConfigValue -import ru.dbotthepony.mc.otm.core.defineDecimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.menu.AndroidStationMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt index c3092159c..33924d262 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/BatteryBankBlockEntity.kt @@ -28,6 +28,9 @@ import ru.dbotthepony.mc.otm.compat.mekanism.Mattery2MekanismEnergyWrapper import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.unaryMinus +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.menu.BatteryBankMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities @@ -177,7 +180,8 @@ class BatteryBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Matte throw UnsupportedOperationException("Can't set battery value for battery bank") } - override val maxBatteryLevel: Decimal get() { + override val maxBatteryLevel: Decimal + get() { var result = Decimal.ZERO for (i in 0 until container.containerSize) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/CargoCrateBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/CargoCrateBlockEntity.kt index 236c50821..97c58cbdd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/CargoCrateBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/CargoCrateBlockEntity.kt @@ -33,8 +33,8 @@ import ru.dbotthepony.mc.otm.block.IDroppableContainer import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.menu.CargoCrateMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MSoundEvents diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/ChemicalGeneratorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/ChemicalGeneratorBlockEntity.kt index b46a5e0d9..50915838f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/ChemicalGeneratorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/ChemicalGeneratorBlockEntity.kt @@ -30,6 +30,13 @@ import ru.dbotthepony.mc.otm.menu.ChemicalGeneratorMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.core.WriteOnce +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.unaryMinus +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import java.lang.ref.WeakReference class ChemicalGeneratorBlockEntity(pos: BlockPos, state: BlockState) : MatteryBlockEntity(MBlockEntities.CHEMICAL_GENERATOR, pos, state), IDroppableContainer { @@ -77,8 +84,8 @@ class ChemicalGeneratorBlockEntity(pos: BlockPos, state: BlockState) : MatteryBl valid = true } - override fun setLevel(level: Level) { - super.setLevel(level) + override fun setLevel(p_155231_: Level) { + super.setLevel(p_155231_) tickOnceServer(this::checkSurroundings) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyCounterBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyCounterBlockEntity.kt index 07a1e3ce2..58bbf5a95 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyCounterBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyCounterBlockEntity.kt @@ -22,6 +22,13 @@ import ru.dbotthepony.mc.otm.capability.* import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.compat.mekanism.Mattery2MekanismEnergyWrapper import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.math.unaryMinus +import ru.dbotthepony.mc.otm.core.nbt.getByteArrayList +import ru.dbotthepony.mc.otm.core.nbt.ifHas +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.menu.EnergyCounterMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import java.lang.ref.WeakReference diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyServoBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyServoBlockEntity.kt index 7fcebc2a6..36060a13b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyServoBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/EnergyServoBlockEntity.kt @@ -25,9 +25,9 @@ import ru.dbotthepony.mc.otm.capability.maxEnergyStoredMattery import ru.dbotthepony.mc.otm.capability.receiveEnergy import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.menu.EnergyServoMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MBlocks diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/GravitationStabilizerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/GravitationStabilizerBlockEntity.kt index 9a14c3332..d2f25dee2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/GravitationStabilizerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/GravitationStabilizerBlockEntity.kt @@ -14,8 +14,8 @@ import ru.dbotthepony.mc.otm.block.BlockGravitationStabilizer import ru.dbotthepony.mc.otm.block.BlockGravitationStabilizerLens import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock import ru.dbotthepony.mc.otm.block.entity.blackhole.BlackHoleBlockEntity -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.registry.MBlockEntities class GravitationStabilizerBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : MatteryBlockEntity( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt index ba983af03..c2ed4d53b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt @@ -3,7 +3,6 @@ package ru.dbotthepony.mc.otm.block.entity import net.minecraft.world.level.block.entity.BlockEntityType import net.minecraft.core.BlockPos import net.minecraft.world.level.block.state.BlockState -import net.minecraft.world.level.block.entity.BlockEntity import net.minecraft.world.MenuProvider import java.lang.Runnable import net.minecraft.server.level.ServerLevel @@ -23,16 +22,8 @@ import net.minecraft.world.level.Level import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity import net.minecraftforge.common.capabilities.Capability import ru.dbotthepony.mc.otm.core.TextComponent -import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.component1 -import ru.dbotthepony.mc.otm.core.component2 -import ru.dbotthepony.mc.otm.core.component3 -import ru.dbotthepony.mc.otm.core.ifHas -import ru.dbotthepony.mc.otm.core.position -import ru.dbotthepony.mc.otm.core.set -import ru.dbotthepony.mc.otm.network.BlockEntitySyncPacket -import ru.dbotthepony.mc.otm.network.FieldSynchronizer -import ru.dbotthepony.mc.otm.network.WorldNetworkChannel +import ru.dbotthepony.mc.otm.core.nbt.ifHas +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.oncePre abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: BlockPos, p_155230_: BlockState) : SynchronizedBlockEntity(p_155228_, p_155229_, p_155230_), MenuProvider { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryPoweredBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryPoweredBlockEntity.kt index bd1485eee..37396ca9b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryPoweredBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryPoweredBlockEntity.kt @@ -16,15 +16,14 @@ import net.minecraftforge.common.capabilities.ForgeCapabilities import net.minecraftforge.common.util.LazyOptional import ru.dbotthepony.mc.otm.capability.* import ru.dbotthepony.mc.otm.capability.energy.BlockEnergyStorageImpl -import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.ItemEnergyStorageImpl import ru.dbotthepony.mc.otm.container.MatteryContainer -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.ifHas +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.ifHas import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set abstract class MatteryPoweredBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: BlockPos, p_155230_: BlockState) : MatteryBlockEntity(p_155228_, p_155229_, p_155230_) { abstract val energy: BlockEnergyStorageImpl diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt index ed475cf53..9e3278d11 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt @@ -12,7 +12,14 @@ import net.minecraft.world.level.BlockGetter import net.minecraft.world.level.block.Block import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.core.* -import ru.dbotthepony.mc.otm.core.map +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.math.set +import ru.dbotthepony.mc.otm.core.math.weakEqualDoubles +import ru.dbotthepony.mc.otm.core.math.weakGreaterThan +import ru.dbotthepony.mc.otm.core.math.weakLessThan +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set private fun isReason(status: Any?, reason: Any) = status == null || status == reason diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/PlatePressBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/PlatePressBlockEntity.kt index f7d36a62c..144e2c029 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/PlatePressBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/PlatePressBlockEntity.kt @@ -19,12 +19,12 @@ import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.menu.PlatePressMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MRecipes -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set class PlatePressBlockEntity( p_155229_: BlockPos, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleBlockEntity.kt index b119619e4..6d1b91ae8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleBlockEntity.kt @@ -10,7 +10,6 @@ import net.minecraft.world.entity.EquipmentSlot import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.item.ItemEntity import net.minecraft.world.entity.player.Player -import net.minecraft.world.level.Explosion import net.minecraft.world.level.Level import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.Blocks @@ -22,14 +21,14 @@ import ru.dbotthepony.mc.otm.block.BlackHoleBlock import ru.dbotthepony.mc.otm.block.entity.GravitationStabilizerBlockEntity import ru.dbotthepony.mc.otm.block.entity.SynchronizedBlockEntity import ru.dbotthepony.mc.otm.block.entity.blackhole.ExplosionQueue.Companion.queueForLevel -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MItems import ru.dbotthepony.mc.otm.registry.MRegistry -import ru.dbotthepony.mc.otm.core.getSphericalBlockPositions -import ru.dbotthepony.mc.otm.core.mapIf -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.getSphericalBlockPositions +import ru.dbotthepony.mc.otm.core.nbt.mapIf +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.matter.MatterManager import ru.dbotthepony.mc.otm.triggers.BlackHoleTrigger import java.util.LinkedList diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/ExplosionDebuggerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/ExplosionDebuggerBlockEntity.kt index 0cdad6434..55d4378a4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/ExplosionDebuggerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/ExplosionDebuggerBlockEntity.kt @@ -7,8 +7,8 @@ import net.minecraft.world.level.block.Blocks import net.minecraft.world.level.block.entity.BlockEntity import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.phys.Vec3 -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.registry.MBlockEntities class BlockEntityExplosionDebugger(p_155229_: BlockPos, p_155230_: BlockState) : BlockEntity(MBlockEntities.DEBUG_EXPLOSION_SMALL, p_155229_, p_155230_) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/Explosions.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/Explosions.kt index 0777f6c46..9de142daf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/Explosions.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/Explosions.kt @@ -21,7 +21,15 @@ import net.minecraftforge.eventbus.api.SubscribeEvent import org.apache.logging.log4j.LogManager import ru.dbotthepony.mc.otm.block.BlockExplosionDebugger import ru.dbotthepony.mc.otm.core.* -import ru.dbotthepony.mc.otm.core.Vector +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 +import ru.dbotthepony.mc.otm.core.math.left +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.rotateAroundAxis +import ru.dbotthepony.mc.otm.core.math.up +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.registry.MRegistry import java.util.* import kotlin.collections.ArrayList diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt index 24e02c22f..b59157637 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt @@ -39,6 +39,11 @@ import ru.dbotthepony.mc.otm.core.* import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.core.WriteOnce +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set class MatterBottlerBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : MatteryPoweredBlockEntity(MBlockEntities.MATTER_BOTTLER, p_155229_, p_155230_), IMatterGraphNode, IDroppableContainer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt index 7f1502cff..5d1389529 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterCapacitorBankBlockEntity.kt @@ -23,15 +23,15 @@ import ru.dbotthepony.mc.otm.capability.FlowDirection import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.matter.IMatterStorage import ru.dbotthepony.mc.otm.container.MatteryContainer -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.menu.MatterCapacitorBankMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set class MatterCapacitorBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : MatteryBlockEntity(MBlockEntities.MATTER_CAPACITOR_BANK, p_155229_, p_155230_), IMatterGraphNode, IMatterStorage, IDroppableContainer { var gaugeLevel by synchronizer.float() @@ -43,7 +43,8 @@ class MatterCapacitorBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) override val canSetMatterLevel: Boolean get() = false - override var storedMatter: Decimal get() { + override var storedMatter: Decimal + get() { var summ = Decimal.ZERO for (stack in container) @@ -58,7 +59,8 @@ class MatterCapacitorBankBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) throw UnsupportedOperationException() } - override val maxStoredMatter: Decimal get() { + override val maxStoredMatter: Decimal + get() { var summ = Decimal.ZERO for (stack in container) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterDecomposerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterDecomposerBlockEntity.kt index c0cd54136..0850b82c9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterDecomposerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterDecomposerBlockEntity.kt @@ -39,6 +39,13 @@ import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.registry.MItems import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.core.WriteOnce +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.math.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.matter.MatterManager fun moveMatterAsDustIntoContainer(_matterValue: Decimal, container: MatteryContainer, OUTPUT_DUST_MAIN: Int, OUTPUT_DUST_STACKING: Int): Decimal { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterRecyclerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterRecyclerBlockEntity.kt index 6d0f5bb13..5f9876c5d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterRecyclerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterRecyclerBlockEntity.kt @@ -28,21 +28,22 @@ import ru.dbotthepony.mc.otm.capability.matter.IMatterStorage import ru.dbotthepony.mc.otm.capability.matter.MatterStorageImpl import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph import ru.dbotthepony.mc.otm.item.MatterDustItem -import ru.dbotthepony.mc.otm.core.map +import ru.dbotthepony.mc.otm.core.nbt.map import ru.dbotthepony.mc.otm.menu.MatterRecyclerMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities -import ru.dbotthepony.mc.otm.core.DecimalConfigValue -import ru.dbotthepony.mc.otm.core.defineDecimal -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.core.WriteOnce -import ru.dbotthepony.mc.otm.core.getDecimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.math.set class MatterRecyclerBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryWorkerBlockEntity(MBlockEntities.MATTER_RECYCLER, blockPos, blockState, ::RecyclerJob), IMatterGraphNode, IDroppableContainer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt index bd64d1820..daf276288 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReplicatorBlockEntity.kt @@ -35,6 +35,13 @@ import ru.dbotthepony.mc.otm.core.* import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.core.WriteOnce +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.math.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.matter.MatterManager class MatterReplicatorBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterScannerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterScannerBlockEntity.kt index 8f7ee8d45..103f04e5b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterScannerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterScannerBlockEntity.kt @@ -26,10 +26,10 @@ import ru.dbotthepony.mc.otm.capability.matter.IPatternState import ru.dbotthepony.mc.otm.capability.matter.PatternState import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.MatteryContainerHooks -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.DecimalConfigValue -import ru.dbotthepony.mc.otm.core.defineDecimal -import ru.dbotthepony.mc.otm.core.map +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.nbt.map import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt index 07a081342..e733387f1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/PatternStorageBlockEntity.kt @@ -27,13 +27,13 @@ import ru.dbotthepony.mc.otm.block.IDroppableContainer import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.capability.matter.* -import ru.dbotthepony.mc.otm.core.iterator +import ru.dbotthepony.mc.otm.core.collect.iterator import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.matter.IMatterGraphNode import ru.dbotthepony.mc.otm.graph.matter.MatterNetworkGraph -import ru.dbotthepony.mc.otm.core.map +import ru.dbotthepony.mc.otm.core.nbt.map import ru.dbotthepony.mc.otm.registry.MBlockEntities -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import java.util.ArrayList import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt index 9751a6e5b..f0fd113eb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt @@ -20,8 +20,8 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.menu.DriveRackMenu -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.graph.storage.StorageNetworkGraph import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MBlocks diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveViewerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveViewerBlockEntity.kt index 0fd68dfbd..6dc847021 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveViewerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveViewerBlockEntity.kt @@ -21,8 +21,8 @@ import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.menu.DriveViewerMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.registry.MBlocks class DriveViewerBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : MatteryPoweredBlockEntity(MBlockEntities.DRIVE_VIEWER, p_155229_, p_155230_), IDroppableContainer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/ItemMonitorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/ItemMonitorBlockEntity.kt index 571dbc5d0..ef1653feb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/ItemMonitorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/ItemMonitorBlockEntity.kt @@ -39,8 +39,8 @@ import ru.dbotthepony.mc.otm.menu.ItemMonitorMenu import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.container.set -import ru.dbotthepony.mc.otm.core.getEnum -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.getEnum +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.registry.MBlocks import ru.dbotthepony.mc.otm.storage.* import java.math.BigInteger diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt index 034c23628..f9c6d2cb8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt @@ -27,6 +27,12 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.container.ItemFilter import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.isPositive +import ru.dbotthepony.mc.otm.core.math.isZero +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.unaryMinus +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.GraphNodeListener import ru.dbotthepony.mc.otm.graph.storage.BasicStorageGraphNode diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt index e9d20036c..acf76caf0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt @@ -26,6 +26,12 @@ import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.container.ItemFilter import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.toIntSafe +import ru.dbotthepony.mc.otm.core.math.unaryMinus +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.graph.Graph6Node import ru.dbotthepony.mc.otm.graph.GraphNodeListener import ru.dbotthepony.mc.otm.graph.storage.BasicStorageGraphNode diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StoragePowerSupplierBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StoragePowerSupplierBlockEntity.kt index cee292844..a9e2f61ab 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StoragePowerSupplierBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StoragePowerSupplierBlockEntity.kt @@ -19,14 +19,14 @@ import ru.dbotthepony.mc.otm.block.entity.MatteryPoweredBlockEntity import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.transferChecked -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.graph.storage.BasicStorageGraphNode import ru.dbotthepony.mc.otm.graph.storage.StorageNetworkGraph import ru.dbotthepony.mc.otm.menu.StoragePowerSupplierMenu import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.registry.MNames -import ru.dbotthepony.mc.otm.core.getDecimal -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.nbt.set class StoragePowerSupplierBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryPoweredBlockEntity(MBlockEntities.STORAGE_POWER_SUPPLIER, blockPos, blockState) { override val defaultDisplayName: Component diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageBusBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageBusBlock.kt index 89726cb77..d0f5d2867 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageBusBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageBusBlock.kt @@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.block.entity.storage.StorageBusBlockEntity import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.shapes.BlockShapes -import ru.dbotthepony.mc.otm.core.unaryMinus +import ru.dbotthepony.mc.otm.core.math.unaryMinus import ru.dbotthepony.mc.otm.oncePre class StorageBusBlock : RotatableMatteryBlock(), EntityBlock { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageInterfaces.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageInterfaces.kt index bda55fd7f..1ae920297 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageInterfaces.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/storage/StorageInterfaces.kt @@ -27,7 +27,7 @@ import ru.dbotthepony.mc.otm.block.entity.storage.StorageImporterBlockEntity import ru.dbotthepony.mc.otm.capability.energy.WorkerEnergyStorage import ru.dbotthepony.mc.otm.registry.MBlockEntities import ru.dbotthepony.mc.otm.shapes.BlockShapes -import ru.dbotthepony.mc.otm.core.unaryMinus +import ru.dbotthepony.mc.otm.core.math.unaryMinus import ru.dbotthepony.mc.otm.oncePre class StorageImporterBlock : RotatableMatteryBlock(), EntityBlock { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/Ext.kt index 81b08130d..11ca15287 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/Ext.kt @@ -20,9 +20,9 @@ import ru.dbotthepony.mc.otm.compat.mekanism.getMekanismEnergySided import ru.dbotthepony.mc.otm.compat.mekanism.mekanismEnergy import ru.dbotthepony.mc.otm.container.awareStream import ru.dbotthepony.mc.otm.container.stream -import ru.dbotthepony.mc.otm.core.AwareItemStack -import ru.dbotthepony.mc.otm.core.ContainerItemStackEntry -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.ContainerItemStackEntry +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.orNull import java.util.IdentityHashMap import java.util.LinkedList @@ -68,7 +68,8 @@ internal fun IEnergyStorage.extractEnergy(amount: Decimal, simulate: Boolean): D return Decimal.valueOf(extractEnergy(amount.toInt(), simulate)) } -val IEnergyStorage.maxEnergyStoredMattery: Decimal get() { +val IEnergyStorage.maxEnergyStoredMattery: Decimal + get() { if (this is IMatteryEnergyStorage) { return maxBatteryLevel } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index 79232b09a..1e885e286 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -49,6 +49,15 @@ import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.stream import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.collect.UUIDIntModifiersMap +import ru.dbotthepony.mc.otm.core.collect.nonEmpty +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.set +import ru.dbotthepony.mc.otm.core.nbt.getCompoundList +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set +import ru.dbotthepony.mc.otm.core.util.IntValueCodec +import ru.dbotthepony.mc.otm.core.util.UUIDValueCodec import ru.dbotthepony.mc.otm.menu.ExoPackInventoryMenu import ru.dbotthepony.mc.otm.network.* import ru.dbotthepony.mc.otm.registry.AndroidFeatures diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/AbstractMatteryDrive.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/AbstractMatteryDrive.kt index 1fbda2ec0..60f568e8c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/AbstractMatteryDrive.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/AbstractMatteryDrive.kt @@ -7,8 +7,12 @@ import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.ListTag import net.minecraft.nbt.Tag import org.apache.logging.log4j.LogManager -import ru.dbotthepony.mc.otm.container.set import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.BigInteger +import ru.dbotthepony.mc.otm.core.math.isPositive +import ru.dbotthepony.mc.otm.core.math.serializeNBT +import ru.dbotthepony.mc.otm.core.nbt.ifHas +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.storage.* import java.math.BigInteger import java.util.ArrayList @@ -214,4 +218,4 @@ abstract class AbstractMatteryDrive @JvmOverloads constructor companion object { private val LOGGER = LogManager.getLogger() } -} \ No newline at end of file +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/ItemMatteryDrive.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/ItemMatteryDrive.kt index 6cd728abb..4ff1b972b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/ItemMatteryDrive.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/drive/ItemMatteryDrive.kt @@ -7,10 +7,9 @@ import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.core.BigInteger -import ru.dbotthepony.mc.otm.core.serializeNBT -import ru.dbotthepony.mc.otm.container.set -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.BigInteger +import ru.dbotthepony.mc.otm.core.math.serializeNBT +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.storage.IStorageTuple import ru.dbotthepony.mc.otm.storage.ItemStackWrapper import ru.dbotthepony.mc.otm.storage.StorageStackType diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/AndroidPowerSource.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/AndroidPowerSource.kt index 08b8b86bb..1559d828e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/AndroidPowerSource.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/AndroidPowerSource.kt @@ -9,11 +9,11 @@ import net.minecraftforge.common.util.INBTSerializable import ru.dbotthepony.mc.otm.capability.FlowDirection import ru.dbotthepony.mc.otm.capability.extractEnergy import ru.dbotthepony.mc.otm.capability.receiveEnergy -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.getDecimal -import ru.dbotthepony.mc.otm.core.getItemStack +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.getDecimal +import ru.dbotthepony.mc.otm.core.nbt.getItemStack import ru.dbotthepony.mc.otm.core.ifPresentK -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.network.FieldSynchronizer import ru.dbotthepony.mc.otm.registry.StatNames import ru.dbotthepony.mc.otm.triggers.AndroidBatteryTrigger diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BlockEnergyStorageImpl.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BlockEnergyStorageImpl.kt index 0da6d774e..e3d73b061 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BlockEnergyStorageImpl.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/BlockEnergyStorageImpl.kt @@ -17,11 +17,11 @@ import ru.dbotthepony.mc.otm.ConciseBalanceValues import ru.dbotthepony.mc.otm.VerboseBalanceValues import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity import ru.dbotthepony.mc.otm.capability.FlowDirection -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.defineDecimal -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.mapIf -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.mapIf +import ru.dbotthepony.mc.otm.core.nbt.set sealed class BlockEnergyStorageImpl( protected val listener: () -> Unit, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IEnergyStorageImpl.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IEnergyStorageImpl.kt index 5deb39c5f..edd032081 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IEnergyStorageImpl.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IEnergyStorageImpl.kt @@ -4,10 +4,9 @@ import net.minecraft.ChatFormatting import net.minecraft.network.chat.Component import net.minecraftforge.energy.IEnergyStorage import ru.dbotthepony.mc.otm.capability.FlowDirection -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.formatPower -import java.math.BigInteger +import ru.dbotthepony.mc.otm.core.util.formatPower sealed interface IEnergyStorageImpl { val maxInput: Decimal? diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt index e8241fd3a..9f3853a0c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt @@ -2,8 +2,8 @@ package ru.dbotthepony.mc.otm.capability.energy import net.minecraftforge.energy.IEnergyStorage import ru.dbotthepony.mc.otm.capability.FlowDirection -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.RGBAColor import java.math.BigInteger import kotlin.math.roundToInt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/ItemEnergyStorageImpl.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/ItemEnergyStorageImpl.kt index 8e9331612..3a4708335 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/ItemEnergyStorageImpl.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/ItemEnergyStorageImpl.kt @@ -14,9 +14,9 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.energy import ru.dbotthepony.mc.otm.capability.isMekanismLoaded import ru.dbotthepony.mc.otm.compat.mekanism.Mattery2MekanismEnergyWrapper -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.map -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.map +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.tagNotNull sealed class ItemEnergyStorageImpl( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt index dc70b2142..c8544371f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt @@ -3,8 +3,8 @@ package ru.dbotthepony.mc.otm.capability.matter import net.minecraftforge.common.capabilities.ICapabilityProvider import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.FlowDirection -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.orNull import kotlin.math.roundToInt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt index 4429e70e9..087d02a65 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt @@ -1,10 +1,9 @@ package ru.dbotthepony.mc.otm.capability.matter -import net.minecraft.util.Mth import net.minecraft.world.item.Item import net.minecraftforge.common.capabilities.ICapabilityProvider import ru.dbotthepony.mc.otm.capability.MatteryCapability -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.orNull import java.util.* import java.util.function.Predicate diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/MatterStorageImpl.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/MatterStorageImpl.kt index 420c03643..80482af86 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/MatterStorageImpl.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/MatterStorageImpl.kt @@ -6,8 +6,8 @@ import net.minecraftforge.common.util.LazyOptional import ru.dbotthepony.mc.otm.ConciseBalanceValues import ru.dbotthepony.mc.otm.VerboseBalanceValues import ru.dbotthepony.mc.otm.capability.FlowDirection -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.set open class MatterStorageImpl @JvmOverloads constructor( protected val listener: Runnable?, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/PatternState.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/PatternState.kt index c53bcc134..c1c17a410 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/PatternState.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/PatternState.kt @@ -9,6 +9,8 @@ import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.nbt.contains +import ru.dbotthepony.mc.otm.core.nbt.set import java.util.* sealed interface IPatternState { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/ReplicationTask.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/ReplicationTask.kt index 0dd3991d9..b93b12d7f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/ReplicationTask.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/ReplicationTask.kt @@ -10,7 +10,7 @@ import net.minecraft.world.item.Items import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.core.readItemType import ru.dbotthepony.mc.otm.core.registryName -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.writeItemType import java.util.UUID diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt index d3ae061e9..cde8acdc9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt @@ -2,7 +2,6 @@ package ru.dbotthepony.mc.otm.client import com.mojang.blaze3d.platform.InputConstants import com.mojang.blaze3d.systems.RenderSystem -import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.KeyMapping import net.minecraftforge.client.event.RegisterKeyMappingsEvent import net.minecraftforge.client.event.RenderGuiEvent @@ -14,7 +13,7 @@ import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.Widgets18 import ru.dbotthepony.mc.otm.client.render.drawRect import ru.dbotthepony.mc.otm.client.render.is3DContext -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.network.ActivateAndroidFeaturePacket import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import kotlin.math.roundToInt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt index 7476fed2b..4ab602abd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt @@ -16,7 +16,10 @@ import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.TextAlign import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.render.drawArc -import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.angleDifference +import ru.dbotthepony.mc.otm.core.math.normalizeAngle +import ru.dbotthepony.mc.otm.core.util.formatTickDuration import ru.dbotthepony.mc.otm.milliTimeD import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import ru.dbotthepony.mc.otm.network.SwitchAndroidFeaturePacket @@ -206,8 +209,8 @@ object AndroidMenuKeyMapping : KeyMapping("key.otm.android_menu", KeyConflictCon event.poseStack, minecraft.window.guiScaledWidth / 2f, minecraft.window.guiScaledHeight / 2f, - linearInterpolation(lastSelectProgressGlobal, size, size * 1.2f), - linearInterpolation(lastSelectProgressGlobal, size * 0.3f, size * 0.4f), + ru.dbotthepony.mc.otm.core.math.linearInterpolation(lastSelectProgressGlobal, size, size * 1.2f), + ru.dbotthepony.mc.otm.core.math.linearInterpolation(lastSelectProgressGlobal, size * 0.3f, size * 0.4f), startDegree = lastSelectedDegree!!, endDegree = lastSelectedDegree!! + degreePerSlice diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt index bde02c326..5186062c4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt @@ -27,7 +27,7 @@ import ru.dbotthepony.mc.otm.client.screen.panels.Panel2Widget import ru.dbotthepony.mc.otm.compat.InventoryScrollPacket import ru.dbotthepony.mc.otm.compat.cos.isCosmeticArmorScreen import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.integerDivisionUp +import ru.dbotthepony.mc.otm.core.math.integerDivisionUp import ru.dbotthepony.mc.otm.menu.MatteryMenu import ru.dbotthepony.mc.otm.network.MenuNetworkChannel import ru.dbotthepony.mc.otm.registry.AndroidFeatures diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index 9e91f0ade..d94391adf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -21,8 +21,8 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.* -import ru.dbotthepony.mc.otm.core.RGBAColor -import ru.dbotthepony.mc.otm.core.formatPower +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.core.ifPresentK import java.util.* import kotlin.math.ceil diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt index 55cb45618..953f95f17 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt @@ -12,8 +12,8 @@ import net.minecraft.client.renderer.RenderType import net.minecraft.network.FriendlyByteBuf import net.minecraft.resources.ResourceLocation import org.lwjgl.opengl.GL11.GL_ALWAYS -import ru.dbotthepony.mc.otm.core.RGBAColor -import ru.dbotthepony.mc.otm.core.linearInterpolation +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.linearInterpolation import java.util.concurrent.ConcurrentHashMap sealed class AbstractMatterySprite { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Ext.kt index 1baf4bc9a..9edcc8c87 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Ext.kt @@ -10,7 +10,14 @@ import net.minecraft.network.chat.Component import net.minecraft.util.FormattedCharSequence import org.joml.Matrix4f import org.joml.Vector3f -import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.IAngle +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.rotateAroundPoint +import ru.dbotthepony.mc.otm.core.math.rotateAroundThis +import ru.dbotthepony.mc.otm.core.math.times +import ru.dbotthepony.mc.otm.core.math.translation +import ru.dbotthepony.mc.otm.core.math.unaryMinus import kotlin.math.roundToInt val tesselator: Tesselator get() = Tesselator.getInstance() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/GlitchRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/GlitchRenderer.kt index 6910fe611..f1a970036 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/GlitchRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/GlitchRenderer.kt @@ -17,7 +17,7 @@ import org.joml.Matrix4f import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.minecraft -import ru.dbotthepony.mc.otm.core.linearInterpolation +import ru.dbotthepony.mc.otm.core.math.linearInterpolation import ru.dbotthepony.mc.otm.milliTime import java.lang.ref.WeakReference import kotlin.math.absoluteValue diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/RenderHelper.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/RenderHelper.kt index 72d8c4dd8..f26184b61 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/RenderHelper.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/RenderHelper.kt @@ -12,7 +12,7 @@ import org.joml.Matrix4f import org.lwjgl.opengl.GL11.GL_ALWAYS import org.lwjgl.opengl.GL11.GL_LESS import ru.dbotthepony.mc.otm.client.minecraft -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import java.util.* import kotlin.collections.ArrayDeque import kotlin.math.PI diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ShockwaveRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ShockwaveRenderer.kt index 1ba1d357f..4d1a8b57c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ShockwaveRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ShockwaveRenderer.kt @@ -8,12 +8,12 @@ import net.minecraft.client.renderer.GameRenderer import net.minecraftforge.client.event.RenderLevelStageEvent import org.lwjgl.opengl.GL11.GL_LESS import ru.dbotthepony.mc.otm.ServerConfig -import ru.dbotthepony.mc.otm.core.Vector -import ru.dbotthepony.mc.otm.core.component1 -import ru.dbotthepony.mc.otm.core.component2 -import ru.dbotthepony.mc.otm.core.component3 -import ru.dbotthepony.mc.otm.core.linearInterpolation -import ru.dbotthepony.mc.otm.core.rotateX +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 +import ru.dbotthepony.mc.otm.core.math.linearInterpolation +import ru.dbotthepony.mc.otm.core.math.rotateX import ru.dbotthepony.mc.otm.network.ShockwaveEffectPacket import ru.dbotthepony.mc.otm.secondTimeD import kotlin.math.PI diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt index 677e6a132..18149aa40 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt @@ -5,6 +5,7 @@ import com.google.gson.JsonPrimitive import com.google.gson.JsonSyntaxException import net.minecraft.network.FriendlyByteBuf import net.minecraft.resources.ResourceLocation +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set enum class SpriteType { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BankRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BankRenderer.kt index ef8f5da50..72babc852 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BankRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BankRenderer.kt @@ -14,7 +14,7 @@ import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel import ru.dbotthepony.mc.otm.core.get -import ru.dbotthepony.mc.otm.core.rotateY +import ru.dbotthepony.mc.otm.core.math.rotateY import kotlin.math.PI abstract class BankRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BlackHoleRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BlackHoleRenderer.kt index 12c565310..ea28c7fb4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BlackHoleRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/BlackHoleRenderer.kt @@ -17,7 +17,17 @@ import ru.dbotthepony.mc.otm.block.entity.blackhole.BlackHoleBlockEntity import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.* -import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.VECTOR_FORWARD +import ru.dbotthepony.mc.otm.core.math.VECTOR_RIGHT +import ru.dbotthepony.mc.otm.core.math.VECTOR_UP +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.asMutableAngle +import ru.dbotthepony.mc.otm.core.math.asVector +import ru.dbotthepony.mc.otm.core.math.minus +import ru.dbotthepony.mc.otm.core.math.rotateAroundAxis +import ru.dbotthepony.mc.otm.core.math.times +import ru.dbotthepony.mc.otm.core.util.formatMatter import ru.dbotthepony.mc.otm.registry.MItems import kotlin.math.PI import kotlin.math.pow diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/EnergyCounterRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/EnergyCounterRenderer.kt index 95d5fdd75..008242080 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/EnergyCounterRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/EnergyCounterRenderer.kt @@ -1,7 +1,6 @@ package ru.dbotthepony.mc.otm.client.render.blockentity import com.mojang.blaze3d.vertex.PoseStack -import net.minecraft.client.Minecraft import net.minecraft.client.renderer.MultiBufferSource import net.minecraft.client.renderer.blockentity.BlockEntityRenderer import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider @@ -11,10 +10,10 @@ import ru.dbotthepony.mc.otm.block.EnergyCounterBlock import ru.dbotthepony.mc.otm.block.entity.EnergyCounterBlockEntity import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.* -import ru.dbotthepony.mc.otm.core.RGBAColor -import ru.dbotthepony.mc.otm.core.asAngle -import ru.dbotthepony.mc.otm.core.formatPower -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.asAngle +import ru.dbotthepony.mc.otm.core.util.formatPower +import ru.dbotthepony.mc.otm.core.math.times import kotlin.math.PI class EnergyCounterRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt index fc56109ee..140842d68 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt @@ -2,7 +2,6 @@ package ru.dbotthepony.mc.otm.client.render.blockentity import com.mojang.blaze3d.vertex.* -import net.minecraft.client.Minecraft import net.minecraft.client.renderer.MultiBufferSource import net.minecraft.client.renderer.RenderType import net.minecraft.client.renderer.blockentity.BeaconRenderer @@ -20,6 +19,17 @@ import ru.dbotthepony.mc.otm.block.entity.WorkerState import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.* import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.VECTOR_DOWN +import ru.dbotthepony.mc.otm.core.math.VECTOR_FORWARD +import ru.dbotthepony.mc.otm.core.math.VECTOR_RIGHT +import ru.dbotthepony.mc.otm.core.math.VECTOR_UP +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.asAngle +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.rotateAroundAxis +import ru.dbotthepony.mc.otm.core.math.times +import ru.dbotthepony.mc.otm.core.util.formatMatter import kotlin.math.PI @Suppress("PrivatePropertyName") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/MatterReplicatorRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/MatterReplicatorRenderer.kt index 3b1e7b8ce..73bc49d0d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/MatterReplicatorRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/MatterReplicatorRenderer.kt @@ -16,12 +16,12 @@ import ru.dbotthepony.mc.otm.block.entity.WorkerState import ru.dbotthepony.mc.otm.block.entity.matter.MatterReplicatorBlockEntity import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource import ru.dbotthepony.mc.otm.client.render.lockBlendFunc -import ru.dbotthepony.mc.otm.core.component1 -import ru.dbotthepony.mc.otm.core.component2 -import ru.dbotthepony.mc.otm.core.component3 +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 import ru.dbotthepony.mc.otm.core.get -import ru.dbotthepony.mc.otm.core.normalizeAngleDeg -import ru.dbotthepony.mc.otm.core.rotateYDegrees +import ru.dbotthepony.mc.otm.core.math.normalizeAngleDeg +import ru.dbotthepony.mc.otm.core.math.rotateYDegrees import ru.dbotthepony.mc.otm.isPaused class MatterReplicatorRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/PlasmaProjectileRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/PlasmaProjectileRenderer.kt index 34c8917fd..b13fb7963 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/PlasmaProjectileRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/PlasmaProjectileRenderer.kt @@ -9,9 +9,8 @@ import ru.dbotthepony.mc.otm.client.render.TextAlign import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.render.rotateAroundPoint import ru.dbotthepony.mc.otm.client.render.translation -import ru.dbotthepony.mc.otm.core.Angle +import ru.dbotthepony.mc.otm.core.math.Angle import ru.dbotthepony.mc.otm.entity.PlasmaProjectile -import kotlin.math.PI class PlasmaProjectileRenderer(context: EntityRendererProvider.Context) : EntityRenderer(context) { override fun getTextureLocation(p_114482_: PlasmaProjectile): ResourceLocation { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt index 6ea310399..aafad7d12 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/AndroidStationScreen.kt @@ -28,12 +28,11 @@ import ru.dbotthepony.mc.otm.client.render.drawRect import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel import ru.dbotthepony.mc.otm.client.screen.widget.WidePowerGaugePanel -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.menu.AndroidStationMenu import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import ru.dbotthepony.mc.otm.network.AndroidResearchRequestPacket -import ru.dbotthepony.mc.otm.registry.MRegistry import java.util.* import kotlin.collections.ArrayList import kotlin.properties.Delegates diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt index 2eada543a..eeeffa51c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/DriveViewerScreen.kt @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.CheckBoxLabelInputPanel import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel -import ru.dbotthepony.mc.otm.core.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import ru.dbotthepony.mc.otm.item.PortableCondensationDriveItem import ru.dbotthepony.mc.otm.menu.DriveViewerMenu import yalter.mousetweaks.api.MouseTweaksDisableWheelTweak diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt index 01fd8a4f7..913440b37 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/EnergyCounterScreen.kt @@ -5,7 +5,7 @@ import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel -import ru.dbotthepony.mc.otm.core.formatPower +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.menu.EnergyCounterMenu class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title: Component) : MatteryScreen(menu, inventory, title) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt index 3f5456b3e..f69f02ebe 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt @@ -11,7 +11,7 @@ import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.LargeRectangleButtonPanel import ru.dbotthepony.mc.otm.client.setMousePos import ru.dbotthepony.mc.otm.client.shouldOpenVanillaInventory -import ru.dbotthepony.mc.otm.core.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import ru.dbotthepony.mc.otm.menu.ExoPackInventoryMenu import ru.dbotthepony.mc.otm.network.ExoSuitMenuOpen import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt index 9e8cdc170..4733cb7ab 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ItemMonitorScreen.kt @@ -17,9 +17,9 @@ import ru.dbotthepony.mc.otm.client.screen.panels.buttons.SmallEnumRectangleButt import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel import ru.dbotthepony.mc.otm.client.screen.widget.WidePowerGaugePanel import ru.dbotthepony.mc.otm.core.asGetterSetter -import ru.dbotthepony.mc.otm.core.integerDivisionDown -import ru.dbotthepony.mc.otm.core.formatReadableNumber -import ru.dbotthepony.mc.otm.core.formatSiComponent +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown +import ru.dbotthepony.mc.otm.core.util.formatReadableNumber +import ru.dbotthepony.mc.otm.core.util.formatSiComponent import ru.dbotthepony.mc.otm.menu.ItemMonitorMenu import ru.dbotthepony.mc.otm.storage.ITEM_STORAGE import yalter.mousetweaks.api.MouseTweaksDisableWheelTweak diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.kt index ff9f18e3e..15af82304 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatterPanelScreen.kt @@ -11,7 +11,7 @@ import ru.dbotthepony.mc.otm.client.render.WidgetLocation import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.ButtonPanel import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import ru.dbotthepony.mc.otm.menu.MatterPanelMenu import ru.dbotthepony.mc.otm.menu.ReplicationRequestPacket import ru.dbotthepony.mc.otm.network.MenuNetworkChannel diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt index 01a6a3f8c..c1ca6606b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/MatteryScreen.kt @@ -2,7 +2,6 @@ package ru.dbotthepony.mc.otm.client.screen import com.mojang.blaze3d.systems.RenderSystem import com.mojang.blaze3d.vertex.PoseStack -import it.unimi.dsi.fastutil.ints.Int2ObjectAVLTreeMap import it.unimi.dsi.fastutil.ints.Int2ObjectFunction import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap import net.minecraft.ChatFormatting @@ -21,7 +20,7 @@ import ru.dbotthepony.mc.otm.ClientConfig import ru.dbotthepony.mc.otm.client.moveMousePosScaled import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleButton -import ru.dbotthepony.mc.otm.core.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import ru.dbotthepony.mc.otm.menu.MatteryMenu import java.util.Collections diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/StoragePowerSupplierScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/StoragePowerSupplierScreen.kt index 34b515144..e3bc34cef 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/StoragePowerSupplierScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/StoragePowerSupplierScreen.kt @@ -5,7 +5,7 @@ import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.widget.HorizontalPowerGaugePanel -import ru.dbotthepony.mc.otm.core.formatPower +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.menu.StoragePowerSupplierMenu diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AbstractSlotPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AbstractSlotPanel.kt index 497656317..701e5c21e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AbstractSlotPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AbstractSlotPanel.kt @@ -10,7 +10,7 @@ import org.lwjgl.opengl.GL11 import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.* import ru.dbotthepony.mc.otm.client.screen.MatteryScreen -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor abstract class AbstractSlotPanel> @JvmOverloads constructor( screen: S, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt index 226cbac40..38cb1b5f4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels import com.mojang.blaze3d.platform.InputConstants import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.gui.screens.Screen -import ru.dbotthepony.mc.otm.core.linearInterpolation +import ru.dbotthepony.mc.otm.core.math.linearInterpolation import ru.dbotthepony.mc.otm.milliTimeD import kotlin.math.roundToInt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt index e9292ea60..07ab355b8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt @@ -16,10 +16,10 @@ import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.render.drawScaledAligned import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.render.render -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.formatTickDuration -import ru.dbotthepony.mc.otm.core.integerDivisionDown +import ru.dbotthepony.mc.otm.core.util.formatTickDuration +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown import java.util.stream.Collectors open class EffectListPanel @JvmOverloads constructor( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/Label.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/Label.kt index bd701138d..9c506ab41 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/Label.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/Label.kt @@ -3,10 +3,8 @@ package ru.dbotthepony.mc.otm.client.screen.panels import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.client.render.clearDepth import ru.dbotthepony.mc.otm.core.TextComponent -import ru.dbotthepony.mc.otm.core.RGBAColor -import ru.dbotthepony.mc.otm.client.screen.MatteryScreen +import ru.dbotthepony.mc.otm.core.math.RGBAColor open class Label @JvmOverloads constructor( screen: S, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/ButtonPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/ButtonPanel.kt index 1b4b32b51..f376d3cab 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/ButtonPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/ButtonPanel.kt @@ -8,7 +8,7 @@ import ru.dbotthepony.mc.otm.client.render.TextAlign import ru.dbotthepony.mc.otm.client.render.Widgets18 import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor open class ButtonPanel( screen: S, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt index 18efc0375..a34012c68 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt @@ -13,7 +13,7 @@ import ru.dbotthepony.mc.otm.client.render.WidgetLocation import ru.dbotthepony.mc.otm.client.render.tesselator import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.formatMatterLevel +import ru.dbotthepony.mc.otm.core.util.formatMatterLevel import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import ru.dbotthepony.mc.otm.nanoTime import kotlin.math.absoluteValue diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt index 5cf9f63a3..194ef0004 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt @@ -6,7 +6,7 @@ import net.minecraft.network.chat.Component import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.client.render.* import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel -import ru.dbotthepony.mc.otm.core.formatPowerLevel +import ru.dbotthepony.mc.otm.core.util.formatPowerLevel import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget open class PowerGaugePanel @JvmOverloads constructor( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt index c7d053404..b0f26e07c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt @@ -25,7 +25,7 @@ import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleButton.Companion.BUTTON_AC import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleButton.Companion.BUTTON_INACTIVE import ru.dbotthepony.mc.otm.container.awareStream import ru.dbotthepony.mc.otm.container.stream -import ru.dbotthepony.mc.otm.core.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack import ru.dbotthepony.mc.otm.menu.MatterySlot import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt index ddda5ccb1..3242a016c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/curios/CuriosCompat.kt @@ -8,7 +8,7 @@ import net.minecraftforge.fml.ModList import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.container.awareStream import ru.dbotthepony.mc.otm.container.stream -import ru.dbotthepony.mc.otm.core.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack import ru.dbotthepony.mc.otm.core.orNull import top.theillusivec4.curios.api.CuriosApi import top.theillusivec4.curios.common.inventory.CosmeticCurioSlot diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt index efd2869f0..6c2449140 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jei/PlatePressRecipeCategory.kt @@ -18,7 +18,7 @@ import ru.dbotthepony.mc.otm.client.render.TextAlign import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.screen.panels.AbstractSlotPanel import ru.dbotthepony.mc.otm.client.screen.widget.ProgressGaugePanel -import ru.dbotthepony.mc.otm.core.RGBAColor +import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.registryName import ru.dbotthepony.mc.otm.recipe.PlatePressRecipe diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Conversions.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Conversions.kt index b760e0242..fbf931c09 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Conversions.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Conversions.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.mc.otm.compat.mekanism import mekanism.api.math.FloatingLong -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import java.math.BigInteger private val LONG_OVERFLOW = BigInteger.valueOf(Long.MAX_VALUE) + BigInteger.valueOf(Long.MAX_VALUE) + BigInteger.TWO diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Power.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Power.kt index d2b6e4e66..fa7a627f6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Power.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/Power.kt @@ -14,7 +14,7 @@ import ru.dbotthepony.mc.otm.capability.FlowDirection import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.isMekanismLoaded -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.orNull import java.lang.ref.WeakReference import java.util.WeakHashMap diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/QIO.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/QIO.kt index 123bf5d3c..3c4b1ef04 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/QIO.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/mekanism/QIO.kt @@ -20,7 +20,7 @@ import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.onceServer import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.isMekanismLoaded -import ru.dbotthepony.mc.otm.core.isPositive +import ru.dbotthepony.mc.otm.core.math.isPositive import ru.dbotthepony.mc.otm.graph.storage.BasicStorageGraphNode import ru.dbotthepony.mc.otm.graph.storage.StorageNetworkGraph import ru.dbotthepony.mc.otm.storage.* diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerIterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerIterator.kt index 710757ef0..197633e58 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerIterator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerIterator.kt @@ -3,8 +3,8 @@ package ru.dbotthepony.mc.otm.container import it.unimi.dsi.fastutil.objects.ObjectIterators import net.minecraft.world.Container import net.minecraft.world.item.ItemStack -import ru.dbotthepony.mc.otm.core.ContainerItemStackEntry -import ru.dbotthepony.mc.otm.core.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.ContainerItemStackEntry +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack class ContainerIterator(private val container: Container, initialPosition: Int = 0) : ObjectIterators.AbstractIndexBasedListIterator(0, initialPosition), MutableListIterator { init { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerSpliterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerSpliterator.kt index 305792410..7087d6b7c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerSpliterator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerSpliterator.kt @@ -4,8 +4,8 @@ import it.unimi.dsi.fastutil.objects.ObjectSpliterator import it.unimi.dsi.fastutil.objects.ObjectSpliterators import net.minecraft.world.Container import net.minecraft.world.item.ItemStack -import ru.dbotthepony.mc.otm.core.AwareItemStack -import ru.dbotthepony.mc.otm.core.ContainerItemStackEntry +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.ContainerItemStackEntry import java.util.stream.Stream import java.util.stream.StreamSupport diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/Ext.kt index bc2b1a738..6e45cb70b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/Ext.kt @@ -3,8 +3,8 @@ package ru.dbotthepony.mc.otm.container import net.minecraft.world.Container import net.minecraft.world.item.ItemStack import net.minecraftforge.common.capabilities.Capability -import ru.dbotthepony.mc.otm.core.iterator -import ru.dbotthepony.mc.otm.core.nonEmpty +import ru.dbotthepony.mc.otm.core.collect.iterator +import ru.dbotthepony.mc.otm.core.collect.nonEmpty operator fun Container.set(index: Int, value: ItemStack) = setItem(index, value) operator fun Container.get(index: Int): ItemStack = getItem(index) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemFilter.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemFilter.kt index 25e41c726..8d55e42ba 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemFilter.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemFilter.kt @@ -11,11 +11,10 @@ import net.minecraftforge.common.util.INBTSerializable import net.minecraftforge.network.NetworkEvent import org.apache.logging.log4j.LogManager import ru.dbotthepony.mc.otm.client.minecraft -import ru.dbotthepony.mc.otm.core.ifHas +import ru.dbotthepony.mc.otm.core.nbt.ifHas import ru.dbotthepony.mc.otm.menu.MatteryMenu import ru.dbotthepony.mc.otm.network.MatteryPacket -import ru.dbotthepony.mc.otm.container.set -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import java.util.Arrays import java.util.LinkedList import java.util.function.Supplier diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemHandlerSpliterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemHandlerSpliterator.kt index 4482d0efc..25fc780fb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemHandlerSpliterator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ItemHandlerSpliterator.kt @@ -4,8 +4,8 @@ import it.unimi.dsi.fastutil.objects.ObjectSpliterator import it.unimi.dsi.fastutil.objects.ObjectSpliterators import net.minecraft.world.item.ItemStack import net.minecraftforge.items.IItemHandler -import ru.dbotthepony.mc.otm.core.AwareItemStack -import ru.dbotthepony.mc.otm.core.ItemHandlerItemStackEntry +import ru.dbotthepony.mc.otm.core.collect.AwareItemStack +import ru.dbotthepony.mc.otm.core.collect.ItemHandlerItemStackEntry import java.util.* import java.util.stream.Stream import java.util.stream.StreamSupport diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt index 54ac9226f..97cdad1b9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt @@ -9,8 +9,8 @@ import net.minecraft.world.Container import kotlin.jvm.JvmOverloads import net.minecraft.world.entity.player.Player import net.minecraft.world.level.block.entity.BlockEntity -import ru.dbotthepony.mc.otm.core.ifHas -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.ifHas +import ru.dbotthepony.mc.otm.core.nbt.set import java.util.* @Suppress("UNUSED") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt index dbb2e120e..ace708971 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt @@ -8,9 +8,7 @@ import com.google.gson.JsonElement import com.google.gson.JsonObject import com.google.gson.JsonPrimitive import net.minecraft.core.BlockPos -import net.minecraft.nbt.ByteArrayTag import net.minecraft.nbt.CompoundTag -import net.minecraft.nbt.Tag import net.minecraft.network.FriendlyByteBuf import net.minecraft.resources.ResourceLocation import net.minecraft.world.entity.Entity @@ -28,8 +26,8 @@ import net.minecraftforge.items.IItemHandler import net.minecraftforge.registries.ForgeRegistries import net.minecraftforge.registries.ForgeRegistry import net.minecraftforge.registries.IForgeRegistry +import ru.dbotthepony.mc.otm.core.math.Vector import java.lang.ref.Reference -import java.lang.ref.WeakReference import java.math.BigInteger import java.util.Arrays import java.util.Spliterators @@ -38,149 +36,6 @@ import java.util.stream.Stream import java.util.stream.StreamSupport import kotlin.reflect.KProperty -/** - * Performs type check+cast and sums two numbers. - * - * Returns the same type as on input (adding Double to Float will not return Double, etc.) - */ -fun Number.dynPlus(other: Number): Number { - return when (this) { - is Float -> this + other.toFloat() - is Double -> this + other.toDouble() - is Int -> this + other.toInt() - is Long -> this + other.toLong() - is Short -> this + other.toShort() - is Byte -> this + other.toByte() - - is Decimal -> { - when (other) { - is Float -> this + other.toFloat() - is Double -> this + other.toDouble() - is Int, is Byte, is Short -> this + other.toInt() - is Long -> this + other.toLong() - is Decimal -> this + other - else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") - } - } - - else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") - } -} - -/** - * Performs type check+cast and subtracts two numbers. - * - * Returns the same type as on input (adding Double to Float will not return Double, etc.) - */ -fun Number.dynMinus(other: Number): Number { - return when (this) { - is Float -> this - other.toFloat() - is Double -> this - other.toDouble() - is Int -> this - other.toInt() - is Long -> this - other.toLong() - is Short -> this - other.toShort() - is Byte -> this - other.toByte() - - is Decimal -> { - when (other) { - is Float -> this - other.toFloat() - is Double -> this - other.toDouble() - is Int, is Byte, is Short -> this - other.toInt() - is Long -> this - other.toLong() - is Decimal -> this - other - else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") - } - } - - else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") - } -} - -/** - * Performs type check+cast and multiplies two numbers. - * - * Returns the same type as on input (adding Double to Float will not return Double, etc.) - */ -fun Number.dynTimes(other: Number): Number { - return when (this) { - is Float -> this * other.toFloat() - is Double -> this * other.toDouble() - is Int -> this * other.toInt() - is Long -> this * other.toLong() - is Short -> this * other.toShort() - is Byte -> this * other.toByte() - - is Decimal -> { - when (other) { - is Float -> this * other.toFloat() - is Double -> this * other.toDouble() - is Int, is Byte, is Short -> this * other.toInt() - is Long -> this * other.toLong() - is Decimal -> this * other - else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") - } - } - - else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") - } -} - -/** - * Performs type check+cast and divides two numbers. - * - * Returns the same type as on input (adding Double to Float will not return Double, etc.) - */ -fun Number.dynDiv(other: Number): Number { - return when (this) { - is Float -> this / other.toFloat() - is Double -> this / other.toDouble() - is Int -> this / other.toInt() - is Long -> this / other.toLong() - is Short -> this / other.toShort() - is Byte -> this / other.toByte() - - is Decimal -> { - when (other) { - is Float -> this / other.toFloat() - is Double -> this / other.toDouble() - is Int, is Byte, is Short -> this / other.toInt() - is Long -> this / other.toLong() - is Decimal -> this / other - else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") - } - } - - else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") - } -} - -val Number.isFractional get() = this is Float || this is Double || this is Decimal -val Number.isWhole get() = !isFractional - -fun Number.toDecimal(): Decimal { - return when (this) { - is Decimal -> this - is Float -> Decimal(this) - is Double -> Decimal(this) - is Int -> Decimal(this) - is Byte -> Decimal(this) - is Short -> Decimal(this) - is Long -> Decimal(this) - else -> throw ClassCastException("Can not turn $this into ImpreciseFraction") - } -} - -fun BigInteger(tag: Tag?): BigInteger { - if (tag !is ByteArrayTag) - return BigInteger.ZERO - - return BigInteger(tag.asByteArray) -} - -fun BigInteger.serializeNBT(): ByteArrayTag { - return ByteArrayTag(toByteArray()) -} - fun FriendlyByteBuf.writeBigInteger(value: BigInteger) { writeByteArray(value.toByteArray()) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/LevelExt.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/LevelExt.kt index 3342aefe9..38d70d4b8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/LevelExt.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/LevelExt.kt @@ -3,6 +3,8 @@ package ru.dbotthepony.mc.otm.core import net.minecraft.world.entity.Entity import net.minecraft.world.level.Level import net.minecraft.world.phys.AABB +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.minus import java.util.LinkedList import java.util.function.Predicate import kotlin.math.pow diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/AwareItemStack.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/AwareItemStack.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/AwareItemStack.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/AwareItemStack.kt index 3222c9e15..cc60cfe9d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/AwareItemStack.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/AwareItemStack.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import net.minecraft.world.Container import net.minecraft.world.entity.player.Inventory @@ -7,6 +7,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper.hasBindingCurse import net.minecraftforge.items.IItemHandler import ru.dbotthepony.mc.otm.container.get import ru.dbotthepony.mc.otm.container.set +import ru.dbotthepony.mc.otm.core.get /** * Allows to see the contents of container and extract the item from it diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CapabilityIterators.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/CapabilityIterators.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/CapabilityIterators.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/CapabilityIterators.kt index a04c6358b..eb4760384 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CapabilityIterators.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/CapabilityIterators.kt @@ -1,9 +1,10 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import net.minecraft.world.Container import net.minecraftforge.common.capabilities.Capability import net.minecraftforge.common.capabilities.ICapabilityProvider import ru.dbotthepony.mc.otm.container.iterator +import ru.dbotthepony.mc.otm.core.ifPresentK open class CapabilityIterator

(protected open val parent: Iterator

, private val cap: Capability) : Iterator> { private var provider: P? = null diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSet.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSet.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSet.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSet.kt index 0b75642e9..04e3ff6e7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSet.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSet.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect class ConditionalSet : AbstractSet { // method without boxing diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSupplierSet.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSupplierSet.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSupplierSet.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSupplierSet.kt index f3454ceb0..9e55865fd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ConditionalSupplierSet.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ConditionalSupplierSet.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect class ConditionalSupplierSet : AbstractSet { // method without boxing diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ItemStackIterators.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ItemStackIterators.kt similarity index 83% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/ItemStackIterators.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ItemStackIterators.kt index e64500e50..f3da0a85d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ItemStackIterators.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ItemStackIterators.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import net.minecraft.world.item.ItemStack diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ListSet.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ListSet.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/ListSet.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ListSet.kt index 449e5b585..fd8cdb104 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ListSet.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ListSet.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import com.google.common.collect.ImmutableList import com.google.common.collect.ImmutableSet @@ -56,4 +56,4 @@ class ListSet(private val list: ImmutableList) : List, Set, RandomAc override fun subList(fromIndex: Int, toIndex: Int): List { return list.subList(fromIndex, toIndex) } -} \ No newline at end of file +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/PredicateIterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/PredicateIterator.kt similarity index 97% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/PredicateIterator.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/PredicateIterator.kt index 92ba48e04..ff7c47461 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/PredicateIterator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/PredicateIterator.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import java.util.function.Consumer import java.util.function.Predicate diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ProxiedMap.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ProxiedMap.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/ProxiedMap.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ProxiedMap.kt index 2c4840fd7..eae95106b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/ProxiedMap.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/ProxiedMap.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect abstract class ProxiedMap(protected val backingMap: MutableMap = HashMap()) : MutableMap { protected abstract fun onClear() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SlotIterator.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SlotIterator.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/SlotIterator.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SlotIterator.kt index e8bcb616c..9db7a4561 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SlotIterator.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SlotIterator.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import net.minecraft.world.inventory.AbstractContainerMenu import net.minecraft.world.inventory.Slot diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierList.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierList.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierList.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierList.kt index aa47888fc..82c637fcf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierList.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierList.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import java.util.function.Supplier import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierMap.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierMap.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierMap.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierMap.kt index 3b15b9c08..da61f08b2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/SupplierMap.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/SupplierMap.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import com.google.common.collect.ImmutableSet import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/UUIDIntModifiersMap.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/UUIDIntModifiersMap.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/UUIDIntModifiersMap.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/UUIDIntModifiersMap.kt index 1a566fe4d..7f7a4174a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/UUIDIntModifiersMap.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/collect/UUIDIntModifiersMap.kt @@ -1,8 +1,9 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.collect import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.ListTag import net.minecraftforge.common.util.INBTSerializable +import ru.dbotthepony.mc.otm.core.nbt.contains import java.util.UUID /** diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Decimal.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/Decimal.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt index ddd2f602b..cd3c96913 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Decimal.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Decimal.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.math import net.minecraft.nbt.ByteArrayTag import net.minecraft.nbt.CompoundTag @@ -7,6 +7,10 @@ import net.minecraft.nbt.Tag import net.minecraft.network.FriendlyByteBuf import net.minecraftforge.common.ForgeConfigSpec import ru.dbotthepony.mc.otm.ObservedConfigValue +import ru.dbotthepony.mc.otm.core.util.readDouble +import ru.dbotthepony.mc.otm.core.util.readVarIntLE +import ru.dbotthepony.mc.otm.core.util.writeDouble +import ru.dbotthepony.mc.otm.core.util.writeVarIntLE import java.io.InputStream import java.io.OutputStream import java.math.BigDecimal diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/EuclidMath.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/EuclidMath.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt index 1c9d2d084..ce084ea57 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/EuclidMath.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.math import com.mojang.blaze3d.vertex.PoseStack import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap @@ -11,7 +11,6 @@ import org.joml.Matrix3f import org.joml.Matrix4f import org.joml.Quaternionf import org.joml.Vector3f -import java.lang.Math.toDegrees import java.lang.ref.SoftReference import kotlin.math.* @@ -282,7 +281,8 @@ interface IAngle { } } -data class Angle(override val pitch: Double = 0.0, override val yaw: Double = 0.0, override val roll: Double = 0.0) : IAngle { +data class Angle(override val pitch: Double = 0.0, override val yaw: Double = 0.0, override val roll: Double = 0.0) : + IAngle { companion object { const val PI_HALF = Math.PI / 2.0 @@ -300,7 +300,8 @@ data class Angle(override val pitch: Double = 0.0, override val yaw: Double = 0. } } -data class MutableAngle(override var pitch: Double = 0.0, override var yaw: Double = 0.0, override var roll: Double = 0.0) : IAngle { +data class MutableAngle(override var pitch: Double = 0.0, override var yaw: Double = 0.0, override var roll: Double = 0.0) : + IAngle { companion object { fun deg(pitch: Double, yaw: Double, roll: Double): MutableAngle { return MutableAngle(Math.toRadians(pitch), Math.toRadians(yaw), Math.toRadians(roll)) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Math.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Math.kt similarity index 97% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/Math.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Math.kt index a5955aa08..248380d83 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Math.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/Math.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.math import java.math.BigDecimal import java.math.BigInteger diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/MatrixExt.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/MatrixExt.kt similarity index 86% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/MatrixExt.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/math/MatrixExt.kt index e6e1281fc..f12e17d7d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/MatrixExt.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/MatrixExt.kt @@ -1,12 +1,19 @@ @file:Suppress("unused") -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.math import org.joml.Matrix3f import org.joml.Matrix4f import org.joml.Vector3f import org.joml.Vector4f +import ru.dbotthepony.mc.otm.core.math.IAngle +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.asVector3f +import ru.dbotthepony.mc.otm.core.math.rotateAroundThis +import ru.dbotthepony.mc.otm.core.math.rotation +import ru.dbotthepony.mc.otm.core.math.rotationDegrees +import ru.dbotthepony.mc.otm.core.math.unaryMinus fun Matrix4f.rotate(angle: IAngle): Matrix4f { mul(angle.rotationXYZW()) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/NumberExt.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/NumberExt.kt new file mode 100644 index 000000000..8c4c3dd64 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/NumberExt.kt @@ -0,0 +1,147 @@ +package ru.dbotthepony.mc.otm.core.math + +import net.minecraft.nbt.ByteArrayTag +import net.minecraft.nbt.Tag +import java.math.BigInteger + +/** + * Performs type check+cast and sums two numbers. + * + * Returns the same type as on input (adding Double to Float will not return Double, etc.) + */ +fun Number.dynPlus(other: Number): Number { + return when (this) { + is Float -> this + other.toFloat() + is Double -> this + other.toDouble() + is Int -> this + other.toInt() + is Long -> this + other.toLong() + is Short -> this + other.toShort() + is Byte -> this + other.toByte() + + is Decimal -> { + when (other) { + is Float -> this + other.toFloat() + is Double -> this + other.toDouble() + is Int, is Byte, is Short -> this + other.toInt() + is Long -> this + other.toLong() + is Decimal -> this + other + else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") + } + } + + else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") + } +} + +/** + * Performs type check+cast and subtracts two numbers. + * + * Returns the same type as on input (adding Double to Float will not return Double, etc.) + */ +fun Number.dynMinus(other: Number): Number { + return when (this) { + is Float -> this - other.toFloat() + is Double -> this - other.toDouble() + is Int -> this - other.toInt() + is Long -> this - other.toLong() + is Short -> this - other.toShort() + is Byte -> this - other.toByte() + + is Decimal -> { + when (other) { + is Float -> this - other.toFloat() + is Double -> this - other.toDouble() + is Int, is Byte, is Short -> this - other.toInt() + is Long -> this - other.toLong() + is Decimal -> this - other + else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") + } + } + + else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") + } +} + +/** + * Performs type check+cast and multiplies two numbers. + * + * Returns the same type as on input (adding Double to Float will not return Double, etc.) + */ +fun Number.dynTimes(other: Number): Number { + return when (this) { + is Float -> this * other.toFloat() + is Double -> this * other.toDouble() + is Int -> this * other.toInt() + is Long -> this * other.toLong() + is Short -> this * other.toShort() + is Byte -> this * other.toByte() + + is Decimal -> { + when (other) { + is Float -> this * other.toFloat() + is Double -> this * other.toDouble() + is Int, is Byte, is Short -> this * other.toInt() + is Long -> this * other.toLong() + is Decimal -> this * other + else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") + } + } + + else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") + } +} + +/** + * Performs type check+cast and divides two numbers. + * + * Returns the same type as on input (adding Double to Float will not return Double, etc.) + */ +fun Number.dynDiv(other: Number): Number { + return when (this) { + is Float -> this / other.toFloat() + is Double -> this / other.toDouble() + is Int -> this / other.toInt() + is Long -> this / other.toLong() + is Short -> this / other.toShort() + is Byte -> this / other.toByte() + + is Decimal -> { + when (other) { + is Float -> this / other.toFloat() + is Double -> this / other.toDouble() + is Int, is Byte, is Short -> this / other.toInt() + is Long -> this / other.toLong() + is Decimal -> this / other + else -> throw IllegalStateException("I don't know what to do with ${other::class.qualifiedName} (right hand operand)") + } + } + + else -> throw IllegalStateException("I don't know what to do with ${this::class.qualifiedName} (left hand operand)") + } +} + +val Number.isFractional get() = this is Float || this is Double || this is Decimal +val Number.isWhole get() = !isFractional +fun Number.toDecimal(): Decimal { + return when (this) { + is Decimal -> this + is Float -> Decimal(this) + is Double -> Decimal(this) + is Int -> Decimal(this) + is Byte -> Decimal(this) + is Short -> Decimal(this) + is Long -> Decimal(this) + else -> throw ClassCastException("Can not turn $this into ImpreciseFraction") + } +} + +fun BigInteger(tag: Tag?): BigInteger { + if (tag !is ByteArrayTag) + return BigInteger.ZERO + + return BigInteger(tag.asByteArray) +} + +fun BigInteger.serializeNBT(): ByteArrayTag { + return ByteArrayTag(toByteArray()) +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/RGBAColor.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/RGBAColor.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/RGBAColor.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/math/RGBAColor.kt index 44e049b2a..5aff0aa32 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/RGBAColor.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/RGBAColor.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.math import com.mojang.blaze3d.systems.RenderSystem import net.minecraft.ChatFormatting diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagDelegates.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagDelegates.kt similarity index 97% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagDelegates.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagDelegates.kt index c3fc4a3df..7b6161557 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagDelegates.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagDelegates.kt @@ -1,7 +1,6 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.nbt import net.minecraft.nbt.CompoundTag -import net.minecraft.nbt.LongArrayTag import java.util.* import kotlin.properties.ReadWriteProperty import kotlin.reflect.KProperty diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagExt.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagExt.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagExt.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagExt.kt index 2a93691b8..042eb8c63 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/CompoundTagExt.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/nbt/CompoundTagExt.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.nbt import net.minecraft.nbt.ByteArrayTag import net.minecraft.nbt.ByteTag diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/DataStreams.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/DataStreams.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt index 77d78a59d..095b0addd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/DataStreams.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt @@ -1,6 +1,8 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.util import net.minecraft.world.item.ItemStack +import ru.dbotthepony.mc.otm.core.math.readDecimal +import ru.dbotthepony.mc.otm.core.math.writeDecimal import java.io.DataInputStream import java.io.DataOutputStream import java.io.InputStream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/FriendlyStreams.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/FriendlyStreams.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/FriendlyStreams.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/util/FriendlyStreams.kt index 53769f924..4beddf9d8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/FriendlyStreams.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/FriendlyStreams.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.util import io.netty.handler.codec.EncoderException import net.minecraft.nbt.CompoundTag diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Formatting.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/SiPrefix.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/core/Formatting.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/core/util/SiPrefix.kt index e67b33a37..62e093cdf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Formatting.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/SiPrefix.kt @@ -1,7 +1,12 @@ -package ru.dbotthepony.mc.otm.core +package ru.dbotthepony.mc.otm.core.util import com.google.common.collect.ImmutableList import net.minecraft.network.chat.Component +import ru.dbotthepony.mc.otm.core.TextComponent +import ru.dbotthepony.mc.otm.core.TranslatableComponent +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.isNegative +import ru.dbotthepony.mc.otm.core.math.isZero import java.math.BigDecimal import java.math.BigInteger @@ -396,11 +401,13 @@ fun Int.formatPower(decimalPlaces: Int = 2) = formatSiComponent(POWER_NAME, deci fun Decimal.formatPower(decimalPlaces: Int = 2) = formatSiComponent(POWER_NAME, decimalPlaces) fun Decimal.formatMatter(decimalPlaces: Int = 2) = formatSiComponent(MATTER_NAME, decimalPlaces) -fun Decimal.formatMatterFull(decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.matter.format", formatSiComponent(MATTER_NAME, decimalPlaces)) +fun Decimal.formatMatterFull(decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.matter.format", formatSiComponent( + MATTER_NAME, decimalPlaces)) fun BigInteger.formatPower(decimalPlaces: Int = 2) = formatSiComponent(POWER_NAME, decimalPlaces) fun BigInteger.formatMatter(decimalPlaces: Int = 2) = formatSiComponent(MATTER_NAME, decimalPlaces) -fun BigInteger.formatMatterFull(decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.matter.format", formatSiComponent(MATTER_NAME, decimalPlaces)) +fun BigInteger.formatMatterFull(decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.matter.format", formatSiComponent( + MATTER_NAME, decimalPlaces)) fun formatPowerLevel(a: Decimal, b: Decimal, decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.level", a.formatPower(decimalPlaces), b.formatPower(decimalPlaces)) fun formatMatterLevel(a: Decimal, b: Decimal, decimalPlaces: Int = 2) = TranslatableComponent("otm.gui.level", a.formatMatter(decimalPlaces), b.formatMatter(decimalPlaces)) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/ItemStackCodec.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/ItemStackCodec.kt index a2a42a34d..da27c1d3f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/ItemStackCodec.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/ItemStackCodec.kt @@ -22,6 +22,7 @@ import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.core.registryName +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import java.lang.reflect.Type diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/SerializedFunctionRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/SerializedFunctionRegistry.kt index 24f85d16e..548d43200 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/SerializedFunctionRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/SerializedFunctionRegistry.kt @@ -19,18 +19,18 @@ import it.unimi.dsi.fastutil.io.FastByteArrayInputStream import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream import net.minecraft.network.FriendlyByteBuf import net.minecraft.resources.ResourceLocation -import ru.dbotthepony.mc.otm.core.readType -import ru.dbotthepony.mc.otm.core.readVarIntLE +import ru.dbotthepony.mc.otm.core.util.readType +import ru.dbotthepony.mc.otm.core.util.readVarIntLE +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set -import ru.dbotthepony.mc.otm.core.writeType -import ru.dbotthepony.mc.otm.core.writeVarIntLE +import ru.dbotthepony.mc.otm.core.util.writeType +import ru.dbotthepony.mc.otm.core.util.writeVarIntLE import java.io.DataInputStream import java.io.DataOutputStream import java.lang.reflect.Type import java.util.Base64 import java.util.Collections import java.util.LinkedList -import java.util.function.Consumer class SerializedFunctionRegistry(val gson: Gson = Gson()) : JsonSerializer>, JsonDeserializer>, TypeAdapter>() { fun interface AnonymousFunction { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceCondition.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceCondition.kt index bb92e5431..74eb3c34b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceCondition.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceCondition.kt @@ -9,6 +9,7 @@ import net.minecraft.world.level.storage.loot.LootContext import net.minecraft.world.level.storage.loot.Serializer import net.minecraft.world.level.storage.loot.predicates.LootItemCondition import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.registry.MLootItemConditions diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceWithPlaytimeCondition.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceWithPlaytimeCondition.kt index bcfee2b3d..ba23eea7d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceWithPlaytimeCondition.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ChanceWithPlaytimeCondition.kt @@ -10,6 +10,7 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams import net.minecraft.world.level.storage.loot.predicates.LootItemCondition import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType import ru.dbotthepony.mc.otm.capability.matteryPlayer +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.data.get import ru.dbotthepony.mc.otm.registry.MLootItemConditions diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ItemInInventoryCondition.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ItemInInventoryCondition.kt index 39dc2ef2c..353f5a8c0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ItemInInventoryCondition.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/ItemInInventoryCondition.kt @@ -16,6 +16,7 @@ import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.capability.itemsStream import ru.dbotthepony.mc.otm.core.registryName +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.data.get import ru.dbotthepony.mc.otm.registry.MLootItemConditions diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/loot/RandomizerFunction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/loot/RandomizerFunction.kt index b764464c2..822fdee36 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/loot/RandomizerFunction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/loot/RandomizerFunction.kt @@ -14,6 +14,7 @@ import net.minecraft.world.level.storage.loot.functions.LootItemFunction import net.minecraft.world.level.storage.loot.functions.LootItemFunctionType import net.minecraft.world.level.storage.loot.parameters.LootContextParams import org.apache.logging.log4j.LogManager +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.registry.MItemFunctionTypes diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/PlasmaProjectile.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/PlasmaProjectile.kt index 43096f523..966f0f13d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/PlasmaProjectile.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/PlasmaProjectile.kt @@ -12,7 +12,6 @@ import net.minecraft.world.phys.BlockHitResult import net.minecraft.world.phys.EntityHitResult import net.minecraft.world.phys.HitResult import net.minecraftforge.event.ForgeEventFactory -import ru.dbotthepony.mc.otm.core.Vector import ru.dbotthepony.mc.otm.registry.MEntityTypes import ru.dbotthepony.mc.otm.registry.PlasmaDamageSource diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/Abstract6Graph.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/Abstract6Graph.kt index 915eb16d9..8a136c671 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/Abstract6Graph.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/Abstract6Graph.kt @@ -6,7 +6,7 @@ import net.minecraft.core.SectionPos import net.minecraft.server.level.ServerLevel import net.minecraft.world.level.block.entity.BlockEntity import ru.dbotthepony.mc.otm.core.IConditionalTickable -import ru.dbotthepony.mc.otm.core.plus +import ru.dbotthepony.mc.otm.core.math.plus import ru.dbotthepony.mc.otm.addTicker import java.util.* import kotlin.collections.ArrayList diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/matter/MatterNetworkGraph.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/matter/MatterNetworkGraph.kt index 4e7ca9b03..9cc19b1e8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/graph/matter/MatterNetworkGraph.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/graph/matter/MatterNetworkGraph.kt @@ -7,7 +7,7 @@ import net.minecraft.world.level.block.entity.BlockEntity import ru.dbotthepony.mc.otm.capability.FlowDirection import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.matter.* -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.graph.Abstract6Graph import ru.dbotthepony.mc.otm.graph.Graph6Node import java.util.* diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/BatteryItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/BatteryItem.kt index 5ae18f6a0..1c92144ac 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/BatteryItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/BatteryItem.kt @@ -23,6 +23,7 @@ import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.registry.MRegistry import ru.dbotthepony.mc.otm.runIfClient import kotlin.math.roundToInt @@ -39,7 +40,8 @@ open class BatteryItem : Item { return super.receiveEnergy(howMuch, simulate) } - override val missingPower: Decimal get() { + override val missingPower: Decimal + get() { return if (isCreative) Decimal.LONG_MAX_VALUE else super.missingPower } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt index eb07a3736..f9065728c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/EnergySwordItem.kt @@ -35,10 +35,10 @@ import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.capability.matteryEnergy import ru.dbotthepony.mc.otm.capability.matteryPlayer -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.defineDecimal +import ru.dbotthepony.mc.otm.core.math.defineDecimal import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.core.orNull import ru.dbotthepony.mc.otm.registry.EMPDamageSource diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterCapacitorItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterCapacitorItem.kt index 4eda3a7e9..78a446aa8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterCapacitorItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterCapacitorItem.kt @@ -17,8 +17,8 @@ import ru.dbotthepony.mc.otm.capability.FlowDirection import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.matter.* -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.formatMatter +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.util.formatMatter import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.core.tagNotNull import javax.annotation.ParametersAreNonnullByDefault @@ -44,11 +44,13 @@ class MatterCapacitorItem : Item { stack.tagNotNull.put("matter", value.serializeNBT()) } - override val maxStoredMatter: Decimal get() { + override val maxStoredMatter: Decimal + get() { return capacity } - override val missingMatter: Decimal get() { + override val missingMatter: Decimal + get() { return if (isCreative) Decimal.LONG_MAX_VALUE else super.missingMatter } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt index 9d533f3c8..90bcfd2cf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt @@ -6,12 +6,11 @@ import net.minecraft.world.item.Item import net.minecraft.world.item.ItemStack import net.minecraft.world.item.TooltipFlag import net.minecraft.world.level.Level -import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.ServerConfig import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.matter.IMatterItem -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.matter.IMatterValue import ru.dbotthepony.mc.otm.matter.MatterValue diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PatternStorageItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PatternStorageItem.kt index 93ffbfb2f..f1812f5b9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PatternStorageItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PatternStorageItem.kt @@ -1,6 +1,5 @@ package ru.dbotthepony.mc.otm.item -import ru.dbotthepony.mc.otm.OverdriveThatMatters import net.minecraft.world.item.ItemStack import net.minecraft.nbt.CompoundTag import net.minecraftforge.common.capabilities.ICapabilityProvider @@ -11,14 +10,13 @@ import net.minecraftforge.common.util.LazyOptional import net.minecraft.nbt.ListTag import net.minecraft.core.Direction import net.minecraft.network.chat.Component -import net.minecraft.util.Mth import net.minecraft.world.item.Item import net.minecraft.world.item.Rarity import net.minecraft.world.level.Level import net.minecraftforge.common.capabilities.Capability import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.capability.matter.* -import ru.dbotthepony.mc.otm.core.ifHas +import ru.dbotthepony.mc.otm.core.nbt.ifHas import java.util.* import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PortableCondensationDriveItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PortableCondensationDriveItem.kt index 48d62cfd0..4aa4e152c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PortableCondensationDriveItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PortableCondensationDriveItem.kt @@ -1,7 +1,6 @@ package ru.dbotthepony.mc.otm.item import ru.dbotthepony.mc.otm.capability.drive.DrivePool.isLegalAccess -import ru.dbotthepony.mc.otm.OverdriveThatMatters import net.minecraft.world.item.ItemStack import net.minecraftforge.common.capabilities.ICapabilityProvider import net.minecraftforge.common.util.LazyOptional @@ -18,13 +17,11 @@ import net.minecraft.world.item.Item import net.minecraft.world.level.Level import net.minecraftforge.common.capabilities.Capability import net.minecraftforge.event.ForgeEventFactory -import net.minecraftforge.eventbus.api.SubscribeEvent import net.minecraftforge.event.entity.player.EntityItemPickupEvent -import net.minecraftforge.eventbus.api.EventPriority import ru.dbotthepony.mc.otm.core.TextComponent import ru.dbotthepony.mc.otm.capability.drive.DrivePool import ru.dbotthepony.mc.otm.container.ItemFilter -import ru.dbotthepony.mc.otm.core.ifHas +import ru.dbotthepony.mc.otm.core.nbt.ifHas import java.math.BigInteger import java.util.* diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/ProceduralExoPackSlotUpgradeItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/ProceduralExoPackSlotUpgradeItem.kt index 9128da3b0..9864f1be7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/ProceduralExoPackSlotUpgradeItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/ProceduralExoPackSlotUpgradeItem.kt @@ -9,7 +9,7 @@ import net.minecraft.world.item.Rarity import net.minecraft.world.item.TooltipFlag import net.minecraft.world.level.Level import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.tagNotNull import ru.dbotthepony.mc.otm.data.loot.IRandomizableItem import java.util.* diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/QuantumBatteryItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/QuantumBatteryItem.kt index 2772269ce..84373254a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/QuantumBatteryItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/QuantumBatteryItem.kt @@ -29,6 +29,11 @@ import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.compat.mekanism.Mattery2MekanismEnergyWrapper import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.readDecimal +import ru.dbotthepony.mc.otm.core.math.writeDecimal +import ru.dbotthepony.mc.otm.core.nbt.set +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.network.GenericNetworkChannel import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.network.packetHandled @@ -198,7 +203,8 @@ class QuantumBatteryItem : Item { data.energy = value } - val passed: Decimal get() { + val passed: Decimal + get() { if (data.parent == null) { determineQuantumLink() } @@ -210,7 +216,8 @@ class QuantumBatteryItem : Item { return data.passed } - val received: Decimal get() { + val received: Decimal + get() { if (data.parent == null) { determineQuantumLink() } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/SingleUseBatteryItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/SingleUseBatteryItem.kt index cbe908c47..cce7ef7ee 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/SingleUseBatteryItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/SingleUseBatteryItem.kt @@ -18,6 +18,7 @@ import ru.dbotthepony.mc.otm.capability.energy.ItemEnergyStorageImpl import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal open class SingleUseBatteryItem( private val _capacity: () -> Decimal, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/AbstractWeaponItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/AbstractWeaponItem.kt index bf58e6e3c..fcd607fc7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/AbstractWeaponItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/AbstractWeaponItem.kt @@ -26,7 +26,22 @@ import ru.dbotthepony.mc.otm.client.font import ru.dbotthepony.mc.otm.client.render.drawRect import ru.dbotthepony.mc.otm.client.render.setDrawColor import ru.dbotthepony.mc.otm.core.* -import ru.dbotthepony.mc.otm.core.Vector +import ru.dbotthepony.mc.otm.core.math.Angle +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.bezierCurve +import ru.dbotthepony.mc.otm.core.math.component1 +import ru.dbotthepony.mc.otm.core.math.component2 +import ru.dbotthepony.mc.otm.core.math.component3 +import ru.dbotthepony.mc.otm.core.math.linearInterpolation +import ru.dbotthepony.mc.otm.core.math.rotateX +import ru.dbotthepony.mc.otm.core.math.rotateY +import ru.dbotthepony.mc.otm.core.math.rotateZ +import ru.dbotthepony.mc.otm.core.nbt.EMPTY_UUID +import ru.dbotthepony.mc.otm.core.nbt.booleans +import ru.dbotthepony.mc.otm.core.nbt.ints +import ru.dbotthepony.mc.otm.core.nbt.uuids +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.network.WeaponNetworkChannel import java.util.* @@ -284,7 +299,7 @@ abstract class AbstractWeaponItem(val tables: KClass, pr if (it.compatibleDataTable(predictedData)) (it as AbstractWeaponItem).dataTable = predictedData - val interp = linearInterpolation( + val interp = ru.dbotthepony.mc.otm.core.math.linearInterpolation( it.ironSightsProgress( player.mainHandItem, event.partialTick @@ -293,7 +308,9 @@ abstract class AbstractWeaponItem(val tables: KClass, pr val time = System.nanoTime() val diff = abs(lastFovTime - time) - lastFov = linearInterpolation(diff.coerceIn(0L, 10_000_000L).toDouble() / 10_000_000.0, lastFov, interp).coerceAtLeast(0.001) + lastFov = ru.dbotthepony.mc.otm.core.math.linearInterpolation( + diff.coerceIn(0L, 10_000_000L).toDouble() / 10_000_000.0, lastFov, interp + ).coerceAtLeast(0.001) lastFovTime = time event.fov /= lastFov diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaRifleItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaRifleItem.kt index 4035fc729..053b96d5e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaRifleItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaRifleItem.kt @@ -4,8 +4,9 @@ import net.minecraft.sounds.SoundSource import net.minecraft.world.entity.player.Player import net.minecraft.world.item.ItemStack import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact -import ru.dbotthepony.mc.otm.core.* -import ru.dbotthepony.mc.otm.core.Vector +import ru.dbotthepony.mc.otm.core.math.Angle +import ru.dbotthepony.mc.otm.core.math.Vector +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.entity.PlasmaProjectile import ru.dbotthepony.mc.otm.core.position import ru.dbotthepony.mc.otm.registry.MSoundEvents diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt index 2bd11a3ff..e33c8662d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/PlasmaWeaponItem.kt @@ -21,6 +21,12 @@ import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.getBarColor import ru.dbotthepony.mc.otm.capability.energy.getBarWidth import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.bezierCurve +import ru.dbotthepony.mc.otm.core.nbt.doubles +import ru.dbotthepony.mc.otm.core.nbt.ints +import ru.dbotthepony.mc.otm.core.nbt.set +import ru.dbotthepony.mc.otm.core.util.formatPower import ru.dbotthepony.mc.otm.registry.MSoundEvents import kotlin.reflect.KClass diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/VelocityCalculation.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/VelocityCalculation.kt index c94c26837..a3d95a956 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/VelocityCalculation.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/VelocityCalculation.kt @@ -3,8 +3,8 @@ package ru.dbotthepony.mc.otm.item.weapon import net.minecraft.util.Mth import net.minecraft.world.entity.Entity import net.minecraft.world.phys.Vec3 -import ru.dbotthepony.mc.otm.core.plus -import ru.dbotthepony.mc.otm.core.times +import ru.dbotthepony.mc.otm.core.math.plus +import ru.dbotthepony.mc.otm.core.math.times import java.util.* import kotlin.math.PI import kotlin.math.cos diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/AbstractRegistryAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/AbstractRegistryAction.kt index 6b77baf72..7922d3331 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/AbstractRegistryAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/AbstractRegistryAction.kt @@ -8,7 +8,8 @@ import net.minecraft.resources.ResourceLocation import net.minecraft.tags.ItemTags import net.minecraft.tags.TagKey import net.minecraft.world.item.Item -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set sealed class AbstractRegistryAction : Comparable { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BlacklistAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BlacklistAction.kt index ae9a980ea..41ec5e35e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BlacklistAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BlacklistAction.kt @@ -4,6 +4,7 @@ import com.google.gson.JsonObject import net.minecraft.resources.ResourceLocation import net.minecraft.tags.TagKey import net.minecraft.world.item.Item +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set class BlacklistAction : DeleteAction { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BoundMatterFunction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BoundMatterFunction.kt index f4a239e52..27e55bf04 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BoundMatterFunction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/BoundMatterFunction.kt @@ -2,7 +2,8 @@ package ru.dbotthepony.mc.otm.matter import com.google.gson.JsonElement import com.google.gson.JsonObject -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set class BoundMatterFunction(val function: MatterFunction, val value: T) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/ComputeAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/ComputeAction.kt index 9ffb62311..bdb723c09 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/ComputeAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/ComputeAction.kt @@ -10,8 +10,9 @@ import net.minecraft.tags.TagKey import net.minecraft.world.item.Item import net.minecraft.world.level.ItemLike import net.minecraftforge.registries.ForgeRegistries -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.registryName +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.data.stream import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/DeleteAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/DeleteAction.kt index 58252bdd1..ad5b7b29a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/DeleteAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/DeleteAction.kt @@ -4,6 +4,7 @@ import com.google.gson.JsonObject import net.minecraft.resources.ResourceLocation import net.minecraft.tags.TagKey import net.minecraft.world.item.Item +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set open class DeleteAction : AbstractRegistryAction { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt index 7fc49dd3b..6367157d2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/IMatterValue.kt @@ -1,9 +1,9 @@ package ru.dbotthepony.mc.otm.matter import net.minecraft.network.FriendlyByteBuf -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.readDecimal -import ru.dbotthepony.mc.otm.core.writeDecimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.readDecimal +import ru.dbotthepony.mc.otm.core.math.writeDecimal interface IMatterValue : Comparable { val matter: Decimal diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/InsertAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/InsertAction.kt index b0f54b201..31f0ce082 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/InsertAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/InsertAction.kt @@ -4,8 +4,9 @@ import com.google.gson.JsonObject import net.minecraft.resources.ResourceLocation import net.minecraft.tags.TagKey import net.minecraft.world.item.Item -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.probablyParallelStream +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set class InsertAction : AbstractRegistryAction { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterDataProvider.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterDataProvider.kt index dc1e34769..42b89a276 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterDataProvider.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterDataProvider.kt @@ -1,7 +1,6 @@ package ru.dbotthepony.mc.otm.matter import net.minecraft.data.CachedOutput -import net.minecraft.data.DataGenerator import net.minecraft.data.DataProvider import net.minecraft.data.PackOutput import net.minecraft.resources.ResourceLocation @@ -9,8 +8,7 @@ import net.minecraft.tags.TagKey import net.minecraft.world.item.Item import net.minecraft.world.level.ItemLike import net.minecraftforge.data.event.GatherDataEvent -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.WriteOnce import ru.dbotthepony.mc.otm.core.registryName import java.util.Collections @@ -318,217 +316,281 @@ open class MatterDataProvider(val modid: String? = null) : DataProvider { } } - fun Scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(matterValue, complexity, configurator) fun scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, matterValue, complexity, configurator) fun scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, matterValue, complexity, configurator) - fun scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun Scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun Scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun Scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun Scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(matterValue, complexity, configurator) fun scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, matterValue, complexity, configurator) fun scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, matterValue, complexity, configurator) - fun scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity, configurator) + fun scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity, configurator) - fun scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) - fun scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue), complexity.toDouble(), configurator) + fun scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue), complexity.toDouble(), configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue), complexity.toDouble(), configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue), complexity.toDouble(), configurator) @@ -561,110 +623,142 @@ open class MatterDataProvider(val modid: String? = null) : DataProvider { fun Scope(matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(matterValue * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, matterValue * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, matterValue * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(matterValue * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, matterValue * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, matterValue * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Scope.() -> Unit) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) @@ -672,110 +766,142 @@ open class MatterDataProvider(val modid: String? = null) : DataProvider { fun Scope(matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(matterValue * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, matterValue * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, matterValue * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun Scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun Scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun Scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(matterValue * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, matterValue * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Decimal, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, matterValue * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Double, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Int, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Float, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Int, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Long, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Double, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) - fun scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) + fun scope( matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope( + Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(item: ItemLike, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(item, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) fun scope(tag: TagKey, matterValue: Float, complexity: Long, configurator: Consumer) = this@MatterDataProvider.Scope(tag, Decimal(matterValue) * this.matterValue, complexity * this.complexity, configurator) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterFunction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterFunction.kt index 37b2e7a9f..f4774ae06 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterFunction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterFunction.kt @@ -1,9 +1,9 @@ package ru.dbotthepony.mc.otm.matter import com.google.gson.JsonParseException -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.integerDivisionDown -import ru.dbotthepony.mc.otm.core.integerDivisionUp +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionUp enum class MatterFunction { ADD { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt index d9d2f187c..83d058abd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/MatterManager.kt @@ -62,17 +62,17 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.drive.IMatteryDrive import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.container.stream -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.TextComponent import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.filterNotNull -import ru.dbotthepony.mc.otm.core.formatMatter -import ru.dbotthepony.mc.otm.core.formatMatterFull -import ru.dbotthepony.mc.otm.core.formatSiComponent -import ru.dbotthepony.mc.otm.core.formatTickDuration +import ru.dbotthepony.mc.otm.core.util.formatMatter +import ru.dbotthepony.mc.otm.core.util.formatMatterFull +import ru.dbotthepony.mc.otm.core.util.formatSiComponent +import ru.dbotthepony.mc.otm.core.util.formatTickDuration import ru.dbotthepony.mc.otm.core.ifPresentK import ru.dbotthepony.mc.otm.core.isActuallyEmpty -import ru.dbotthepony.mc.otm.core.isZero +import ru.dbotthepony.mc.otm.core.math.isZero import ru.dbotthepony.mc.otm.core.orNull import ru.dbotthepony.mc.otm.core.readItemType import ru.dbotthepony.mc.otm.core.registryName diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/UpdateAction.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/UpdateAction.kt index 5a255cf50..e1a0d0799 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/matter/UpdateAction.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/matter/UpdateAction.kt @@ -8,7 +8,8 @@ import com.google.gson.JsonParseException import net.minecraft.resources.ResourceLocation import net.minecraft.tags.TagKey import net.minecraft.world.item.Item -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import ru.dbotthepony.mc.otm.data.stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt index 827b45194..87af8898d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/EnergyCounterMenu.kt @@ -7,7 +7,7 @@ import net.minecraft.world.inventory.Slot import net.minecraft.world.level.block.Block import ru.dbotthepony.mc.otm.block.EnergyCounterBlock import ru.dbotthepony.mc.otm.block.entity.EnergyCounterBlockEntity -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.menu.widget.NumberPlayerInputWidget import ru.dbotthepony.mc.otm.menu.widget.OneWayPlayerInputWidget import ru.dbotthepony.mc.otm.registry.MMenus diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt index 63199e3da..925cec1ef 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/ItemMonitorMenu.kt @@ -11,7 +11,7 @@ import net.minecraftforge.network.PacketDistributor import ru.dbotthepony.mc.otm.block.entity.storage.ItemMonitorBlockEntity import ru.dbotthepony.mc.otm.block.entity.storage.ItemMonitorPlayerSettings import ru.dbotthepony.mc.otm.container.get -import ru.dbotthepony.mc.otm.core.nonEmpty +import ru.dbotthepony.mc.otm.core.collect.nonEmpty import ru.dbotthepony.mc.otm.menu.data.INetworkedItemViewProvider import ru.dbotthepony.mc.otm.menu.data.NetworkedItemView import ru.dbotthepony.mc.otm.network.MenuNetworkChannel diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt index 759e5a326..b03c8411b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterCapacitorBankMenu.kt @@ -4,7 +4,7 @@ import net.minecraft.world.SimpleContainer import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.core.ImmutableList import ru.dbotthepony.mc.otm.block.entity.matter.MatterCapacitorBankBlockEntity -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import ru.dbotthepony.mc.otm.registry.MMenus diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt index 5c1384149..81eb2fea8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatterScannerMenu.kt @@ -7,7 +7,7 @@ import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import net.minecraft.world.SimpleContainer import net.minecraft.world.item.ItemStack -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.matter.MatterManager import ru.dbotthepony.mc.otm.registry.MMenus diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt index 7b4990b01..146e867e2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/PatternStorageMenu.kt @@ -4,7 +4,7 @@ import net.minecraft.world.SimpleContainer import net.minecraft.world.entity.player.Inventory import ru.dbotthepony.mc.otm.core.ImmutableList import ru.dbotthepony.mc.otm.block.entity.matter.PatternStorageBlockEntity -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget import ru.dbotthepony.mc.otm.registry.MMenus diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/widget/LevelGaugeWidget.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/widget/LevelGaugeWidget.kt index 7c8b51a89..f2ab00129 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/widget/LevelGaugeWidget.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/widget/LevelGaugeWidget.kt @@ -3,13 +3,13 @@ package ru.dbotthepony.mc.otm.menu.widget import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.matter.IMatterStorage import ru.dbotthepony.mc.otm.capability.matter.IPatternStorage -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.menu.MatteryMenu @Suppress("unused") class LevelGaugeWidget(menu: MatteryMenu) : AbstractWidget(menu) { var levelProvider = { Decimal.ONE } - var maxLevelProvider = {Decimal.ONE } + var maxLevelProvider = { Decimal.ONE } var level by menu.mSynchronizer.fraction() private set @@ -42,8 +42,8 @@ class LevelGaugeWidget(menu: MatteryMenu) : AbstractWidget(menu) { ) : this(menu) { if (patterns == null) return - this.levelProvider = {Decimal(patterns.storedPatterns)} - this.maxLevelProvider = {Decimal(patterns.patternCapacity)} + this.levelProvider = { Decimal(patterns.storedPatterns) } + this.maxLevelProvider = { Decimal(patterns.patternCapacity) } } constructor( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt index 9e9427b2a..1761b0832 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt @@ -11,6 +11,25 @@ import it.unimi.dsi.fastutil.objects.ReferenceArraySet import net.minecraft.world.item.ItemStack import org.apache.logging.log4j.LogManager import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.collect.ProxiedMap +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.util.BigDecimalValueCodec +import ru.dbotthepony.mc.otm.core.util.BooleanValueCodec +import ru.dbotthepony.mc.otm.core.util.ByteValueCodec +import ru.dbotthepony.mc.otm.core.util.DoubleValueCodec +import ru.dbotthepony.mc.otm.core.util.EnumValueCodec +import ru.dbotthepony.mc.otm.core.util.FloatValueCodec +import ru.dbotthepony.mc.otm.core.util.IStreamCodec +import ru.dbotthepony.mc.otm.core.util.ImpreciseFractionValueCodec +import ru.dbotthepony.mc.otm.core.util.IntValueCodec +import ru.dbotthepony.mc.otm.core.util.ItemStackValueCodec +import ru.dbotthepony.mc.otm.core.util.LongValueCodec +import ru.dbotthepony.mc.otm.core.util.ShortValueCodec +import ru.dbotthepony.mc.otm.core.util.UUIDValueCodec +import ru.dbotthepony.mc.otm.core.util.VarIntValueCodec +import ru.dbotthepony.mc.otm.core.util.VarLongValueCodec +import ru.dbotthepony.mc.otm.core.util.readVarIntLE +import ru.dbotthepony.mc.otm.core.util.writeVarIntLE import ru.dbotthepony.mc.otm.secondTime import java.io.DataInputStream import java.io.DataOutputStream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerNetworkChannel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerNetworkChannel.kt index 606d5745b..755bae55d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerNetworkChannel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerNetworkChannel.kt @@ -26,7 +26,7 @@ import ru.dbotthepony.mc.otm.client.render.GlitchRenderer import ru.dbotthepony.mc.otm.client.render.ShockwaveRenderer import ru.dbotthepony.mc.otm.container.get import ru.dbotthepony.mc.otm.container.set -import ru.dbotthepony.mc.otm.core.Vector +import ru.dbotthepony.mc.otm.core.math.Vector import ru.dbotthepony.mc.otm.menu.AndroidStationMenu import ru.dbotthepony.mc.otm.menu.ExoPackInventoryMenu import ru.dbotthepony.mc.otm.registry.AndroidFeatures diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/Helpers.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/Helpers.kt index d0500fc95..dee95301c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/Helpers.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/recipe/Helpers.kt @@ -9,6 +9,7 @@ import net.minecraft.world.item.Items import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.core.registryName import ru.dbotthepony.mc.otm.container.set +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set fun stackFromJson(obj: JsonElement, field: String = ""): ItemStack { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/Ext.kt index fdbf81a00..5072e9935 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/Ext.kt @@ -9,7 +9,7 @@ import net.minecraft.resources.ResourceLocation import net.minecraft.world.item.DyeColor import net.minecraftforge.registries.DeferredRegister import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.core.SupplierMap +import ru.dbotthepony.mc.otm.core.collect.SupplierMap private fun DeferredRegister.doColored(prefix: String, factory: (color: DyeColor, name: String) -> T): MutableCollection T>> { return mutableListOf( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt index 7f4862af9..9d58d7dc9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt @@ -15,7 +15,7 @@ import net.minecraftforge.registries.DeferredRegister import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.ServerConfig -import ru.dbotthepony.mc.otm.core.SupplierList +import ru.dbotthepony.mc.otm.core.collect.SupplierList import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.item.* import ru.dbotthepony.mc.otm.item.weapon.PlasmaRifleItem diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index d7728cd27..ccac6679f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -27,7 +27,7 @@ import ru.dbotthepony.mc.otm.android.feature.ShockwaveFeature import ru.dbotthepony.mc.otm.block.CargoCrateBlock import ru.dbotthepony.mc.otm.block.TritaniumPressurePlate import ru.dbotthepony.mc.otm.capability.matteryEnergy -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.item.EnergySwordItem import ru.dbotthepony.mc.otm.registry.objects.ColoredDecorativeBlock import ru.dbotthepony.mc.otm.registry.objects.CrateProperties diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/ColoredDecorativeBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/ColoredDecorativeBlock.kt index 07c3fd7a1..7b5e10a4d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/ColoredDecorativeBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/ColoredDecorativeBlock.kt @@ -1,14 +1,13 @@ package ru.dbotthepony.mc.otm.registry.objects import net.minecraft.world.item.BlockItem -import net.minecraft.world.item.CreativeModeTab import net.minecraft.world.item.DyeColor import net.minecraft.world.item.Item import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.state.BlockBehaviour import net.minecraftforge.registries.DeferredRegister import net.minecraftforge.registries.RegistryObject -import ru.dbotthepony.mc.otm.core.SupplierMap +import ru.dbotthepony.mc.otm.core.collect.SupplierMap import java.util.EnumMap /** diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/DecorativeBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/DecorativeBlock.kt index 8aeafeabf..732085af2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/DecorativeBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/DecorativeBlock.kt @@ -1,16 +1,14 @@ package ru.dbotthepony.mc.otm.registry.objects import net.minecraft.world.item.BlockItem -import net.minecraft.world.item.CreativeModeTab import net.minecraft.world.item.DyeColor import net.minecraft.world.item.Item import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.state.BlockBehaviour import net.minecraftforge.registries.DeferredRegister import net.minecraftforge.registries.RegistryObject -import ru.dbotthepony.mc.otm.core.SupplierMap +import ru.dbotthepony.mc.otm.core.collect.SupplierMap import ru.dbotthepony.mc.otm.core.WriteOnce -import ru.dbotthepony.mc.otm.registry.MCreativeTabs /** * Base + Colored diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt index fe3516ddf..6e357144d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/objects/StripedColoredDecorativeBlock.kt @@ -8,9 +8,8 @@ import net.minecraft.world.item.Item import net.minecraft.world.level.block.Block import net.minecraftforge.registries.DeferredRegister import net.minecraftforge.registries.RegistryObject -import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.core.SupplierList -import ru.dbotthepony.mc.otm.core.SupplierMap +import ru.dbotthepony.mc.otm.core.collect.SupplierList +import ru.dbotthepony.mc.otm.core.collect.SupplierMap import java.util.EnumMap @Suppress("PropertyName", "unused", "ReplaceGetOrSet", "ReplacePutWithAssignment") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/saveddata/SavedCountingMap.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/saveddata/SavedCountingMap.kt index a1ef2d947..6c696ea66 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/saveddata/SavedCountingMap.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/saveddata/SavedCountingMap.kt @@ -8,8 +8,8 @@ import net.minecraft.nbt.ListTag import net.minecraft.nbt.Tag import net.minecraft.world.level.saveddata.SavedData import org.apache.logging.log4j.LogManager -import ru.dbotthepony.mc.otm.core.ProxiedMap -import ru.dbotthepony.mc.otm.core.set +import ru.dbotthepony.mc.otm.core.collect.ProxiedMap +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.WriteOnce class SavedMapDelegate(val parent: SavedCountingMap>?, val index: Int, value: V) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/ItemStackWrapper.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/ItemStackWrapper.kt index 4ba6e3e5d..0c9402dd4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/ItemStackWrapper.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/ItemStackWrapper.kt @@ -4,6 +4,8 @@ import net.minecraft.network.FriendlyByteBuf import net.minecraft.world.item.ItemStack import org.jetbrains.annotations.ApiStatus import ru.dbotthepony.mc.otm.core.* +import ru.dbotthepony.mc.otm.core.math.isPositive +import ru.dbotthepony.mc.otm.core.math.toIntSafe import ru.dbotthepony.mc.otm.core.registryName import java.math.BigInteger diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/Registry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/Registry.kt index 56ad6c23f..c8e6c54a0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/Registry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/Registry.kt @@ -1,7 +1,7 @@ package ru.dbotthepony.mc.otm.storage import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import java.util.IdentityHashMap open class StorageStackType( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/VirtualComponent.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/VirtualComponent.kt index 2866da497..a8dd38f74 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/storage/VirtualComponent.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/storage/VirtualComponent.kt @@ -2,9 +2,8 @@ package ru.dbotthepony.mc.otm.storage import it.unimi.dsi.fastutil.objects.ObjectArraySet import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage -import ru.dbotthepony.mc.otm.capability.energy.extractEnergy -import ru.dbotthepony.mc.otm.core.isPositive -import ru.dbotthepony.mc.otm.core.isZero +import ru.dbotthepony.mc.otm.core.math.isPositive +import ru.dbotthepony.mc.otm.core.math.isZero import java.math.BigInteger import java.util.* import java.util.stream.Stream diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidBatteryTrigger.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidBatteryTrigger.kt index 513d10a9f..86af33853 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidBatteryTrigger.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidBatteryTrigger.kt @@ -11,6 +11,7 @@ import net.minecraft.resources.ResourceLocation import net.minecraft.server.level.ServerPlayer import net.minecraft.world.item.ItemStack import ru.dbotthepony.mc.otm.OverdriveThatMatters +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set object AndroidBatteryTrigger : SimpleCriterionTrigger() { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt index 2eb8c4634..c2ef83ae8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt @@ -11,6 +11,7 @@ import net.minecraft.resources.ResourceLocation import net.minecraft.server.level.ServerPlayer import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set import java.util.function.Predicate diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/NanobotsArmorTrigger.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/NanobotsArmorTrigger.kt index fa026e177..a1d7253eb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/NanobotsArmorTrigger.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/NanobotsArmorTrigger.kt @@ -10,6 +10,7 @@ import net.minecraft.advancements.critereon.SimpleCriterionTrigger import net.minecraft.resources.ResourceLocation import net.minecraft.server.level.ServerPlayer import ru.dbotthepony.mc.otm.OverdriveThatMatters +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set object NanobotsArmorTrigger : SimpleCriterionTrigger() { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/ShockwaveDamageMobTrigger.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/ShockwaveDamageMobTrigger.kt index a8fe3d1f1..e50e2a58c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/ShockwaveDamageMobTrigger.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/ShockwaveDamageMobTrigger.kt @@ -1,7 +1,6 @@ package ru.dbotthepony.mc.otm.triggers import com.google.gson.JsonObject -import com.google.gson.JsonSyntaxException import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance import net.minecraft.advancements.critereon.DamagePredicate import net.minecraft.advancements.critereon.DamageSourcePredicate @@ -15,6 +14,7 @@ import net.minecraft.server.level.ServerPlayer import net.minecraft.world.damagesource.DamageSource import net.minecraft.world.entity.Entity import ru.dbotthepony.mc.otm.OverdriveThatMatters +import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.set object ShockwaveDamageMobTrigger: SimpleCriterionTrigger() { diff --git a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/DecimalTests.kt b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/DecimalTests.kt index 52b31fcaf..801639431 100644 --- a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/DecimalTests.kt +++ b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/DecimalTests.kt @@ -5,7 +5,7 @@ import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import ru.dbotthepony.mc.otm.core.Decimal +import ru.dbotthepony.mc.otm.core.math.Decimal import java.io.ObjectInputStream import java.io.ObjectOutputStream diff --git a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FormattingTests.kt b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FormattingTests.kt index b278c12e9..e258d8012 100644 --- a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FormattingTests.kt +++ b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FormattingTests.kt @@ -3,9 +3,9 @@ package ru.dbotthepony.mc.otm.tests import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import ru.dbotthepony.mc.otm.core.Decimal -import ru.dbotthepony.mc.otm.core.formatReadableNumber -import ru.dbotthepony.mc.otm.core.formatSi +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.util.formatReadableNumber +import ru.dbotthepony.mc.otm.core.util.formatSi import java.math.BigInteger object FormattingTests { diff --git a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FriendlyStreams.kt b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FriendlyStreams.kt index 371cfb050..332832e17 100644 --- a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FriendlyStreams.kt +++ b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/FriendlyStreams.kt @@ -5,12 +5,12 @@ import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import ru.dbotthepony.mc.otm.core.readInt -import ru.dbotthepony.mc.otm.core.readVarIntLE -import ru.dbotthepony.mc.otm.core.readVarLongLE -import ru.dbotthepony.mc.otm.core.writeInt -import ru.dbotthepony.mc.otm.core.writeVarIntLE -import ru.dbotthepony.mc.otm.core.writeVarLongLE +import ru.dbotthepony.mc.otm.core.util.readInt +import ru.dbotthepony.mc.otm.core.util.readVarIntLE +import ru.dbotthepony.mc.otm.core.util.readVarLongLE +import ru.dbotthepony.mc.otm.core.util.writeInt +import ru.dbotthepony.mc.otm.core.util.writeVarIntLE +import ru.dbotthepony.mc.otm.core.util.writeVarLongLE object FriendlyStreams { @Test @@ -118,4 +118,4 @@ object FriendlyStreams { assertEquals(-10023, input.readVarLongLE()) assertEquals(-100000, input.readVarLongLE()) } -} \ No newline at end of file +} diff --git a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/MathTests.kt b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/MathTests.kt index 4e96b646d..43b2b8a6e 100644 --- a/src/test/kotlin/ru/dbotthepony/mc/otm/tests/MathTests.kt +++ b/src/test/kotlin/ru/dbotthepony/mc/otm/tests/MathTests.kt @@ -3,8 +3,8 @@ package ru.dbotthepony.mc.otm.tests import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test -import ru.dbotthepony.mc.otm.core.integerDivisionDown -import ru.dbotthepony.mc.otm.core.integerDivisionUp +import ru.dbotthepony.mc.otm.core.math.integerDivisionDown +import ru.dbotthepony.mc.otm.core.math.integerDivisionUp object MathTests { @Test