Skip to content

Commit

Permalink
Implement reference to unknown
Browse files Browse the repository at this point in the history
Signed-off-by: TheSilkMiner <thesilkminer@outlook.com>
  • Loading branch information
TheSilkMiner committed May 6, 2022
1 parent eb7e853 commit d37b741
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.blamejared.contenttweaker.core.api.zen.rt;

import com.blamejared.contenttweaker.core.api.ContentTweakerConstants;
import com.blamejared.contenttweaker.core.api.object.ObjectType;
import com.blamejared.contenttweaker.core.api.zen.object.Reference;
import com.blamejared.contenttweaker.core.api.zen.ContentTweakerZenConstants;
import com.blamejared.crafttweaker.api.annotation.ZenRegister;
import net.minecraft.resources.ResourceLocation;
import org.openzen.zencode.java.ZenCodeType;

@ZenCodeType.Name(ContentTweakerZenConstants.UNKNOWN_REFERENCE_CLASS_MARKER)
@ZenRegister(loaders = ContentTweakerConstants.CONTENT_LOADER_ID)
public final class UnknownReference<T> extends Reference<T> {
private UnknownReference(final ObjectType<T> type, final ResourceLocation id) {
super(type, id);
}

public static <T> UnknownReference<T> of(final ObjectType<T> type, final ResourceLocation id) {
return new UnknownReference<>(type, id);
}
}

0 comments on commit d37b741

Please sign in to comment.