72 lines
3.6 KiB
Java
72 lines
3.6 KiB
Java
/*
|
|
* *
|
|
* * Copyright (c) 2025 R3944Realms. All rights reserved.
|
|
* *
|
|
* * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
|
* * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
* * or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
|
* *
|
|
* * 本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
|
|
*
|
|
*/
|
|
|
|
package top.r3944realms.eroticdungeongame.content.register;
|
|
|
|
import net.minecraft.world.item.BedItem;
|
|
import net.minecraft.world.item.BlockItem;
|
|
import net.minecraft.world.item.Item;
|
|
import net.minecraft.world.level.block.Block;
|
|
import net.minecraftforge.eventbus.api.IEventBus;
|
|
import net.minecraftforge.registries.DeferredRegister;
|
|
import net.minecraftforge.registries.ForgeRegistries;
|
|
import net.minecraftforge.registries.RegistryObject;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import top.r3944realms.eroticdungeongame.EroticDungeon;
|
|
import top.r3944realms.eroticdungeongame.content.block.CuffBedBlock;
|
|
import top.r3944realms.eroticdungeongame.datagen.value.ColorContent;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class EDGItems {
|
|
|
|
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, EroticDungeon.MOD_ID);
|
|
// 床物品列表
|
|
public static final Map<ColorContent, RegistryObject<Item>> CUFF_BED_ITEMS = new HashMap<>();
|
|
// 床物品注册
|
|
public static final RegistryObject<Item> WHITE_CUFF_BED = registerCuffBedItem(ColorContent.WHITE);
|
|
public static final RegistryObject<Item> ORANGE_CUFF_BED = registerCuffBedItem(ColorContent.ORANGE);
|
|
public static final RegistryObject<Item> MAGENTA_CUFF_BED = registerCuffBedItem(ColorContent.MAGENTA);
|
|
public static final RegistryObject<Item> LIGHT_BLUE_CUFF_BED = registerCuffBedItem(ColorContent.LIGHT_BLUE);
|
|
public static final RegistryObject<Item> YELLOW_CUFF_BED = registerCuffBedItem(ColorContent.YELLOW);
|
|
public static final RegistryObject<Item> LIME_CUFF_BED = registerCuffBedItem(ColorContent.LIME);
|
|
public static final RegistryObject<Item> PINK_CUFF_BED = registerCuffBedItem(ColorContent.PINK);
|
|
public static final RegistryObject<Item> GRAY_CUFF_BED = registerCuffBedItem(ColorContent.GRAY);
|
|
public static final RegistryObject<Item> LIGHT_GRAY_CUFF_BED = registerCuffBedItem(ColorContent.LIGHT_GRAY);
|
|
public static final RegistryObject<Item> CYAN_CUFF_BED = registerCuffBedItem(ColorContent.CYAN);
|
|
public static final RegistryObject<Item> PURPLE_CUFF_BED = registerCuffBedItem(ColorContent.PURPLE);
|
|
public static final RegistryObject<Item> BLUE_CUFF_BED = registerCuffBedItem(ColorContent.BLUE);
|
|
public static final RegistryObject<Item> BROWN_CUFF_BED = registerCuffBedItem(ColorContent.BROWN);
|
|
public static final RegistryObject<Item> GREEN_CUFF_BED = registerCuffBedItem(ColorContent.GREEN);
|
|
public static final RegistryObject<Item> RED_CUFF_BED = registerCuffBedItem(ColorContent.RED);
|
|
public static final RegistryObject<Item> BLACK_CUFF_BED = registerCuffBedItem(ColorContent.BLACK);
|
|
|
|
|
|
|
|
private static RegistryObject<Item> registerCuffBedItem(@NotNull ColorContent color) {
|
|
String name = color.getName() + "_cuff_bed";
|
|
RegistryObject<Item> item = ITEMS.register(name, () -> new BlockItem(
|
|
EDGBlocks.getCuffedBlock(color)
|
|
,new Item.Properties()
|
|
));
|
|
CUFF_BED_ITEMS.put(color,item);
|
|
return item;
|
|
}
|
|
|
|
public static void register(IEventBus eventBus) {
|
|
ITEMS.register(eventBus);
|
|
}
|
|
}
|