Skip to content

Commit

Permalink
Reformatted payloads and gradle.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
LatvianModder committed May 29, 2024
1 parent 16282b8 commit 061ff46
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 32 deletions.
12 changes: 8 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
loom.platform=neoforge

mod_id=kubejs
archives_base_name=kubejs
mod_name=KubeJS
mod_version=2006.7.0
maven_group=dev.latvian.mods
mod_author=LatvianModder
mod_author=latvian.dev
curseforge_id=238086
modrinth_id=umyGl7zF

minecraft_version=1.20.6
mod_version=2006.7.0

neoforge_version=20.6.98-beta
rhino_version=2006.2.4-build.13
min_rhino_version=2006.2.4-build.13
architectury_version=12.1.2

rei_version=15.0.728
#rei_comp_version=9.0.16
#forge_bookshelf_version=11.0.3
#forge_gamestages_version=7.+
jei_version=17.3.0.52
loom.platform=neoforge
jei_version=17.3.0.52
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@

public record AddStagePayload(UUID player, String stage) implements CustomPacketPayload {
public static final StreamCodec<ByteBuf, AddStagePayload> STREAM_CODEC = StreamCodec.composite(
UUIDUtil.STREAM_CODEC,
AddStagePayload::player,
ByteBufCodecs.STRING_UTF8,
AddStagePayload::stage,
UUIDUtil.STREAM_CODEC, AddStagePayload::player,
ByteBufCodecs.STRING_UTF8, AddStagePayload::stage,
AddStagePayload::new
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@

public record DisplayServerErrorsPayload(int scriptType, List<ConsoleLine> errors, List<ConsoleLine> warnings) implements CustomPacketPayload {
public static final StreamCodec<FriendlyByteBuf, DisplayServerErrorsPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.VAR_INT,
DisplayServerErrorsPayload::scriptType,
ByteBufCodecs.collection(ArrayList::new, ConsoleLine.STREAM_CODEC),
DisplayServerErrorsPayload::errors,
ByteBufCodecs.collection(ArrayList::new, ConsoleLine.STREAM_CODEC),
DisplayServerErrorsPayload::warnings,
ByteBufCodecs.VAR_INT, DisplayServerErrorsPayload::scriptType,
ByteBufCodecs.collection(ArrayList::new, ConsoleLine.STREAM_CODEC), DisplayServerErrorsPayload::errors,
ByteBufCodecs.collection(ArrayList::new, ConsoleLine.STREAM_CODEC), DisplayServerErrorsPayload::warnings,
DisplayServerErrorsPayload::new
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@

public record RemoveStagePayload(UUID player, String stage) implements CustomPacketPayload {
public static final StreamCodec<ByteBuf, RemoveStagePayload> STREAM_CODEC = StreamCodec.composite(
UUIDUtil.STREAM_CODEC,
RemoveStagePayload::player,
ByteBufCodecs.STRING_UTF8,
RemoveStagePayload::stage,
UUIDUtil.STREAM_CODEC, RemoveStagePayload::player,
ByteBufCodecs.STRING_UTF8, RemoveStagePayload::stage,
RemoveStagePayload::new
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@

public record SendDataFromClientPayload(String channel, CompoundTag data) implements CustomPacketPayload {
public static final StreamCodec<ByteBuf, SendDataFromClientPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.STRING_UTF8,
SendDataFromClientPayload::channel,
ByteBufCodecs.COMPOUND_TAG,
SendDataFromClientPayload::data,
ByteBufCodecs.STRING_UTF8, SendDataFromClientPayload::channel,
ByteBufCodecs.COMPOUND_TAG, SendDataFromClientPayload::data,
SendDataFromClientPayload::new
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@

public record SendDataFromServerPayload(String channel, CompoundTag data) implements CustomPacketPayload {
public static final StreamCodec<ByteBuf, SendDataFromServerPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.STRING_UTF8,
SendDataFromServerPayload::channel,
ByteBufCodecs.COMPOUND_TAG,
SendDataFromServerPayload::data,
ByteBufCodecs.STRING_UTF8, SendDataFromServerPayload::channel,
ByteBufCodecs.COMPOUND_TAG, SendDataFromServerPayload::data,
SendDataFromServerPayload::new
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

public record SyncStagesPayload(Collection<String> stages) implements CustomPacketPayload {
public static final StreamCodec<ByteBuf, SyncStagesPayload> STREAM_CODEC = StreamCodec.composite(
ByteBufCodecs.collection(ArrayList::new, ByteBufCodecs.STRING_UTF8),
SyncStagesPayload::stages,
ByteBufCodecs.collection(ArrayList::new, ByteBufCodecs.STRING_UTF8), SyncStagesPayload::stages,
SyncStagesPayload::new
);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GNU LGPLv3"
modId = "kubejs"
version = "${version}"
displayName = "KubeJS"
authors = "LatvianModder"
authors = "latvian.dev"
description = '''
Customize your modpack or server with JavaScript!
'''
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/kubejs.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"required": true,
"minVersion": "0.8",
"package": "dev.latvian.mods.kubejs.core.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"mixins": [
"AdvancementNodeMixin",
"BlockBehaviourMixin",
Expand Down Expand Up @@ -76,6 +77,5 @@
"injectors": {
"defaultRequire": 1,
"maxShiftBy": 2
},
"minVersion": "0.8"
}
}

0 comments on commit 061ff46

Please sign in to comment.