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 8f71c05 commit 7d94793
Show file tree
Hide file tree
Showing 3 changed files with 6 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.19.1
yarn_mappings=1.19.1+build.6
minecraft_version=1.19
yarn_mappings=1.19+build.4
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.58.5+1.19.1
fabric_version=0.58.0+1.19
4 changes: 2 additions & 2 deletions src/main/kotlin/com/enginemachiner/harmony/Item.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val hands = arrayOf( Hand.MAIN_HAND, Hand.OFF_HAND )

fun handItem( player: PlayerEntity, kClass: KClass<*> ): ItemStack {

return player.handItems.find { kClass.isInstance( it.item ) }!!
return player.itemsHand.find { kClass.isInstance( it.item ) }!!

}

Expand Down Expand Up @@ -86,7 +86,7 @@ interface StackScreen {

fun canOpenScreen( player: PlayerEntity, stack: ItemStack ): Boolean {

val handStack = player.handItems.find { it != stack }!!
val handStack = player.itemsHand.find { it != stack }!!

return handStack.item is AirBlockItem

Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/enginemachiner/harmony/NBT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ object NBT {

val holder = stack.holder; if ( holder !is PlayerEntity ) return

val i = holder.handItems.indexOf(stack)
val i = holder.itemsHand.indexOf(stack)

putInt( nbt(stack), "Hand", i )

Expand Down

0 comments on commit 7d94793

Please sign in to comment.