添加javadoc

This commit is contained in:
叁玖领域 2026-02-16 20:29:20 +08:00
parent cf14cd705e
commit 8ad47ce339
6 changed files with 35 additions and 6 deletions

View File

@ -116,6 +116,9 @@ public enum Lib39LangKey implements ILangKeyValueCollection {
true true
) )
); );
/**
* The constant DOLL_SOUND.
*/
public static final LangKeyValue DOLL_SOUND = addAndRet( public static final LangKeyValue DOLL_SOUND = addAndRet(
LangKeyValue.ofKey( LangKeyValue.ofKey(
Lib39SoundEvents.getSubTitleTranslateKey("duck_toy"), ModPartEnum.SOUND, Lib39SoundEvents.getSubTitleTranslateKey("duck_toy"), ModPartEnum.SOUND,

View File

@ -241,6 +241,11 @@ public class CommonEventHandler {
static volatile CompatManager compatManager; static volatile CompatManager compatManager;
/**
* On construct mod.
*
* @param event the event
*/
@SubscribeEvent @SubscribeEvent
public static void onConstructMod(FMLConstructModEvent event) { public static void onConstructMod(FMLConstructModEvent event) {
event.enqueueWork(() -> { event.enqueueWork(() -> {
@ -255,6 +260,11 @@ public class CommonEventHandler {
}); });
} }
/**
* On fml common setup.
*
* @param event the event
*/
@SubscribeEvent @SubscribeEvent
public static void onFMLCommonSetup(FMLCommonSetupEvent event) { public static void onFMLCommonSetup(FMLCommonSetupEvent event) {
event.enqueueWork(() -> { event.enqueueWork(() -> {

View File

@ -8,8 +8,17 @@ import org.jetbrains.annotations.NotNull;
import top.r3944realms.lib39.Lib39; import top.r3944realms.lib39.Lib39;
import top.r3944realms.lib39.core.compat.ICompat; import top.r3944realms.lib39.core.compat.ICompat;
/**
* The type Lib 39 compat.
*/
public class Lib39Compat implements ICompat { public class Lib39Compat implements ICompat {
/**
* The constant INSTANCE.
*/
public static Lib39Compat INSTANCE = new Lib39Compat(); public static Lib39Compat INSTANCE = new Lib39Compat();
/**
* The constant ID.
*/
public static ResourceLocation ID = Lib39.rl("lib39"); public static ResourceLocation ID = Lib39.rl("lib39");
@Override @Override
public ResourceLocation id() { public ResourceLocation id() {

View File

@ -65,10 +65,16 @@ public class ExCommonEventHandler {
*/ */
public static class Mod extends ExCommonEventHandler { public static class Mod extends ExCommonEventHandler {
/**
* On register compat.
*
* @param event the event
*/
@SubscribeEvent @SubscribeEvent
public static void onRegisterCompat (RegisterCompatEvent event) { public static void onRegisterCompat (RegisterCompatEvent event) {
event.registerCompat(Lib39Compat.ID, Lib39Compat.INSTANCE); event.registerCompat(Lib39Compat.ID, Lib39Compat.INSTANCE);
} }
/** /**
* On fml common setup. * On fml common setup.
* *

View File

@ -574,8 +574,8 @@ public class NBTWriter {
* String if nbt writer. * String if nbt writer.
* *
* @param key the key * @param key the key
* @param value the value
* @param condition the condition * @param condition the condition
* @param value the value
* @return the nbt writer * @return the nbt writer
*/ */
// 条件添加方法 // 条件添加方法
@ -590,8 +590,8 @@ public class NBTWriter {
* Int value if nbt writer. * Int value if nbt writer.
* *
* @param key the key * @param key the key
* @param value the value
* @param condition the condition * @param condition the condition
* @param value the value
* @return the nbt writer * @return the nbt writer
*/ */
public NBTWriter intValueIf(String key, boolean condition, Supplier<Integer> value) { public NBTWriter intValueIf(String key, boolean condition, Supplier<Integer> value) {
@ -605,8 +605,8 @@ public class NBTWriter {
* Long value if nbt writer. * Long value if nbt writer.
* *
* @param key the key * @param key the key
* @param value the value
* @param condition the condition * @param condition the condition
* @param value the value
* @return the nbt writer * @return the nbt writer
*/ */
public NBTWriter longValueIf(String key, boolean condition, Supplier<Long> value) { public NBTWriter longValueIf(String key, boolean condition, Supplier<Long> value) {
@ -620,8 +620,8 @@ public class NBTWriter {
* Uuid value if nbt writer. * Uuid value if nbt writer.
* *
* @param key the key * @param key the key
* @param value the value
* @param condition the condition * @param condition the condition
* @param value the value
* @return the nbt writer * @return the nbt writer
*/ */
public NBTWriter uuidValueIf(String key, boolean condition, Supplier<UUID> value) { public NBTWriter uuidValueIf(String key, boolean condition, Supplier<UUID> value) {
@ -635,8 +635,8 @@ public class NBTWriter {
* Boolean value if nbt writer. * Boolean value if nbt writer.
* *
* @param key the key * @param key the key
* @param value the value
* @param condition the condition * @param condition the condition
* @param value the value
* @return the nbt writer * @return the nbt writer
*/ */
public NBTWriter booleanValueIf(String key, boolean condition, Supplier<Boolean> value) { public NBTWriter booleanValueIf(String key, boolean condition, Supplier<Boolean> value) {

View File

@ -66,7 +66,7 @@ public class ShapeUtil {
* 创建支持全方向的形状映射包括上下 * 创建支持全方向的形状映射包括上下
* *
* @param shape 基础形状默认为NORTH方向 * @param shape 基础形状默认为NORTH方向
* @return 全方向形状映射 * @return 全方向形状映射 map
*/ */
public static @NotNull Map<Direction, VoxelShape> createFullDirectionMap(VoxelShape shape) { public static @NotNull Map<Direction, VoxelShape> createFullDirectionMap(VoxelShape shape) {
EnumMap<Direction, VoxelShape> directionMap = new EnumMap<>(Direction.class); EnumMap<Direction, VoxelShape> directionMap = new EnumMap<>(Direction.class);
@ -157,6 +157,7 @@ public class ShapeUtil {
} }
return result; return result;
} }
/** /**
* 将形状旋转到向上方向绕X轴-90度 * 将形状旋转到向上方向绕X轴-90度
* *