Move Items and Block registration to DeferredRegistries (#2678)
* remove wireless transmitter tooltip as it is no longer accurate * Move Blocks and Items into DeferredRegistries * fix issues and registration order * formatting changes
This commit is contained in:
@@ -40,11 +40,11 @@ public final class RS {
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CLIENT_CONFIG.getSpec());
|
||||
|
||||
CommonSetup commonSetup = new CommonSetup();
|
||||
RSBlocks.register();
|
||||
RSItems.register();
|
||||
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(commonSetup::onCommonSetup);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addGenericListener(Block.class, commonSetup::onRegisterBlocks);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addGenericListener(TileEntityType.class, commonSetup::onRegisterTiles);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addGenericListener(Item.class, commonSetup::onRegisterItems);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addGenericListener(IRecipeSerializer.class, commonSetup::onRegisterRecipeSerializers);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addGenericListener(ContainerType.class, commonSetup::onRegisterContainers);
|
||||
|
||||
|
@@ -1,88 +1,99 @@
|
||||
package com.refinedmods.refinedstorage;
|
||||
|
||||
import com.refinedmods.refinedstorage.api.network.NetworkType;
|
||||
import com.refinedmods.refinedstorage.api.network.grid.GridType;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType;
|
||||
import com.refinedmods.refinedstorage.block.*;
|
||||
import net.minecraftforge.registries.ObjectHolder;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ObjectHolder(RS.ID)
|
||||
public final class RSBlocks {
|
||||
@ObjectHolder("importer")
|
||||
public static final ImporterBlock IMPORTER = null;
|
||||
@ObjectHolder("exporter")
|
||||
public static final ExporterBlock EXPORTER = null;
|
||||
@ObjectHolder("detector")
|
||||
public static final DetectorBlock DETECTOR = null;
|
||||
@ObjectHolder("relay")
|
||||
public static final RelayBlock RELAY = null;
|
||||
@ObjectHolder("network_transmitter")
|
||||
public static final NetworkTransmitterBlock NETWORK_TRANSMITTER = null;
|
||||
@ObjectHolder("network_receiver")
|
||||
public static final NetworkReceiverBlock NETWORK_RECEIVER = null;
|
||||
@ObjectHolder("quartz_enriched_iron_block")
|
||||
public static final QuartzEnrichedIronBlock QUARTZ_ENRICHED_IRON = null;
|
||||
@ObjectHolder("machine_casing")
|
||||
public static final MachineCasingBlock MACHINE_CASING = null;
|
||||
@ObjectHolder("controller")
|
||||
public static final ControllerBlock CONTROLLER = null;
|
||||
@ObjectHolder("creative_controller")
|
||||
public static final ControllerBlock CREATIVE_CONTROLLER = null;
|
||||
@ObjectHolder("cable")
|
||||
public static final CableBlock CABLE = null;
|
||||
@ObjectHolder("disk_drive")
|
||||
public static final DiskDriveBlock DISK_DRIVE = null;
|
||||
@ObjectHolder("external_storage")
|
||||
public static final ExternalStorageBlock EXTERNAL_STORAGE = null;
|
||||
@ObjectHolder("grid")
|
||||
public static final GridBlock GRID = null;
|
||||
@ObjectHolder("crafting_grid")
|
||||
public static final GridBlock CRAFTING_GRID = null;
|
||||
@ObjectHolder("pattern_grid")
|
||||
public static final GridBlock PATTERN_GRID = null;
|
||||
@ObjectHolder("fluid_grid")
|
||||
public static final GridBlock FLUID_GRID = null;
|
||||
@ObjectHolder("1k_storage_block")
|
||||
public static final StorageBlock ONE_K_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("4k_storage_block")
|
||||
public static final StorageBlock FOUR_K_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("16k_storage_block")
|
||||
public static final StorageBlock SIXTEEN_K_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("64k_storage_block")
|
||||
public static final StorageBlock SIXTY_FOUR_K_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("creative_storage_block")
|
||||
public static final StorageBlock CREATIVE_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("64k_fluid_storage_block")
|
||||
public static final FluidStorageBlock SIXTY_FOUR_K_FLUID_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("256k_fluid_storage_block")
|
||||
public static final FluidStorageBlock TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("1024k_fluid_storage_block")
|
||||
public static final FluidStorageBlock THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("4096k_fluid_storage_block")
|
||||
public static final FluidStorageBlock FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("creative_fluid_storage_block")
|
||||
public static final FluidStorageBlock CREATIVE_FLUID_STORAGE_BLOCK = null;
|
||||
@ObjectHolder("security_manager")
|
||||
public static final SecurityManagerBlock SECURITY_MANAGER = null;
|
||||
@ObjectHolder("interface")
|
||||
public static final InterfaceBlock INTERFACE = null;
|
||||
@ObjectHolder("fluid_interface")
|
||||
public static final FluidInterfaceBlock FLUID_INTERFACE = null;
|
||||
@ObjectHolder("wireless_transmitter")
|
||||
public static final WirelessTransmitterBlock WIRELESS_TRANSMITTER = null;
|
||||
@ObjectHolder("storage_monitor")
|
||||
public static final StorageMonitorBlock STORAGE_MONITOR = null;
|
||||
@ObjectHolder("constructor")
|
||||
public static final ConstructorBlock CONSTRUCTOR = null;
|
||||
@ObjectHolder("destructor")
|
||||
public static final DestructorBlock DESTRUCTOR = null;
|
||||
@ObjectHolder("disk_manipulator")
|
||||
public static final DiskManipulatorBlock DISK_MANIPULATOR = null;
|
||||
@ObjectHolder("portable_grid")
|
||||
public static final PortableGridBlock PORTABLE_GRID = null;
|
||||
@ObjectHolder("creative_portable_grid")
|
||||
public static final PortableGridBlock CREATIVE_PORTABLE_GRID = null;
|
||||
@ObjectHolder("crafter")
|
||||
public static final CrafterBlock CRAFTER = null;
|
||||
@ObjectHolder("crafter_manager")
|
||||
public static final CrafterManagerBlock CRAFTER_MANAGER = null;
|
||||
@ObjectHolder("crafting_monitor")
|
||||
public static final CraftingMonitorBlock CRAFTING_MONITOR = null;
|
||||
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, RS.ID);
|
||||
|
||||
public static final RegistryObject<ImporterBlock> IMPORTER;
|
||||
public static final RegistryObject<ExporterBlock> EXPORTER;
|
||||
public static final RegistryObject<DetectorBlock> DETECTOR;
|
||||
public static final RegistryObject<RelayBlock> RELAY;
|
||||
public static final RegistryObject<NetworkTransmitterBlock> NETWORK_TRANSMITTER;
|
||||
public static final RegistryObject<NetworkReceiverBlock> NETWORK_RECEIVER;
|
||||
public static final RegistryObject<QuartzEnrichedIronBlock> QUARTZ_ENRICHED_IRON;
|
||||
public static final RegistryObject<MachineCasingBlock> MACHINE_CASING;
|
||||
public static final RegistryObject<ControllerBlock> CONTROLLER;
|
||||
public static final RegistryObject<ControllerBlock> CREATIVE_CONTROLLER;
|
||||
public static final RegistryObject<CableBlock> CABLE;
|
||||
public static final RegistryObject<DiskDriveBlock> DISK_DRIVE;
|
||||
public static final RegistryObject<ExternalStorageBlock> EXTERNAL_STORAGE;
|
||||
public static final RegistryObject<GridBlock> GRID;
|
||||
public static final RegistryObject<GridBlock> CRAFTING_GRID;
|
||||
public static final RegistryObject<GridBlock> PATTERN_GRID;
|
||||
public static final RegistryObject<GridBlock> FLUID_GRID;
|
||||
public static final Map<ItemStorageType, RegistryObject<StorageBlock>> STORAGE_BLOCKS = new HashMap<>();
|
||||
public static final Map<FluidStorageType, RegistryObject<FluidStorageBlock>> FLUID_STORAGE_BLOCKS = new HashMap<>();
|
||||
public static final RegistryObject<SecurityManagerBlock> SECURITY_MANAGER;
|
||||
public static final RegistryObject<InterfaceBlock> INTERFACE;
|
||||
public static final RegistryObject<FluidInterfaceBlock> FLUID_INTERFACE;
|
||||
public static final RegistryObject<WirelessTransmitterBlock> WIRELESS_TRANSMITTER;
|
||||
public static final RegistryObject<StorageMonitorBlock> STORAGE_MONITOR;
|
||||
public static final RegistryObject<ConstructorBlock> CONSTRUCTOR;
|
||||
public static final RegistryObject<DestructorBlock> DESTRUCTOR;
|
||||
public static final RegistryObject<DiskManipulatorBlock> DISK_MANIPULATOR;
|
||||
public static final RegistryObject<PortableGridBlock> PORTABLE_GRID;
|
||||
public static final RegistryObject<PortableGridBlock> CREATIVE_PORTABLE_GRID;
|
||||
public static final RegistryObject<CrafterBlock> CRAFTER;
|
||||
public static final RegistryObject<CrafterManagerBlock> CRAFTER_MANAGER;
|
||||
public static final RegistryObject<CraftingMonitorBlock> CRAFTING_MONITOR;
|
||||
|
||||
static {
|
||||
QUARTZ_ENRICHED_IRON = BLOCKS.register("quartz_enriched_iron_block", QuartzEnrichedIronBlock::new);
|
||||
CONTROLLER = BLOCKS.register("controller", () -> new ControllerBlock(NetworkType.NORMAL));
|
||||
CREATIVE_CONTROLLER = BLOCKS.register("creative_controller", () -> new ControllerBlock(NetworkType.CREATIVE));
|
||||
MACHINE_CASING = BLOCKS.register("machine_casing", MachineCasingBlock::new);
|
||||
CABLE = BLOCKS.register("cable", CableBlock::new);
|
||||
DISK_DRIVE = BLOCKS.register("disk_drive", DiskDriveBlock::new);
|
||||
GRID = BLOCKS.register("grid", () -> new GridBlock(GridType.NORMAL));
|
||||
CRAFTING_GRID = BLOCKS.register(GridType.CRAFTING.getString() + "_grid", () -> new GridBlock(GridType.CRAFTING));
|
||||
PATTERN_GRID = BLOCKS.register(GridType.PATTERN.getString() + "_grid", () -> new GridBlock(GridType.PATTERN));
|
||||
FLUID_GRID = BLOCKS.register(GridType.FLUID.getString() + "_grid", () -> new GridBlock(GridType.FLUID));
|
||||
|
||||
for (ItemStorageType type : ItemStorageType.values()) {
|
||||
STORAGE_BLOCKS.put(type, BLOCKS.register(type.getName() + "_storage_block", () -> new StorageBlock(type)));
|
||||
}
|
||||
|
||||
for (FluidStorageType type : FluidStorageType.values()) {
|
||||
FLUID_STORAGE_BLOCKS.put(type, BLOCKS.register(type.getName() + "_fluid_storage_block", () -> new FluidStorageBlock(type)));
|
||||
}
|
||||
|
||||
EXTERNAL_STORAGE = BLOCKS.register("external_storage", ExternalStorageBlock::new);
|
||||
IMPORTER = BLOCKS.register("importer", ImporterBlock::new);
|
||||
EXPORTER = BLOCKS.register("exporter", ExporterBlock::new);
|
||||
NETWORK_RECEIVER = BLOCKS.register("network_receiver", NetworkReceiverBlock::new);
|
||||
NETWORK_TRANSMITTER = BLOCKS.register("network_transmitter", NetworkTransmitterBlock::new);
|
||||
RELAY = BLOCKS.register("relay", RelayBlock::new);
|
||||
DETECTOR = BLOCKS.register("detector", DetectorBlock::new);
|
||||
SECURITY_MANAGER = BLOCKS.register("security_manager", SecurityManagerBlock::new);
|
||||
INTERFACE = BLOCKS.register("interface", InterfaceBlock::new);
|
||||
FLUID_INTERFACE = BLOCKS.register("fluid_interface", FluidInterfaceBlock::new);
|
||||
WIRELESS_TRANSMITTER = BLOCKS.register("wireless_transmitter", WirelessTransmitterBlock::new);
|
||||
STORAGE_MONITOR = BLOCKS.register("storage_monitor", StorageMonitorBlock::new);
|
||||
CONSTRUCTOR = BLOCKS.register("constructor", ConstructorBlock::new);
|
||||
DESTRUCTOR = BLOCKS.register("destructor", DestructorBlock::new);
|
||||
DISK_MANIPULATOR = BLOCKS.register("disk_manipulator", DiskManipulatorBlock::new);
|
||||
CREATIVE_PORTABLE_GRID = BLOCKS.register("creative_portable_grid", () -> new PortableGridBlock(PortableGridBlockItem.Type.CREATIVE));
|
||||
PORTABLE_GRID = BLOCKS.register("portable_grid", () -> new PortableGridBlock(PortableGridBlockItem.Type.NORMAL));
|
||||
CRAFTER = BLOCKS.register("crafter", CrafterBlock::new);
|
||||
CRAFTER_MANAGER = BLOCKS.register("crafter_manager", CrafterManagerBlock::new);
|
||||
CRAFTING_MONITOR = BLOCKS.register("crafting_monitor", CraftingMonitorBlock::new);
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus());
|
||||
}
|
||||
}
|
@@ -1,118 +1,150 @@
|
||||
package com.refinedmods.refinedstorage;
|
||||
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType;
|
||||
import com.refinedmods.refinedstorage.block.BaseBlock;
|
||||
import com.refinedmods.refinedstorage.item.*;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.ControllerBlockItem;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem;
|
||||
import net.minecraftforge.registries.ObjectHolder;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.*;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ObjectHolder(RS.ID)
|
||||
public final class RSItems {
|
||||
@ObjectHolder("quartz_enriched_iron")
|
||||
public static final QuartzEnrichedIronItem QUARTZ_ENRICHED_IRON = null;
|
||||
@ObjectHolder("silicon")
|
||||
public static final SiliconItem SILICON = null;
|
||||
@ObjectHolder("processor_binding")
|
||||
public static final ProcessorBindingItem PROCESSOR_BINDING = null;
|
||||
@ObjectHolder("wrench")
|
||||
public static final WrenchItem WRENCH = null;
|
||||
@ObjectHolder("pattern")
|
||||
public static final PatternItem PATTERN = null;
|
||||
@ObjectHolder("filter")
|
||||
public static final FilterItem FILTER = null;
|
||||
@ObjectHolder("storage_housing")
|
||||
public static final StorageHousingItem STORAGE_HOUSING = null;
|
||||
@ObjectHolder("network_card")
|
||||
public static final NetworkCardItem NETWORK_CARD = null;
|
||||
@ObjectHolder("security_card")
|
||||
public static final SecurityCardItem SECURITY_CARD = null;
|
||||
@ObjectHolder("controller")
|
||||
public static final ControllerBlockItem CONTROLLER = null;
|
||||
@ObjectHolder("creative_controller")
|
||||
public static final ControllerBlockItem CREATIVE_CONTROLLER = null;
|
||||
@ObjectHolder("construction_core")
|
||||
public static final CoreItem CONSTRUCTION_CORE = null;
|
||||
@ObjectHolder("destruction_core")
|
||||
public static final CoreItem DESTRUCTION_CORE = null;
|
||||
@ObjectHolder("raw_basic_processor")
|
||||
public static final ProcessorItem RAW_BASIC_PROCESSOR = null;
|
||||
@ObjectHolder("raw_improved_processor")
|
||||
public static final ProcessorItem RAW_IMPROVED_PROCESSOR = null;
|
||||
@ObjectHolder("raw_advanced_processor")
|
||||
public static final ProcessorItem RAW_ADVANCED_PROCESSOR = null;
|
||||
@ObjectHolder("basic_processor")
|
||||
public static final ProcessorItem BASIC_PROCESSOR = null;
|
||||
@ObjectHolder("improved_processor")
|
||||
public static final ProcessorItem IMPROVED_PROCESSOR = null;
|
||||
@ObjectHolder("advanced_processor")
|
||||
public static final ProcessorItem ADVANCED_PROCESSOR = null;
|
||||
@ObjectHolder("upgrade")
|
||||
public static final UpgradeItem UPGRADE = null;
|
||||
@ObjectHolder("speed_upgrade")
|
||||
public static final UpgradeItem SPEED_UPGRADE = null;
|
||||
@ObjectHolder("range_upgrade")
|
||||
public static final UpgradeItem RANGE_UPGRADE = null;
|
||||
@ObjectHolder("crafting_upgrade")
|
||||
public static final UpgradeItem CRAFTING_UPGRADE = null;
|
||||
@ObjectHolder("stack_upgrade")
|
||||
public static final UpgradeItem STACK_UPGRADE = null;
|
||||
@ObjectHolder("silk_touch_upgrade")
|
||||
public static final UpgradeItem SILK_TOUCH_UPGRADE = null;
|
||||
@ObjectHolder("fortune_1_upgrade")
|
||||
public static final UpgradeItem FORTUNE_1_UPGRADE = null;
|
||||
@ObjectHolder("fortune_2_upgrade")
|
||||
public static final UpgradeItem FORTUNE_2_UPGRADE = null;
|
||||
@ObjectHolder("fortune_3_upgrade")
|
||||
public static final UpgradeItem FORTUNE_3_UPGRADE = null;
|
||||
@ObjectHolder("wireless_grid")
|
||||
public static final WirelessGridItem WIRELESS_GRID = null;
|
||||
@ObjectHolder("creative_wireless_grid")
|
||||
public static final WirelessGridItem CREATIVE_WIRELESS_GRID = null;
|
||||
@ObjectHolder("wireless_fluid_grid")
|
||||
public static final WirelessFluidGridItem WIRELESS_FLUID_GRID = null;
|
||||
@ObjectHolder("creative_wireless_fluid_grid")
|
||||
public static final WirelessFluidGridItem CREATIVE_WIRELESS_FLUID_GRID = null;
|
||||
@ObjectHolder("1k_storage_part")
|
||||
public static final StoragePartItem ONE_K_STORAGE_PART = null;
|
||||
@ObjectHolder("4k_storage_part")
|
||||
public static final StoragePartItem FOUR_K_STORAGE_PART = null;
|
||||
@ObjectHolder("16k_storage_part")
|
||||
public static final StoragePartItem SIXTEEN_K_STORAGE_PART = null;
|
||||
@ObjectHolder("64k_storage_part")
|
||||
public static final StoragePartItem SIXTY_FOUR_K_STORAGE_PART = null;
|
||||
@ObjectHolder("1k_storage_disk")
|
||||
public static final StorageDiskItem ONE_K_STORAGE_DISK = null;
|
||||
@ObjectHolder("4k_storage_disk")
|
||||
public static final StorageDiskItem FOUR_K_STORAGE_DISK = null;
|
||||
@ObjectHolder("16k_storage_disk")
|
||||
public static final StorageDiskItem SIXTEEN_K_STORAGE_DISK = null;
|
||||
@ObjectHolder("64k_storage_disk")
|
||||
public static final StorageDiskItem SIXTY_FOUR_K_STORAGE_DISK = null;
|
||||
@ObjectHolder("creative_storage_disk")
|
||||
public static final StorageDiskItem CREATIVE_STORAGE_DISK = null;
|
||||
@ObjectHolder("64k_fluid_storage_part")
|
||||
public static final FluidStoragePartItem SIXTY_FOUR_K_FLUID_STORAGE_PART = null;
|
||||
@ObjectHolder("256k_fluid_storage_part")
|
||||
public static final FluidStoragePartItem TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_PART = null;
|
||||
@ObjectHolder("1024k_fluid_storage_part")
|
||||
public static final FluidStoragePartItem THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_PART = null;
|
||||
@ObjectHolder("4096k_fluid_storage_part")
|
||||
public static final FluidStoragePartItem FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_PART = null;
|
||||
@ObjectHolder("64k_fluid_storage_disk")
|
||||
public static final FluidStorageDiskItem SIXTY_FOUR_K_FLUID_STORAGE_DISK = null;
|
||||
@ObjectHolder("256k_fluid_storage_disk")
|
||||
public static final FluidStorageDiskItem TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_DISK = null;
|
||||
@ObjectHolder("1024k_fluid_storage_disk")
|
||||
public static final FluidStorageDiskItem THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_DISK = null;
|
||||
@ObjectHolder("4096k_fluid_storage_disk")
|
||||
public static final FluidStorageDiskItem FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_DISK = null;
|
||||
@ObjectHolder("creative_fluid_storage_disk")
|
||||
public static final FluidStorageDiskItem CREATIVE_FLUID_STORAGE_DISK = null;
|
||||
@ObjectHolder("portable_grid")
|
||||
public static final PortableGridBlockItem PORTABLE_GRID = null;
|
||||
@ObjectHolder("creative_portable_grid")
|
||||
public static final PortableGridBlockItem CREATIVE_PORTABLE_GRID = null;
|
||||
@ObjectHolder("wireless_crafting_monitor")
|
||||
public static final WirelessCraftingMonitorItem WIRELESS_CRAFTING_MONITOR = null;
|
||||
@ObjectHolder("creative_wireless_crafting_monitor")
|
||||
public static final WirelessCraftingMonitorItem CREATIVE_WIRELESS_CRAFTING_MONITOR = null;
|
||||
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, RS.ID);
|
||||
|
||||
public static final RegistryObject<QuartzEnrichedIronItem> QUARTZ_ENRICHED_IRON;
|
||||
public static final RegistryObject<SiliconItem> SILICON;
|
||||
public static final RegistryObject<ProcessorBindingItem> PROCESSOR_BINDING;
|
||||
public static final RegistryObject<WrenchItem> WRENCH;
|
||||
public static final RegistryObject<PatternItem> PATTERN;
|
||||
public static final RegistryObject<FilterItem> FILTER;
|
||||
public static final RegistryObject<StorageHousingItem> STORAGE_HOUSING;
|
||||
public static final RegistryObject<NetworkCardItem> NETWORK_CARD;
|
||||
public static final RegistryObject<SecurityCardItem> SECURITY_CARD;
|
||||
public static final RegistryObject<ControllerBlockItem> CONTROLLER;
|
||||
public static final RegistryObject<ControllerBlockItem> CREATIVE_CONTROLLER;
|
||||
public static final RegistryObject<CoreItem> CONSTRUCTION_CORE;
|
||||
public static final RegistryObject<CoreItem> DESTRUCTION_CORE;
|
||||
public static final RegistryObject<WirelessGridItem> WIRELESS_GRID;
|
||||
public static final RegistryObject<WirelessGridItem> CREATIVE_WIRELESS_GRID;
|
||||
public static final RegistryObject<WirelessFluidGridItem> WIRELESS_FLUID_GRID;
|
||||
public static final RegistryObject<WirelessFluidGridItem> CREATIVE_WIRELESS_FLUID_GRID;
|
||||
public static final RegistryObject<PortableGridBlockItem> PORTABLE_GRID;
|
||||
public static final RegistryObject<PortableGridBlockItem> CREATIVE_PORTABLE_GRID;
|
||||
public static final RegistryObject<WirelessCraftingMonitorItem> WIRELESS_CRAFTING_MONITOR;
|
||||
public static final RegistryObject<WirelessCraftingMonitorItem> CREATIVE_WIRELESS_CRAFTING_MONITOR;
|
||||
|
||||
public static final Map<ProcessorItem.Type, RegistryObject<ProcessorItem>> PROCESSORS = new HashMap<>();
|
||||
|
||||
public static final Map<ItemStorageType, RegistryObject<StoragePartItem>> ITEM_STORAGE_PARTS = new HashMap<>();
|
||||
public static final Map<ItemStorageType, RegistryObject<StorageDiskItem>> ITEM_STORAGE_DISKS = new HashMap<>();
|
||||
public static final Map<ItemStorageType, RegistryObject<StorageBlockItem>> STORAGE_BLOCKS = new HashMap<>();
|
||||
|
||||
public static final Map<FluidStorageType, RegistryObject<FluidStoragePartItem>> FLUID_STORAGE_PARTS = new HashMap<>();
|
||||
public static final Map<FluidStorageType, RegistryObject<FluidStorageDiskItem>> FLUID_STORAGE_DISKS = new HashMap<>();
|
||||
public static final Map<FluidStorageType, RegistryObject<FluidStorageBlockItem>> FLUID_STORAGE_BLOCKS = new HashMap<>();
|
||||
|
||||
public static final Map<UpgradeItem.Type, RegistryObject<UpgradeItem>> UPGRADE_ITEMS = new HashMap<>();
|
||||
|
||||
static {
|
||||
CONSTRUCTION_CORE = ITEMS.register("construction_core", CoreItem::new);
|
||||
DESTRUCTION_CORE = ITEMS.register("destruction_core", CoreItem::new);
|
||||
QUARTZ_ENRICHED_IRON = ITEMS.register("quartz_enriched_iron", QuartzEnrichedIronItem::new);
|
||||
PROCESSOR_BINDING = ITEMS.register("processor_binding", ProcessorBindingItem::new);
|
||||
|
||||
for (ProcessorItem.Type type : ProcessorItem.Type.values()) {
|
||||
PROCESSORS.put(type, ITEMS.register(type.getName() + "_processor", ProcessorItem::new));
|
||||
}
|
||||
|
||||
SILICON = ITEMS.register("silicon", SiliconItem::new);
|
||||
SECURITY_CARD = ITEMS.register("security_card", SecurityCardItem::new);
|
||||
NETWORK_CARD = ITEMS.register("network_card", NetworkCardItem::new);
|
||||
|
||||
for (ItemStorageType type : ItemStorageType.values()) {
|
||||
if (type != ItemStorageType.CREATIVE) {
|
||||
ITEM_STORAGE_PARTS.put(type, ITEMS.register(type.getName() + "_storage_part", StoragePartItem::new));
|
||||
}
|
||||
|
||||
ITEM_STORAGE_DISKS.put(type, ITEMS.register(type.getName() + "_storage_disk", () -> new StorageDiskItem(type)));
|
||||
}
|
||||
|
||||
for (FluidStorageType type : FluidStorageType.values()) {
|
||||
if (type != FluidStorageType.CREATIVE) {
|
||||
FLUID_STORAGE_PARTS.put(type, ITEMS.register(type.getName() + "_fluid_storage_part", FluidStoragePartItem::new));
|
||||
}
|
||||
|
||||
FLUID_STORAGE_DISKS.put(type, ITEMS.register(type.getName() + "_fluid_storage_disk", () -> new FluidStorageDiskItem(type)));
|
||||
}
|
||||
|
||||
STORAGE_HOUSING = ITEMS.register("storage_housing", StorageHousingItem::new);
|
||||
|
||||
for (UpgradeItem.Type type : UpgradeItem.Type.values()) {
|
||||
UPGRADE_ITEMS.put(type, ITEMS.register(type == UpgradeItem.Type.NORMAL ? "upgrade" : type.getName() + "_upgrade", () -> new UpgradeItem(type)));
|
||||
}
|
||||
|
||||
WRENCH = ITEMS.register("wrench", WrenchItem::new);
|
||||
PATTERN = ITEMS.register("pattern", PatternItem::new);
|
||||
FILTER = ITEMS.register("filter", FilterItem::new);
|
||||
PORTABLE_GRID = ITEMS.register("portable_grid", () -> new PortableGridBlockItem(PortableGridBlockItem.Type.NORMAL));
|
||||
CREATIVE_PORTABLE_GRID = ITEMS.register("creative_portable_grid", () -> new PortableGridBlockItem(PortableGridBlockItem.Type.CREATIVE));
|
||||
|
||||
createBlockItemFor(RSBlocks.QUARTZ_ENRICHED_IRON);
|
||||
CONTROLLER = ITEMS.register(RSBlocks.CONTROLLER.getId().getPath(), () -> new ControllerBlockItem(RSBlocks.CONTROLLER.get()));
|
||||
CREATIVE_CONTROLLER = ITEMS.register(RSBlocks.CREATIVE_CONTROLLER.getId().getPath(), () -> new ControllerBlockItem(RSBlocks.CREATIVE_CONTROLLER.get()));
|
||||
createBlockItemFor(RSBlocks.MACHINE_CASING);
|
||||
createBlockItemFor(RSBlocks.CABLE);
|
||||
createBlockItemFor(RSBlocks.DISK_DRIVE);
|
||||
createBlockItemFor(RSBlocks.GRID);
|
||||
createBlockItemFor(RSBlocks.CRAFTING_GRID);
|
||||
createBlockItemFor(RSBlocks.PATTERN_GRID);
|
||||
createBlockItemFor(RSBlocks.FLUID_GRID);
|
||||
|
||||
for (ItemStorageType type : ItemStorageType.values()) {
|
||||
STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.STORAGE_BLOCKS.get(type).getId().getPath(), () -> new StorageBlockItem(RSBlocks.STORAGE_BLOCKS.get(type).get())));
|
||||
}
|
||||
|
||||
for (FluidStorageType type : FluidStorageType.values()) {
|
||||
FLUID_STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).getId().getPath(), () -> new FluidStorageBlockItem(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).get())));
|
||||
}
|
||||
|
||||
createBlockItemFor(RSBlocks.EXTERNAL_STORAGE);
|
||||
createBlockItemFor(RSBlocks.IMPORTER);
|
||||
createBlockItemFor(RSBlocks.EXPORTER);
|
||||
createBlockItemFor(RSBlocks.NETWORK_RECEIVER);
|
||||
createBlockItemFor(RSBlocks.NETWORK_TRANSMITTER);
|
||||
createBlockItemFor(RSBlocks.RELAY);
|
||||
createBlockItemFor(RSBlocks.DETECTOR);
|
||||
createBlockItemFor(RSBlocks.SECURITY_MANAGER);
|
||||
createBlockItemFor(RSBlocks.INTERFACE);
|
||||
createBlockItemFor(RSBlocks.FLUID_INTERFACE);
|
||||
createBlockItemFor(RSBlocks.WIRELESS_TRANSMITTER);
|
||||
createBlockItemFor(RSBlocks.STORAGE_MONITOR);
|
||||
createBlockItemFor(RSBlocks.CONSTRUCTOR);
|
||||
createBlockItemFor(RSBlocks.DESTRUCTOR);
|
||||
createBlockItemFor(RSBlocks.DISK_MANIPULATOR);
|
||||
createBlockItemFor(RSBlocks.CRAFTER);
|
||||
createBlockItemFor(RSBlocks.CRAFTER_MANAGER);
|
||||
createBlockItemFor(RSBlocks.CRAFTING_MONITOR);
|
||||
|
||||
WIRELESS_GRID = ITEMS.register("wireless_grid", () -> new WirelessGridItem(WirelessGridItem.Type.NORMAL));
|
||||
CREATIVE_WIRELESS_GRID = ITEMS.register("creative_wireless_grid", () -> new WirelessGridItem(WirelessGridItem.Type.CREATIVE));
|
||||
WIRELESS_FLUID_GRID = ITEMS.register("wireless_fluid_grid", () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.NORMAL));
|
||||
CREATIVE_WIRELESS_FLUID_GRID = ITEMS.register("creative_wireless_fluid_grid", () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.CREATIVE));
|
||||
WIRELESS_CRAFTING_MONITOR = ITEMS.register("wireless_crafting_monitor", () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.NORMAL));
|
||||
CREATIVE_WIRELESS_CRAFTING_MONITOR = ITEMS.register("creative_wireless_crafting_monitor", () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.CREATIVE));
|
||||
}
|
||||
|
||||
private static <T extends BaseBlock> RegistryObject<BlockItem> createBlockItemFor(RegistryObject<T> block) {
|
||||
return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().group(RS.MAIN_GROUP)));
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
|
||||
}
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ public class DetectorNetworkNode extends NetworkNode implements IComparable, ITy
|
||||
wasPowered = powered;
|
||||
|
||||
world.setBlockState(pos, world.getBlockState(pos).with(DetectorBlock.POWERED, powered));
|
||||
world.notifyNeighborsOfStateChange(pos, RSBlocks.DETECTOR);
|
||||
world.notifyNeighborsOfStateChange(pos, RSBlocks.DETECTOR.get());
|
||||
}
|
||||
|
||||
if (canUpdate() && ticks % SPEED == 0) {
|
||||
|
@@ -138,7 +138,7 @@ public class GridNetworkNode extends NetworkNode implements INetworkAwareGrid, I
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
.addValidator(new ItemValidator(RSItems.PATTERN))
|
||||
.addValidator(new ItemValidator(RSItems.PATTERN.get()))
|
||||
.addListener(new NetworkNodeInventoryListener(this))
|
||||
.addListener(((handler, slot, reading) -> {
|
||||
ItemStack pattern = handler.getStackInSlot(slot);
|
||||
@@ -455,7 +455,7 @@ public class GridNetworkNode extends NetworkNode implements INetworkAwareGrid, I
|
||||
patterns.extractItem(0, 1, false);
|
||||
}
|
||||
|
||||
ItemStack pattern = new ItemStack(RSItems.PATTERN);
|
||||
ItemStack pattern = new ItemStack(RSItems.PATTERN.get());
|
||||
|
||||
PatternItem.setToCurrentVersion(pattern);
|
||||
PatternItem.setProcessing(pattern, processingPattern);
|
||||
|
@@ -24,7 +24,7 @@ public class NetworkTransmitterNetworkNode extends NetworkNode {
|
||||
public static final ResourceLocation ID = new ResourceLocation(RS.ID, "network_transmitter");
|
||||
|
||||
private final BaseItemHandler networkCard = new BaseItemHandler(1)
|
||||
.addValidator(new ItemValidator(RSItems.NETWORK_CARD))
|
||||
.addValidator(new ItemValidator(RSItems.NETWORK_CARD.get()))
|
||||
.addListener(new NetworkNodeInventoryListener(this))
|
||||
.addListener((handler, slot, reading) -> {
|
||||
ItemStack card = handler.getStackInSlot(slot);
|
||||
|
@@ -32,7 +32,7 @@ public class SecurityManagerNetworkNode extends NetworkNode implements ISecurity
|
||||
private ISecurityCard globalCard;
|
||||
|
||||
private final BaseItemHandler cardsInv = new BaseItemHandler(9 * 2)
|
||||
.addValidator(new ItemValidator(RSItems.SECURITY_CARD))
|
||||
.addValidator(new ItemValidator(RSItems.SECURITY_CARD.get()))
|
||||
.addListener(new NetworkNodeInventoryListener(this))
|
||||
.addListener(((handler, slot, reading) -> {
|
||||
if (!world.isRemote) {
|
||||
@@ -45,7 +45,7 @@ public class SecurityManagerNetworkNode extends NetworkNode implements ISecurity
|
||||
}));
|
||||
|
||||
private final BaseItemHandler editCard = new BaseItemHandler(1)
|
||||
.addValidator(new ItemValidator(RSItems.SECURITY_CARD))
|
||||
.addValidator(new ItemValidator(RSItems.SECURITY_CARD.get()))
|
||||
.addListener(new NetworkNodeInventoryListener(this));
|
||||
|
||||
public SecurityManagerNetworkNode(World world, BlockPos pos) {
|
||||
|
@@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.RSItems;
|
||||
import com.refinedmods.refinedstorage.api.storage.disk.IStorageDisk;
|
||||
import com.refinedmods.refinedstorage.api.storage.disk.IStorageDiskFactory;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.disk.FluidStorageDisk;
|
||||
import com.refinedmods.refinedstorage.item.FluidStorageDiskItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -46,19 +47,19 @@ public class FluidStorageDiskFactory implements IStorageDiskFactory<FluidStack>
|
||||
FluidStorageDiskItem item;
|
||||
switch (disk.getCapacity()) {
|
||||
case 64_000:
|
||||
item = RSItems.SIXTY_FOUR_K_FLUID_STORAGE_DISK;
|
||||
item = RSItems.FLUID_STORAGE_DISKS.get(FluidStorageType.SIXTY_FOUR_K).get();
|
||||
break;
|
||||
case 256_000:
|
||||
item = RSItems.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_DISK;
|
||||
item = RSItems.FLUID_STORAGE_DISKS.get(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K).get();
|
||||
break;
|
||||
case 1024_000:
|
||||
item = RSItems.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_DISK;
|
||||
item = RSItems.FLUID_STORAGE_DISKS.get(FluidStorageType.THOUSAND_TWENTY_FOUR_K).get();
|
||||
break;
|
||||
case 4096_000:
|
||||
item = RSItems.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_DISK;
|
||||
item = RSItems.FLUID_STORAGE_DISKS.get(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K).get();
|
||||
break;
|
||||
default:
|
||||
item = RSItems.CREATIVE_FLUID_STORAGE_DISK;
|
||||
item = RSItems.FLUID_STORAGE_DISKS.get(FluidStorageType.CREATIVE).get();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.RSItems;
|
||||
import com.refinedmods.refinedstorage.api.storage.disk.IStorageDisk;
|
||||
import com.refinedmods.refinedstorage.api.storage.disk.IStorageDiskFactory;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.disk.ItemStorageDisk;
|
||||
import com.refinedmods.refinedstorage.item.StorageDiskItem;
|
||||
import com.refinedmods.refinedstorage.util.StackUtils;
|
||||
@@ -46,19 +47,19 @@ public class ItemStorageDiskFactory implements IStorageDiskFactory<ItemStack> {
|
||||
StorageDiskItem item;
|
||||
switch (disk.getCapacity()) {
|
||||
case 1_000:
|
||||
item = RSItems.ONE_K_STORAGE_DISK;
|
||||
item = RSItems.ITEM_STORAGE_DISKS.get(ItemStorageType.ONE_K).get();
|
||||
break;
|
||||
case 4_000:
|
||||
item = RSItems.FOUR_K_STORAGE_DISK;
|
||||
item = RSItems.ITEM_STORAGE_DISKS.get(ItemStorageType.FOUR_K).get();
|
||||
break;
|
||||
case 16_000:
|
||||
item = RSItems.SIXTEEN_K_STORAGE_DISK;
|
||||
item = RSItems.ITEM_STORAGE_DISKS.get(ItemStorageType.SIXTEEN_K).get();
|
||||
break;
|
||||
case 64_000:
|
||||
item = RSItems.SIXTY_FOUR_K_STORAGE_DISK;
|
||||
item = RSItems.ITEM_STORAGE_DISKS.get(ItemStorageType.SIXTY_FOUR_K).get();
|
||||
break;
|
||||
default:
|
||||
item = RSItems.CREATIVE_STORAGE_DISK;
|
||||
item = RSItems.ITEM_STORAGE_DISKS.get(ItemStorageType.CREATIVE).get();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -58,7 +58,6 @@ public class CableBlock extends NetworkNodeBlock implements IWaterLoggable {
|
||||
public CableBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "cable");
|
||||
this.setDefaultState(getDefaultState().with(NORTH, false).with(EAST, false).with(SOUTH, false).with(WEST, false).with(UP, false).with(DOWN, false).with(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
|
@@ -37,8 +37,6 @@ public class ConstructorBlock extends CableBlock {
|
||||
|
||||
public ConstructorBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "constructor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -68,7 +68,6 @@ public class ControllerBlock extends BaseBlock {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.type = type;
|
||||
this.setRegistryName(RS.ID, type == NetworkType.CREATIVE ? "creative_controller" : "controller");
|
||||
this.setDefaultState(getStateContainer().getBaseState().with(ENERGY_TYPE, EnergyType.OFF));
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,6 @@ import javax.annotation.Nullable;
|
||||
public class CrafterBlock extends NetworkNodeBlock {
|
||||
public CrafterBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "crafter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -23,8 +23,6 @@ import javax.annotation.Nullable;
|
||||
public class CrafterManagerBlock extends NetworkNodeBlock {
|
||||
public CrafterManagerBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "crafter_manager");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -24,8 +24,6 @@ import javax.annotation.Nullable;
|
||||
public class CraftingMonitorBlock extends NetworkNodeBlock {
|
||||
public CraftingMonitorBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "crafting_monitor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -37,8 +37,6 @@ public class DestructorBlock extends CableBlock {
|
||||
|
||||
public DestructorBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "destructor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -35,7 +35,6 @@ public class DetectorBlock extends NetworkNodeBlock {
|
||||
public DetectorBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "detector");
|
||||
this.setDefaultState(this.getStateContainer().getBaseState().with(POWERED, false));
|
||||
}
|
||||
|
||||
|
@@ -24,8 +24,6 @@ import javax.annotation.Nullable;
|
||||
public class DiskDriveBlock extends NetworkNodeBlock {
|
||||
public DiskDriveBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "disk_drive");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -24,8 +24,6 @@ import javax.annotation.Nullable;
|
||||
public class DiskManipulatorBlock extends NetworkNodeBlock {
|
||||
public DiskManipulatorBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "disk_manipulator");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -60,8 +60,6 @@ public class ExporterBlock extends CableBlock {
|
||||
|
||||
public ExporterBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "exporter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -41,8 +41,6 @@ public class ExternalStorageBlock extends CableBlock {
|
||||
|
||||
public ExternalStorageBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "external_storage");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -25,8 +25,6 @@ import javax.annotation.Nullable;
|
||||
public class FluidInterfaceBlock extends NetworkNodeBlock {
|
||||
public FluidInterfaceBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "fluid_interface");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -31,8 +31,6 @@ public class FluidStorageBlock extends NetworkNodeBlock {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_fluid_storage_block");
|
||||
}
|
||||
|
||||
public FluidStorageType getType() {
|
||||
|
@@ -23,11 +23,10 @@ import javax.annotation.Nullable;
|
||||
public class GridBlock extends NetworkNodeBlock {
|
||||
private final GridType type;
|
||||
|
||||
public GridBlock(GridType type, ResourceLocation registryName) {
|
||||
public GridBlock(GridType type) {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.type = type;
|
||||
setRegistryName(registryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -60,8 +60,6 @@ public class ImporterBlock extends CableBlock {
|
||||
|
||||
public ImporterBlock() {
|
||||
super(BlockUtils.DEFAULT_GLASS_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "importer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -25,8 +25,6 @@ import javax.annotation.Nullable;
|
||||
public class InterfaceBlock extends NetworkNodeBlock {
|
||||
public InterfaceBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "interface");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -1,12 +1,9 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.util.BlockUtils;
|
||||
|
||||
public class MachineCasingBlock extends BaseBlock {
|
||||
public MachineCasingBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "machine_casing");
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.tile.NetworkReceiverTile;
|
||||
import com.refinedmods.refinedstorage.util.BlockUtils;
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -12,8 +11,6 @@ import javax.annotation.Nullable;
|
||||
public class NetworkReceiverBlock extends NetworkNodeBlock {
|
||||
public NetworkReceiverBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "network_receiver");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.container.NetworkTransmitterContainer;
|
||||
import com.refinedmods.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||
import com.refinedmods.refinedstorage.tile.NetworkTransmitterTile;
|
||||
@@ -24,8 +23,6 @@ import javax.annotation.Nullable;
|
||||
public class NetworkTransmitterBlock extends NetworkNodeBlock {
|
||||
public NetworkTransmitterBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "network_transmitter");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.apiimpl.API;
|
||||
import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.PortableGridBlockGridFactory;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem;
|
||||
@@ -40,7 +39,6 @@ public class PortableGridBlock extends BaseBlock {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.type = type;
|
||||
this.setRegistryName(RS.ID, (type == PortableGridBlockItem.Type.CREATIVE ? "creative_" : "") + "portable_grid");
|
||||
this.setDefaultState(getDefaultState().with(DISK_STATE, PortableGridDiskState.NONE).with(ACTIVE, false));
|
||||
}
|
||||
|
||||
|
@@ -1,12 +1,9 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.util.BlockUtils;
|
||||
|
||||
public class QuartzEnrichedIronBlock extends BaseBlock {
|
||||
public QuartzEnrichedIronBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "quartz_enriched_iron_block");
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.container.RelayContainer;
|
||||
import com.refinedmods.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||
import com.refinedmods.refinedstorage.tile.RelayTile;
|
||||
@@ -24,8 +23,6 @@ import javax.annotation.Nullable;
|
||||
public class RelayBlock extends NetworkNodeBlock {
|
||||
public RelayBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "relay");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.api.network.security.Permission;
|
||||
import com.refinedmods.refinedstorage.container.SecurityManagerContainer;
|
||||
import com.refinedmods.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||
@@ -25,8 +24,6 @@ import javax.annotation.Nullable;
|
||||
public class SecurityManagerBlock extends NetworkNodeBlock {
|
||||
public SecurityManagerBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "security_manager");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.apiimpl.network.node.storage.StorageNetworkNode;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType;
|
||||
import com.refinedmods.refinedstorage.container.StorageContainer;
|
||||
@@ -31,8 +30,6 @@ public class StorageBlock extends NetworkNodeBlock {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_storage_block");
|
||||
}
|
||||
|
||||
public ItemStorageType getType() {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.apiimpl.network.node.StorageMonitorNetworkNode;
|
||||
import com.refinedmods.refinedstorage.container.StorageMonitorContainer;
|
||||
import com.refinedmods.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||
@@ -28,8 +27,6 @@ import javax.annotation.Nullable;
|
||||
public class StorageMonitorBlock extends NetworkNodeBlock {
|
||||
public StorageMonitorBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "storage_monitor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.refinedmods.refinedstorage.block;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.container.WirelessTransmitterContainer;
|
||||
import com.refinedmods.refinedstorage.container.factory.PositionalTileContainerProvider;
|
||||
import com.refinedmods.refinedstorage.tile.WirelessTransmitterTile;
|
||||
@@ -34,8 +33,6 @@ public class WirelessTransmitterBlock extends NetworkNodeBlock {
|
||||
|
||||
public WirelessTransmitterBlock() {
|
||||
super(BlockUtils.DEFAULT_ROCK_PROPERTIES);
|
||||
|
||||
this.setRegistryName(RS.ID, "wireless_transmitter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -29,7 +29,7 @@ public class FilterItemHandler extends BaseItemHandler {
|
||||
this.filters = filters;
|
||||
this.tabs = tabs;
|
||||
|
||||
this.addValidator(new ItemValidator(RSItems.FILTER));
|
||||
this.addValidator(new ItemValidator(RSItems.FILTER.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +62,7 @@ public class FilterItemHandler extends BaseItemHandler {
|
||||
FilterItemsItemHandler items = new FilterItemsItemHandler(filter);
|
||||
|
||||
for (ItemStack stack : items.getFilteredItems()) {
|
||||
if (stack.getItem() == RSItems.FILTER) {
|
||||
if (stack.getItem() == RSItems.FILTER.get()) {
|
||||
addFilter(stack);
|
||||
} else if (!stack.isEmpty()) {
|
||||
filters.add(new ItemFilter(stack, compare, mode, modFilter));
|
||||
|
@@ -9,9 +9,7 @@ public class CoreItem extends Item {
|
||||
DESTRUCTION
|
||||
}
|
||||
|
||||
public CoreItem(Type type) {
|
||||
public CoreItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, type == Type.CONSTRUCTION ? "construction_core" : "destruction_core");
|
||||
}
|
||||
}
|
||||
|
@@ -42,8 +42,6 @@ public class FilterItem extends Item {
|
||||
|
||||
public FilterItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.setRegistryName(RS.ID, "filter");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,7 +50,7 @@ public class FilterItem extends Item {
|
||||
|
||||
if (!world.isRemote) {
|
||||
if (player.isCrouching()) {
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.FILTER));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.FILTER.get()));
|
||||
}
|
||||
|
||||
player.openContainer(new INamedContainerProvider() {
|
||||
|
@@ -38,8 +38,6 @@ public class FluidStorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_fluid_storage_disk");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,7 +95,7 @@ public class FluidStorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).remove(getId(diskStack));
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).markForSaving();
|
||||
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.STORAGE_HOUSING));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.STORAGE_HOUSING.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,24 +6,11 @@ import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class FluidStoragePartItem extends Item {
|
||||
public FluidStoragePartItem(FluidStorageType type) {
|
||||
public FluidStoragePartItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_fluid_storage_part");
|
||||
}
|
||||
|
||||
public static FluidStoragePartItem getByType(FluidStorageType type) {
|
||||
switch (type) {
|
||||
case SIXTY_FOUR_K:
|
||||
return RSItems.SIXTY_FOUR_K_FLUID_STORAGE_PART;
|
||||
case TWO_HUNDRED_FIFTY_SIX_K:
|
||||
return RSItems.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_PART;
|
||||
case THOUSAND_TWENTY_FOUR_K:
|
||||
return RSItems.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_PART;
|
||||
case FOUR_THOUSAND_NINETY_SIX_K:
|
||||
return RSItems.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_PART;
|
||||
default:
|
||||
throw new IllegalArgumentException("Cannot get fluid storage part of " + type);
|
||||
}
|
||||
return RSItems.FLUID_STORAGE_PARTS.get(type).get();
|
||||
}
|
||||
}
|
||||
|
@@ -29,15 +29,13 @@ public class NetworkCardItem extends Item {
|
||||
|
||||
public NetworkCardItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.setRegistryName(RS.ID, "network_card");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onItemUse(ItemUseContext ctx) {
|
||||
Block block = ctx.getWorld().getBlockState(ctx.getPos()).getBlock();
|
||||
|
||||
if (block == RSBlocks.NETWORK_RECEIVER) {
|
||||
if (block == RSBlocks.NETWORK_RECEIVER.get()) {
|
||||
CompoundNBT tag = new CompoundNBT();
|
||||
|
||||
tag.putInt(NBT_RECEIVER_X, ctx.getPos().getX());
|
||||
|
@@ -50,8 +50,6 @@ public class PatternItem extends Item implements ICraftingPatternProvider {
|
||||
|
||||
public PatternItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).setISTER(() -> PatternItemStackTileRenderer::new));
|
||||
|
||||
this.setRegistryName(RS.ID, "pattern");
|
||||
}
|
||||
|
||||
public static CraftingPattern fromCache(World world, ItemStack stack) {
|
||||
@@ -127,7 +125,7 @@ public class PatternItem extends Item implements ICraftingPatternProvider {
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, Hand hand) {
|
||||
if (!world.isRemote && player.isCrouching()) {
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.PATTERN, player.getHeldItem(hand).getCount()));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.PATTERN.get(), player.getHeldItem(hand).getCount()));
|
||||
}
|
||||
|
||||
return new ActionResult<>(ActionResultType.PASS, player.getHeldItem(hand));
|
||||
|
@@ -6,7 +6,5 @@ import net.minecraft.item.Item;
|
||||
public class ProcessorBindingItem extends Item {
|
||||
public ProcessorBindingItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, "processor_binding");
|
||||
}
|
||||
}
|
||||
|
@@ -17,11 +17,13 @@ public class ProcessorItem extends Item {
|
||||
Type(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
public ProcessorItem(Type type) {
|
||||
public ProcessorItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, type.name + "_processor");
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,5 @@ import net.minecraft.item.Item;
|
||||
public class QuartzEnrichedIronItem extends Item {
|
||||
public QuartzEnrichedIronItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, "quartz_enriched_iron");
|
||||
}
|
||||
}
|
||||
|
@@ -26,8 +26,6 @@ public class SecurityCardItem extends Item {
|
||||
|
||||
public SecurityCardItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.setRegistryName(RS.ID, "security_card");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -6,7 +6,5 @@ import net.minecraft.item.Item;
|
||||
public class SiliconItem extends Item {
|
||||
public SiliconItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, "silicon");
|
||||
}
|
||||
}
|
||||
|
@@ -38,8 +38,6 @@ public class StorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_storage_disk");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,7 +95,7 @@ public class StorageDiskItem extends Item implements IStorageDiskProvider {
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).remove(getId(diskStack));
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).markForSaving();
|
||||
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.STORAGE_HOUSING));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSItems.STORAGE_HOUSING.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,5 @@ import net.minecraft.item.Item;
|
||||
public class StorageHousingItem extends Item {
|
||||
public StorageHousingItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, "storage_housing");
|
||||
}
|
||||
}
|
||||
|
@@ -6,24 +6,11 @@ import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class StoragePartItem extends Item {
|
||||
public StoragePartItem(ItemStorageType type) {
|
||||
public StoragePartItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, type.getName() + "_storage_part");
|
||||
}
|
||||
|
||||
public static StoragePartItem getByType(ItemStorageType type) {
|
||||
switch (type) {
|
||||
case ONE_K:
|
||||
return RSItems.ONE_K_STORAGE_PART;
|
||||
case FOUR_K:
|
||||
return RSItems.FOUR_K_STORAGE_PART;
|
||||
case SIXTEEN_K:
|
||||
return RSItems.SIXTEEN_K_STORAGE_PART;
|
||||
case SIXTY_FOUR_K:
|
||||
return RSItems.SIXTY_FOUR_K_STORAGE_PART;
|
||||
default:
|
||||
throw new IllegalArgumentException("Cannot get storage part of " + type);
|
||||
}
|
||||
return RSItems.ITEM_STORAGE_PARTS.get(type).get();
|
||||
}
|
||||
}
|
||||
|
@@ -82,8 +82,6 @@ public class UpgradeItem extends Item {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, type == Type.NORMAL ? "upgrade" : type.getName() + "_upgrade");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -27,8 +27,6 @@ public class WirelessCraftingMonitorItem extends NetworkItem {
|
||||
public WirelessCraftingMonitorItem(Type type) {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity());
|
||||
|
||||
this.setRegistryName(RS.ID, (type == Type.CREATIVE ? "creative_" : "") + "wireless_crafting_monitor");
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
@@ -24,8 +24,6 @@ public class WirelessFluidGridItem extends NetworkItem {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity());
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, (type == Type.CREATIVE ? "creative_" : "") + "wireless_fluid_grid");
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
|
@@ -24,8 +24,6 @@ public class WirelessGridItem extends NetworkItem {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity());
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.setRegistryName(RS.ID, (type == Type.CREATIVE ? "creative_" : "") + "wireless_grid");
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
|
@@ -15,8 +15,6 @@ import net.minecraft.util.Rotation;
|
||||
public class WrenchItem extends Item {
|
||||
public WrenchItem() {
|
||||
super(new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1));
|
||||
|
||||
this.setRegistryName(RS.ID, "wrench");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -8,7 +8,5 @@ import net.minecraft.item.Item;
|
||||
public class ControllerBlockItem extends EnergyBlockItem {
|
||||
public ControllerBlockItem(ControllerBlock block) {
|
||||
super(block, new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity());
|
||||
|
||||
this.setRegistryName(block.getRegistryName());
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.storage.FluidStorageN
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType;
|
||||
import com.refinedmods.refinedstorage.block.FluidStorageBlock;
|
||||
import com.refinedmods.refinedstorage.item.FluidStoragePartItem;
|
||||
import com.refinedmods.refinedstorage.item.ProcessorItem;
|
||||
import com.refinedmods.refinedstorage.render.Styles;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
@@ -37,8 +38,6 @@ public class FluidStorageBlockItem extends BaseBlockItem {
|
||||
super(block, new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.type = block.getType();
|
||||
|
||||
this.setRegistryName(block.getRegistryName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,7 +85,7 @@ public class FluidStorageBlockItem extends BaseBlockItem {
|
||||
InventoryHelper.spawnItemStack(world, player.getPosX(), player.getPosY(), player.getPosZ(), fluidStoragePart);
|
||||
}
|
||||
|
||||
ItemStack processor = new ItemStack(RSItems.BASIC_PROCESSOR);
|
||||
ItemStack processor = new ItemStack(RSItems.PROCESSORS.get(ProcessorItem.Type.BASIC).get());
|
||||
|
||||
if (!player.inventory.addItemStackToInventory(processor.copy())) {
|
||||
InventoryHelper.spawnItemStack(world, player.getPosX(), player.getPosY(), player.getPosZ(), processor);
|
||||
@@ -103,7 +102,7 @@ public class FluidStorageBlockItem extends BaseBlockItem {
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).markForSaving();
|
||||
}
|
||||
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSBlocks.MACHINE_CASING));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSBlocks.MACHINE_CASING.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -32,14 +32,13 @@ public class PortableGridBlockItem extends EnergyBlockItem {
|
||||
|
||||
public PortableGridBlockItem(Type type) {
|
||||
super(
|
||||
type == Type.CREATIVE ? RSBlocks.CREATIVE_PORTABLE_GRID : RSBlocks.PORTABLE_GRID,
|
||||
type == Type.CREATIVE ? RSBlocks.CREATIVE_PORTABLE_GRID.get() : RSBlocks.PORTABLE_GRID.get(),
|
||||
new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1),
|
||||
type == Type.CREATIVE,
|
||||
() -> RS.SERVER_CONFIG.getPortableGrid().getCapacity()
|
||||
);
|
||||
|
||||
this.type = type;
|
||||
this.setRegistryName(RS.ID, (type == Type.CREATIVE ? "creative_" : "") + "portable_grid");
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
|
@@ -35,8 +35,6 @@ public class StorageBlockItem extends BaseBlockItem {
|
||||
super(block, new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.type = block.getType();
|
||||
|
||||
this.setRegistryName(block.getRegistryName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +87,7 @@ public class StorageBlockItem extends BaseBlockItem {
|
||||
API.instance().getStorageDiskManager((ServerWorld) world).markForSaving();
|
||||
}
|
||||
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSBlocks.MACHINE_CASING));
|
||||
return new ActionResult<>(ActionResultType.SUCCESS, new ItemStack(RSBlocks.MACHINE_CASING.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,29 +0,0 @@
|
||||
package com.refinedmods.refinedstorage.item.blockitem;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.RSBlocks;
|
||||
import com.refinedmods.refinedstorage.render.Styles;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class WirelessTransmitterBlockItem extends BaseBlockItem {
|
||||
public WirelessTransmitterBlockItem() {
|
||||
super(RSBlocks.WIRELESS_TRANSMITTER, new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
this.setRegistryName(RS.ID, "wireless_transmitter");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, @Nullable World world, List<ITextComponent> tooltip, ITooltipFlag flag) {
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
|
||||
tooltip.add(new TranslationTextComponent("block.refinedstorage.wireless_transmitter.tooltip", new TranslationTextComponent("block.refinedstorage.cable")).setStyle(Styles.GRAY));
|
||||
}
|
||||
}
|
@@ -12,6 +12,6 @@ public class MainItemGroup extends ItemGroup {
|
||||
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(RSBlocks.CREATIVE_CONTROLLER);
|
||||
return new ItemStack(RSBlocks.CREATIVE_CONTROLLER.get());
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.refinedmods.refinedstorage.recipe;
|
||||
|
||||
import com.refinedmods.refinedstorage.RSItems;
|
||||
import com.refinedmods.refinedstorage.item.UpgradeItem;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentData;
|
||||
@@ -22,15 +23,15 @@ public class UpgradeWithEnchantedBookRecipe extends ShapedRecipe {
|
||||
|
||||
public UpgradeWithEnchantedBookRecipe(ResourceLocation recipeId, Enchantment enchantment, int enchantmentLevel, ItemStack result) {
|
||||
super(recipeId, "", 3, 3, NonNullList.from(Ingredient.EMPTY,
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())),
|
||||
Ingredient.fromStacks(EnchantedBookItem.getEnchantedItemStack(new EnchantmentData(enchantment, enchantmentLevel))),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.BOOKSHELF)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.UPGRADE)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.UPGRADE_ITEMS.get(UpgradeItem.Type.NORMAL).get())),
|
||||
Ingredient.fromStacks(new ItemStack(Blocks.BOOKSHELF)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON)),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON))
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())),
|
||||
Ingredient.fromStacks(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get()))
|
||||
), result);
|
||||
|
||||
this.enchant = new EnchantmentData(enchantment, enchantmentLevel);
|
||||
|
@@ -76,7 +76,7 @@ public class DiskDriveBakedModel extends DelegateBakedModel {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<BakedQuad> load(CacheKey key) {
|
||||
Direction facing = key.state.get(RSBlocks.DISK_DRIVE.getDirection().getProperty());
|
||||
Direction facing = key.state.get(RSBlocks.DISK_DRIVE.get().getDirection().getProperty());
|
||||
|
||||
List<BakedQuad> quads = new ArrayList<>(QuadTransformer.getTransformedQuads(base, facing, null, key.state, key.random, key.side));
|
||||
|
||||
|
@@ -78,7 +78,7 @@ public class DiskManipulatorBakedModel extends DelegateBakedModel {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<BakedQuad> load(CacheKey key) {
|
||||
Direction facing = key.state.get(RSBlocks.DISK_MANIPULATOR.getDirection().getProperty());
|
||||
Direction facing = key.state.get(RSBlocks.DISK_MANIPULATOR.get().getDirection().getProperty());
|
||||
boolean connected = key.state.get(DiskManipulatorBlock.CONNECTED);
|
||||
|
||||
List<BakedQuad> quads = new ArrayList<>(QuadTransformer.getTransformedQuads(
|
||||
|
@@ -37,7 +37,7 @@ public class PortableGridBakedModel extends DelegateBakedModel {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<BakedQuad> load(@Nonnull CacheKey key) {
|
||||
Direction direction = key.state.get(RSBlocks.PORTABLE_GRID.getDirection().getProperty());
|
||||
Direction direction = key.state.get(RSBlocks.PORTABLE_GRID.get().getDirection().getProperty());
|
||||
boolean active = key.state.get(PortableGridBlock.ACTIVE);
|
||||
PortableGridDiskState diskState = key.state.get(PortableGridBlock.DISK_STATE);
|
||||
|
||||
|
@@ -38,7 +38,7 @@ public class StorageMonitorTileRenderer extends TileEntityRenderer<StorageMonito
|
||||
|
||||
BlockState state = tile.getWorld().getBlockState(tile.getPos());
|
||||
if (state.getBlock() instanceof StorageMonitorBlock) {
|
||||
direction = state.get(RSBlocks.STORAGE_MONITOR.getDirection().getProperty());
|
||||
direction = state.get(RSBlocks.STORAGE_MONITOR.get().getDirection().getProperty());
|
||||
}
|
||||
|
||||
final int light = WorldRenderer.getCombinedLight(tile.getWorld(), tile.getPos().add(direction.getDirectionVec()));
|
||||
|
@@ -27,13 +27,13 @@ public class KeyInputListener {
|
||||
PlayerInventory inv = Minecraft.getInstance().player.inventory;
|
||||
|
||||
if (RSKeyBindings.OPEN_WIRELESS_GRID.isKeyDown()) {
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_GRID, RSItems.CREATIVE_WIRELESS_GRID);
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_GRID.get(), RSItems.CREATIVE_WIRELESS_GRID.get());
|
||||
} else if (RSKeyBindings.OPEN_WIRELESS_FLUID_GRID.isKeyDown()) {
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_FLUID_GRID, RSItems.CREATIVE_WIRELESS_FLUID_GRID);
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_FLUID_GRID.get(), RSItems.CREATIVE_WIRELESS_FLUID_GRID.get());
|
||||
} else if (RSKeyBindings.OPEN_PORTABLE_GRID.isKeyDown()) {
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.PORTABLE_GRID, RSItems.CREATIVE_PORTABLE_GRID);
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.PORTABLE_GRID.get(), RSItems.CREATIVE_PORTABLE_GRID.get());
|
||||
} else if (RSKeyBindings.OPEN_WIRELESS_CRAFTING_MONITOR.isKeyDown()) {
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_CRAFTING_MONITOR, RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR);
|
||||
findAndOpen(inv, (error) -> Minecraft.getInstance().player.sendMessage(error, Util.DUMMY_UUID), RSItems.WIRELESS_CRAFTING_MONITOR.get(), RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -146,6 +146,7 @@ public class ClientSetup {
|
||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/disk_manipulator_disconnected"));
|
||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/disk_manipulator_connected"));
|
||||
|
||||
|
||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/portable_grid_connected"));
|
||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/portable_grid_disconnected"));
|
||||
ModelLoader.addSpecialModel(new ResourceLocation(RS.ID + ":block/disks/portable_grid_disk"));
|
||||
@@ -223,46 +224,46 @@ public class ClientSetup {
|
||||
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_CRAFTING_MONITOR);
|
||||
ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_PORTABLE_GRID);
|
||||
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CONTROLLER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CREATIVE_CONTROLLER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CABLE, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTER_MANAGER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTING_MONITOR, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DETECTOR, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DISK_MANIPULATOR, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.GRID, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTING_GRID, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.PATTERN_GRID, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.FLUID_GRID, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.NETWORK_RECEIVER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.NETWORK_TRANSMITTER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.RELAY, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.SECURITY_MANAGER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.WIRELESS_TRANSMITTER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.IMPORTER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.EXPORTER, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.EXTERNAL_STORAGE, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CONSTRUCTOR, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DESTRUCTOR, RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CONTROLLER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CREATIVE_CONTROLLER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CABLE.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTER_MANAGER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTING_MONITOR.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DETECTOR.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DISK_MANIPULATOR.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.GRID.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CRAFTING_GRID.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.PATTERN_GRID.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.FLUID_GRID.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.NETWORK_RECEIVER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.NETWORK_TRANSMITTER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.RELAY.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.SECURITY_MANAGER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.WIRELESS_TRANSMITTER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.IMPORTER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.EXPORTER.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.EXTERNAL_STORAGE.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.CONSTRUCTOR.get(), RenderType.getCutout());
|
||||
RenderTypeLookup.setRenderLayer(RSBlocks.DESTRUCTOR.get(), RenderType.getCutout());
|
||||
|
||||
ClientRegistry.bindTileEntityRenderer(RSTiles.STORAGE_MONITOR, StorageMonitorTileRenderer::new);
|
||||
|
||||
e.getMinecraftSupplier().get().getItemColors().register(new PatternItemColor(), RSItems.PATTERN);
|
||||
e.getMinecraftSupplier().get().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get());
|
||||
|
||||
ItemModelsProperties.func_239418_a_(RSItems.SECURITY_CARD, new ResourceLocation("active"), new SecurityCardItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter());
|
||||
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CONTROLLER, new ResourceLocation("energy_type"), new ControllerItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_CONTROLLER, new ResourceLocation("energy_type"), new ControllerItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CONTROLLER.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_CONTROLLER.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter());
|
||||
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_CRAFTING_MONITOR, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_CRAFTING_MONITOR.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_GRID, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_GRID, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_GRID.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_GRID.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_FLUID_GRID, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_FLUID_GRID, new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_FLUID_GRID.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), new ResourceLocation("connected"), new NetworkItemPropertyGetter());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@@ -29,7 +29,7 @@ import com.refinedmods.refinedstorage.apiimpl.storage.disk.factory.FluidStorageD
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.disk.factory.ItemStorageDiskFactory;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.FluidExternalStorageProvider;
|
||||
import com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.ItemExternalStorageProvider;
|
||||
import com.refinedmods.refinedstorage.block.*;
|
||||
import com.refinedmods.refinedstorage.block.BlockListener;
|
||||
import com.refinedmods.refinedstorage.capability.NetworkNodeProxyCapability;
|
||||
import com.refinedmods.refinedstorage.container.*;
|
||||
import com.refinedmods.refinedstorage.container.factory.*;
|
||||
@@ -44,14 +44,12 @@ import com.refinedmods.refinedstorage.tile.data.TileDataManager;
|
||||
import com.refinedmods.refinedstorage.tile.grid.GridTile;
|
||||
import com.refinedmods.refinedstorage.tile.grid.portable.PortableGridTile;
|
||||
import com.refinedmods.refinedstorage.util.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.container.ContainerType;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.extensions.IForgeContainerType;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
@@ -151,93 +149,50 @@ public class CommonSetup {
|
||||
e.getRegistry().register(new UpgradeWithEnchantedBookRecipeSerializer().setRegistryName(RS.ID, "upgrade_with_enchanted_book"));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRegisterBlocks(RegistryEvent.Register<Block> e) {
|
||||
e.getRegistry().register(new QuartzEnrichedIronBlock());
|
||||
e.getRegistry().register(new ControllerBlock(NetworkType.NORMAL));
|
||||
e.getRegistry().register(new ControllerBlock(NetworkType.CREATIVE));
|
||||
e.getRegistry().register(new MachineCasingBlock());
|
||||
e.getRegistry().register(new CableBlock());
|
||||
e.getRegistry().register(new DiskDriveBlock());
|
||||
e.getRegistry().register(new GridBlock(GridType.NORMAL, new ResourceLocation(RS.ID, "grid")));
|
||||
e.getRegistry().register(new GridBlock(GridType.CRAFTING, new ResourceLocation(RS.ID, GridType.CRAFTING.getString() + "_grid")));
|
||||
e.getRegistry().register(new GridBlock(GridType.PATTERN, new ResourceLocation(RS.ID, GridType.PATTERN.getString() + "_grid")));
|
||||
e.getRegistry().register(new GridBlock(GridType.FLUID, new ResourceLocation(RS.ID, GridType.FLUID.getString() + "_grid")));
|
||||
|
||||
for (ItemStorageType type : ItemStorageType.values()) {
|
||||
e.getRegistry().register(new StorageBlock(type));
|
||||
}
|
||||
|
||||
for (FluidStorageType type : FluidStorageType.values()) {
|
||||
e.getRegistry().register(new FluidStorageBlock(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new ExternalStorageBlock());
|
||||
e.getRegistry().register(new ImporterBlock());
|
||||
e.getRegistry().register(new ExporterBlock());
|
||||
e.getRegistry().register(new NetworkReceiverBlock());
|
||||
e.getRegistry().register(new NetworkTransmitterBlock());
|
||||
e.getRegistry().register(new RelayBlock());
|
||||
e.getRegistry().register(new DetectorBlock());
|
||||
e.getRegistry().register(new SecurityManagerBlock());
|
||||
e.getRegistry().register(new InterfaceBlock());
|
||||
e.getRegistry().register(new FluidInterfaceBlock());
|
||||
e.getRegistry().register(new WirelessTransmitterBlock());
|
||||
e.getRegistry().register(new StorageMonitorBlock());
|
||||
e.getRegistry().register(new ConstructorBlock());
|
||||
e.getRegistry().register(new DestructorBlock());
|
||||
e.getRegistry().register(new DiskManipulatorBlock());
|
||||
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.NORMAL));
|
||||
e.getRegistry().register(new PortableGridBlock(PortableGridBlockItem.Type.CREATIVE));
|
||||
e.getRegistry().register(new CrafterBlock());
|
||||
e.getRegistry().register(new CrafterManagerBlock());
|
||||
e.getRegistry().register(new CraftingMonitorBlock());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRegisterTiles(RegistryEvent.Register<TileEntityType<?>> e) {
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new ControllerTile(NetworkType.NORMAL), RSBlocks.CONTROLLER).build(null).setRegistryName(RS.ID, "controller")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new ControllerTile(NetworkType.CREATIVE), RSBlocks.CREATIVE_CONTROLLER).build(null).setRegistryName(RS.ID, "creative_controller")));
|
||||
e.getRegistry().register(TileEntityType.Builder.create(CableTile::new, RSBlocks.CABLE).build(null).setRegistryName(RS.ID, "cable"));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskDriveTile::new, RSBlocks.DISK_DRIVE).build(null).setRegistryName(RS.ID, "disk_drive")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.NORMAL), RSBlocks.GRID).build(null).setRegistryName(RS.ID, "grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.CRAFTING), RSBlocks.CRAFTING_GRID).build(null).setRegistryName(RS.ID, "crafting_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.PATTERN), RSBlocks.PATTERN_GRID).build(null).setRegistryName(RS.ID, "pattern_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.FLUID), RSBlocks.FLUID_GRID).build(null).setRegistryName(RS.ID, "fluid_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new ControllerTile(NetworkType.NORMAL), RSBlocks.CONTROLLER.get()).build(null).setRegistryName(RS.ID, "controller")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new ControllerTile(NetworkType.CREATIVE), RSBlocks.CREATIVE_CONTROLLER.get()).build(null).setRegistryName(RS.ID, "creative_controller")));
|
||||
e.getRegistry().register(TileEntityType.Builder.create(CableTile::new, RSBlocks.CABLE.get()).build(null).setRegistryName(RS.ID, "cable"));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskDriveTile::new, RSBlocks.DISK_DRIVE.get()).build(null).setRegistryName(RS.ID, "disk_drive")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.NORMAL), RSBlocks.GRID.get()).build(null).setRegistryName(RS.ID, "grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.CRAFTING), RSBlocks.CRAFTING_GRID.get()).build(null).setRegistryName(RS.ID, "crafting_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.PATTERN), RSBlocks.PATTERN_GRID.get()).build(null).setRegistryName(RS.ID, "pattern_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new GridTile(GridType.FLUID), RSBlocks.FLUID_GRID.get()).build(null).setRegistryName(RS.ID, "fluid_grid")));
|
||||
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.ONE_K), RSBlocks.ONE_K_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "1k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.FOUR_K), RSBlocks.FOUR_K_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "4k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.SIXTEEN_K), RSBlocks.SIXTEEN_K_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "16k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.SIXTY_FOUR_K), RSBlocks.SIXTY_FOUR_K_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "64k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.CREATIVE), RSBlocks.CREATIVE_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "creative_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.ONE_K), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.ONE_K).get()).build(null).setRegistryName(RS.ID, "1k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.FOUR_K), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.FOUR_K).get()).build(null).setRegistryName(RS.ID, "4k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.SIXTEEN_K), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.SIXTEEN_K).get()).build(null).setRegistryName(RS.ID, "16k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.SIXTY_FOUR_K), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.SIXTY_FOUR_K).get()).build(null).setRegistryName(RS.ID, "64k_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new StorageTile(ItemStorageType.CREATIVE), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.CREATIVE).get()).build(null).setRegistryName(RS.ID, "creative_storage_block")));
|
||||
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.SIXTY_FOUR_K), RSBlocks.SIXTY_FOUR_K_FLUID_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "64k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K), RSBlocks.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "256k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.THOUSAND_TWENTY_FOUR_K), RSBlocks.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "1024k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K), RSBlocks.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "4096k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.CREATIVE), RSBlocks.CREATIVE_FLUID_STORAGE_BLOCK).build(null).setRegistryName(RS.ID, "creative_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.SIXTY_FOUR_K), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.SIXTY_FOUR_K).get()).build(null).setRegistryName(RS.ID, "64k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K).get()).build(null).setRegistryName(RS.ID, "256k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.THOUSAND_TWENTY_FOUR_K), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.THOUSAND_TWENTY_FOUR_K).get()).build(null).setRegistryName(RS.ID, "1024k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K).get()).build(null).setRegistryName(RS.ID, "4096k_fluid_storage_block")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new FluidStorageTile(FluidStorageType.CREATIVE), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.CREATIVE).get()).build(null).setRegistryName(RS.ID, "creative_fluid_storage_block")));
|
||||
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ExternalStorageTile::new, RSBlocks.EXTERNAL_STORAGE).build(null).setRegistryName(RS.ID, "external_storage")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ImporterTile::new, RSBlocks.IMPORTER).build(null).setRegistryName(RS.ID, "importer")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ExporterTile::new, RSBlocks.EXPORTER).build(null).setRegistryName(RS.ID, "exporter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(NetworkReceiverTile::new, RSBlocks.NETWORK_RECEIVER).build(null).setRegistryName(RS.ID, "network_receiver")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(NetworkTransmitterTile::new, RSBlocks.NETWORK_TRANSMITTER).build(null).setRegistryName(RS.ID, "network_transmitter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(RelayTile::new, RSBlocks.RELAY).build(null).setRegistryName(RS.ID, "relay")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DetectorTile::new, RSBlocks.DETECTOR).build(null).setRegistryName(RS.ID, "detector")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(SecurityManagerTile::new, RSBlocks.SECURITY_MANAGER).build(null).setRegistryName(RS.ID, "security_manager")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(InterfaceTile::new, RSBlocks.INTERFACE).build(null).setRegistryName(RS.ID, "interface")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(FluidInterfaceTile::new, RSBlocks.FLUID_INTERFACE).build(null).setRegistryName(RS.ID, "fluid_interface")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(WirelessTransmitterTile::new, RSBlocks.WIRELESS_TRANSMITTER).build(null).setRegistryName(RS.ID, "wireless_transmitter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(StorageMonitorTile::new, RSBlocks.STORAGE_MONITOR).build(null).setRegistryName(RS.ID, "storage_monitor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ConstructorTile::new, RSBlocks.CONSTRUCTOR).build(null).setRegistryName(RS.ID, "constructor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DestructorTile::new, RSBlocks.DESTRUCTOR).build(null).setRegistryName(RS.ID, "destructor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskManipulatorTile::new, RSBlocks.DISK_MANIPULATOR).build(null).setRegistryName(RS.ID, "disk_manipulator")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterTile::new, RSBlocks.CRAFTER).build(null).setRegistryName(RS.ID, "crafter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterManagerTile::new, RSBlocks.CRAFTER_MANAGER).build(null).setRegistryName(RS.ID, "crafter_manager")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CraftingMonitorTile::new, RSBlocks.CRAFTING_MONITOR).build(null).setRegistryName(RS.ID, "crafting_monitor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ExternalStorageTile::new, RSBlocks.EXTERNAL_STORAGE.get()).build(null).setRegistryName(RS.ID, "external_storage")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ImporterTile::new, RSBlocks.IMPORTER.get()).build(null).setRegistryName(RS.ID, "importer")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ExporterTile::new, RSBlocks.EXPORTER.get()).build(null).setRegistryName(RS.ID, "exporter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(NetworkReceiverTile::new, RSBlocks.NETWORK_RECEIVER.get()).build(null).setRegistryName(RS.ID, "network_receiver")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(NetworkTransmitterTile::new, RSBlocks.NETWORK_TRANSMITTER.get()).build(null).setRegistryName(RS.ID, "network_transmitter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(RelayTile::new, RSBlocks.RELAY.get()).build(null).setRegistryName(RS.ID, "relay")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DetectorTile::new, RSBlocks.DETECTOR.get()).build(null).setRegistryName(RS.ID, "detector")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(SecurityManagerTile::new, RSBlocks.SECURITY_MANAGER.get()).build(null).setRegistryName(RS.ID, "security_manager")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(InterfaceTile::new, RSBlocks.INTERFACE.get()).build(null).setRegistryName(RS.ID, "interface")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(FluidInterfaceTile::new, RSBlocks.FLUID_INTERFACE.get()).build(null).setRegistryName(RS.ID, "fluid_interface")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(WirelessTransmitterTile::new, RSBlocks.WIRELESS_TRANSMITTER.get()).build(null).setRegistryName(RS.ID, "wireless_transmitter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(StorageMonitorTile::new, RSBlocks.STORAGE_MONITOR.get()).build(null).setRegistryName(RS.ID, "storage_monitor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(ConstructorTile::new, RSBlocks.CONSTRUCTOR.get()).build(null).setRegistryName(RS.ID, "constructor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DestructorTile::new, RSBlocks.DESTRUCTOR.get()).build(null).setRegistryName(RS.ID, "destructor")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(DiskManipulatorTile::new, RSBlocks.DISK_MANIPULATOR.get()).build(null).setRegistryName(RS.ID, "disk_manipulator")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterTile::new, RSBlocks.CRAFTER.get()).build(null).setRegistryName(RS.ID, "crafter")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CrafterManagerTile::new, RSBlocks.CRAFTER_MANAGER.get()).build(null).setRegistryName(RS.ID, "crafter_manager")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(CraftingMonitorTile::new, RSBlocks.CRAFTING_MONITOR.get()).build(null).setRegistryName(RS.ID, "crafting_monitor")));
|
||||
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.CREATIVE), RSBlocks.CREATIVE_PORTABLE_GRID).build(null).setRegistryName(RS.ID, "creative_portable_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.NORMAL), RSBlocks.PORTABLE_GRID).build(null).setRegistryName(RS.ID, "portable_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.CREATIVE), RSBlocks.CREATIVE_PORTABLE_GRID.get()).build(null).setRegistryName(RS.ID, "creative_portable_grid")));
|
||||
e.getRegistry().register(registerTileDataParameters(TileEntityType.Builder.create(() -> new PortableGridTile(PortableGridBlockItem.Type.NORMAL), RSBlocks.PORTABLE_GRID.get()).build(null).setRegistryName(RS.ID, "portable_grid")));
|
||||
}
|
||||
|
||||
private <T extends TileEntity> TileEntityType<T> registerTileDataParameters(TileEntityType<T> t) {
|
||||
@@ -275,98 +230,4 @@ public class CommonSetup {
|
||||
e.getRegistry().register(IForgeContainerType.create(new CraftingMonitorContainerFactory()).setRegistryName(RS.ID, "crafting_monitor"));
|
||||
e.getRegistry().register(IForgeContainerType.create(new WirelessCraftingMonitorContainerFactory()).setRegistryName(RS.ID, "wireless_crafting_monitor"));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRegisterItems(RegistryEvent.Register<Item> e) {
|
||||
e.getRegistry().register(new CoreItem(CoreItem.Type.CONSTRUCTION));
|
||||
e.getRegistry().register(new CoreItem(CoreItem.Type.DESTRUCTION));
|
||||
e.getRegistry().register(new QuartzEnrichedIronItem());
|
||||
e.getRegistry().register(new ProcessorBindingItem());
|
||||
|
||||
for (ProcessorItem.Type type : ProcessorItem.Type.values()) {
|
||||
e.getRegistry().register(new ProcessorItem(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new SiliconItem());
|
||||
|
||||
e.getRegistry().register(new SecurityCardItem());
|
||||
e.getRegistry().register(new NetworkCardItem());
|
||||
|
||||
for (ItemStorageType type : ItemStorageType.values()) {
|
||||
if (type != ItemStorageType.CREATIVE) {
|
||||
e.getRegistry().register(new StoragePartItem(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new StorageDiskItem(type));
|
||||
}
|
||||
|
||||
for (FluidStorageType type : FluidStorageType.values()) {
|
||||
if (type != FluidStorageType.CREATIVE) {
|
||||
e.getRegistry().register(new FluidStoragePartItem(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new FluidStorageDiskItem(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new StorageHousingItem());
|
||||
|
||||
for (UpgradeItem.Type type : UpgradeItem.Type.values()) {
|
||||
e.getRegistry().register(new UpgradeItem(type));
|
||||
}
|
||||
|
||||
e.getRegistry().register(new WrenchItem());
|
||||
e.getRegistry().register(new PatternItem());
|
||||
e.getRegistry().register(new FilterItem());
|
||||
e.getRegistry().register(new PortableGridBlockItem(PortableGridBlockItem.Type.NORMAL));
|
||||
e.getRegistry().register(new PortableGridBlockItem(PortableGridBlockItem.Type.CREATIVE));
|
||||
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.QUARTZ_ENRICHED_IRON));
|
||||
e.getRegistry().register(new ControllerBlockItem(RSBlocks.CONTROLLER));
|
||||
e.getRegistry().register(new ControllerBlockItem(RSBlocks.CREATIVE_CONTROLLER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.MACHINE_CASING));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CABLE));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DISK_DRIVE));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.GRID));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTING_GRID));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.PATTERN_GRID));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.FLUID_GRID));
|
||||
|
||||
e.getRegistry().register(new StorageBlockItem(RSBlocks.ONE_K_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new StorageBlockItem(RSBlocks.FOUR_K_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new StorageBlockItem(RSBlocks.SIXTEEN_K_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new StorageBlockItem(RSBlocks.SIXTY_FOUR_K_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new StorageBlockItem(RSBlocks.CREATIVE_STORAGE_BLOCK));
|
||||
|
||||
e.getRegistry().register(new FluidStorageBlockItem(RSBlocks.SIXTY_FOUR_K_FLUID_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new FluidStorageBlockItem(RSBlocks.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new FluidStorageBlockItem(RSBlocks.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new FluidStorageBlockItem(RSBlocks.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK));
|
||||
e.getRegistry().register(new FluidStorageBlockItem(RSBlocks.CREATIVE_FLUID_STORAGE_BLOCK));
|
||||
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.EXTERNAL_STORAGE));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.IMPORTER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.EXPORTER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.NETWORK_RECEIVER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.NETWORK_TRANSMITTER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.RELAY));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DETECTOR));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.SECURITY_MANAGER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.INTERFACE));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.FLUID_INTERFACE));
|
||||
e.getRegistry().register(new WirelessTransmitterBlockItem());
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.STORAGE_MONITOR));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CONSTRUCTOR));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DESTRUCTOR));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.DISK_MANIPULATOR));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTER_MANAGER));
|
||||
e.getRegistry().register(BlockUtils.createBlockItemFor(RSBlocks.CRAFTING_MONITOR));
|
||||
|
||||
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.NORMAL));
|
||||
e.getRegistry().register(new WirelessGridItem(WirelessGridItem.Type.CREATIVE));
|
||||
e.getRegistry().register(new WirelessFluidGridItem(WirelessFluidGridItem.Type.NORMAL));
|
||||
e.getRegistry().register(new WirelessFluidGridItem(WirelessFluidGridItem.Type.CREATIVE));
|
||||
e.getRegistry().register(new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.NORMAL));
|
||||
e.getRegistry().register(new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.CREATIVE));
|
||||
}
|
||||
}
|
||||
|
@@ -1,23 +1,10 @@
|
||||
package com.refinedmods.refinedstorage.util;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.block.BaseBlock;
|
||||
import com.refinedmods.refinedstorage.item.blockitem.BaseBlockItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BlockUtils {
|
||||
public static final Block.Properties DEFAULT_ROCK_PROPERTIES = Block.Properties.create(Material.ROCK).hardnessAndResistance(1.9F).sound(SoundType.STONE);
|
||||
public static final Block.Properties DEFAULT_GLASS_PROPERTIES = Block.Properties.create(Material.GLASS).sound(SoundType.GLASS).hardnessAndResistance(0.35F);
|
||||
|
||||
public static BlockItem createBlockItemFor(BaseBlock block) {
|
||||
BaseBlockItem blockItem = new BaseBlockItem(block, new Item.Properties().group(RS.MAIN_GROUP));
|
||||
|
||||
blockItem.setRegistryName(block.getRegistryName());
|
||||
|
||||
return blockItem;
|
||||
}
|
||||
}
|
||||
|
@@ -236,7 +236,6 @@
|
||||
"block.refinedstorage.interface": "Interface",
|
||||
"block.refinedstorage.crafting_monitor": "Crafting Monitor",
|
||||
"block.refinedstorage.wireless_transmitter": "Wireless Transmitter",
|
||||
"block.refinedstorage.wireless_transmitter.tooltip": "Must be placed on %s.",
|
||||
"block.refinedstorage.crafter": "Crafter",
|
||||
"block.refinedstorage.network_receiver": "Network Receiver",
|
||||
"block.refinedstorage.network_transmitter": "Network Transmitter",
|
||||
|
Reference in New Issue
Block a user