First commit
Some checks failed
build / build (push) Failing after 4m1s

This commit is contained in:
2026-07-12 17:00:44 +02:00
commit aa8fa05506
34 changed files with 2192 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
package com.aranroig.editor;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
public class EditorFile {
public static final StreamCodec<RegistryFriendlyByteBuf, EditorFile> CODEC =
StreamCodec.composite(
ByteBufCodecs.STRING_UTF8,
EditorFile::getName,
ByteBufCodecs.STRING_UTF8,
EditorFile::getText,
EditorFile::new
);
// Class with file info
private String name;
private String text;
public EditorFile(String name, String text) {
this.name = name;
this.text = text;
}
public String getName() {
return name;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}