Skip to content

Commit

Permalink
Update groovy script, should fix Srdjan-V/TweakedPetroleum#11
Browse files Browse the repository at this point in the history
  • Loading branch information
Srdjan-V committed Oct 15, 2024
1 parent 7253d43 commit 339e0bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# Mod Information
mod_version = 2.0.0
mod_version = 2.0.1
maven_group = io.github.srdjanv
archives_base_name = tweakedlib

groovy_script_version = 1.0.1
groovy_script_version = 1.2.0-hotfix1

# Boilerplate Options
use_mixins = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
package io.github.srdjanv.tweakedlib.common.compat.groovyscript;

import com.cleanroommc.groovyscript.api.GroovyPlugin;
import com.cleanroommc.groovyscript.api.IGameObjectParser;
import com.cleanroommc.groovyscript.api.INamed;
import com.cleanroommc.groovyscript.api.Result;
import com.cleanroommc.groovyscript.compat.mods.GroovyContainer;
import com.cleanroommc.groovyscript.compat.mods.ModPropertyContainer;
import com.cleanroommc.groovyscript.gameobjects.GameObjectHandler;
import com.cleanroommc.groovyscript.gameobjects.GameObjectHandlerManager;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;
import io.github.srdjanv.tweakedlib.TweakedLib;
import io.github.srdjanv.tweakedlib.api.powertier.PowerTier;
import io.github.srdjanv.tweakedlib.api.powertier.PowerTierHandler;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.function.Consumer;

public class GroovyScriptRegistry extends ModPropertyContainer implements GroovyPlugin {
public class GroovyScriptRegistry extends GroovyPropertyContainer implements GroovyPlugin {
private static GroovyScriptRegistry registry;
public static GroovyScriptRegistry getRegistry() {
return Objects.requireNonNull(registry);
Expand All @@ -29,15 +22,19 @@ public static GroovyScriptRegistry getRegistry() {

public GroovyScriptRegistry() {
registry = this;
addRegistry(new GroovyPowerTier());
addProperty(new GroovyPowerTier());
}

@Override @Nullable public ModPropertyContainer createModPropertyContainer() {
@Override public @Nullable GroovyPropertyContainer createGroovyPropertyContainer() {
return this;
}

@Override public void addRegistry(INamed named) {
super.addRegistry(named);
@Override public void addProperty(INamed property) {
super.addProperty(property);
}

@Deprecated public void addRegistry(INamed named) {
super.addProperty(named);
}

@Override public @NotNull Collection<String> getAliases() {
Expand Down

0 comments on commit 339e0bb

Please sign in to comment.