Ejemplo n.º 1
0
        public override void Initialize(ICoreAPI api, VoxelCircuit circuit)
        {
            if (circuit == null)
            {
                return;
            }
            myCircuit = circuit;
            BlockPos blockPos = myCircuit?.myBE?.Pos;

            for (int i = 0; i < inputs.Length; i++)
            {
                ushort?index = myCircuit?.getIndexFromVector(this.Pos.AddCopy(inputs[i].X, inputs[i].Y, inputs[i].Z));
                if (blockPos == null || index == null)
                {
                    continue;
                }
                //outputNodes[i].Pos = new NodePos(blockPos, index.Value);
                //outputNodes[i].myBlockEntity = myCircuit?.myBE;
                //if(i == 0)
                //{
                //    ushort? index2 = myCircuit.getIndexFromVector(this.Pos.AddCopy(inputs[1].X, inputs[1].Y, inputs[1].Z));
                //    outputNodes[i].Initialize(api, new Dictionary<NodePos, byte> { { new NodePos(blockPos, index2.Value), (byte)0 } });
                //}
                //else
                //{
                //    outputNodes[i].Initialize(api);
                // }
            }
        }
Ejemplo n.º 2
0
 public BEBehaviorCircuitHolder(BlockEntity entity) : base(entity)
 {
     Circuit = new VoxelCircuit(16, 16, 16, this.Blockentity);
 }
Ejemplo n.º 3
0
 public CircuitComponentValve(VoxelCircuit circuit) : this()
 {
     this.myCircuit = circuit;
 }