Compare commits
No commits in common. "94601478bbe2dee9d0eb3433bdb6f805d13b3c71" and "a9851e08b3b75a21ce75a5378a83cb38f8ef6266" have entirely different histories.
94601478bb
...
a9851e08b3
@ -265,6 +265,7 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
|
|||||||
|
|
||||||
itemModelProvider.generatedBlockDecorative(MItems.INDUSTRIAL_LADDER)
|
itemModelProvider.generatedBlockDecorative(MItems.INDUSTRIAL_LADDER)
|
||||||
|
|
||||||
|
|
||||||
itemModelProvider.block(MItems.TIRE_BLOCK)
|
itemModelProvider.block(MItems.TIRE_BLOCK)
|
||||||
|
|
||||||
blockStateProvider.block(MBlocks.METAL_BEAM_CENTER)
|
blockStateProvider.block(MBlocks.METAL_BEAM_CENTER)
|
||||||
|
@ -124,30 +124,19 @@ class MatteryBlockStateProvider(event: GatherDataEvent) : BlockStateProvider(eve
|
|||||||
fun simpleLadder(vararg blocks: Block): MatteryBlockStateProvider {
|
fun simpleLadder(vararg blocks: Block): MatteryBlockStateProvider {
|
||||||
for (block in blocks) {
|
for (block in blocks) {
|
||||||
exec {
|
exec {
|
||||||
val mdl = models().getExistingFile(modLocation("block/${block.registryName!!.path}"))
|
|
||||||
getVariantBuilder(block)
|
getVariantBuilder(block)
|
||||||
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.NORTH)
|
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.NORTH)
|
||||||
.modelForState()
|
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).addModel()
|
||||||
.modelFile(mdl)
|
|
||||||
.addModel()
|
|
||||||
|
|
||||||
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.SOUTH)
|
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.SOUTH)
|
||||||
.modelForState()
|
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(180).addModel()
|
||||||
.modelFile(mdl)
|
|
||||||
.rotationY(180)
|
|
||||||
.addModel()
|
|
||||||
|
|
||||||
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.WEST)
|
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.WEST)
|
||||||
.modelForState()
|
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(270).addModel()
|
||||||
.modelFile(mdl)
|
|
||||||
.rotationY(270)
|
|
||||||
.addModel()
|
|
||||||
|
|
||||||
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.EAST)
|
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.EAST)
|
||||||
.modelForState()
|
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(90).addModel()
|
||||||
.modelFile(mdl)
|
|
||||||
.rotationY(90)
|
|
||||||
.addModel()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,12 +53,10 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun decorativeLadder(block: Block) {
|
fun decorativeLadder(block: Block) {
|
||||||
exec {
|
|
||||||
withExistingParent(block.registryName!!.path, ResourceLocation("minecraft", "block/ladder"))
|
withExistingParent(block.registryName!!.path, ResourceLocation("minecraft", "block/ladder"))
|
||||||
.texture("texture", modLocation("block/decorative/${block.registryName!!.path}"))
|
.texture("texture", modLocation("block/decorative/${block.registryName!!.path}"))
|
||||||
.renderType("cutout")
|
.renderType("cutout")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun decorativeGlassAll(blocks: Collection<Block>) {
|
fun decorativeGlassAll(blocks: Collection<Block>) {
|
||||||
for (block in blocks) {
|
for (block in blocks) {
|
||||||
|
@ -5,7 +5,7 @@ import ru.dbotthepony.mc.otm.client.render.sprites.MatteryAtlas
|
|||||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||||
|
|
||||||
object WidgetLocation {
|
object WidgetLocation {
|
||||||
val STORAGE_CONTROLS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/storage_controls.png"), 90f, 90f)
|
val STORAGE_CONTROLS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/storage_controls.png"), 90f, 72f)
|
||||||
val WIDGET_18 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_18.png"), 72f, 72f)
|
val WIDGET_18 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_18.png"), 72f, 72f)
|
||||||
val WIDGET_15 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_15.png"), 60f, 60f)
|
val WIDGET_15 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_15.png"), 60f, 60f)
|
||||||
val WIDGET_8 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_8.png"), 64f, 32f)
|
val WIDGET_8 = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/widget_8.png"), 64f, 32f)
|
||||||
|
@ -6,7 +6,7 @@ import ru.dbotthepony.mc.otm.core.immutableMap
|
|||||||
import ru.dbotthepony.mc.otm.core.math.RelativeSide
|
import ru.dbotthepony.mc.otm.core.math.RelativeSide
|
||||||
|
|
||||||
object Widgets18 {
|
object Widgets18 {
|
||||||
private val storageGrid = WidgetLocation.STORAGE_CONTROLS.grid(rows = 5, columns = 5)
|
private val storageGrid = WidgetLocation.STORAGE_CONTROLS.grid(rows = 4, columns = 5)
|
||||||
|
|
||||||
val SORT_DESCENDING = storageGrid.next()
|
val SORT_DESCENDING = storageGrid.next()
|
||||||
val SORT_ASCENDING = storageGrid.next()
|
val SORT_ASCENDING = storageGrid.next()
|
||||||
@ -24,12 +24,6 @@ object Widgets18 {
|
|||||||
val PLAY = storageGrid.next()
|
val PLAY = storageGrid.next()
|
||||||
val STOP = storageGrid.next()
|
val STOP = storageGrid.next()
|
||||||
val SORT_NOW = storageGrid.next()
|
val SORT_NOW = storageGrid.next()
|
||||||
val MOVE_EVERYTHING_TO_STORAGE = storageGrid.next()
|
|
||||||
val MOVE_EVERYTHING_FROM_STORAGE = storageGrid.next()
|
|
||||||
val RESTOCK_TO_STORAGE = storageGrid.next()
|
|
||||||
val RESTOCK_FROM_STORAGE = storageGrid.next()
|
|
||||||
val RESTOCK_WITH_MOVE_TO_STORAGE = storageGrid.next()
|
|
||||||
val RESTOCK_WITH_MOVE_FROM_STORAGE = storageGrid.next()
|
|
||||||
|
|
||||||
private val miscGrid = WidgetLocation.WIDGET_18.grid(4, 4)
|
private val miscGrid = WidgetLocation.WIDGET_18.grid(4, 4)
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
.add(Attributes.KNOCKBACK_RESISTANCE, 1.0)
|
.add(Attributes.KNOCKBACK_RESISTANCE, 1.0)
|
||||||
.add(Attributes.FOLLOW_RANGE, 32.0)
|
.add(Attributes.FOLLOW_RANGE, 32.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val IS_CHARGING: EntityDataAccessor<Boolean> =
|
private val IS_CHARGING: EntityDataAccessor<Boolean> =
|
||||||
SynchedEntityData.defineId(Enforcer::class.java, EntityDataSerializers.BOOLEAN)
|
SynchedEntityData.defineId(Enforcer::class.java, EntityDataSerializers.BOOLEAN)
|
||||||
}
|
}
|
||||||
@ -66,12 +65,14 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
builder.define(IS_CHARGING, false)
|
builder.define(IS_CHARGING, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
var isCharging: Boolean
|
fun setCharging(value: Boolean) {
|
||||||
get() = entityData.get(IS_CHARGING)
|
|
||||||
set(value) {
|
|
||||||
entityData.set(IS_CHARGING, value)
|
entityData.set(IS_CHARGING, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isCharging(): Boolean {
|
||||||
|
return entityData.get(IS_CHARGING)
|
||||||
|
}
|
||||||
|
|
||||||
override fun registerGoals() {
|
override fun registerGoals() {
|
||||||
goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f))
|
goalSelector.addGoal(7, LookAtPlayerGoal(this, Player::class.java, 8f))
|
||||||
goalSelector.addGoal(3, NearestAttackableTargetGoal(this, LivingEntity::class.java, 10, true, true) { entity ->
|
goalSelector.addGoal(3, NearestAttackableTargetGoal(this, LivingEntity::class.java, 10, true, true) { entity ->
|
||||||
@ -199,7 +200,7 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
private var target: LivingEntity? = null
|
private var target: LivingEntity? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setFlags(EnumSet.of(Flag.MOVE))
|
setFlags(EnumSet.of(Goal.Flag.MOVE))
|
||||||
}
|
}
|
||||||
|
|
||||||
private var chargeTime = 0
|
private var chargeTime = 0
|
||||||
@ -207,6 +208,8 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
private val maxChargeTime = 40
|
private val maxChargeTime = 40
|
||||||
private var chargeDir: Vec3? = null
|
private var chargeDir: Vec3? = null
|
||||||
private var cooldown = 0
|
private var cooldown = 0
|
||||||
|
private val minCooldown = 35
|
||||||
|
private val maxCooldown = 60
|
||||||
private var isCharging = false
|
private var isCharging = false
|
||||||
|
|
||||||
override fun canUse(): Boolean {
|
override fun canUse(): Boolean {
|
||||||
@ -224,7 +227,7 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun start() {
|
override fun start() {
|
||||||
mob.isCharging = true
|
mob.setCharging(true)
|
||||||
mob.playSound(MSoundEvents.ENFORCER_ALERT, 1.0f, 1.0f)
|
mob.playSound(MSoundEvents.ENFORCER_ALERT, 1.0f, 1.0f)
|
||||||
chargeTime = 0
|
chargeTime = 0
|
||||||
mob.navigation.stop()
|
mob.navigation.stop()
|
||||||
@ -312,18 +315,13 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun stop() {
|
override fun stop() {
|
||||||
mob.isCharging = false
|
mob.setCharging(false)
|
||||||
mob.deltaMovement = Vec3.ZERO
|
mob.setDeltaMovement(Vec3.ZERO)
|
||||||
chargeTime = 0
|
chargeTime = 0
|
||||||
chargeDir = null
|
chargeDir = null
|
||||||
isCharging = false
|
isCharging = false
|
||||||
mob.chargeState.stop()
|
mob.chargeState.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val minCooldown = 35
|
|
||||||
private const val maxCooldown = 60
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class StayNearGoal(private val mob: Enforcer) : Goal() {
|
class StayNearGoal(private val mob: Enforcer) : Goal() {
|
||||||
@ -332,7 +330,7 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
private var movePos: Vec3? = null
|
private var movePos: Vec3? = null
|
||||||
|
|
||||||
override fun canUse(): Boolean {
|
override fun canUse(): Boolean {
|
||||||
return mob.target != null && !mob.isCharging
|
return mob.target != null && !mob.isCharging()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun canContinueToUse(): Boolean {
|
override fun canContinueToUse(): Boolean {
|
||||||
@ -375,11 +373,11 @@ class Enforcer(type: EntityType<Enforcer>, level: Level) : Monster(type,level) {
|
|||||||
private var fireTick = 0
|
private var fireTick = 0
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setFlags(EnumSet.of(Flag.LOOK))
|
setFlags(EnumSet.of(Goal.Flag.LOOK))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun canUse(): Boolean {
|
override fun canUse(): Boolean {
|
||||||
return mob.target != null && !mob.isCharging
|
return mob.target != null && !mob.isCharging()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun canContinueToUse(): Boolean {
|
override fun canContinueToUse(): Boolean {
|
||||||
|
@ -326,6 +326,10 @@ private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
|
|||||||
accept(MItems.METAL_BEAM_CENTER)
|
accept(MItems.METAL_BEAM_CENTER)
|
||||||
accept(MItems.ENGINE)
|
accept(MItems.ENGINE)
|
||||||
|
|
||||||
|
accept(MItems.TRITANIUM_STRIPED_BLOCK.values)
|
||||||
|
accept(MItems.TRITANIUM_STRIPED_STAIRS.values)
|
||||||
|
accept(MItems.TRITANIUM_STRIPED_SLAB.values)
|
||||||
|
accept(MItems.TRITANIUM_STRIPED_WALL.values)
|
||||||
accept(MItems.CARBON_FIBRE_BLOCK)
|
accept(MItems.CARBON_FIBRE_BLOCK)
|
||||||
accept(MItems.METAL_JUNK)
|
accept(MItems.METAL_JUNK)
|
||||||
accept(MItems.METAL_MESH)
|
accept(MItems.METAL_MESH)
|
||||||
@ -334,13 +338,6 @@ private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
|
|||||||
accept(MItems.TRITANIUM_BARS)
|
accept(MItems.TRITANIUM_BARS)
|
||||||
accept(MItems.METAL_RAILING)
|
accept(MItems.METAL_RAILING)
|
||||||
|
|
||||||
accept(MItems.INDUSTRIAL_LADDER)
|
|
||||||
|
|
||||||
accept(MItems.TRITANIUM_STRIPED_BLOCK.values)
|
|
||||||
accept(MItems.TRITANIUM_STRIPED_STAIRS.values)
|
|
||||||
accept(MItems.TRITANIUM_STRIPED_SLAB.values)
|
|
||||||
accept(MItems.TRITANIUM_STRIPED_WALL.values)
|
|
||||||
|
|
||||||
colored(MItems.TRITANIUM_DOOR)
|
colored(MItems.TRITANIUM_DOOR)
|
||||||
colored(MItems.TRITANIUM_TRAPDOOR)
|
colored(MItems.TRITANIUM_TRAPDOOR)
|
||||||
accept(MRegistry.TRITANIUM_PRESSURE_PLATE.items.values)
|
accept(MRegistry.TRITANIUM_PRESSURE_PLATE.items.values)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user