Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.21.1 update #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/BuildConstants.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val githubRepo = "SilkMC/silk-compose"
val minecraftVersion = "1.20.6"
val minecraftVersion = "1.21.1"

object Deps {
// https://fabricmc.net/develop/
Expand All @@ -12,7 +12,7 @@ object Deps {

// https://github.com/SilkMC/silk
object Silk {
val silkVersion = "1.10.5"
val silkVersion = "1.10.7"
val core = "net.silkmc:silk-core:$silkVersion"
val commands = "net.silkmc:silk-commands:$silkVersion"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.core.component.DataComponents
import net.minecraft.network.protocol.game.*
import net.minecraft.server.level.ServerEntity
import net.minecraft.server.level.ServerPlayer
import net.minecraft.world.InteractionHand
import net.minecraft.world.entity.decoration.GlowItemFrame
Expand Down Expand Up @@ -187,7 +188,8 @@ class ItemFrameMapsComposeGui(
// spawn the fake item frame
val itemFrame = GlowItemFrame(player.level(), framePos, guiDirection)
itemFrame.isInvisible = true
connection.send(itemFrame.addEntityPacket)
val playerServerEntity = ServerEntity(player.serverLevel(), player, 0, true) { }
connection.send(itemFrame.getAddEntityPacket(playerServerEntity))
entityIds.add(itemFrame.id)

// put the map in the item frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import kotlin.io.path.isDirectory
import kotlin.io.path.pathString

object AssetsLoader {
private val assetsStorage = (Silk.currentServer?.serverDirectory ?: File(".")).resolve("server-assets/")
private val assetStorageParentPath = (Silk.currentServer?.serverDirectory ?: File(".").toPath())
private val assetsStorage = assetStorageParentPath.resolve("server-assets/").toFile()
private val assetsPath = assetsStorage.toPath().resolve("assets")

private val loadedAssets = CompletableDeferred<Boolean>()
Expand Down