添加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
)
);
/**
* The constant DOLL_SOUND.
*/
public static final LangKeyValue DOLL_SOUND = addAndRet(
LangKeyValue.ofKey(
Lib39SoundEvents.getSubTitleTranslateKey("duck_toy"), ModPartEnum.SOUND,

View File

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

View File

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

View File

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

View File

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

View File

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