Skip to content

Commit

Permalink
feat: network transmitter
Browse files Browse the repository at this point in the history
The network transmitter now has an indicator
 on the block state whether the connection with the receiver is active.
With not enough energy, it's inactive.
Without network card or without connection, it's in errored state.
Otherwise, it's in active state.

The network transmitter will actively retry to reconnect
if the connection is lost (for example due to chunk unloading).
  • Loading branch information
raoulvdberge committed Nov 3, 2023
1 parent c6a0585 commit cb071db
Show file tree
Hide file tree
Showing 171 changed files with 2,548 additions and 64 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Configuration Card. It copies device configurations and can transfer upgrades.
- Network Receiver
- Network Card
- Network Transmitter

### Changed

- The Network Transmitter now goes into an "errored" state if there is no connection (anymore) with the Network Receiver (due to chunk unloading for example).
- The Network Transmitter will actively try to reconnect with the Network Receiver if connection is lost.

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.GlobalPos;
import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.2")
@FunctionalInterface
public interface ConnectionSink {
void tryConnect(GlobalPos pos);

void tryConnectInSameDimension(BlockPos pos, Direction incomingDirection);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/black"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/blue"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/brown"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/cyan"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/gray"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/green"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/light_gray"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/lime"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/magenta"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/light_blue"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/orange"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/pink"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/purple"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/red"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/white"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"state=active": {
"model": "refinedstorage2:block/network_transmitter/yellow"
},
"state=error": {
"model": "refinedstorage2:block/network_transmitter/error"
},
"state=inactive": {
"model": "refinedstorage2:block/network_transmitter/inactive"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/black",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/blue",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/brown",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/cyan",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/error",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/gray",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/green",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/inactive",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/light_blue",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/light_gray",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/lime",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/magenta",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "refinedstorage2:block/emissive_all_cutout",
"textures": {
"all": "refinedstorage2:block/network_transmitter/base",
"cutout": "refinedstorage2:block/network_transmitter/cutouts/orange",
"particle": "refinedstorage2:block/network_transmitter/base"
}
}
Loading

0 comments on commit cb071db

Please sign in to comment.