Search in sources :

Example 1 with ItemMultiTool

use of com.cjm721.overloaded.item.functional.ItemMultiTool in project Overloaded by CJ-MC-Mods.

the class ModItems method init.

public static void init() {
    linkingCard = registerItem(new ItemLinkingCard());
    multiTool = registerItem(new ItemMultiTool());
    energyCore = registerItem(new ItemEnergyCore());
    itemCore = registerItem(new ItemItemCore());
    fluidCore = registerItem(new ItemFluidCore());
    customHelmet = registerItem(new ItemMultiHelmet());
    customChestplate = registerItem(new ItemMultiChestplate());
    customLeggins = registerItem(new ItemMultiLeggings());
    customBoots = registerItem(new ItemMultiBoots());
    settingsEditor = registerItem(new ItemSettingEditor());
    rayGun = registerItem(new ItemRayGun());
    railgun = registerItem(new ItemRailGun());
    if (OverloadedConfig.INSTANCE.developmentConfig.wipStuff) {
        // amountSelector = registerItem(new ItemAmountSelector());
        for (int i = 0; i < 10; i++) {
            registerItem(new InDevItem("in_dev_item_" + i));
        }
    }
}
Also used : InDevItem(com.cjm721.overloaded.item.basic.InDevItem) ItemMultiHelmet(com.cjm721.overloaded.item.functional.armor.ItemMultiHelmet) ItemEnergyCore(com.cjm721.overloaded.item.crafting.ItemEnergyCore) ItemMultiChestplate(com.cjm721.overloaded.item.functional.armor.ItemMultiChestplate) ItemItemCore(com.cjm721.overloaded.item.crafting.ItemItemCore) ItemFluidCore(com.cjm721.overloaded.item.crafting.ItemFluidCore) ItemMultiLeggings(com.cjm721.overloaded.item.functional.armor.ItemMultiLeggings) ItemMultiBoots(com.cjm721.overloaded.item.functional.armor.ItemMultiBoots)

Example 2 with ItemMultiTool

use of com.cjm721.overloaded.item.functional.ItemMultiTool in project Overloaded by CJ-MC-Mods.

the class CommonProxy method commonSetup.

