Skip to content

Refactor/JavaNative: Ability to override a class' ZenCode-Name #160

Description

@kindlich

In CraftTweaker, we add a special NativeTypeRegistration to allow registering of Types from Minecraft where we cannot just add @Name.

In order for this approach to work, we need to be able to hook into the process that resolves a Class<?> from Java into a ZC-specific name.

In this example code:

@NativeTypeRegistration(value = ItemStack.class, zenCodeName = "crafttweaker.api.item.ItemStack")
public class ExpandItemStack {
}

We want ZenCode to resolve ItemStack's name in the same way as if @Name("crafttweaker.api.item.ItemStack") had been applied to the ItemStack class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CraftTweakerAll Issues that are needed by CraftTweakerJavaIntegrationAll issues that relate to integrating ZenCode with existing Java Code

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions