fix: projection command send empty response

This commit is contained in:
xtex 2023-07-04 15:37:44 +08:00
parent ea50514b8f
commit 929474ff19
Signed by: xtex
GPG Key ID: B918086ED8045B91

View File

@ -55,7 +55,7 @@ object ProjectionCommand {
) )
val data = Projector.findNearbyProjectors(ctx.source.level, pos) val data = Projector.findNearbyProjectors(ctx.source.level, pos)
.map { ctx.source.level.getBlockEntity(it)!!.saveWithFullMetadata() } .map { ctx.source.level.getBlockEntity(it)!!.saveWithFullMetadata() }
ctx.source.sendSystemMessage(Component.nbt(path, false, Optional.empty()) { data.stream() }) ctx.source.sendSystemMessage(Component.nbt(path, true, Optional.empty()) { data.stream() })
return 0 return 0
} }
@ -71,7 +71,7 @@ object ProjectionCommand {
val type = ctx.getArgument("type", Holder.Reference::class.java).value() as ProjectionEffectType<*> val type = ctx.getArgument("type", Holder.Reference::class.java).value() as ProjectionEffectType<*>
val data = Projector.findNearbyProjections(ctx.source.level, pos, type) val data = Projector.findNearbyProjections(ctx.source.level, pos, type)
.map { it.toNbt() } .map { it.toNbt() }
ctx.source.sendSystemMessage(Component.nbt(path, false, Optional.empty()) { data.stream() }) ctx.source.sendSystemMessage(Component.nbt(path, true, Optional.empty()) { data.stream() })
return 0 return 0
} }