Skip to content

Forge Cables and Energy Systems

NorthWestTrees edited this page Jan 27, 2024 · 1 revision

OVERVIEW

This page will explain additional information about this project and how to use the cables correctly.

TUTORIALS

You can find a YouTube tutorial on how to set up custom cables for your mod using the project files listed above.

CABLE BREAKDOWN

Cables will change the model in a single tick based on the NBT and forge tag they are grouped in. This determines the block model and then the rotation of the block to connect to the correct blocks. Devices and cables share signals using NBT tags to allow them to know what can be connected to. Devices can then use these NBT tags to test if other blocks can receive or send power. All this is done through the blocks tick update meaning the cable sends and receives energy quickly.

REQUIRED CABLE SETTINGS

  • Cables have some required settings
  • Check the chart below to ensure your cables have the proper setting.

SETTINGS

Setting Value
Block rotation mode D/U/N/S/W/E rotation (player)
Transparency type Cutout
Tick rate 1
Enabled block entity Enabled
Energy storage Enabled
Trigger Update tick procedure for main script

BLOCK TAGS

  • Tags are used for grouping the cables only used for cable script.
  • They are not designed to be used between devices and cables.

FORGE CABLE TAG NAMES

Setting Value Example
Namespace Forge forge
Main Category cables/ forge:cables/
Second category <cable size>/ forge:cables/xs/
Material <material> forge:cables/xs/copper

CABLE SIZES

  • We mentioned cable sizes in the tag listed above.
  • Having a modular design will help with cross-mod support.
  • We recommend using this chart below and configuring your cable blocks to use the values.
  • Keep in mind that block tick rates should be set to 1 tick
  • Also keep in mind that you will need to block NBT enabled to use Forge Energy.

CABLE SIZE CHART

Size Storage Input/Output
XXXS 8 FE 8 FE/t
XXS 32 FE 32 FE/t
XS 128 FE 128 FE/t
S 512 FE 512 FE/t
M 2,048 FE 2,048 FE/t
L 8,192 FE 8,192 FE/t
XL 32,768 FE 32,768 FE/t
XXL 131,072 FE 131,072 FE/t
XXXL 524,288 FE 524,288 FE/t

MATERIALS

  • You can use any material you like.
  • For better cross-mod support you may want to use something from this list.
  • All the following materials are used in energy storage or used by other mods.
  • Grade is the suggested grade for efficiency. The lower the number the better the material.

MATERIAL LIST

Grade Name
1 Fiberglass
2 Gold
3 Copper
4 Nickel
5 Chromium
6 Molybdenum
7 Manganese
8 Aluminum
9 Titanium
10 Zinc
11 Lead
12 Cobalt
13 Silver
14 Vanadium
15 Indium
16 Iron
17 Lithium
18 Graphite

NBT VARIABLES

  • NBT variables are used to communicate between blocks.
  • NBT should be consistent between your devices and your cables.
  • By default, you can use the default settings or use your cable type for each direction.
  • Keep in mind that by changing the NBT cable direction for your NBT tags, other mods may not be compatible with your mod.

DEFAULT NBT NBT LIST

Type Name Facing Direction
Logic cablesUp Up
Logic cablesDown Down
Logic cablesNorth North
Logic cablesEast East
Logic cablesSouth South
Logic cablesWest West

KNOWN ISSUES

CABLES SEND BACK ENERGY THE OPPOSITE DIRECTION

This is normal, far as I can tell it won't make too much of a major difference.

CABLES TAKE LONG TO FILL UP

Cables may take a long time to fill due to the length of the cable and the amount of power they can store.
For cables keep the storage the same as the send/revice per tick.
Also, make sure you have enough energy sources to generate a reasonable amount of energy to send through the cables.
If your generator produces less than its max sending range it will take more time to send energy.

IS THERE A FABRIC VERSION

I plan to make a version of these cables that uses only NBT variables so fabric users can make use Energy system for fabric.
I will link to a page here once I have the workspace made and tested.