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 000000000..ad057ecda Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/egg/bread_monster.png differ