public void commonSetup(FMLCommonSetupEvent event) {
    CapabilityHyperItem.register();
    CapabilityHyperEnergy.register();
    CapabilityHyperFluid.register();
    CapabilityGenericDataStorage.register();
    networkWrapper = newSimpleChannel(ResourceLocation.of("overloaded_network", '_'), () -> "1.0", v -> true, v -> true);
    int dis = 0;
    networkWrapper.registerMessage(dis++, LeftClickBlockMessage.class, LeftClickBlockMessage::toBytes, LeftClickBlockMessage::fromBytes, new PlayerMessageHandler<>(ItemMultiTool::leftClickOnBlockServer));
    networkWrapper.registerMessage(dis++, RightClickBlockMessage.class, RightClickBlockMessage::toBytes, RightClickBlockMessage::fromBytes, new PlayerMessageHandler<>(ModItems.multiTool::rightClickWithItem));
    networkWrapper.registerMessage(dis++, RayGunMessage.class, RayGunMessage::toBytes, RayGunMessage::fromBytes, new PlayerMessageHandler<>(ModItems.rayGun::handleMessage));
    networkWrapper.registerMessage(dis++, MultiArmorSettingsMessage.class, MultiArmorSettingsMessage::toBytes, MultiArmorSettingsMessage::fromBytes, new PlayerMessageHandler<>(ModItems.customHelmet::updateSettings));
    networkWrapper.registerMessage(dis++, RailGunFireMessage.class, RailGunFireMessage::toBytes, RailGunFireMessage::fromBytes, new PlayerMessageHandler<>(ModItems.railgun::handleFireMessage));
    networkWrapper.registerMessage(dis++, RailGunSettingsMessage.class, RailGunSettingsMessage::toBytes, RailGunSettingsMessage::fromBytes, new PlayerMessageHandler<>(ModItems.railgun::handleSettingsMessage));
    networkWrapper.registerMessage(dis++, KeyBindPressedMessage.class, KeyBindPressedMessage::toBytes, KeyBindPressedMessage::fromBytes, new KeyBindPressedHandler());
    networkWrapper.registerMessage(dis++, NoClipStatusMessage.class, NoClipStatusMessage::toBytes, NoClipStatusMessage::fromBytes, new NoClipUpdateHandler());
    networkWrapper.registerMessage(dis++, ContainerDataMessage.class, ContainerDataMessage::toBytes, ContainerDataMessage::fromBytes, new ContainerDataHandler());
    MinecraftForge.EVENT_BUS.register(new ArmorEventHandler());
}
Also used : Item(net.minecraft.item.Item) NoClipUpdateHandler(com.cjm721.overloaded.network.handler.NoClipUpdateHandler) KeyBindPressedHandler(com.cjm721.overloaded.network.handler.KeyBindPressedHandler) ContainerType(net.minecraft.inventory.container.ContainerType) FMLJavaModLoadingContext(net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext) ModBlocks(com.cjm721.overloaded.block.ModBlocks) FMLCommonSetupEvent(net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent) CapabilityGenericDataStorage(com.cjm721.overloaded.capabilities.CapabilityGenericDataStorage) ModContainers(com.cjm721.overloaded.network.container.ModContainers) Block(net.minecraft.block.Block) TileEntityType(net.minecraft.tileentity.TileEntityType) RegistryEvent(net.minecraftforge.event.RegistryEvent) CapabilityHyperFluid(com.cjm721.overloaded.capabilities.CapabilityHyperFluid) LinkedList(java.util.LinkedList) NetworkRegistry.newSimpleChannel(net.minecraftforge.fml.network.NetworkRegistry.newSimpleChannel) com.cjm721.overloaded.network.packets(com.cjm721.overloaded.network.packets) ModItems(com.cjm721.overloaded.item.ModItems) ModTiles(com.cjm721.overloaded.tile.ModTiles) CapabilityHyperItem(com.cjm721.overloaded.capabilities.CapabilityHyperItem) ModFluids(com.cjm721.overloaded.fluid.ModFluids) MinecraftForge(net.minecraftforge.common.MinecraftForge) List(java.util.List) CapabilityHyperEnergy(com.cjm721.overloaded.capabilities.CapabilityHyperEnergy) ContainerDataHandler(com.cjm721.overloaded.network.handler.ContainerDataHandler) SimpleChannel(net.minecraftforge.fml.network.simple.SimpleChannel) PlayerMessageHandler(com.cjm721.overloaded.network.handler.PlayerMessageHandler) ResourceLocation(net.minecraft.util.ResourceLocation) ItemMultiTool(com.cjm721.overloaded.item.functional.ItemMultiTool) ArmorEventHandler(com.cjm721.overloaded.item.functional.armor.ArmorEventHandler) Fluid(net.minecraft.fluid.Fluid) NoClipUpdateHandler(com.cjm721.overloaded.network.handler.NoClipUpdateHandler) KeyBindPressedHandler(com.cjm721.overloaded.network.handler.KeyBindPressedHandler) ArmorEventHandler(com.cjm721.overloaded.item.functional.armor.ArmorEventHandler) ModItems(com.cjm721.overloaded.item.ModItems) ContainerDataHandler(com.cjm721.overloaded.network.handler.ContainerDataHandler)

Aggregations

ModBlocks (com.cjm721.overloaded.block.ModBlocks)1 CapabilityGenericDataStorage (com.cjm721.overloaded.capabilities.CapabilityGenericDataStorage)1 CapabilityHyperEnergy (com.cjm721.overloaded.capabilities.CapabilityHyperEnergy)1 CapabilityHyperFluid (com.cjm721.overloaded.capabilities.CapabilityHyperFluid)1 CapabilityHyperItem (com.cjm721.overloaded.capabilities.CapabilityHyperItem)1 ModFluids (com.cjm721.overloaded.fluid.ModFluids)1 ModItems (com.cjm721.overloaded.item.ModItems)1 InDevItem (com.cjm721.overloaded.item.basic.InDevItem)1 ItemEnergyCore (com.cjm721.overloaded.item.crafting.ItemEnergyCore)1 ItemFluidCore (com.cjm721.overloaded.item.crafting.ItemFluidCore)1 ItemItemCore (com.cjm721.overloaded.item.crafting.ItemItemCore)1 ItemMultiTool (com.cjm721.overloaded.item.functional.ItemMultiTool)1 ArmorEventHandler (com.cjm721.overloaded.item.functional.armor.ArmorEventHandler)1 ItemMultiBoots (com.cjm721.overloaded.item.functional.armor.ItemMultiBoots)1 ItemMultiChestplate (com.cjm721.overloaded.item.functional.armor.ItemMultiChestplate)1 ItemMultiHelmet (com.cjm721.overloaded.item.functional.armor.ItemMultiHelmet)1 ItemMultiLeggings (com.cjm721.overloaded.item.functional.armor.ItemMultiLeggings)1 ModContainers (com.cjm721.overloaded.network.container.ModContainers)1 ContainerDataHandler (com.cjm721.overloaded.network.handler.ContainerDataHandler)1 KeyBindPressedHandler (com.cjm721.overloaded.network.handler.KeyBindPressedHandler)1