镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Open

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

  1. added
    CraftTweakerAll Issues that are needed by CraftTweaker
    JavaIntegrationAll issues that relate to integrating ZenCode with existing Java Code
    on Jul 24, 2024
  2. added this to the Refactor milestone on Jul 24, 2024
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