Require 1.17.1 or greater

This commit is contained in:
Camotoy 2021-07-16 10:53:48 -04:00
parent 7660ebb48b
commit fcbd90c4d6
4 changed files with 8 additions and 9 deletions

View File

@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17-rc1
yarn_mappings=1.17-rc1+build.5
loader_version=0.11.3
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.14
loader_version=0.11.6
# Mod Properties
mod_version=1.4.0-SNAPSHOT
maven_group=org.geysermc.platform
archives_base_name=Geyser-Fabric
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.34.9+1.17
fabric_version=0.37.0+1.17

View File

@ -66,11 +66,10 @@ public class GeyserFabricWorldManager extends GeyserWorldManager {
PlayerEntity player = server.getPlayerManager().getPlayer(session.getPlayerEntity().getUuid());
if (player != null) {
BlockEntity blockEntity = player.world.getBlockEntity(new BlockPos(x, y, z));
if (!(blockEntity instanceof LecternBlockEntity)) {
if (!(blockEntity instanceof LecternBlockEntity lectern)) {
return;
}
LecternBlockEntity lectern = (LecternBlockEntity) blockEntity;
if (!lectern.hasBook()) {
if (!isChunkLoad) {
BlockEntityUtils.updateBlockEntity(session, LecternInventoryTranslator.getBaseLecternTag(x, y, z, 0).build(), Vector3i.from(x, y, z));
@ -88,8 +87,8 @@ public class GeyserFabricWorldManager extends GeyserWorldManager {
.putShort("Damage", (short) 0)
.putString("Name", "minecraft:writable_book");
List<NbtMap> pages = new ArrayList<>(hasBookPages ? pageCount : 1);
if (hasBookPages && WritableBookItem.isValid(book.getTag())) {
NbtList listTag = book.getTag().getList("pages", 8);
if (hasBookPages && WritableBookItem.isValid(book.getNbt())) {
NbtList listTag = book.getNbt().getList("pages", 8);
for (int i = 0; i < listTag.size(); i++) {
String page = listTag.getString(i);

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@ -25,6 +25,6 @@
"depends": {
"fabricloader": ">=0.11.3",
"fabric": "*",
"minecraft": "1.17.x"
"minecraft": ">=1.17.1"
}
}