From 7ba2e020b7150c48784809b9ae86cff2eb3603e9 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Thu, 27 Feb 2025 22:01:35 +0300 Subject: [PATCH 01/10] bread monster entity wip --- .../animation/BreadMonsterAnimation.java | 77 ++++++++++++++++++ .../model/entity/BreadMonsterModel.java | 73 +++++++++++++++++ .../mc/otm/OverdriveThatMatters.kt | 3 + .../render/entity/BreadMonsterRenderer.kt | 18 ++++ .../dbotthepony/mc/otm/entity/BreadMonster.kt | 43 ++++++++++ .../ru/dbotthepony/mc/otm/registry/MNames.kt | 1 + .../mc/otm/registry/game/MEntityTypes.kt | 18 ++++ .../models/bread_monster.java | 49 ----------- .../bread_monster.png | Bin 9 files changed, 233 insertions(+), 49 deletions(-) create mode 100644 src/main/java/ru/dbotthepony/mc/otm/client/animation/BreadMonsterAnimation.java create mode 100644 src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt delete mode 100644 src/main/resources/assets/overdrive_that_matters/models/bread_monster.java rename src/main/resources/assets/overdrive_that_matters/textures/{models/bread_monster => entity}/bread_monster.png (100%) diff --git a/src/main/java/ru/dbotthepony/mc/otm/client/animation/BreadMonsterAnimation.java b/src/main/java/ru/dbotthepony/mc/otm/client/animation/BreadMonsterAnimation.java new file mode 100644 index 000000000..dab347224 --- /dev/null +++ b/src/main/java/ru/dbotthepony/mc/otm/client/animation/BreadMonsterAnimation.java @@ -0,0 +1,77 @@ +package ru.dbotthepony.mc.otm.client.animation; + +import net.minecraft.client.animation.AnimationChannel; +import net.minecraft.client.animation.AnimationDefinition; +import net.minecraft.client.animation.Keyframe; +import net.minecraft.client.animation.KeyframeAnimations; + +public class BreadMonsterAnimation { + public static final AnimationDefinition IDLE = AnimationDefinition.Builder.withLength(1.44F).looping() + .addAnimation("Body", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, -2.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, 3.33F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.44F, KeyframeAnimations.degreeVec(0.0F, -2.5F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("Ljaw", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(2.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(5.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.44F, KeyframeAnimations.degreeVec(2.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("UJaw", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(-2.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(-5.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.44F, KeyframeAnimations.degreeVec(-2.5F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("tail", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 5.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, -7.5F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.44F, KeyframeAnimations.degreeVec(0.0F, 5.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .build(); + + public static final AnimationDefinition MOVE = AnimationDefinition.Builder.withLength(1.44F).looping() + .addAnimation("root", new AnimationChannel(AnimationChannel.Targets.POSITION, + new Keyframe(0.0F, KeyframeAnimations.posVec(1.0F, 0.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.12F, KeyframeAnimations.posVec(0.0F, 5.0F, -1.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.24F, KeyframeAnimations.posVec(-1.0F, 0.0F, -1.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.posVec(-2.0F, 0.0F, 2.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.84F, KeyframeAnimations.posVec(0.0F, 5.0F, -1.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.96F, KeyframeAnimations.posVec(1.0F, 0.0F, -1.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.44F, KeyframeAnimations.posVec(1.0F, 0.0F, 2.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("Body", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.12F, KeyframeAnimations.degreeVec(7.5283F, 4.9571F, 0.6543F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.2F, KeyframeAnimations.degreeVec(12.5094F, 1.6524F, 0.2181F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.24F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.84F, KeyframeAnimations.degreeVec(7.5283F, -4.9571F, -0.6543F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.92F, KeyframeAnimations.degreeVec(15.0189F, -3.3047F, -0.4362F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.96F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("Ljaw", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.12F, KeyframeAnimations.degreeVec(25.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.32F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.84F, KeyframeAnimations.degreeVec(25.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.04F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("UJaw", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.12F, KeyframeAnimations.degreeVec(-25.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.32F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.84F, KeyframeAnimations.degreeVec(-30.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(1.04F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .addAnimation("tail", new AnimationChannel(AnimationChannel.Targets.ROTATION, + new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.12F, KeyframeAnimations.degreeVec(-10.0374F, -4.9238F, 0.8704F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.24F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.72F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.84F, KeyframeAnimations.degreeVec(-12.5462F, 4.8812F, -1.0848F), AnimationChannel.Interpolations.LINEAR), + new Keyframe(0.96F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F), AnimationChannel.Interpolations.LINEAR) + )) + .build(); +} diff --git a/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java new file mode 100644 index 000000000..8eadd78ed --- /dev/null +++ b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java @@ -0,0 +1,73 @@ +package ru.dbotthepony.mc.otm.client.model.entity; + +import net.minecraft.client.model.HierarchicalModel; +import net.minecraft.client.model.geom.ModelLayerLocation; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeDeformation; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.neoforged.neoforge.client.event.EntityRenderersEvent; +import org.jetbrains.annotations.NotNull; +import ru.dbotthepony.mc.otm.client.animation.BreadMonsterAnimation; +import ru.dbotthepony.mc.otm.entity.BreadMonster; +import ru.dbotthepony.mc.otm.registry.MNames; + +import static ru.dbotthepony.mc.otm.OverdriveThatMatters.loc; + +public class BreadMonsterModel { + public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(loc(MNames.BREAD_MONSTER), "main"); + + private static HierarchicalModel model; + private static LayerDefinition def; + + public static HierarchicalModel getModel() { + if (model == null) { + return model = new BreadMonsterHierarchicalModel<>(def.bakeRoot()); + } + + return model; + } + + public static LayerDefinition createBodyLayer() { + MeshDefinition meshdefinition = new MeshDefinition(); + PartDefinition partdefinition = meshdefinition.getRoot(); + + PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 24.0F, 0.0F)); + + PartDefinition Body = root.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -3.0F, -5.0F, 8.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -3.0F, 0.0F)); + PartDefinition Ljaw = Body.addOrReplaceChild("Ljaw", CubeListBuilder.create().texOffs(26, 24).addBox(-4.0F, -2.0F, -4.0F, 8.0F, 3.0F, 4.0F, new CubeDeformation(0.1F)), PartPose.offset(0.0F, 2.0F, -3.0F)); + PartDefinition UJaw = Body.addOrReplaceChild("UJaw", CubeListBuilder.create().texOffs(0, 24).addBox(-4.0F, -2.0F, -4.0F, 8.0F, 3.0F, 5.0F, new CubeDeformation(0.1F)), PartPose.offset(0.0F, -1.0F, -3.0F)); + PartDefinition tail = Body.addOrReplaceChild("tail", CubeListBuilder.create().texOffs(0, 12).addBox(-4.0F, -3.0F, -0.1F, 8.0F, 6.0F, 6.0F, new CubeDeformation(-0.1F)), PartPose.offset(0.0F, 0.0F, 1.0F)); + + model = null; + return def = LayerDefinition.create(meshdefinition, 64, 32); + } + + private static class BreadMonsterHierarchicalModel extends HierarchicalModel { + private final ModelPart root; + public BreadMonsterHierarchicalModel(ModelPart root) { + this.root = root.getChild("root"); + } + + @Override + public void setupAnim(@NotNull T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { + this.root().getAllParts().forEach(ModelPart::resetPose); + +// this.applyStatic(BreadMonsterAnimation.IDLE); + this.animate(entity.getIdleState(), BreadMonsterAnimation.IDLE, ageInTicks, 1.0F); + this.animateWalk(BreadMonsterAnimation.MOVE, limbSwing, limbSwingAmount, 1.0F, 2.5F); + } + + @Override + public @NotNull ModelPart root() { + return this.root; + } + } + + public static void register(EntityRenderersEvent.RegisterLayerDefinitions event) { + event.registerLayerDefinition(LAYER_LOCATION, BreadMonsterModel::createBodyLayer); + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt index 09a8a6249..bdd6095ca 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt @@ -24,6 +24,7 @@ import ru.dbotthepony.mc.otm.client.createCursors import ru.dbotthepony.mc.otm.client.model.ExosuitModel import ru.dbotthepony.mc.otm.client.model.GravitationStabilizerModel import ru.dbotthepony.mc.otm.client.model.TritaniumArmorModel +import ru.dbotthepony.mc.otm.client.model.entity.BreadMonsterModel import ru.dbotthepony.mc.otm.client.onMovementInputUpdate import ru.dbotthepony.mc.otm.client.onScreenOpen import ru.dbotthepony.mc.otm.client.onPostScreenInit @@ -92,6 +93,7 @@ import thedarkcolour.kotlinforforge.neoforge.forge.DIST import thedarkcolour.kotlinforforge.neoforge.forge.FORGE_BUS import thedarkcolour.kotlinforforge.neoforge.forge.LOADING_CONTEXT import thedarkcolour.kotlinforforge.neoforge.forge.MOD_BUS +import top.theillusivec4.curios.client.ClientEventHandler @Mod(OverdriveThatMatters.MOD_ID) object OverdriveThatMatters { @@ -150,6 +152,7 @@ object OverdriveThatMatters { MOD_BUS.addListener(EventPriority.NORMAL, AndroidAbilityKeyMapping::register) MOD_BUS.addListener(EventPriority.NORMAL, TritaniumArmorModel::register) MOD_BUS.addListener(EventPriority.NORMAL, GravitationStabilizerModel::register) + MOD_BUS.addListener(EventPriority.NORMAL, BreadMonsterModel::register) MOD_BUS.addListener(EventPriority.NORMAL, MCreativeTabs::register) MOD_BUS.addListener(EventPriority.NORMAL, BatteryBankRenderer.Companion::onRegisterAdditionalModels) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt new file mode 100644 index 000000000..595be5f82 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt @@ -0,0 +1,18 @@ +package ru.dbotthepony.mc.otm.client.render.entity + +import net.minecraft.client.model.HierarchicalModel +import net.minecraft.client.renderer.entity.EntityRendererProvider +import net.minecraft.client.renderer.entity.MobRenderer +import net.minecraft.resources.ResourceLocation +import ru.dbotthepony.mc.otm.OverdriveThatMatters.loc +import ru.dbotthepony.mc.otm.client.model.entity.BreadMonsterModel +import ru.dbotthepony.mc.otm.entity.BreadMonster + +class BreadMonsterRenderer(context: EntityRendererProvider.Context) + : MobRenderer>(context, BreadMonsterModel.getModel(), 0.9f) { + override fun getTextureLocation(entity: BreadMonster): ResourceLocation = TEXTURE_LOCATION + + companion object { + private val TEXTURE_LOCATION = loc("textures/entity/bread_monster.png") + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt new file mode 100644 index 000000000..5a3515e64 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt @@ -0,0 +1,43 @@ +package ru.dbotthepony.mc.otm.entity + +import net.minecraft.world.entity.AnimationState +import net.minecraft.world.entity.EntityType +import net.minecraft.world.entity.ai.attributes.AttributeSupplier +import net.minecraft.world.entity.ai.attributes.Attributes +import net.minecraft.world.entity.ai.goal.LeapAtTargetGoal +import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal +import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal +import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal +import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal +import net.minecraft.world.entity.ai.navigation.GroundPathNavigation +import net.minecraft.world.entity.ai.navigation.PathNavigation +import net.minecraft.world.entity.monster.Monster +import net.minecraft.world.entity.player.Player +import net.minecraft.world.level.Level + +class BreadMonster(type: EntityType, level: Level) : Monster(type, level) { + val idleState = AnimationState() + + init { + idleState.start(tickCount) + } + + override fun registerGoals() { + goalSelector.addGoal(1, LeapAtTargetGoal(this, 0.4f)) + goalSelector.addGoal(2, WaterAvoidingRandomStrollGoal(this, 0.8)) + goalSelector.addGoal(3, LookAtPlayerGoal(this, Player::class.java, 8f)) + goalSelector.addGoal(4, RandomLookAroundGoal(this)) + + targetSelector.addGoal(1, HurtByTargetGoal(this)) + } + + override fun createNavigation(level: Level): PathNavigation = GroundPathNavigation(this, level) + + companion object { + fun createAttributes() : AttributeSupplier.Builder { + return createMonsterAttributes() + .add(Attributes.MAX_HEALTH, 16.0) + .add(Attributes.MOVEMENT_SPEED, 0.3) + } + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt index 5a4218d0a..a4c9f0f97 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -306,6 +306,7 @@ object MNames { // entities const val PLASMA = "plasma_projectile" const val RIDEABLE_DUMMY = "rideable_dummy" + const val BREAD_MONSTER = "bread_monster" const val PHANTOM_ATTRACTOR = "phantom_attractor" const val JUMP_BOOST = "jump_boost" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MEntityTypes.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MEntityTypes.kt index 412aaf7b4..bafdac6cf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MEntityTypes.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MEntityTypes.kt @@ -12,7 +12,10 @@ import net.minecraft.world.entity.MobCategory import net.minecraft.world.item.DyeColor import net.neoforged.bus.api.IEventBus import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent +import net.neoforged.neoforge.event.entity.EntityAttributeCreationEvent +import ru.dbotthepony.mc.otm.client.render.entity.BreadMonsterRenderer import ru.dbotthepony.mc.otm.client.render.entity.PlasmaProjectileRenderer +import ru.dbotthepony.mc.otm.entity.BreadMonster import ru.dbotthepony.mc.otm.entity.MinecartCargoCrate import ru.dbotthepony.mc.otm.entity.PlasmaProjectile import ru.dbotthepony.mc.otm.entity.RideableDummy @@ -38,11 +41,25 @@ object MEntityTypes { .build(MNames.RIDEABLE_DUMMY) } + val BREAD_MONSTER: EntityType by registry.register(MNames.BREAD_MONSTER) { + EntityType.Builder.of(::BreadMonster, MobCategory.MONSTER) + .sized(0.9f, 0.375f) + .eyeHeight(0.1875f) + .passengerAttachments(0.375f) + .clientTrackingRange(8) + .build(MNames.BREAD_MONSTER) + } + fun register(bus: IEventBus) { registry.register(bus) + bus.addListener(this::registerAttributes) bus.addListener(this::registerClient) } + private fun registerAttributes(event: EntityAttributeCreationEvent) { + event.put(BREAD_MONSTER, BreadMonster.createAttributes().build()) + } + @Suppress("unchecked_cast") private fun registerClient(event: FMLClientSetupEvent) { event.enqueueWork { @@ -53,6 +70,7 @@ object MEntityTypes { } EntityRenderers.register(RIDEABLE_DUMMY, ::NoopRenderer) + EntityRenderers.register(BREAD_MONSTER, ::BreadMonsterRenderer) } } } diff --git a/src/main/resources/assets/overdrive_that_matters/models/bread_monster.java b/src/main/resources/assets/overdrive_that_matters/models/bread_monster.java deleted file mode 100644 index 5926248d2..000000000 --- a/src/main/resources/assets/overdrive_that_matters/models/bread_monster.java +++ /dev/null @@ -1,49 +0,0 @@ -// Made with Blockbench 4.12.3 -// Exported for Minecraft version 1.17 or later with Mojang mappings -// Paste this class into your mod and generate all required imports - - -public class bread_monster extends EntityModel { - // This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor - public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", "bread_monster"), "main"); - private final ModelPart root; - private final ModelPart Body; - private final ModelPart Ljaw; - private final ModelPart UJaw; - private final ModelPart tail; - - public bread_monster(ModelPart root) { - this.root = root.getChild("root"); - this.Body = this.root.getChild("Body"); - this.Ljaw = this.Body.getChild("Ljaw"); - this.UJaw = this.Body.getChild("UJaw"); - this.tail = this.Body.getChild("tail"); - } - - public static LayerDefinition createBodyLayer() { - MeshDefinition meshdefinition = new MeshDefinition(); - PartDefinition partdefinition = meshdefinition.getRoot(); - - PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(), PartPose.offset(0.0F, 24.0F, 0.0F)); - - PartDefinition Body = root.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -3.0F, -5.0F, 8.0F, 6.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, -3.0F, 0.0F)); - - PartDefinition Ljaw = Body.addOrReplaceChild("Ljaw", CubeListBuilder.create().texOffs(26, 24).addBox(-4.0F, -2.0F, -4.0F, 8.0F, 3.0F, 4.0F, new CubeDeformation(0.1F)), PartPose.offset(0.0F, 2.0F, -3.0F)); - - PartDefinition UJaw = Body.addOrReplaceChild("UJaw", CubeListBuilder.create().texOffs(0, 24).addBox(-4.0F, -2.0F, -4.0F, 8.0F, 3.0F, 5.0F, new CubeDeformation(0.1F)), PartPose.offset(0.0F, -1.0F, -3.0F)); - - PartDefinition tail = Body.addOrReplaceChild("tail", CubeListBuilder.create().texOffs(0, 12).addBox(-4.0F, -3.0F, -0.1F, 8.0F, 6.0F, 6.0F, new CubeDeformation(-0.1F)), PartPose.offset(0.0F, 0.0F, 1.0F)); - - return LayerDefinition.create(meshdefinition, 64, 32); - } - - @Override - public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { - - } - - @Override - public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) { - root.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha); - } -} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/models/bread_monster/bread_monster.png b/src/main/resources/assets/overdrive_that_matters/textures/entity/bread_monster.png similarity index 100% rename from src/main/resources/assets/overdrive_that_matters/textures/models/bread_monster/bread_monster.png rename to src/main/resources/assets/overdrive_that_matters/textures/entity/bread_monster.png From eddb7a1445f4fe5a600e692804ec8db0599071cd Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Thu, 27 Feb 2025 22:04:07 +0300 Subject: [PATCH 02/10] =?UTF-8?q?=D0=9A=D0=A3=D0=94=D0=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt index bdd6095ca..a0e42bdfc 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/OverdriveThatMatters.kt @@ -93,7 +93,6 @@ import thedarkcolour.kotlinforforge.neoforge.forge.DIST import thedarkcolour.kotlinforforge.neoforge.forge.FORGE_BUS import thedarkcolour.kotlinforforge.neoforge.forge.LOADING_CONTEXT import thedarkcolour.kotlinforforge.neoforge.forge.MOD_BUS -import top.theillusivec4.curios.client.ClientEventHandler @Mod(OverdriveThatMatters.MOD_ID) object OverdriveThatMatters { From 18252cf800dc2c267f3f0c7834d2a96009c7fa39 Mon Sep 17 00:00:00 2001 From: GearShocky Date: Fri, 28 Feb 2025 17:03:05 +0500 Subject: [PATCH 03/10] bread --- .../mc/otm/datagen/items/ItemModels.kt | 2 ++ .../ru/dbotthepony/mc/otm/datagen/lang/English.kt | 2 ++ .../client/model/entity/BreadMonsterModel.java | 2 +- .../client/render/entity/BreadMonsterRenderer.kt | 2 +- .../ru/dbotthepony/mc/otm/entity/BreadMonster.kt | 14 +++++++++++--- .../ru/dbotthepony/mc/otm/registry/MNames.kt | 3 +++ .../ru/dbotthepony/mc/otm/registry/game/MItems.kt | 3 +++ .../textures/item/egg/bread_monster.png | Bin 0 -> 533 bytes 8 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/egg/bread_monster.png diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index 87984511b..089bcda2c 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -108,6 +108,8 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.handheld(MItems.CHEST_UPGRADER) + provider.generated(MItems.BREAD_MONSTER_SPAWN_EGG, modLocation("item/egg/bread_monster")) + provider.generatedTiered(MItems.BATTERIES, "battery_tier") provider.generated(MItems.BATTERY_CREATIVE) provider.generated(MItems.PROCEDURAL_BATTERY, modLocation("item/battery_procedural")) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index b60fdaff0..822fefc35 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -909,6 +909,8 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.CHEST_UPGRADER, "Crate-r") add(MItems.CHEST_UPGRADER, "desc", "Replaces placed chests and barrels with cargo crates while keeping storage contents") add(MItems.CHEST_UPGRADER, "desc2", "Hold desired crates in the opposite hand") + + add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg") } } diff --git a/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java index 8eadd78ed..e16be2838 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java +++ b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java @@ -58,7 +58,7 @@ public class BreadMonsterModel { // this.applyStatic(BreadMonsterAnimation.IDLE); this.animate(entity.getIdleState(), BreadMonsterAnimation.IDLE, ageInTicks, 1.0F); - this.animateWalk(BreadMonsterAnimation.MOVE, limbSwing, limbSwingAmount, 1.0F, 2.5F); + this.animateWalk(BreadMonsterAnimation.MOVE, limbSwing, limbSwingAmount, 1.0F, 5.5F); } @Override diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt index 595be5f82..ce3692a67 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/entity/BreadMonsterRenderer.kt @@ -9,7 +9,7 @@ import ru.dbotthepony.mc.otm.client.model.entity.BreadMonsterModel import ru.dbotthepony.mc.otm.entity.BreadMonster class BreadMonsterRenderer(context: EntityRendererProvider.Context) - : MobRenderer>(context, BreadMonsterModel.getModel(), 0.9f) { + : MobRenderer>(context, BreadMonsterModel.getModel(), 0.4f) { override fun getTextureLocation(entity: BreadMonster): ResourceLocation = TEXTURE_LOCATION companion object { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt index 5a3515e64..f13fd15dc 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt @@ -2,13 +2,16 @@ package ru.dbotthepony.mc.otm.entity import net.minecraft.world.entity.AnimationState import net.minecraft.world.entity.EntityType +import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.ai.attributes.AttributeSupplier import net.minecraft.world.entity.ai.attributes.Attributes import net.minecraft.world.entity.ai.goal.LeapAtTargetGoal import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal +import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal import net.minecraft.world.entity.ai.navigation.GroundPathNavigation import net.minecraft.world.entity.ai.navigation.PathNavigation import net.minecraft.world.entity.monster.Monster @@ -23,10 +26,14 @@ class BreadMonster(type: EntityType, level: Level) : Monster(type, } override fun registerGoals() { + goalSelector.addGoal(8, RandomLookAroundGoal(this)) + goalSelector.addGoal(7, WaterAvoidingRandomStrollGoal(this, 0.8)) + goalSelector.addGoal(8, LookAtPlayerGoal(this, Player::class.java, 8f)) + goalSelector.addGoal(3, NearestAttackableTargetGoal(this, LivingEntity::class.java , true, true)) + goalSelector.addGoal(3, NearestAttackableTargetGoal(this, Player::class.java , true, true)) + goalSelector.addGoal(1, LeapAtTargetGoal(this, 0.4f)) - goalSelector.addGoal(2, WaterAvoidingRandomStrollGoal(this, 0.8)) - goalSelector.addGoal(3, LookAtPlayerGoal(this, Player::class.java, 8f)) - goalSelector.addGoal(4, RandomLookAroundGoal(this)) + goalSelector.addGoal(2, MeleeAttackGoal(this, 1.3, true)) targetSelector.addGoal(1, HurtByTargetGoal(this)) } @@ -38,6 +45,7 @@ class BreadMonster(type: EntityType, level: Level) : Monster(type, return createMonsterAttributes() .add(Attributes.MAX_HEALTH, 16.0) .add(Attributes.MOVEMENT_SPEED, 0.3) + .add(Attributes.ATTACK_DAMAGE, 3.0) } } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt index a4c9f0f97..c873ba1a5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -191,6 +191,9 @@ object MNames { const val CHEST_UPGRADER = "chest_upgrader" + // eg + const val BREAD_MONSTER_SPAWN_EGG = "bead_monster_spawn_egg" + // items: crafting components const val TRITANIUM_DUST = "tritanium_dust" const val TRITANIUM_NUGGET = "tritanium_nugget" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index b200f0536..55ba8d92c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -20,6 +20,7 @@ import net.minecraft.world.item.Rarity import net.minecraft.world.item.ShearsItem import net.minecraft.world.item.ShieldItem import net.minecraft.world.item.ShovelItem +import net.minecraft.world.item.SpawnEggItem import net.minecraft.world.item.SwordItem import net.minecraft.world.item.Tiers import net.minecraft.world.item.crafting.Ingredient @@ -656,6 +657,8 @@ object MItems { val CHEST_UPGRADER: Item by registry.register(MNames.CHEST_UPGRADER) { ChestUpgraderItem() } + val BREAD_MONSTER_SPAWN_EGG: Item by registry.register(MNames.BREAD_MONSTER_SPAWN_EGG){ SpawnEggItem(MEntityTypes.BREAD_MONSTER, 0xFFFFFF, 0xFFFFFF, Item.Properties())} + init { MRegistry.registerItems(registry) } diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/egg/bread_monster.png b/src/main/resources/assets/overdrive_that_matters/textures/item/egg/bread_monster.png new file mode 100644 index 0000000000000000000000000000000000000000..ad057ecdac6b90f6ebaf56d4d5097bedb85ba38e GIT binary patch literal 533 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}50G|+78-3x%KCSQs**%@=ryn@?q{%I+R9Sb>BG^u3(fso0NQd1!CZ&3d z1C>udFS!^<@s$Mm1^-6|46X<6oB+yj7I;J!0~H(uVa6R3v)=**B}!Z)N`mv#O3D+9 zQW*jgGxJLH{9Hp6O!W-)jDGK7-Ud{&Ej7Y3&C^qhfdj~4WsqWIWncudynt95$_DvP zgOM35&IDu|GBSaE8wF%%wzGi6vw&<6xLL-?@B$bJFdEHL2B6dgb_N!pN&_Qf1I7gq zQ$aSeE`XRc1;_>gCZM@YV3k3Z7C;tMm!W|HNOrl#zIDGv55561OFUg1Lo|Y8`vduo zC~&Yka*Jwy-=8O+u%a3QyEsy$@Ip#=rRr*|Do4dZ7^~H}Px?C>d-49l7yBlJ> z;6sDt&e@znowIq4V3EuOA^F6*2UngGVxmp=di literal 0 HcmV?d00001 From b1930bc93d60ed09811d03ab50d94774840c942d Mon Sep 17 00:00:00 2001 From: GearShocky Date: Fri, 28 Feb 2025 19:20:42 +0500 Subject: [PATCH 04/10] add iron sandwiches to creative menu --- .../ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt | 2 +- .../mc/otm/client/model/entity/BreadMonsterModel.java | 2 +- src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt index 433218a58..d1eff86fa 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt @@ -135,7 +135,7 @@ fun addMultiblockRecipes(consumer: RecipeOutput) { .row(MItems.MATTER_CAPACITOR_PARTS, Tags.Items.GEMS_DIAMOND, MItems.MATTER_CAPACITOR_PARTS) .build(consumer) - MatteryRecipe(MItems.TRITANIUM_HULL, count = 4, category = machinesCategory) + MatteryRecipe(MItems.TRITANIUM_HULL, count = 2, category = machinesCategory) .row(MItemTags.TRITANIUM_PLATES, MItemTags.IRON_PLATES, MItemTags.TRITANIUM_PLATES) .row(MItemTags.IRON_PLATES, MItems.MODULAR_FRAME, MItemTags.IRON_PLATES) .row(MItemTags.TRITANIUM_PLATES, MItemTags.IRON_PLATES, MItemTags.TRITANIUM_PLATES) diff --git a/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java index e16be2838..8eadd78ed 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java +++ b/src/main/java/ru/dbotthepony/mc/otm/client/model/entity/BreadMonsterModel.java @@ -58,7 +58,7 @@ public class BreadMonsterModel { // this.applyStatic(BreadMonsterAnimation.IDLE); this.animate(entity.getIdleState(), BreadMonsterAnimation.IDLE, ageInTicks, 1.0F); - this.animateWalk(BreadMonsterAnimation.MOVE, limbSwing, limbSwingAmount, 1.0F, 5.5F); + this.animateWalk(BreadMonsterAnimation.MOVE, limbSwing, limbSwingAmount, 1.0F, 2.5F); } @Override diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index 55ba8d92c..8dc77c623 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -582,6 +582,7 @@ object MItems { MItems::CARBON_MESH, MItems::ARMOR_ASSEMBLY, MItems::REINFORCED_TRITANIUM_PLATE, + MItems::REINFORCED_IRON_PLATE, MachineUpgrades.Basic::BLANK, MachineUpgrades.Normal::BLANK, From f9b2cef51347f8745a14590f34893b09b5b67bb5 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 28 Feb 2025 22:03:44 +0700 Subject: [PATCH 05/10] =?UTF-8?q?=E2=9A=99=20SHOCKY=20=E2=80=94=20=D0=A1?= =?UTF-8?q?=D0=B5=D0=B3=D0=BE=D0=B4=D0=BD=D1=8F,=20=D0=B2=2022:00=20=D0=B0?= =?UTF-8?q?=20=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=20=D1=8D=D0=BD=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=20=D1=81=D1=83=D0=BD=D0=B4=D1=83=D0=BA=20=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=BD=D0=B2=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B5=20=E2=9A=99=20?= =?UTF-8?q?SHOCKY=20=E2=80=94=20=D0=A1=D0=B5=D0=B3=D0=BE=D0=B4=D0=BD=D1=8F?= =?UTF-8?q?,=20=D0=B2=2022:00=20=D0=B2=D1=8B=D1=80=D1=83=D0=B1=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BC=D0=B8=D0=BD=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8=20?= =?UTF-8?q?=D1=87=D1=82=D0=BE-=D0=B1=D1=8B=20=D0=BF=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=BC=D0=B5=D1=82=D1=8B=20=D0=BD=D0=B5=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D1=8F=D0=BB=D0=B8=D1=81=D1=8C=20=D0=B2=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=D0=B4=D0=BD=D1=83=20(=D1=8D=D0=BD=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=20=D1=81=D1=83=D0=BD=D0=B4=D1=83=D0=BA)=20=E2=9A=99=20SH?= =?UTF-8?q?OCKY=20=E2=80=94=20=D0=A1=D0=B5=D0=B3=D0=BE=D0=B4=D0=BD=D1=8F,?= =?UTF-8?q?=20=D0=B2=2022:01=20=D1=8D=D1=82=D0=BE=20=D1=87=D1=82=D0=BE=20?= =?UTF-8?q?=D0=B4=D0=B5=D1=81=D0=B8=D0=BD=D0=BA=20=D0=BA=D0=BB=D0=B8=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=D0=B8=D1=82?= =?UTF-8?q?=20=D0=B8=D0=BB=D0=B8=20=D0=BA=D0=B0=D0=BA=20=D1=87=D1=82=D0=BE?= =?UTF-8?q?=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=20=D0=B4=D1=83=D0=BC?= =?UTF-8?q?=D0=B0=D0=B5=D1=82=20=D1=87=D1=82=D0=BE=20=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D1=80=D1=8B=D1=82=20=D1=81=D1=83=D0=BD=D0=B4=D1=83=D0=BA=20?= =?UTF-8?q?=D0=B8=20=D1=88=D0=B8=D1=84=D1=82=20=D0=BA=D0=BB=D0=B8=D0=BA=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BA=D0=B8=D0=B4=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=20?= =?UTF-8?q?=D0=B2=20=D1=8D=D0=BD=D0=B4=D0=B5=D1=80=20=D1=81=D1=83=D0=BD?= =?UTF-8?q?=D0=B4=D1=83=D0=BA=20=D0=B0=20=D0=BD=D0=B5=20=D0=B2=20=D1=85?= =?UTF-8?q?=D0=BE=D1=82=D0=B1=D0=B0=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/dbotthepony/mc/otm/menu/input/InstantBooleanInput.kt | 2 -- .../ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/input/InstantBooleanInput.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/input/InstantBooleanInput.kt index de588058c..9de91eb29 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/input/InstantBooleanInput.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/input/InstantBooleanInput.kt @@ -6,8 +6,6 @@ import java.util.function.BooleanSupplier class InstantBooleanInput(menu: MatteryMenu) : Delegate, BooleanSupplier { var value = false - private set - val input = menu.booleanInput(true) { value = it } override fun get(): Boolean { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt index 1bcc75ab1..7c27788fd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt @@ -229,6 +229,7 @@ object ExopackMenuOpen : CustomPacketPayload { if (mattery.hasExopack) { player.containerMenu = mattery.exoPackMenu + mattery.exoPackMenu.enderChestOpenState.value = false } } From 1d11b9b626593eb1095193d12eafde418bac1ab1 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 28 Feb 2025 22:05:47 +0700 Subject: [PATCH 06/10] Also unset "ender chest open" state on client --- .../mc/otm/client/screen/ExopackInventoryScreen.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 fba31c2b9..4abe280f4 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 @@ -236,10 +236,6 @@ class ExopackInventoryScreen(menu: ExopackInventoryMenu) : MatteryScreen Date: Sat, 1 Mar 2025 00:25:24 +0700 Subject: [PATCH 07/10] Add DeviceControls#dockOnLeft --- .../mc/otm/client/screen/panels/button/Buttons.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/Buttons.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/Buttons.kt index 71295e837..f513a81c4 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/Buttons.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/Buttons.kt @@ -323,7 +323,8 @@ class DeviceControls>( val fluidConfig: FluidConfigPlayerInput? = null, val balanceInputs: BooleanInputWithFeedback? = null, val upgrades: UpgradeSlots? = null, - val experience: TakeExperienceWidget? = null + val experience: TakeExperienceWidget? = null, + var dockOnLeft: Boolean = false, ) : EditablePanel(screen, parent, x = parent.width + 3f, height = 0f, width = 0f) { val itemConfigButton: ButtonPanel? val energyConfigButton: ButtonPanel? @@ -736,7 +737,12 @@ class DeviceControls>( override fun preRender(graphics: MGUIGraphics, mouseX: Float, mouseY: Float, partialTick: Float) { if (parent is FramePanel<*>) { - x = parent!!.width + 3f + if (dockOnLeft) { + x = -width - 3f + } else { + x = parent!!.width + 3f + } + y = dockTop } } From ffdb7f6f8f0168306c1479ee46721b9038755686 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 1 Mar 2025 00:37:47 +0700 Subject: [PATCH 08/10] Also set furnaceMenuOpenState to false --- .../mc/otm/client/screen/ExopackInventoryScreen.kt | 5 +---- .../ru/dbotthepony/mc/otm/network/MatteryPlayerPackets.kt | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) 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 4abe280f4..d02636fa7 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 @@ -196,10 +196,6 @@ class ExopackInventoryScreen(menu: ExopackInventoryMenu) : MatteryScreen Date: Sat, 1 Mar 2025 03:08:10 +0500 Subject: [PATCH 09/10] I'm schizo --- .../mc/otm/datagen/items/ItemModels.kt | 1 + .../mc/otm/datagen/lang/English.kt | 4 ++ .../mc/otm/datagen/lang/Russian.kt | 6 ++ .../mc/otm/datagen/loot/LootModifiersData.kt | 10 ++++ .../otm/datagen/recipes/MultiblockRecipes.kt | 6 +- .../mc/otm/datagen/recipes/ToolsRecipes.kt | 7 +++ .../otm/item/weapon/WitheredSteelSwordItem.kt | 53 ++++++++++++++++++ .../ru/dbotthepony/mc/otm/registry/MNames.kt | 9 ++- .../mc/otm/registry/game/MCreativeTabs.kt | 4 ++ .../mc/otm/registry/game/MItems.kt | 5 ++ .../models/block/frame_block.json | 4 +- .../models/item/withered_steel_sword.json | 19 +++++++ .../item/withered_steel_sword_handheld.json | 29 ++++++++++ .../item/withered_steel_sword_inventory.json | 7 +++ .../textures/block/heavy_modular_frame.png | Bin 491 -> 491 bytes .../roflite_alloy_ingot.png | Bin .../item/resources/withered_steel.png | Bin 0 -> 504 bytes .../textures/item/withered_steel_sword.png | Bin 0 -> 483 bytes .../item/withered_steel_sword_handheld.png | Bin 0 -> 494 bytes .../withered_steel_sword.json | 6 ++ 20 files changed, 164 insertions(+), 6 deletions(-) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/WitheredSteelSwordItem.kt create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_inventory.json rename src/main/resources/assets/overdrive_that_matters/textures/item/{component => resources}/roflite_alloy_ingot.png (100%) create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/resources/withered_steel.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword_handheld.png create mode 100644 src/main/resources/data/overdrive_that_matters/weapon_attributes/withered_steel_sword.json diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index 089bcda2c..452c25f6c 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -99,6 +99,7 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.resource(MItems.TRITANIUM_ORE_CLUMP) provider.resource(MItems.DILITHIUM_CRYSTAL) + provider.resource(MItems.WITHERED_STEEL) provider.generated(MItems.EXOPACK_PROBE) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index 822fefc35..ee8818b27 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -772,6 +772,8 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.TRITANIUM_SHEARS, "Tritanium Shears") add(MItems.TRITANIUM_SHIELD, "Tritanium Shield") + add(MItems.WITHERED_STEEL_SWORD, "Withered Steel Sword") + add(MItems.TRITANIUM_HELMET, "Tritanium Helmet") add(MItems.TRITANIUM_CHESTPLATE, "Tritanium Chestplate") add(MItems.TRITANIUM_PANTS, "Tritanium Leggings") @@ -785,6 +787,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.TRITANIUM_DUST, "Tritanium Dust") add(MItems.TRITANIUM_INGOT, "Tritanium Ingot") add(MItems.DILITHIUM_CRYSTAL, "Dilithium Crystal") + add(MItems.WITHERED_STEEL, "Withered Steel Ingot") add(MItems.TRITANIUM_NUGGET, "Tritanium Nugget") add(MItems.MATTER_IO_PORT, "Matter IO Port") add(MItems.MATTER_TRANSFORM_MATRIX, "Matter Transformation Matrix") @@ -911,6 +914,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.CHEST_UPGRADER, "desc2", "Hold desired crates in the opposite hand") add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg") + add(MEntityTypes.BREAD_MONSTER, "Bread Monster") } } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt index d4867917a..229c311d1 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt @@ -765,6 +765,8 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.TRITANIUM_SHEARS, "Тритановые ножницы") add(MItems.TRITANIUM_SHIELD, "Тритановый щит") + add(MItems.WITHERED_STEEL_SWORD, "Меч из иссушенной стали") + add(MItems.TRITANIUM_HELMET, "Тритановый шлем") add(MItems.TRITANIUM_CHESTPLATE, "Тритановый нагрудник") add(MItems.TRITANIUM_PANTS, "Тритановые поножи") @@ -778,6 +780,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.TRITANIUM_DUST, "Тритановая пыль") add(MItems.TRITANIUM_INGOT, "Тритановый слиток") add(MItems.DILITHIUM_CRYSTAL, "Дилитевый кристалл") + add(MItems.WITHERED_STEEL, "Слиток иссушенной стали") add(MItems.TRITANIUM_NUGGET, "Тритановый самородок") add(MItems.MATTER_IO_PORT, "Порт ввода/вывода материи") add(MItems.MATTER_TRANSFORM_MATRIX, "Матрица преобразования материи") @@ -902,6 +905,9 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.CHEST_UPGRADER, "Ящикатор") add(MItems.CHEST_UPGRADER, "desc", "Заменяет установленные сундуки и бочки грузовыми ящиками с сохранением содержимого") add(MItems.CHEST_UPGRADER, "desc2", "Удерживайте необходимые ящики в противоположной руке") + + add(MItems.BREAD_MONSTER_SPAWN_EGG, "Яйцо призыва хлебного монстра") + add(MEntityTypes.BREAD_MONSTER, "Хлебный монстр") } } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt index 527b0ac61..3a74146bc 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt @@ -204,6 +204,16 @@ fun addLootModifiers(it: LootModifiers) { ItemStack(MItems.EXOPACK_PROBE) )) + it.add("withered_skeleton_steel_drop", PlainLootAppender( + arrayOf( + LootTableIdCondition(EntityType.WITHER_SKELETON.defaultLootTable), + KilledByRealPlayerOrIndirectly + ), + + ItemStack(MItems.WITHERED_STEEL, 1) to 0.24, + ItemStack(MItems.WITHERED_STEEL, 2) to 0.11 + )) + it.add("wither_exosuit_upgrades", BasicLootAppender( arrayOf( LootTableIdCondition(EntityType.WITHER.defaultLootTable), diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt index d1eff86fa..501c13621 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/MultiblockRecipes.kt @@ -120,12 +120,14 @@ fun addMultiblockRecipes(consumer: RecipeOutput) { .row(MItemTags.IRON_PLATES, Tags.Items.INGOTS_IRON, MItemTags.IRON_PLATES) .rowAC(Tags.Items.INGOTS_IRON, Tags.Items.INGOTS_IRON) .row(MItemTags.IRON_PLATES, Tags.Items.INGOTS_IRON, MItemTags.IRON_PLATES) + .unlockedBy(MItemTags.IRON_PLATES) .build(consumer) MatteryRecipe(MItems.HEAVY_MODULAR_FRAME, count = 2, category = machinesCategory) - .rowB(MItems.REINFORCED_IRON_PLATE) + .row(MItems.WITHERED_STEEL, MItems.REINFORCED_IRON_PLATE, MItems.WITHERED_STEEL,) .row(MItems.REINFORCED_IRON_PLATE, MItems.MODULAR_FRAME, MItems.REINFORCED_IRON_PLATE) - .rowB(MItems.REINFORCED_IRON_PLATE) + .row(MItems.WITHERED_STEEL, MItems.REINFORCED_IRON_PLATE, MItems.WITHERED_STEEL,) + .unlockedBy(MItems.MODULAR_FRAME) .build(consumer) // blackhole generator diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt index 2d2749e32..78c63bd92 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ToolsRecipes.kt @@ -58,4 +58,11 @@ fun addToolsRecipes(consumer: RecipeOutput) { .rowB(Tags.Items.RODS_WOODEN) .unlockedBy(MItemTags.TRITANIUM_INGOTS) .build(consumer) + + MatteryRecipe(MItems.WITHERED_STEEL_SWORD, category = RecipeCategory.COMBAT) + .rowB(MItems.WITHERED_STEEL) + .rowB(MItems.WITHERED_STEEL) + .rowB(Tags.Items.RODS_WOODEN) + .unlockedBy(MItems.WITHERED_STEEL) + .build(consumer) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/WitheredSteelSwordItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/WitheredSteelSwordItem.kt new file mode 100644 index 000000000..4c78415e1 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/WitheredSteelSwordItem.kt @@ -0,0 +1,53 @@ +package ru.dbotthepony.mc.otm.item.weapon + +import net.minecraft.world.effect.MobEffectInstance +import net.minecraft.world.effect.MobEffects +import net.minecraft.world.entity.EquipmentSlotGroup +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.item.Item +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.SwordItem +import net.minecraft.world.item.Tiers +import net.minecraft.world.item.component.ItemAttributeModifiers +import ru.dbotthepony.mc.otm.registry.game.MItems + +class WitheredSteelSwordItem(properties: Item.Properties) : SwordItem(Tiers.IRON, properties){ + private val attributes: ItemAttributeModifiers + + init { + var builder = ItemAttributeModifiers.builder() + builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 4.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -2.4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + + attributes = builder.build() + } + + override fun getMaxDamage(stack: ItemStack): Int { + return 420 + } + + override fun isEnchantable(p_41456_: ItemStack): Boolean { + return p_41456_.count == 1 + } + + override fun getEnchantmentValue(stack: ItemStack): Int { + return 10 + } + + override fun isValidRepairItem(stack: ItemStack, ingredient: ItemStack): Boolean { + return ingredient.`is`(MItems.WITHERED_STEEL) + } + + override fun hurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean { + target.addEffect(MobEffectInstance(MobEffects.WITHER, 100, 0)) // 5s Wither II + return super.hurtEnemy(stack, target, attacker) + } + + override fun getDefaultAttributeModifiers(stack: ItemStack): ItemAttributeModifiers { + return attributes + } + + +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt index c873ba1a5..c803ef655 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -115,6 +115,9 @@ object MNames { const val VENT = "vent" const val VENT_ALTERNATIVE = "vent_alternative" + const val TRITANIUM_BARS = "tritanium_bars" + const val METAL_RAILING = "metal_railing" + // items const val GRAVITATIONAL_DISRUPTOR = "gravitational_disruptor" const val MATTER_DUST = "matter_dust" @@ -191,6 +194,8 @@ object MNames { const val CHEST_UPGRADER = "chest_upgrader" + const val WITHERED_STEEL_SWORD = "withered_steel_sword" + // eg const val BREAD_MONSTER_SPAWN_EGG = "bead_monster_spawn_egg" @@ -199,8 +204,8 @@ object MNames { const val TRITANIUM_NUGGET = "tritanium_nugget" const val TRITANIUM_INGOT = "tritanium_ingot" const val TRITANIUM_INGOT_BLOCK = "tritanium_ingot_block" - const val TRITANIUM_BARS = "tritanium_bars" - const val METAL_RAILING = "metal_railing" + + const val WITHERED_STEEL = "withered_steel" const val MATTER_IO_PORT = "matter_io_port" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt index 0b762632e..5b4d243b5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt @@ -236,11 +236,15 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) { accept(MItems.DILITHIUM_CRYSTAL) accept(MItems.DILITHIUM_CRYSTAL_BLOCK) + accept(MItems.WITHERED_STEEL) + accept(MItems.TRITANIUM_TOOLS) accept(MItems.TRITANIUM_SHIELD) accept(MItems.SIMPLE_TRITANIUM_ARMOR) accept(MItems.TRITANIUM_ARMOR) + accept(MItems.WITHERED_STEEL_SWORD) + energized(MItems.ENERGY_SWORD) accept(MItems.REDSTONE_INTERACTOR) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index 8dc77c623..89194c834 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -75,6 +75,7 @@ import ru.dbotthepony.mc.otm.item.tool.ExplosiveHammerItem import ru.dbotthepony.mc.otm.item.tool.MatteryAxeItem import ru.dbotthepony.mc.otm.item.tool.RedstoneInteractorItem import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem +import ru.dbotthepony.mc.otm.item.weapon.WitheredSteelSwordItem import ru.dbotthepony.mc.otm.registry.MDeferredRegister import ru.dbotthepony.mc.otm.registry.MItemTags import ru.dbotthepony.mc.otm.registry.MNames @@ -303,6 +304,8 @@ object MItems { val TRITANIUM_BARS: BlockItem by registry.register(MNames.TRITANIUM_BARS) { BlockItem(MBlocks.TRITANIUM_BARS, DEFAULT_PROPERTIES) } val METAL_RAILING: BlockItem by registry.register(MNames.METAL_RAILING) { BlockItem(MBlocks.METAL_RAILING, DEFAULT_PROPERTIES) } + val WITHERED_STEEL: Item by registry.register(MNames.WITHERED_STEEL) { Item(DEFAULT_PROPERTIES) } + val DILITHIUM_CRYSTAL by registry.register("dilithium_crystal") { MatteryItem(DEFAULT_PROPERTIES) } val DILITHIUM_ORE by registry.register("dilithium_ore") { BlockItem(MBlocks.DILITHIUM_ORE, DEFAULT_PROPERTIES) } val DEEPSLATE_DILITHIUM_ORE by registry.register("deepslate_dilithium_ore") { BlockItem(MBlocks.DEEPSLATE_DILITHIUM_ORE, DEFAULT_PROPERTIES) } @@ -405,6 +408,8 @@ object MItems { val ENERGY_SWORD: Item by registry.register(MNames.ENERGY_SWORD) { EnergySwordItem() } + val WITHERED_STEEL_SWORD: Item by registry.register(MNames.WITHERED_STEEL_SWORD) { WitheredSteelSwordItem(Item.Properties().durability(420)) } + val BLACK_HOLE_SCANNER: Item by registry.register(MNames.BLACK_HOLE_SCANNER) { MatteryItem(DEFAULT_PROPERTIES).addSimpleDescription().addSimpleDescription("2") } val GRAVITATION_FIELD_LIMITER: Item by registry.register(MNames.GRAVITATION_FIELD_LIMITER) { Item(DEFAULT_PROPERTIES) } diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json b/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json index 5aea3aa89..46650d35f 100644 --- a/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json +++ b/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json @@ -17,8 +17,8 @@ } }, { - "from": [15.99995, 15.99995, 15.99995], - "to": [0.00005, 0.00005, 0.00005], + "from": [15.9999, 15.9999, 15.9999], + "to": [0.0001, 0.0001, 0.0001], "rotation": {"angle": 0, "axis": "y", "origin": [16, 16, 16]}, "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "south"}, diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword.json b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword.json new file mode 100644 index 000000000..3d8815653 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword.json @@ -0,0 +1,19 @@ +{ + "loader": "neoforge:separate_transforms", + "gui_light": "front", + "base": + { + "parent": "overdrive_that_matters:item/withered_steel_sword_handheld" + }, + "perspectives": { + "gui": { + "parent": "overdrive_that_matters:item/withered_steel_sword_inventory" + }, + "fixed": { + "parent": "overdrive_that_matters:item/withered_steel_sword_inventory" + }, + "ground": { + "parent": "overdrive_that_matters:item/withered_steel_sword_inventory" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json new file mode 100644 index 000000000..75344b0cb --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json @@ -0,0 +1,29 @@ +{ + "credit": "Made with Blockbench", + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "overdrive_that_matters:item/withered_steel_sword_handheld" + }, + "display": { + "thirdperson_righthand": { + "rotation": [0, -90, 55], + "translation": [0, 4, 0.5], + "scale": [0.85, 0.85, 0.85] + }, + "thirdperson_lefthand": { + "rotation": [0, 90, -55], + "translation": [0, 4, 0.5], + "scale": [0.85, 0.85, 0.85] + }, + "firstperson_righthand": { + "rotation": [0, -90, 25], + "translation": [1.13, 3.2, 1.13], + "scale": [0.68, 0.68, 0.68] + }, + "firstperson_lefthand": { + "rotation": [0, 90, -25], + "translation": [1.13, 3.2, 1.13], + "scale": [0.68, 0.68, 0.68] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_inventory.json b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_inventory.json new file mode 100644 index 000000000..1749d2995 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_inventory.json @@ -0,0 +1,7 @@ +{ + "credit": "Made with Blockbench", + "parent": "minecraft:item/generated", + "textures": { + "layer0": "overdrive_that_matters:item/withered_steel_sword" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png b/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png index 1f5295b471c74a49ab9512e26d8df88bcf8b774f..d0657c812fd2d56e15b82ab96cf4c592ce72d13d 100644 GIT binary patch delta 33 pcmaFO{F-@!kC>sowS}jPTV#N?wziy{90LQx+n(=RHzsv50syc13d;Zh delta 33 ocmaFO{F-@!kC>;qS+t9DvX`f}wziy{90LP`riAVKjY*x10H&@90ssI2 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/component/roflite_alloy_ingot.png b/src/main/resources/assets/overdrive_that_matters/textures/item/resources/roflite_alloy_ingot.png similarity index 100% rename from src/main/resources/assets/overdrive_that_matters/textures/item/component/roflite_alloy_ingot.png rename to src/main/resources/assets/overdrive_that_matters/textures/item/resources/roflite_alloy_ingot.png diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/resources/withered_steel.png b/src/main/resources/assets/overdrive_that_matters/textures/item/resources/withered_steel.png new file mode 100644 index 0000000000000000000000000000000000000000..c9572dd57e546fad712fbf4fcfc6976ca544f6ef GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}%0G|+7AxUvvV;xxyRYQAgx5xksPnU$MTy@P8;^ z2==cK0tps)L>4nJ@a+d-Mhn(p6`-I*iEBhjaDG}zd16s2LqK9?UWuNcYlwoWo}r%6 z?>)@hfNHj-MtG)qdTKFn06DA-QjDw&j6jwb5KBYZAfIS3GK0mLfNVoXCa}+)7@P1DV;LE{-7@!Lj|^dl!bJ8n)Jwo*rPR4rk79{srDmJ`2`^ncwPJ@G0HCc+Yb5ouVhp3?OYeNNF|Ksy? zCfMo0H=9c3zAK*hpR-@P#rRE!bxKs)`_&*Pc)I$ztaD0e0s!#W Bbu0h? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword.png b/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword.png new file mode 100644 index 0000000000000000000000000000000000000000..781a545513ce139d354b8530683f06b82437cdd8 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}f0G|+7bz}X6s$5wORSQoSx5xk?NpYae_Sr(ZK#IL2$S?Rm7%)hAGrIwW zI14-?iy0XB_Jc5^1#7ShP*9@8HKHUqKdq!Zu_%=xATcwqM9n999M?Mpgz!Aj=DgrJ-z)4>TB=!QxCnwjm=E*hf)7c4j*ZSUd~J z27%r(MurzakHTm)OBsMt6WAG8fGQ1)j13qUKuiVM$hrVx(i9*Y1ek#4GJ#bFSy}*D zP+f)w1|Zo^{=3d~YHnfPZrnRUHK}JP2{J~L2ZF$ zf;roMO8FktmYDR@OrR-D_t(#2(f?W>h40+2>^`#T_D_!4hgD~^R8*LIoMeB-HYdt- jmd)K~qQY}O{?j)4A9jJI&`b50CCFA!S3j3^P6b z$b#xJG%x_kcJkkKu4CIH3}j|{x;Tbt1jn8Y Date: Sat, 1 Mar 2025 11:13:33 +0700 Subject: [PATCH 10/10] Fix allowSpectators not being used by filter --- src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt index 5c7ed9174..674e64ea6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt @@ -137,7 +137,7 @@ abstract class MatteryMenu( private val filters = ArrayList>() init { - filters.add { allowSpectators || !it.isSpectator } + filters.add { this.allowSpectators || !it.isSpectator } } fun filter(predicate: Predicate): PlayerInput {