Downgrade to 1.21

This commit is contained in:
2025-07-30 15:34:43 +02:00
parent 4f98cc0267
commit 5953eb0640
2 changed files with 7 additions and 7 deletions

View File

@ -5,13 +5,13 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
minecraft_version=1.21
yarn_mappings=1.21+build.1
loader_version=0.16.14
loom_version=1.10-SNAPSHOT
# Fabric API
fabric_version=0.119.3+1.21.5
fabric_version=0.100.3+1.21
# Mod Properties
mod_version = 2.2.2

View File

@ -73,7 +73,7 @@ public class ScriptEditScreen extends Screen {
this.itemStack = itemStack;
this.hand = hand;
List<RawFilteredPair<String>> pages = itemStack.get(DataComponentTypes.WRITABLE_BOOK_CONTENT).pages();
List<RawFilteredPair<String>> pages = itemStack.getComponents().get(DataComponentTypes.WRITABLE_BOOK_CONTENT).pages();
pages.forEach(stringRawFilteredPair -> {
for (String s : stringRawFilteredPair.raw().split("\n")) {
if (s.isEmpty()) {
@ -103,7 +103,7 @@ public class ScriptEditScreen extends Screen {
this.addDrawableChild(
new Button(BOOK, this.width - 98 - 5, height - 20 - 5, () -> {
finalizeBook();
this.client.setScreen(new BookEditScreen(player, itemStack, hand, toContent(toPages())));
this.client.setScreen(new BookEditScreen(player, itemStack, hand));
})
);
}
@ -157,7 +157,7 @@ public class ScriptEditScreen extends Screen {
}
@Override
protected void applyBlur() {
protected void applyBlur(float delta) {
}
@Override
@ -634,7 +634,7 @@ public class ScriptEditScreen extends Screen {
private void finalizeBook() {
List<String> pages = toPages();
this.writeNbtData(pages);
int i = this.hand == Hand.MAIN_HAND ? this.player.getInventory().getSelectedSlot() : 40;
int i = this.hand == Hand.MAIN_HAND ? this.player.getInventory().selectedSlot : 40;
this.client.getNetworkHandler().sendPacket(new BookUpdateC2SPacket(i, pages, Optional.empty()));
}