Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
EngineMachiner committed Aug 25, 2024
1 parent 0d24835 commit 8ecfc68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.4
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.22
loader_version=0.16.2
fabric_kotlin_version=1.12.0+kotlin.2.0.10

Expand All @@ -15,4 +15,4 @@ maven_group=com.enginemachiner.harmony
archives_base_name=harmony

# Dependencies
fabric_version=0.77.0+1.18.2
fabric_version=0.46.6+1.18
5 changes: 3 additions & 2 deletions src/main/kotlin/com/enginemachiner/harmony/Item.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.enginemachiner.harmony

import com.enginemachiner.harmony.ModItemGroup.itemGroup
import net.fabricmc.fabric.api.item.v1.FabricItem
import net.minecraft.entity.Entity
import net.minecraft.entity.EquipmentSlot
import net.minecraft.entity.LivingEntity
Expand Down Expand Up @@ -159,15 +160,15 @@ interface HarmonyItem {

private interface Harmony : HarmonyItem, ModID

abstract class ToolItem( material: ToolMaterial, settings: Settings ) : ToolItem( material, settings ), Harmony {
abstract class ToolItem( material: ToolMaterial, settings: Settings ) : ToolItem( material, settings ), Harmony, FabricItem {

override fun allowNbtUpdateAnimation( player: PlayerEntity, hand: Hand, oldStack: ItemStack, newStack: ItemStack ): Boolean { return false }

override fun inventoryTick( stack: ItemStack, world: World, entity: Entity, slot: Int, selected: Boolean ) { tick( stack, world, entity, slot ) }

}

abstract class Item(settings: Settings) : Item(settings), Harmony {
abstract class Item(settings: Settings) : Item(settings), Harmony, FabricItem {

override fun allowNbtUpdateAnimation( player: PlayerEntity, hand: Hand, oldStack: ItemStack, newStack: ItemStack ): Boolean { return false }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class ModAdvancement : ModID {

fun build( consumer: Consumer<Advancement>, criterion: String = name ): Advancement {

val advancement = Advancement.Builder.create()
val advancement = Advancement.Task.create()
.display( icon, title(), description(), background, frame, toast, announce, hidden )
.parent( parent?.advancement ).criterion( criterion, conditions() )
.build( consumer, "$MOD_NAME/$name" )
Expand Down

0 comments on commit 8ecfc68

Please sign in to comment.