diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index 396d3f04d..52fb18559 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -23,7 +23,7 @@ import net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider import net.neoforged.neoforge.data.event.GatherDataEvent import net.neoforged.neoforge.registries.NeoForgeRegistries import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidResearchDataProvider +import ru.dbotthepony.mc.otm.player.android.AndroidResearchDataProvider import ru.dbotthepony.mc.otm.core.ResourceLocation import ru.dbotthepony.mc.otm.core.math.yRotationBlockstateNorth import ru.dbotthepony.mc.otm.core.util.WriteOnce diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/ResearchData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/ResearchData.kt index 9032c063f..387c7a582 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/ResearchData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/ResearchData.kt @@ -4,9 +4,9 @@ import net.minecraft.tags.ItemTags import net.minecraft.world.item.Items import net.neoforged.neoforge.common.Tags import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidResearchDescriptions -import ru.dbotthepony.mc.otm.android.AndroidResearchResults -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidResearchDescriptions +import ru.dbotthepony.mc.otm.player.android.AndroidResearchResults +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.client.render.ResearchIcons import ru.dbotthepony.mc.otm.core.TextComponent import ru.dbotthepony.mc.otm.core.TranslatableComponent diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/MatteryLanguageProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/MatteryLanguageProvider.kt index a92f5f2bf..7aabd86cc 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/MatteryLanguageProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/MatteryLanguageProvider.kt @@ -15,8 +15,8 @@ import net.minecraft.world.item.ItemStack import net.minecraft.world.level.block.Block import net.neoforged.neoforge.common.data.LanguageProvider import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeatureType -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.datagen.DataGen import ru.dbotthepony.mc.otm.registry.objects.ColoredDecorativeBlock diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt index b9c7345e2..dd23eeaef 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt @@ -6,12 +6,12 @@ import net.neoforged.bus.api.EventPriority import net.neoforged.fml.common.Mod import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent -import ru.dbotthepony.mc.otm.android.AndroidResearchDescription -import ru.dbotthepony.mc.otm.android.AndroidResearchDescriptions -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchResult -import ru.dbotthepony.mc.otm.android.AndroidResearchResults -import ru.dbotthepony.mc.otm.android.feature.EnderTeleporterFeature +import ru.dbotthepony.mc.otm.player.android.AndroidResearchDescription +import ru.dbotthepony.mc.otm.player.android.AndroidResearchDescriptions +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchResult +import ru.dbotthepony.mc.otm.player.android.AndroidResearchResults +import ru.dbotthepony.mc.otm.player.android.feature.EnderTeleporterFeature import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity import ru.dbotthepony.mc.otm.block.entity.decorative.DevChestBlockEntity import ru.dbotthepony.mc.otm.player.MatteryPlayer 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 2cb90d1a1..8218c4dd3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidAbilityKeyMapping.kt @@ -8,7 +8,7 @@ import net.neoforged.neoforge.client.event.RenderLevelStageEvent import net.neoforged.neoforge.client.settings.KeyConflictContext import net.neoforged.neoforge.network.PacketDistributor import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidActiveFeature +import ru.dbotthepony.mc.otm.player.android.AndroidActiveFeature import ru.dbotthepony.mc.otm.player.matteryPlayer import ru.dbotthepony.mc.otm.client.render.MGUIGraphics import ru.dbotthepony.mc.otm.client.render.Widgets18 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 5b6b2065e..70144d851 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/AndroidMenuKeyMapping.kt @@ -11,8 +11,8 @@ import net.neoforged.neoforge.client.event.RenderGuiEvent import net.neoforged.neoforge.client.settings.KeyConflictContext import net.neoforged.neoforge.network.PacketDistributor import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeature -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.matteryPlayer import ru.dbotthepony.mc.otm.client.render.MGUIGraphics import ru.dbotthepony.mc.otm.client.render.RenderGravity 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 fa0975202..e6b4e9539 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientEventHandler.kt @@ -18,7 +18,7 @@ import net.neoforged.neoforge.client.event.ScreenEvent import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent import net.neoforged.neoforge.network.PacketDistributor import ru.dbotthepony.mc.otm.config.ClientConfig -import ru.dbotthepony.mc.otm.android.feature.JumpBoostFeature +import ru.dbotthepony.mc.otm.player.android.feature.JumpBoostFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.player.matteryPlayer import ru.dbotthepony.mc.otm.client.render.UVWindingOrder 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 20e18e1c6..e414af87d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -23,7 +23,7 @@ import net.neoforged.neoforge.client.event.RenderGuiLayerEvent import net.neoforged.neoforge.client.event.ScreenEvent import net.neoforged.neoforge.client.gui.VanillaGuiLayers import net.neoforged.neoforge.common.ItemAbilities -import ru.dbotthepony.mc.otm.android.feature.NanobotsArmorFeature +import ru.dbotthepony.mc.otm.player.android.feature.NanobotsArmorFeature import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.player.matteryPlayer diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AndroidStationScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AndroidStationScreen.kt index fee98d5b6..f6edd683a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AndroidStationScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/AndroidStationScreen.kt @@ -11,9 +11,9 @@ import net.minecraft.world.entity.player.Inventory import net.minecraft.world.item.ItemStack import net.neoforged.neoforge.network.PacketDistributor import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.android.AndroidResearch -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidResearch +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.client.CursorType import ru.dbotthepony.mc.otm.client.render.MGUIGraphics diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/AndroidPackets.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/AndroidPackets.kt index 74a49b8e6..b05ef757b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/AndroidPackets.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/AndroidPackets.kt @@ -10,11 +10,11 @@ import net.minecraft.server.level.ServerPlayer import net.minecraft.sounds.SoundSource import net.neoforged.neoforge.network.handling.IPayloadContext import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidActiveFeature -import ru.dbotthepony.mc.otm.android.AndroidFeatureType -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchType -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidActiveFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.player.matteryPlayer import ru.dbotthepony.mc.otm.client.MatteryGUI diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/NetworkPackets.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/NetworkPackets.kt index a44f72a04..1dcb38afa 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/NetworkPackets.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/NetworkPackets.kt @@ -2,8 +2,8 @@ package ru.dbotthepony.mc.otm.network import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent import net.neoforged.neoforge.network.registration.HandlerThread -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.feature.ItemEntityDataPacket +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.feature.ItemEntityDataPacket import ru.dbotthepony.mc.otm.compat.vanilla.InventoryScrollPacket import ru.dbotthepony.mc.otm.data.FlywheelMaterials import ru.dbotthepony.mc.otm.item.QuantumBatteryItem diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/player/MatteryPlayer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/MatteryPlayer.kt index 2553a6656..a8a906d5f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/player/MatteryPlayer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/MatteryPlayer.kt @@ -20,10 +20,7 @@ import net.minecraft.server.level.ServerLevel import net.minecraft.server.level.ServerPlayer import net.minecraft.tags.TagKey import net.minecraft.world.Container -import net.minecraft.world.Difficulty -import net.minecraft.world.damagesource.DamageSource import net.minecraft.world.effect.MobEffect -import net.minecraft.world.effect.MobEffectInstance import net.minecraft.world.effect.MobEffects import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.boss.wither.WitherBoss @@ -36,7 +33,6 @@ import net.minecraft.world.item.ProjectileWeaponItem import net.minecraft.world.item.crafting.RecipeManager import net.minecraft.world.item.crafting.RecipeType import net.minecraft.world.item.crafting.SingleRecipeInput -import net.minecraft.world.level.GameRules import net.minecraft.world.level.Level import net.minecraft.world.phys.Vec3 import net.neoforged.bus.api.Event @@ -60,11 +56,11 @@ import ru.dbotthepony.kommons.util.getValue import ru.dbotthepony.kommons.util.setValue import ru.dbotthepony.kommons.util.value import ru.dbotthepony.mc.otm.* -import ru.dbotthepony.mc.otm.android.AndroidFeature -import ru.dbotthepony.mc.otm.android.AndroidFeatureType -import ru.dbotthepony.mc.otm.android.AndroidResearch -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType +import ru.dbotthepony.mc.otm.player.android.AndroidResearch +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.block.entity.ItemJob import ru.dbotthepony.mc.otm.block.entity.JobContainer import ru.dbotthepony.mc.otm.block.entity.JobStatus @@ -74,8 +70,6 @@ import ru.dbotthepony.mc.otm.capability.energy import ru.dbotthepony.mc.otm.capability.energy.BatteryBackedEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.IMatteryEnergyStorage import ru.dbotthepony.mc.otm.capability.energy.ProfiledEnergyStorage -import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact -import ru.dbotthepony.mc.otm.capability.energy.receiveEnergyExact import ru.dbotthepony.mc.otm.capability.receiveEnergy import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.config.PlayerConfig diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidActiveFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidActiveFeature.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidActiveFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidActiveFeature.kt index 230a0cd47..348be4672 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidActiveFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidActiveFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.Camera diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeature.kt similarity index 97% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeature.kt index 958e2ae6f..b225be0e1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import net.minecraft.core.HolderLookup import net.minecraft.nbt.CompoundTag diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeatureType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeatureType.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeatureType.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeatureType.kt index d01adc685..9fcc9be5c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidFeatureType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidFeatureType.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import net.minecraft.network.chat.Component import net.minecraft.network.chat.ComponentContents diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearch.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearch.kt index 3954b9f2e..8e3675772 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearch.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearch.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import net.minecraft.ChatFormatting import net.minecraft.core.HolderLookup diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDataProvider.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDataProvider.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDataProvider.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDataProvider.kt index 1ca529af2..492295d78 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDataProvider.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDataProvider.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import com.google.gson.JsonObject import it.unimi.dsi.fastutil.objects.ObjectArraySet diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDescription.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDescription.kt similarity index 68% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDescription.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDescription.kt index 1a53c7e37..ac201aa1a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchDescription.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchDescription.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import com.mojang.serialization.Codec import com.mojang.serialization.MapCodec @@ -29,35 +29,76 @@ object AndroidResearchDescriptions { val ENDER_TELEPORTER: AndroidResearchDescription.Singleton by registrar.register("ender_teleporter") { AndroidResearchDescription.singleton { - TranslatableComponent("otm.gui.power_cost_per_use", PlayerConfig.EnderTeleporter.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW)) } + TranslatableComponent( + "otm.gui.power_cost_per_use", + PlayerConfig.EnderTeleporter.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy() + .withStyle(ChatFormatting.YELLOW) + ) + } } val FALL_DAMPENERS: AndroidResearchDescription.Leveled by registrar.register("fall_dampeners") { AndroidResearchDescription.Leveled { _, list, level -> - list.add(TranslatableComponent("otm.fall_dampeners.description", - TextComponent("%.1f".format((PlayerConfig.FALL_DAMAGE_REDUCTION_PER_LEVEL_P * level).toFloat().coerceIn(0f, 1f) * 100f)).withStyle(ChatFormatting.YELLOW), - TextComponent("%.1f".format((PlayerConfig.FALL_DAMAGE_REDUCTION_PER_LEVEL_F * level).toFloat())).withStyle(ChatFormatting.YELLOW), - )) } + list.add( + TranslatableComponent( + "otm.fall_dampeners.description", + TextComponent( + "%.1f".format( + (PlayerConfig.FALL_DAMAGE_REDUCTION_PER_LEVEL_P * level).toFloat().coerceIn(0f, 1f) * 100f + ) + ).withStyle(ChatFormatting.YELLOW), + TextComponent("%.1f".format((PlayerConfig.FALL_DAMAGE_REDUCTION_PER_LEVEL_F * level).toFloat())).withStyle( + ChatFormatting.YELLOW + ), + ) + ) + } } val SWIM_BOOSTERS: AndroidResearchDescription.Leveled by registrar.register("swim_boosters") { AndroidResearchDescription.Leveled { _, list, level -> - list.add(TranslatableComponent( - "android_research.overdrive_that_matters.swim_boosters.description", - TextComponent("%.1f".format(PlayerConfig.SWIM_BOOSTERS * (1 + level) * 100.0)).withStyle(ChatFormatting.YELLOW) - )) } + list.add( + TranslatableComponent( + "android_research.overdrive_that_matters.swim_boosters.description", + TextComponent("%.1f".format(PlayerConfig.SWIM_BOOSTERS * (1 + level) * 100.0)).withStyle( + ChatFormatting.YELLOW + ) + ) + ) + } } val ITEM_MAGNET: AndroidResearchDescription.Singleton by registrar.register("item_magnet") { - AndroidResearchDescription.singleton { TranslatableComponent("otm.gui.power_cost_per_tick", PlayerConfig.Magnet.POWER_DRAW.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW)) } + AndroidResearchDescription.singleton { + TranslatableComponent( + "otm.gui.power_cost_per_tick", + PlayerConfig.Magnet.POWER_DRAW.formatPower( + formatAsReadable = ShiftPressedCond + ).copy().withStyle(ChatFormatting.YELLOW) + ) + } } val JUMP_BOOST: AndroidResearchDescription.Singleton by registrar.register("jump_boost") { - AndroidResearchDescription.singleton { TranslatableComponent("otm.gui.power_cost_per_use", PlayerConfig.JumpBoost.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW)) } + AndroidResearchDescription.singleton { + TranslatableComponent( + "otm.gui.power_cost_per_use", + PlayerConfig.JumpBoost.ENERGY_COST.formatPower( + formatAsReadable = ShiftPressedCond + ).copy().withStyle(ChatFormatting.YELLOW) + ) + } } val SHOCKWAVE: AndroidResearchDescription.Singleton by registrar.register("shockwave") { - AndroidResearchDescription.singleton { TranslatableComponent("otm.gui.power_cost_per_use", PlayerConfig.Shockwave.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW)) } + AndroidResearchDescription.singleton { + TranslatableComponent( + "otm.gui.power_cost_per_use", + PlayerConfig.Shockwave.ENERGY_COST.formatPower( + formatAsReadable = ShiftPressedCond + ).copy().withStyle(ChatFormatting.YELLOW) + ) + } } } @@ -78,7 +119,8 @@ interface AndroidResearchDescription { get() = this } - class Leveled(val callback: (research: AndroidResearch, lines: MutableList, level: Int) -> Unit) : Type { + class Leveled(val callback: (research: AndroidResearch, lines: MutableList, level: Int) -> Unit) : + Type { inner class Instance(val level: Int) : AndroidResearchDescription { override fun addLines(research: AndroidResearch, lines: MutableList) { callback.invoke(research, lines, level) @@ -90,7 +132,7 @@ interface AndroidResearchDescription { override val codec: MapCodec by lazy { RecordCodecBuilder.mapCodec { - it.group(Codec.INT.fieldOf("level").forGetter(Instance::level)).apply(it, ::Instance) + it.group(Codec.INT.fieldOf("level").forGetter(Instance::level)).apply(it, Leveled::Instance) } } } @@ -138,7 +180,7 @@ object PlainAndroidResearchDescription : AndroidResearchDescription.Type(ResourceLocation(OverdriveThatMatters.MOD_ID, "research_sync")) - val SYNC_CODEC: StreamCodec = StreamCodec.ofMember(SyncPacket::write, ::readSyncPacket) + val SYNC_CODEC: StreamCodec = StreamCodec.ofMember( + SyncPacket::write, + AndroidResearchManager::readSyncPacket + ) class SyncPacket(val collection: Collection) : CustomPacketPayload { fun write(buff: FriendlyByteBuf) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchResult.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchResult.kt similarity index 94% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchResult.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchResult.kt index ac67e499e..41043c82d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchResult.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchResult.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import com.mojang.serialization.Codec import com.mojang.serialization.MapCodec @@ -16,8 +16,8 @@ object AndroidResearchResults { private val registrar = MDeferredRegister(AndroidResearchResult.registryKey, OverdriveThatMatters.MOD_ID) init { - registrar.register("feature") { AndroidResearchResult.Feature.Companion } - registrar.register("feature_level") { AndroidResearchResult.FeatureLevel.Companion } + registrar.register("feature") { AndroidResearchResult.Feature } + registrar.register("feature_level") { AndroidResearchResult.FeatureLevel } } private object NanobotsArmorStrength : AndroidResearchResult.Singleton { @@ -90,7 +90,7 @@ interface AndroidResearchResult { it.group( ResourceLocation.CODEC.fieldOf("id").forGetter(Feature::id), Codec.BOOL.optionalFieldOf("optional", false).forGetter(Feature::optional) - ).apply(it, ::Feature) + ).apply(it, AndroidResearchResult::Feature) } } } @@ -99,7 +99,8 @@ interface AndroidResearchResult { /** * Increases level of specific android feature [id] by specified amount [levels] */ - class FeatureLevel(val id: ResourceLocation, val optional: Boolean = false, val levels: Int = 1) : AndroidResearchResult { + class FeatureLevel(val id: ResourceLocation, val optional: Boolean = false, val levels: Int = 1) : + AndroidResearchResult { val feature = MRegistry.ANDROID_FEATURES.get(id) ?: if (optional) null else throw NoSuchElementException("Unknown android feature $id") override val type: Type<*> @@ -132,7 +133,7 @@ interface AndroidResearchResult { ResourceLocation.CODEC.fieldOf("id").forGetter(FeatureLevel::id), Codec.BOOL.optionalFieldOf("optional", false).forGetter(FeatureLevel::optional), Codec.INT.optionalFieldOf("levels", 1).forGetter(FeatureLevel::levels), - ).apply(it, ::FeatureLevel) + ).apply(it, AndroidResearchResult::FeatureLevel) } } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchType.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchType.kt index f7e2cc739..e7fb141cd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidResearchType.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import com.google.common.collect.ImmutableList import com.google.gson.JsonObject @@ -131,10 +131,10 @@ class AndroidResearchType( it.group( ResourceLocation.CODEC.fieldOf("id").forGetter(Reference::id), Codec.BOOL.optionalFieldOf("optional", false).forGetter(Reference::optional) - ).apply(it, ::Reference) + ).apply(it, AndroidResearchType::Reference) }) .xmap( - { c -> c.map(::Reference, Function.identity()) }, + { c -> c.map(AndroidResearchType::Reference, Function.identity()) }, { c -> if (c.optional) Either.right(c) else Either.left(c.id) } ) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidSwitchableFeature.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidSwitchableFeature.kt index df6ea10af..04a67138c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidSwitchableFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/AndroidSwitchableFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android +package ru.dbotthepony.mc.otm.player.android import net.minecraft.client.multiplayer.ClientLevel import net.minecraft.core.HolderLookup diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/AttackBoostFeature.kt similarity index 89% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/AttackBoostFeature.kt index d70658560..c37ae67b8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/AttackBoostFeature.kt @@ -1,9 +1,9 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.minecraft.world.entity.ai.attributes.Attributes import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.core.ResourceLocation import ru.dbotthepony.mc.otm.registry.game.AndroidFeatures diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/EnderTeleporterFeature.kt similarity index 99% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/EnderTeleporterFeature.kt index 35bad8f25..807d461b1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/EnderTeleporterFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import com.mojang.blaze3d.systems.RenderSystem import com.mojang.blaze3d.vertex.PoseStack @@ -25,7 +25,7 @@ import net.neoforged.neoforge.event.entity.living.LivingDeathEvent import ru.dbotthepony.kommons.math.RGBAColor import ru.dbotthepony.mc.otm.NULLABLE_MINECRAFT_SERVER import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidActiveFeature +import ru.dbotthepony.mc.otm.player.android.AndroidActiveFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.player.matteryPlayer diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ExtendedReachFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ExtendedReachFeature.kt similarity index 89% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ExtendedReachFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ExtendedReachFeature.kt index c816e044e..7c80cab46 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ExtendedReachFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ExtendedReachFeature.kt @@ -1,9 +1,9 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.minecraft.world.entity.ai.attributes.Attributes import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.core.ResourceLocation import ru.dbotthepony.mc.otm.registry.game.AndroidFeatures diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/FallDampenersFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/FallDampenersFeature.kt similarity index 91% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/FallDampenersFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/FallDampenersFeature.kt index 0ab545303..9e2cc4ea2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/FallDampenersFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/FallDampenersFeature.kt @@ -1,8 +1,8 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.server.level.ServerPlayer import net.neoforged.neoforge.event.entity.living.LivingIncomingDamageEvent -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.config.PlayerConfig import ru.dbotthepony.mc.otm.core.isFall diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ItemMagnetFeature.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ItemMagnetFeature.kt index 679f8f767..abd1d7f60 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ItemMagnetFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.client.multiplayer.ClientLevel import net.minecraft.network.FriendlyByteBuf @@ -12,7 +12,7 @@ import net.neoforged.neoforge.network.handling.IPayloadContext import ru.dbotthepony.kommons.math.RGBAColor import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.config.PlayerConfig -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.render.MGUIGraphics @@ -60,7 +60,10 @@ class ItemEntityDataPacket(val itemUUID: Int, val owner: UUID? = null, val age: companion object { val TYPE = CustomPacketPayload.Type(ResourceLocation(OverdriveThatMatters.MOD_ID, "item_entity_data")) - val CODEC: StreamCodec = StreamCodec.ofMember(ItemEntityDataPacket::write, ::read) + val CODEC: StreamCodec = StreamCodec.ofMember( + ItemEntityDataPacket::write, + Companion::read + ) fun read(buff: FriendlyByteBuf): ItemEntityDataPacket { return ItemEntityDataPacket(buff.readVarInt(), if (buff.readBoolean()) buff.readUUID() else null, buff.readVarInt(), buff.readVarInt(), buff.readBoolean()) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/JumpBoostFeature.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/JumpBoostFeature.kt index 073327eda..c53c7742a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/JumpBoostFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.server.level.ServerPlayer import net.minecraft.sounds.SoundSource @@ -6,7 +6,7 @@ import net.neoforged.neoforge.network.PacketDistributor import ru.dbotthepony.kommons.math.RGBAColor import ru.dbotthepony.kommons.util.getValue import ru.dbotthepony.kommons.util.setValue -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.render.MGUIGraphics diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/LimbOverclockingFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/LimbOverclockingFeature.kt similarity index 91% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/LimbOverclockingFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/LimbOverclockingFeature.kt index 061d5302e..66c5cde75 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/LimbOverclockingFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/LimbOverclockingFeature.kt @@ -1,11 +1,11 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.minecraft.world.entity.ai.attributes.Attributes import net.minecraft.world.entity.player.Player import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.player.matteryPlayer import ru.dbotthepony.mc.otm.core.ResourceLocation @@ -17,7 +17,7 @@ class LimbOverclockingFeature(android: MatteryPlayer) : AndroidFeature(AndroidFe if (speed != null) { speed.removeModifier(MODIFIER_ID) - speed.addPermanentModifier(AttributeModifier(MODIFIER_ID,(level + 1) * 0.08, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)) + speed.addPermanentModifier(AttributeModifier(MODIFIER_ID, (level + 1) * 0.08, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)) } val attackSpeed = ply.getAttribute(Attributes.ATTACK_SPEED) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsArmorFeature.kt similarity index 96% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsArmorFeature.kt index d80ce2a14..732677573 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsArmorFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsArmorFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.core.HolderLookup import net.minecraft.nbt.CompoundTag @@ -7,7 +7,7 @@ import net.minecraft.tags.DamageTypeTags import net.neoforged.neoforge.event.entity.living.LivingIncomingDamageEvent import ru.dbotthepony.kommons.util.getValue import ru.dbotthepony.kommons.util.setValue -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.core.isBypassArmor diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsRegenerationFeature.kt similarity index 95% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsRegenerationFeature.kt index 23a06c150..1e3817629 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NanobotsRegenerationFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NanobotsRegenerationFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.core.HolderLookup import net.minecraft.nbt.CompoundTag @@ -6,7 +6,7 @@ import net.minecraft.server.level.ServerPlayer import net.minecraft.world.level.GameRules import net.neoforged.neoforge.event.entity.living.LivingIncomingDamageEvent import ru.dbotthepony.mc.otm.config.PlayerConfig -import ru.dbotthepony.mc.otm.android.AndroidFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.registry.game.AndroidFeatures import ru.dbotthepony.mc.otm.registry.StatNames diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NightVisionFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NightVisionFeature.kt similarity index 92% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NightVisionFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NightVisionFeature.kt index c4c3d9df4..4277aced7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/NightVisionFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/NightVisionFeature.kt @@ -1,9 +1,9 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.effect.MobEffectInstance import net.minecraft.world.effect.MobEffects import ru.dbotthepony.kommons.math.RGBAColor -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.render.MGUIGraphics diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ShockwaveFeature.kt similarity index 98% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ShockwaveFeature.kt index a78b9fe14..a7d3eb6d6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/ShockwaveFeature.kt @@ -1,4 +1,4 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import it.unimi.dsi.fastutil.objects.ReferenceArraySet import net.minecraft.server.level.ServerPlayer @@ -7,7 +7,7 @@ import net.minecraft.world.entity.Entity import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.monster.warden.Warden import net.neoforged.neoforge.network.PacketDistributor -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.client.render.MGUIGraphics diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/StepAssistFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/StepAssistFeature.kt similarity index 93% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/StepAssistFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/StepAssistFeature.kt index 92d048b78..08cb9cc6a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/StepAssistFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/StepAssistFeature.kt @@ -1,8 +1,8 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.minecraft.world.entity.ai.attributes.Attributes -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.client.render.MGUIGraphics import ru.dbotthepony.mc.otm.client.render.ResearchIcons diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/SwimBoostersFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/SwimBoostersFeature.kt similarity index 92% rename from src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/SwimBoostersFeature.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/SwimBoostersFeature.kt index 4f9c16ceb..2cd1a933e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/SwimBoostersFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/player/android/feature/SwimBoostersFeature.kt @@ -1,8 +1,8 @@ -package ru.dbotthepony.mc.otm.android.feature +package ru.dbotthepony.mc.otm.player.android.feature import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.neoforged.neoforge.common.NeoForgeMod -import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature +import ru.dbotthepony.mc.otm.player.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.player.MatteryPlayer import ru.dbotthepony.mc.otm.client.render.MGUIGraphics import ru.dbotthepony.mc.otm.client.render.ResearchIcons 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 0cf69e5f3..e117ad120 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -29,9 +29,9 @@ import net.neoforged.neoforge.event.ModifyDefaultComponentsEvent import net.neoforged.neoforge.registries.RegisterEvent import ru.dbotthepony.kommons.math.RGBAColor import ru.dbotthepony.mc.otm.OverdriveThatMatters -import ru.dbotthepony.mc.otm.android.AndroidFeatureType -import ru.dbotthepony.mc.otm.android.feature.EnderTeleporterFeature -import ru.dbotthepony.mc.otm.android.feature.NanobotsArmorFeature +import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType +import ru.dbotthepony.mc.otm.player.android.feature.EnderTeleporterFeature +import ru.dbotthepony.mc.otm.player.android.feature.NanobotsArmorFeature import ru.dbotthepony.mc.otm.block.decorative.CargoCrateBlock import ru.dbotthepony.mc.otm.block.decorative.ComputerTerminalBlock import ru.dbotthepony.mc.otm.block.decorative.StarChairBlock diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/AndroidFeatures.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/AndroidFeatures.kt index 43dbc2b22..f3ad0df38 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/AndroidFeatures.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/AndroidFeatures.kt @@ -1,9 +1,21 @@ package ru.dbotthepony.mc.otm.registry.game import net.neoforged.bus.api.IEventBus -import ru.dbotthepony.mc.otm.android.AndroidFeatureType -import ru.dbotthepony.mc.otm.android.DummyAndroidFeature -import ru.dbotthepony.mc.otm.android.feature.* +import ru.dbotthepony.mc.otm.player.android.AndroidFeatureType +import ru.dbotthepony.mc.otm.player.android.DummyAndroidFeature +import ru.dbotthepony.mc.otm.player.android.feature.AttackBoostFeature +import ru.dbotthepony.mc.otm.player.android.feature.EnderTeleporterFeature +import ru.dbotthepony.mc.otm.player.android.feature.ExtendedReachFeature +import ru.dbotthepony.mc.otm.player.android.feature.FallDampenersFeature +import ru.dbotthepony.mc.otm.player.android.feature.ItemMagnetFeature +import ru.dbotthepony.mc.otm.player.android.feature.JumpBoostFeature +import ru.dbotthepony.mc.otm.player.android.feature.LimbOverclockingFeature +import ru.dbotthepony.mc.otm.player.android.feature.NanobotsArmorFeature +import ru.dbotthepony.mc.otm.player.android.feature.NanobotsRegenerationFeature +import ru.dbotthepony.mc.otm.player.android.feature.NightVisionFeature +import ru.dbotthepony.mc.otm.player.android.feature.ShockwaveFeature +import ru.dbotthepony.mc.otm.player.android.feature.StepAssistFeature +import ru.dbotthepony.mc.otm.player.android.feature.SwimBoostersFeature import ru.dbotthepony.mc.otm.registry.MDeferredRegister import ru.dbotthepony.mc.otm.registry.MNames import ru.dbotthepony.mc.otm.registry.MRegistry diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidCommand.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidCommand.kt index f56e583a5..08e2a5df2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidCommand.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidCommand.kt @@ -4,8 +4,8 @@ import net.minecraft.commands.Commands import net.minecraft.commands.arguments.EntityArgument import net.minecraft.world.entity.player.Player import net.neoforged.neoforge.event.RegisterCommandsEvent -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.player.matteryPlayer object AndroidCommand { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidResearchArgument.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidResearchArgument.kt index 16b9cebde..80a58b0c9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidResearchArgument.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/server/command/AndroidResearchArgument.kt @@ -8,8 +8,8 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder import net.minecraft.commands.CommandSourceStack import net.minecraft.commands.SharedSuggestionProvider import net.minecraft.resources.ResourceLocation -import ru.dbotthepony.mc.otm.android.AndroidResearchManager -import ru.dbotthepony.mc.otm.android.AndroidResearchType +import ru.dbotthepony.mc.otm.player.android.AndroidResearchManager +import ru.dbotthepony.mc.otm.player.android.AndroidResearchType import java.util.concurrent.CompletableFuture class AndroidResearchArgument : ArgumentType { 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 a761cc0bb..8b71b4b85 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/triggers/AndroidResearchTrigger.kt @@ -6,7 +6,7 @@ import net.minecraft.advancements.critereon.ContextAwarePredicate 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.player.android.AndroidResearchType import ru.dbotthepony.mc.otm.core.ResourceLocation import java.util.* import java.util.function.Predicate