Skip to content

Commit e601435

Browse files
committed
Misc 3.3 changes
Fix publishing Fix permissions.md formatting Add `@Contract(pure = true)` to most methods in `BoxWithNoAtmosphere` Add up to Function8 for `AtmosphericCodecs$RCB`
1 parent 73a9ccd commit e601435

5 files changed

Lines changed: 165 additions & 2 deletions

File tree

build.fabric.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,24 @@ tasks.jar {
183183
}
184184
}
185185

186+
// configure the maven publication
187+
publishing {
188+
publications {
189+
create<MavenPublication>("mavenJava") {
190+
artifactId = project.property("archives_base_name") as String
191+
from(components["java"])
192+
}
193+
}
194+
195+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
196+
repositories {
197+
// Add repositories to publish to here.
198+
// Notice: This block does NOT have the same function as the block in the top level.
199+
// The repositories here will be used for publishing your artifact, not for
200+
// retrieving dependencies.
201+
}
202+
}
203+
186204
modrinth {
187205
token = providers.environmentVariable("MODRINTH_TOKEN")
188206
projectId = project.base.archivesName

build.fabric_noremap.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,24 @@ tasks.jar {
173173
}
174174
}
175175

176+
// configure the maven publication
177+
publishing {
178+
publications {
179+
create<MavenPublication>("mavenJava") {
180+
artifactId = project.property("archives_base_name") as String
181+
from(components["java"])
182+
}
183+
}
184+
185+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
186+
repositories {
187+
// Add repositories to publish to here.
188+
// Notice: This block does NOT have the same function as the block in the top level.
189+
// The repositories here will be used for publishing your artifact, not for
190+
// retrieving dependencies.
191+
}
192+
}
193+
176194
modrinth {
177195
token = providers.environmentVariable("MODRINTH_TOKEN")
178196
projectId = project.base.archivesName

permissions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ The license still applies, including but not limited to all things not listed he
77

88
SkyNotTheLimit (ekulxam)
99
- See license
10+
1011
Discord: @thecordicus (https://github.com/CordicusC)
1112
- Permission was granted to thecordicus in January 2025 to use this library IF NECESSARY to create a custom totem item
1213
- Weak permission (an alternative solution was already found)
14+
1315
ModFest (https://modfest.net/, https://github.com/ModFest)
1416
- (Re)Distribution by ModFest is permitted
1517
- This is assuming that this library is bundled in another mod. Extracting the bundled library is not allowed.
1618
- (Production) Usage by ModFest in Minecraft modpacks is permitted (as long as the library is bundled in one of my mods).
19+
1720
Everyone
1821
- By using one of my mods that includes and/or depends on this library, you are allowed to use this library in a production environment to play Minecraft as necessary.
1922
- Developer usage: Contact me, and we can figure something out. (Why would you want to use this library anyway? It's a mess.)

src/main/java/survivalblock/atmosphere/atmospheric_api/not_mixin/datafixer/AtmosphericCodecs.java

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
*/
66
package survivalblock.atmosphere.atmospheric_api.not_mixin.datafixer;
77

8-
import com.mojang.datafixers.util.Function3;
9-
import com.mojang.datafixers.util.Function4;
8+
import com.mojang.datafixers.util.*;
109
import com.mojang.serialization.Codec;
1110
import com.mojang.serialization.MapCodec;
1211
import com.mojang.serialization.codecs.RecordCodecBuilder;
@@ -87,5 +86,93 @@ static <O, F1, F2, F3, F4> MapCodec<O> tuple(
8786
).apply(instance, to)
8887
);
8988
}
89+
90+
static <O, F1, F2, F3, F4, F5> MapCodec<O> tuple(
91+
MapCodec<F1> codec1, Function<O, F1> from1,
92+
MapCodec<F2> codec2, Function<O, F2> from2,
93+
MapCodec<F3> codec3, Function<O, F3> from3,
94+
MapCodec<F4> codec4, Function<O, F4> from4,
95+
MapCodec<F5> codec5, Function<O, F5> from5,
96+
Function5<F1, F2, F3, F4, F5, O> to
97+
) {
98+
return RecordCodecBuilder.mapCodec(
99+
instance -> instance.group(
100+
codec1.forGetter(from1),
101+
codec2.forGetter(from2),
102+
codec3.forGetter(from3),
103+
codec4.forGetter(from4),
104+
codec5.forGetter(from5)
105+
).apply(instance, to)
106+
);
107+
}
108+
109+
static <O, F1, F2, F3, F4, F5, F6> MapCodec<O> tuple(
110+
MapCodec<F1> codec1, Function<O, F1> from1,
111+
MapCodec<F2> codec2, Function<O, F2> from2,
112+
MapCodec<F3> codec3, Function<O, F3> from3,
113+
MapCodec<F4> codec4, Function<O, F4> from4,
114+
MapCodec<F5> codec5, Function<O, F5> from5,
115+
MapCodec<F6> codec6, Function<O, F6> from6,
116+
Function6<F1, F2, F3, F4, F5, F6, O> to
117+
) {
118+
return RecordCodecBuilder.mapCodec(
119+
instance -> instance.group(
120+
codec1.forGetter(from1),
121+
codec2.forGetter(from2),
122+
codec3.forGetter(from3),
123+
codec4.forGetter(from4),
124+
codec5.forGetter(from5),
125+
codec6.forGetter(from6)
126+
).apply(instance, to)
127+
);
128+
}
129+
130+
static <O, F1, F2, F3, F4, F5, F6, F7> MapCodec<O> tuple(
131+
MapCodec<F1> codec1, Function<O, F1> from1,
132+
MapCodec<F2> codec2, Function<O, F2> from2,
133+
MapCodec<F3> codec3, Function<O, F3> from3,
134+
MapCodec<F4> codec4, Function<O, F4> from4,
135+
MapCodec<F5> codec5, Function<O, F5> from5,
136+
MapCodec<F6> codec6, Function<O, F6> from6,
137+
MapCodec<F7> codec7, Function<O, F7> from7,
138+
Function7<F1, F2, F3, F4, F5, F6, F7, O> to
139+
) {
140+
return RecordCodecBuilder.mapCodec(
141+
instance -> instance.group(
142+
codec1.forGetter(from1),
143+
codec2.forGetter(from2),
144+
codec3.forGetter(from3),
145+
codec4.forGetter(from4),
146+
codec5.forGetter(from5),
147+
codec6.forGetter(from6),
148+
codec7.forGetter(from7)
149+
).apply(instance, to)
150+
);
151+
}
152+
153+
static <O, F1, F2, F3, F4, F5, F6, F7, F8> MapCodec<O> tuple(
154+
MapCodec<F1> codec1, Function<O, F1> from1,
155+
MapCodec<F2> codec2, Function<O, F2> from2,
156+
MapCodec<F3> codec3, Function<O, F3> from3,
157+
MapCodec<F4> codec4, Function<O, F4> from4,
158+
MapCodec<F5> codec5, Function<O, F5> from5,
159+
MapCodec<F6> codec6, Function<O, F6> from6,
160+
MapCodec<F7> codec7, Function<O, F7> from7,
161+
MapCodec<F8> codec8, Function<O, F8> from8,
162+
Function8<F1, F2, F3, F4, F5, F6, F7, F8, O> to
163+
) {
164+
return RecordCodecBuilder.mapCodec(
165+
instance -> instance.group(
166+
codec1.forGetter(from1),
167+
codec2.forGetter(from2),
168+
codec3.forGetter(from3),
169+
codec4.forGetter(from4),
170+
codec5.forGetter(from5),
171+
codec6.forGetter(from6),
172+
codec7.forGetter(from7),
173+
codec8.forGetter(from8)
174+
).apply(instance, to)
175+
);
176+
}
90177
}
91178
}

0 commit comments

Comments
 (0)