This commit is contained in:
GearShocky 2025-02-28 17:03:05 +05:00
parent eddb7a1445
commit 18252cf800
8 changed files with 23 additions and 5 deletions

View File

@ -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"))

View File

@ -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")
}
}

View File

@ -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

View File

@ -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<BreadMonster, HierarchicalModel<BreadMonster>>(context, BreadMonsterModel.getModel(), 0.9f) {
: MobRenderer<BreadMonster, HierarchicalModel<BreadMonster>>(context, BreadMonsterModel.getModel(), 0.4f) {
override fun getTextureLocation(entity: BreadMonster): ResourceLocation = TEXTURE_LOCATION
companion object {

View File

@ -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<BreadMonster>, 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<BreadMonster>, level: Level) : Monster(type,
return createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 16.0)
.add(Attributes.MOVEMENT_SPEED, 0.3)
.add(Attributes.ATTACK_DAMAGE, 3.0)
}
}
}

View File

@ -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"

View File

@ -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)
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B