Skip to content

Commit

Permalink
Remove deprecated stuff for 1.2 (#250)
Browse files Browse the repository at this point in the history
* remove deprecated for 1.2

* this is not supposed to be here
  • Loading branch information
brachy84 authored Oct 6, 2024
1 parent 9ce7d02 commit 040a6cd
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 589 deletions.
13 changes: 0 additions & 13 deletions src/main/java/com/cleanroommc/groovyscript/api/GroovyPlugin.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.cleanroommc.groovyscript.api;

import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;
import com.cleanroommc.groovyscript.compat.mods.ModPropertyContainer;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
Expand All @@ -20,17 +18,6 @@ public interface GroovyPlugin extends IGroovyContainer {
@GroovyBlacklist
@ApiStatus.OverrideOnly
default @Nullable GroovyPropertyContainer createGroovyPropertyContainer() {
return createModPropertyContainer();
}

/**
* @deprecated use {@link #createGroovyPropertyContainer()} instead
*/
@GroovyBlacklist
@ApiStatus.OverrideOnly
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "1.2.0")
default @Nullable ModPropertyContainer createModPropertyContainer() {
return null;
}

Expand Down

This file was deleted.

This file was deleted.

58 changes: 0 additions & 58 deletions src/main/java/com/cleanroommc/groovyscript/api/IRegistrar.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.cleanroommc.groovyscript.compat.mods;

import com.cleanroommc.groovyscript.api.GroovyBlacklist;
import com.cleanroommc.groovyscript.api.IGroovyContainer;
import com.cleanroommc.groovyscript.api.INamed;
import com.cleanroommc.groovyscript.api.IRegistrar;
import com.cleanroommc.groovyscript.mapper.ObjectMapper;
import org.jetbrains.annotations.ApiStatus;

Expand All @@ -24,28 +22,6 @@ public String toString() {
return getContainerName();
}

/**
* @deprecated Use {@link #addProperty(INamed)} and {@link #addPropertiesOfFields(Object, boolean)} from this class instead.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "1.2.0")
@GroovyBlacklist
public IRegistrar getVirtualizedRegistrar() {
return getRegistrar();
}

/**
* @deprecated Use {@link #addProperty(INamed)} and {@link #addPropertiesOfFields(Object, boolean)} from this class instead.
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "1.2.0")
@GroovyBlacklist
public IRegistrar getRegistrar() {
if (!isLoaded()) return null;
T t = get();
return t::addProperty;
}

/**
* Adds a property which can be accessed like a field from groovy.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,6 @@ void registerContainer(GroovyContainer<?> container) {
}
}

@Deprecated
@Nullable
public Object getProperty(String name) {
GroovyContainer<?> container = containers.get(name);
return container != null ? container.get() : null;
}


@Deprecated
public @UnmodifiableView Map<String, ? extends GroovyContainer<?>> getProperties() {
return containersView;
}

@GroovyBlacklist
@ApiStatus.Internal
public static void init() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.cleanroommc.groovyscript.compat.mods.industrialforegoing;

import com.cleanroommc.groovyscript.compat.mods.ModPropertyContainer;
import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;

public class IndustrialForegoing extends ModPropertyContainer {
public class IndustrialForegoing extends GroovyPropertyContainer {

public final BioReactor bioReactor = new BioReactor();
public final Extractor extractor = new Extractor();
Expand All @@ -15,17 +15,4 @@ public class IndustrialForegoing extends ModPropertyContainer {
public final SludgeRefiner sludgeRefiner = new SludgeRefiner();
public final Straw straw = new Straw();

public IndustrialForegoing() {
addRegistry(bioReactor);
addRegistry(extractor);
addRegistry(fluidDictionary);
addRegistry(laserDrill);
addRegistry(oreFermenter);
addRegistry(oreRaw);
addRegistry(oreSieve);
addRegistry(proteinReactor);
addRegistry(sludgeRefiner);
addRegistry(straw);
}

}
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
package com.cleanroommc.groovyscript.compat.mods.lazyae2;

import com.cleanroommc.groovyscript.api.IIngredient;
import com.cleanroommc.groovyscript.compat.mods.ModPropertyContainer;
import com.cleanroommc.groovyscript.compat.mods.GroovyPropertyContainer;
import io.github.phantamanta44.libnine.util.IDisplayableMatcher;
import net.minecraft.item.ItemStack;

import java.util.Arrays;

public class LazyAE2 extends ModPropertyContainer {
public class LazyAE2 extends GroovyPropertyContainer {

public final Aggregator aggregator = new Aggregator();
public final Centrifuge centrifuge = new Centrifuge();
public final Energizer energizer = new Energizer();
public final Etcher etcher = new Etcher();

public LazyAE2() {
addRegistry(aggregator);
addRegistry(centrifuge);
addRegistry(energizer);
addRegistry(etcher);
}

public static IDisplayableMatcher<ItemStack> matchesIIngredient(IIngredient ingredient) {
return IDisplayableMatcher.ofMany(() -> Arrays.asList(ingredient.getMatchingStacks()), ingredient);
}
Expand Down
Loading

0 comments on commit 040a6cd

Please sign in to comment.