2018-09-06 04:39:01 -07:00
|
|
|
/*
|
2022-04-14 03:42:00 +00:00
|
|
|
* Copyright (c) Forge Development LLC and contributors
|
2022-02-28 13:41:23 -08:00
|
|
|
* SPDX-License-Identifier: LGPL-2.1-only
|
2018-09-06 04:39:01 -07:00
|
|
|
*/
|
2018-09-21 02:17:20 -07:00
|
|
|
|
2018-09-06 04:39:01 -07:00
|
|
|
package net.minecraftforge.registries;
|
|
|
|
|
|
|
|
|
|
import java.lang.annotation.ElementType;
|
|
|
|
|
import java.lang.annotation.Retention;
|
|
|
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
|
import java.lang.annotation.Target;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ObjectHolder can be used to automatically populate public static final fields with entries
|
|
|
|
|
* from the registry. These values can then be referred within mod code directly.
|
|
|
|
|
*/
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target({ElementType.TYPE, ElementType.FIELD})
|
|
|
|
|
public @interface ObjectHolder
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* If used on a class, this represents a modid only.
|
|
|
|
|
* If used on a field, it represents a name, which can be abbreviated or complete.
|
|
|
|
|
* Abbreviated names derive their modid from an enclosing ObjectHolder at the class level.
|
|
|
|
|
*
|
|
|
|
|
* @return either a modid or a name based on the rules above
|
|
|
|
|
*/
|
|
|
|
|
String value();
|
|
|
|
|
}
|