bread
This commit is contained in:
parent
eddb7a1445
commit
18252cf800
@ -108,6 +108,8 @@ fun addItemModels(provider: MatteryItemModelProvider) {
|
|||||||
|
|
||||||
provider.handheld(MItems.CHEST_UPGRADER)
|
provider.handheld(MItems.CHEST_UPGRADER)
|
||||||
|
|
||||||
|
provider.generated(MItems.BREAD_MONSTER_SPAWN_EGG, modLocation("item/egg/bread_monster"))
|
||||||
|
|
||||||
provider.generatedTiered(MItems.BATTERIES, "battery_tier")
|
provider.generatedTiered(MItems.BATTERIES, "battery_tier")
|
||||||
provider.generated(MItems.BATTERY_CREATIVE)
|
provider.generated(MItems.BATTERY_CREATIVE)
|
||||||
provider.generated(MItems.PROCEDURAL_BATTERY, modLocation("item/battery_procedural"))
|
provider.generated(MItems.PROCEDURAL_BATTERY, modLocation("item/battery_procedural"))
|
||||||
|
@ -909,6 +909,8 @@ private fun items(provider: MatteryLanguageProvider) {
|
|||||||
add(MItems.CHEST_UPGRADER, "Crate-r")
|
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, "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.CHEST_UPGRADER, "desc2", "Hold desired crates in the opposite hand")
|
||||||
|
|
||||||
|
add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class BreadMonsterModel {
|
|||||||
|
|
||||||
// this.applyStatic(BreadMonsterAnimation.IDLE);
|
// this.applyStatic(BreadMonsterAnimation.IDLE);
|
||||||
this.animate(entity.getIdleState(), BreadMonsterAnimation.IDLE, ageInTicks, 1.0F);
|
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
|
@Override
|
||||||
|
@ -9,7 +9,7 @@ import ru.dbotthepony.mc.otm.client.model.entity.BreadMonsterModel
|
|||||||
import ru.dbotthepony.mc.otm.entity.BreadMonster
|
import ru.dbotthepony.mc.otm.entity.BreadMonster
|
||||||
|
|
||||||
class BreadMonsterRenderer(context: EntityRendererProvider.Context)
|
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
|
override fun getTextureLocation(entity: BreadMonster): ResourceLocation = TEXTURE_LOCATION
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -2,13 +2,16 @@ package ru.dbotthepony.mc.otm.entity
|
|||||||
|
|
||||||
import net.minecraft.world.entity.AnimationState
|
import net.minecraft.world.entity.AnimationState
|
||||||
import net.minecraft.world.entity.EntityType
|
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.AttributeSupplier
|
||||||
import net.minecraft.world.entity.ai.attributes.Attributes
|
import net.minecraft.world.entity.ai.attributes.Attributes
|
||||||
import net.minecraft.world.entity.ai.goal.LeapAtTargetGoal
|
import net.minecraft.world.entity.ai.goal.LeapAtTargetGoal
|
||||||
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal
|
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.RandomLookAroundGoal
|
||||||
import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal
|
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.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.GroundPathNavigation
|
||||||
import net.minecraft.world.entity.ai.navigation.PathNavigation
|
import net.minecraft.world.entity.ai.navigation.PathNavigation
|
||||||
import net.minecraft.world.entity.monster.Monster
|
import net.minecraft.world.entity.monster.Monster
|
||||||
@ -23,10 +26,14 @@ class BreadMonster(type: EntityType<BreadMonster>, level: Level) : Monster(type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun registerGoals() {
|
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(1, LeapAtTargetGoal(this, 0.4f))
|
||||||
goalSelector.addGoal(2, WaterAvoidingRandomStrollGoal(this, 0.8))
|
goalSelector.addGoal(2, MeleeAttackGoal(this, 1.3, true))
|
||||||
goalSelector.addGoal(3, LookAtPlayerGoal(this, Player::class.java, 8f))
|
|
||||||
goalSelector.addGoal(4, RandomLookAroundGoal(this))
|
|
||||||
|
|
||||||
targetSelector.addGoal(1, HurtByTargetGoal(this))
|
targetSelector.addGoal(1, HurtByTargetGoal(this))
|
||||||
}
|
}
|
||||||
@ -38,6 +45,7 @@ class BreadMonster(type: EntityType<BreadMonster>, level: Level) : Monster(type,
|
|||||||
return createMonsterAttributes()
|
return createMonsterAttributes()
|
||||||
.add(Attributes.MAX_HEALTH, 16.0)
|
.add(Attributes.MAX_HEALTH, 16.0)
|
||||||
.add(Attributes.MOVEMENT_SPEED, 0.3)
|
.add(Attributes.MOVEMENT_SPEED, 0.3)
|
||||||
|
.add(Attributes.ATTACK_DAMAGE, 3.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,6 +191,9 @@ object MNames {
|
|||||||
|
|
||||||
const val CHEST_UPGRADER = "chest_upgrader"
|
const val CHEST_UPGRADER = "chest_upgrader"
|
||||||
|
|
||||||
|
// eg
|
||||||
|
const val BREAD_MONSTER_SPAWN_EGG = "bead_monster_spawn_egg"
|
||||||
|
|
||||||
// items: crafting components
|
// items: crafting components
|
||||||
const val TRITANIUM_DUST = "tritanium_dust"
|
const val TRITANIUM_DUST = "tritanium_dust"
|
||||||
const val TRITANIUM_NUGGET = "tritanium_nugget"
|
const val TRITANIUM_NUGGET = "tritanium_nugget"
|
||||||
|
@ -20,6 +20,7 @@ import net.minecraft.world.item.Rarity
|
|||||||
import net.minecraft.world.item.ShearsItem
|
import net.minecraft.world.item.ShearsItem
|
||||||
import net.minecraft.world.item.ShieldItem
|
import net.minecraft.world.item.ShieldItem
|
||||||
import net.minecraft.world.item.ShovelItem
|
import net.minecraft.world.item.ShovelItem
|
||||||
|
import net.minecraft.world.item.SpawnEggItem
|
||||||
import net.minecraft.world.item.SwordItem
|
import net.minecraft.world.item.SwordItem
|
||||||
import net.minecraft.world.item.Tiers
|
import net.minecraft.world.item.Tiers
|
||||||
import net.minecraft.world.item.crafting.Ingredient
|
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 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 {
|
init {
|
||||||
MRegistry.registerItems(registry)
|
MRegistry.registerItems(registry)
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 533 B |
Loading…
Reference in New Issue
Block a user