Skip to content

Commit

Permalink
Fix enchant sound
Browse files Browse the repository at this point in the history
  • Loading branch information
eth0net authored Jul 26, 2022
2 parents ecca2e0 + 458e71c commit e943398
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ fabricKotlinVersionId=5Aq3SFbi
# Mod Properties
mavenGroup=com.github.eth0net
modId=enchant-menu
modVersion=1.1.0+fabric-1.19
modVersionName=1.1.0 Fabric 1.19
modVersionType=release
modVersion=1.1.1-alpha+fabric-1.19
modVersionName=1.1.1 Alpha Fabric 1.19
modVersionType=alpha
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package com.github.eth0net.enchantmenu.screen
import net.minecraft.entity.player.PlayerEntity
import net.minecraft.entity.player.PlayerInventory
import net.minecraft.screen.NamedScreenHandlerFactory
import net.minecraft.screen.ScreenHandlerContext
import net.minecraft.text.MutableText
import net.minecraft.text.Text

object EnchantMenuScreenHandlerFactory : NamedScreenHandlerFactory {
override fun createMenu(syncId: Int, inv: PlayerInventory, player: PlayerEntity): EnchantMenuScreenHandler {
return EnchantMenuScreenHandler(syncId, inv)
return EnchantMenuScreenHandler(syncId, inv, ScreenHandlerContext.create(player.world, player.blockPos))
}

override fun getDisplayName(): MutableText = Text.translatable("enchant-menu.title")
Expand Down

0 comments on commit e943398

Please sign in to comment.