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..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) @@ -108,6 +109,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..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") @@ -909,6 +912,9 @@ 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") + 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 433218a58..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 @@ -135,7 +137,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/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/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..a0e42bdfc 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 @@ -150,6 +151,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..ce3692a67 --- /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.4f) { + 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/client/screen/ExopackInventoryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExopackInventoryScreen.kt index fba31c2b9..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>( 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? @@ -733,7 +734,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 } } 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..f13fd15dc --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/BreadMonster.kt @@ -0,0 +1,51 @@ +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 +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(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, MeleeAttackGoal(this, 1.3, true)) + + 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) + .add(Attributes.ATTACK_DAMAGE, 3.0) + } + } +} 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/menu/MatteryMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt index 4c4488d00..94ae575d3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/MatteryMenu.kt @@ -138,7 +138,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 { 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..af2e71758 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,8 @@ object ExopackMenuOpen : CustomPacketPayload { if (mattery.hasExopack) { player.containerMenu = mattery.exoPackMenu + mattery.exoPackMenu.enderChestOpenState.value = false + mattery.exoPackMenu.furnaceMenuOpenState.value = false } } 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..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,13 +194,18 @@ 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" + // items: crafting components const val TRITANIUM_DUST = "tritanium_dust" 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" @@ -306,6 +314,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/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/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/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index b200f0536..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 @@ -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 @@ -74,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 @@ -302,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) } @@ -404,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) } @@ -581,6 +587,7 @@ object MItems { MItems::CARBON_MESH, MItems::ARMOR_ASSEMBLY, MItems::REINFORCED_TRITANIUM_PLATE, + MItems::REINFORCED_IRON_PLATE, MachineUpgrades.Basic::BLANK, MachineUpgrades.Normal::BLANK, @@ -656,6 +663,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/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/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/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 1f5295b47..d0657c812 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png and b/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png differ 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 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 000000000..ad057ecda Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/egg/bread_monster.png differ 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 000000000..c9572dd57 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/resources/withered_steel.png differ 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 000000000..781a54551 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword_handheld.png b/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword_handheld.png new file mode 100644 index 000000000..acd6f9833 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/withered_steel_sword_handheld.png differ diff --git a/src/main/resources/data/overdrive_that_matters/weapon_attributes/withered_steel_sword.json b/src/main/resources/data/overdrive_that_matters/weapon_attributes/withered_steel_sword.json new file mode 100644 index 000000000..1271e3f2e --- /dev/null +++ b/src/main/resources/data/overdrive_that_matters/weapon_attributes/withered_steel_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "bettercombat:sword", + "attributes": { + "attack_range": 2 + } +} \ No newline at end of file