Skip to content

Commit

Permalink
Begin update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Jun 17, 2024
1 parent 66fe7cf commit d3cb644
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.lang.annotation.*
* </pre>
* Example out:
* <pre>
* {@code static final RecipeType<MyRecipe> HELLO_WORLD = RecipeType.simple(new ResourceLocation(yourModId, 'hello_world'))}
* {@code static final RecipeType<MyRecipe> HELLO_WORLD = RecipeType.simple(ResourceLocation.fromNamespaceAndPath(yourModId, 'hello_world'))}
* </pre>
*/
@Documented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import java.lang.annotation.*
* </pre>
* Example out:
* <pre>
* {@code static final SoundEvent HELLO_WORLD = new SoundEvent(new ResourceLocation(yourModId, 'hello_world'))}
* {@code static final SoundEvent HELLO_THERE = new SoundEvent(new ResourceLocation(yourModId, 'hello_there'), 0.12f)}
* {@code static final SoundEvent HELLO_WORLD = new SoundEvent(ResourceLocation.fromNamespaceAndPath(yourModId, 'hello_world'))}
* {@code static final SoundEvent HELLO_THERE = new SoundEvent(ResourceLocation.fromNamespaceAndPath(yourModId, 'hello_there'), 0.12f)}
* </pre>
*/
@Documented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class RecipeTypeAddonTransformer implements RegistroidAddon {
@Override
void process(AnnotationNode registroidAnnotation, ClassNode targetClass, PropertyNode property, RegistroidASTTransformer transformer, Supplier<String> modId) {
property.field.setInitialValueExpression(
GeneralUtils.callX(RECIPE_TYPE_TYPE, 'simple', GeneralUtils.ctorX(
RL_TYPE, GeneralUtils.args(
GeneralUtils.callX(RECIPE_TYPE_TYPE, 'simple', GeneralUtils.callX(
RL_TYPE, "fromNamespaceAndPath", GeneralUtils.args(
GeneralUtils.constX(modId.get()), GeneralUtils.constX(transformer.getRegName(property))
)
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class SoundEventAddonTransformer implements RegistroidAddon {
void process(AnnotationNode registroidAnnotation, ClassNode targetClass, PropertyNode property, RegistroidASTTransformer transformer, Supplier<String> modId) {
if (property.field.initialValueExpression === null) {
property.field.setInitialValueExpression(
GeneralUtils.callX(SOUND_EVENT_TYPE, 'createVariableRangeEvent', GeneralUtils.ctorX(
RL_TYPE, GeneralUtils.args(
GeneralUtils.callX(SOUND_EVENT_TYPE, 'createVariableRangeEvent', GeneralUtils.callX(
RL_TYPE, "fromNamespaceAndPath", GeneralUtils.args(
GeneralUtils.constX(modId.get()), GeneralUtils.constX(transformer.getRegName(property))
)))
)
Expand All @@ -36,8 +36,8 @@ class SoundEventAddonTransformer implements RegistroidAddon {
if (args instanceof ArgumentListExpression && args.size() >= 1) {
final arg0 = args[0]
if (arg0 instanceof ConstantExpression && arg0.value === null) {
args.expressions.set(0, GeneralUtils.ctorX(
RL_TYPE, GeneralUtils.args(
args.expressions.set(0, GeneralUtils.callX(
RL_TYPE, "fromNamespaceAndPath", GeneralUtils.args(
GeneralUtils.constX(modId.get()), GeneralUtils.constX(transformer.getRegName(property))
)
))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.groovymc.cgl.impl.fabric.resources

import groovy.transform.CompileStatic
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
import net.minecraft.resources.ResourceLocation
import org.groovymc.cgl.impl.resources.ScriptResourceListener

@CompileStatic
class ScriptResourceListenerFabric extends ScriptResourceListener implements IdentifiableResourceReloadListener {
public static final ResourceLocation FABRIC_ID = new ResourceLocation('cgl', 'load_scripts')
public static final ResourceLocation FABRIC_ID = ResourceLocation.fromNamespaceAndPath('cgl', 'load_scripts')

@Override
ResourceLocation getFabricId() {
Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[versions]
minecraft = "1.20.6"
minecraft = "1.21"
parchment_minecraft = "1.20.6"
parchment_mappings = "2024.05.01"

neoforge = "20.6.76-beta"
neoforge = "21.0.14-beta"

fabric_loader = "0.15.10"
fabric_api = "0.100.0+1.20.6"
fabric_loader = "0.15.11"
fabric_api = "0.100.1+1.21"

mdg = "2.0.0-beta.27"
mdg = "2.0.0-beta.28"
autoservice = "1.1.1"
nexuspublish = "2.0.0"
idea_ext = "1.1.8"
Expand All @@ -18,12 +18,12 @@ architectury_loom = "1.6.397"
jetbrains_annotations = "24.1.0"

managedversioning = "1.2.19"
registrationutils = "1.20.6-0.1.0"
registrationutils = "1.21.0-0.1.0"
enhancedgroovy = "0.2.0"

groovybundler = "2.1.4"
groovybundler = "2.1.5"
groovyduvet = "3.1.6"
gml = "6.0.1"
gml = "7.0.0"

jankson = "1.2.3"
nightconfig = "3.6.7"
Expand Down

0 comments on commit d3cb644

Please sign in to comment.