diff --git a/CHANGELOG.md b/CHANGELOG.md index 3799f1e1a..e41581516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Configuration Card. It copies device configurations and can transfer upgrades. +- Network Receiver + ## [2.0.0-milestone.3.1] - 2023-10-30 ### Added @@ -15,7 +20,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Curios integration on Forge. - Trinkets integration on Fabric. - Storage Monitor -- Configuration Card. It copies device configurations and can transfer upgrades. ### Changed @@ -333,9 +337,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - The Wrench now dismantles devices when crouching. - - The Disk Drive in item form now supports rendering of disks that were dismantled. - - In order to retain Controller energy, the Controller must now be dismantled. - - All config and upgrades are transferred to the item. + - The Disk Drive in item form now supports rendering of disks that were dismantled. + - In order to retain Controller energy, the Controller must now be dismantled. + - All config and upgrades are transferred to the item. - You can now use any Wrench from other mods in order to rotate or dismantle. - Item and fluid storage blocks. - Initial advancements. diff --git a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java index 3248a1016..17c6d34ac 100644 --- a/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java +++ b/refinedstorage2-platform-api/src/main/java/com/refinedmods/refinedstorage2/platform/api/grid/Grid.java @@ -21,7 +21,7 @@ public interface Grid { Storage getItemStorage(); - boolean isActive(); + boolean isGridActive(); List> getResources(StorageChannelType type, Class actorType); diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json new file mode 100644 index 000000000..7c3d97c33 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/black_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/black" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json new file mode 100644 index 000000000..f86cea069 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/blue_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/blue" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json new file mode 100644 index 000000000..272697d4f --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/brown_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/brown" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json new file mode 100644 index 000000000..03ed7c3b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/cyan_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/cyan" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json new file mode 100644 index 000000000..6bbc9fb00 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/gray_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/gray" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json new file mode 100644 index 000000000..86e310337 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/green_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/green" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json new file mode 100644 index 000000000..80e4ab4db --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/light_gray_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/light_gray" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json new file mode 100644 index 000000000..1c06161a2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/lime_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/lime" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json new file mode 100644 index 000000000..0496045b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/magenta_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/magenta" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json new file mode 100644 index 000000000..6fd106527 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/light_blue" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json new file mode 100644 index 000000000..f42263881 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/orange_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/orange" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json new file mode 100644 index 000000000..f72f2d31c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/pink_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/pink" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json new file mode 100644 index 000000000..f62a02452 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/purple_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/purple" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json new file mode 100644 index 000000000..a4db02c72 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/red_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/red" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json new file mode 100644 index 000000000..9d47582c7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/white_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/white" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json new file mode 100644 index 000000000..f553637ea --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/blockstates/yellow_network_receiver.json @@ -0,0 +1,10 @@ +{ + "variants": { + "active=false": { + "model": "refinedstorage2:block/network_receiver/inactive" + }, + "active=true": { + "model": "refinedstorage2:block/network_receiver/yellow" + } + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json new file mode 100644 index 000000000..b353d302b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/black.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/black", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json new file mode 100644 index 000000000..e37eb0248 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/blue", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json new file mode 100644 index 000000000..a7068e51e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/brown.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/brown", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json new file mode 100644 index 000000000..c48b00fc0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/cyan.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/cyan", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json new file mode 100644 index 000000000..5bf2981bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/gray", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json new file mode 100644 index 000000000..552c8d37c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/green.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/green", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json new file mode 100644 index 000000000..090ddd01a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/inactive.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/inactive", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json new file mode 100644 index 000000000..44b9e35b1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_blue.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_blue", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json new file mode 100644 index 000000000..f19ff741c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/light_gray.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_gray", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json new file mode 100644 index 000000000..bbfdb16ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/lime.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/lime", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json new file mode 100644 index 000000000..daf1629ed --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/magenta.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/magenta", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json new file mode 100644 index 000000000..57808fc14 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/orange.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/orange", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json new file mode 100644 index 000000000..b7ac3a556 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/pink.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/pink", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json new file mode 100644 index 000000000..aa8f409de --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/purple.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/purple", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json new file mode 100644 index 000000000..c8c0c9d00 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/red.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/red", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json new file mode 100644 index 000000000..5643b7496 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/white.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/white", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json new file mode 100644 index 000000000..6ad1d45b0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/block/network_receiver/yellow.json @@ -0,0 +1,8 @@ +{ + "parent": "refinedstorage2:block/emissive_all_cutout", + "textures": { + "all": "refinedstorage2:block/network_receiver/base", + "cutout": "refinedstorage2:block/network_receiver/cutouts/yellow", + "particle": "refinedstorage2:block/network_receiver/base" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json new file mode 100644 index 000000000..ade596183 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/black_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/black" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json new file mode 100644 index 000000000..bcf3097c7 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/blue_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json new file mode 100644 index 000000000..249d08271 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/brown_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/brown" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json new file mode 100644 index 000000000..be8369e76 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/cyan_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/cyan" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json new file mode 100644 index 000000000..e91a0cbb1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/gray_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json new file mode 100644 index 000000000..509ec28ad --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/green_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/green" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json new file mode 100644 index 000000000..cf103c918 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/light_gray_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_gray" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json new file mode 100644 index 000000000..7acce74fa --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/lime_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/lime" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json new file mode 100644 index 000000000..c1952d7e5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/magenta_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/magenta" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json new file mode 100644 index 000000000..c237c3d55 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/light_blue" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json new file mode 100644 index 000000000..8ef759ae0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/orange_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/orange" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json new file mode 100644 index 000000000..c9d5ae064 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/pink_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/pink" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json new file mode 100644 index 000000000..df74529c0 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/purple_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/purple" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json new file mode 100644 index 000000000..24e8dff77 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/red_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/red" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json new file mode 100644 index 000000000..5654fa20c --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/white_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/white" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json new file mode 100644 index 000000000..cb901d1bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/assets/refinedstorage2/models/item/yellow_network_receiver.json @@ -0,0 +1,6 @@ +{ + "parent": "refinedstorage2:block/network_receiver/inactive", + "textures": { + "cutout": "refinedstorage2:block/network_receiver/cutouts/yellow" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json new file mode 100644 index 000000000..c7b33755b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/black_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/black_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/black_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json new file mode 100644 index 000000000..22f8c8709 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/blue_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/blue_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/blue_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json new file mode 100644 index 000000000..2dcce70a1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/brown_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/brown_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/brown_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json new file mode 100644 index 000000000..5579db0c2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/cyan_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/cyan_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/cyan_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json new file mode 100644 index 000000000..f91f93326 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/gray_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/gray_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/gray_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json new file mode 100644 index 000000000..4213a221a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/green_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/green_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/green_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json new file mode 100644 index 000000000..d1053d126 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_blue_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_blue_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_blue_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json new file mode 100644 index 000000000..3ddba8f5d --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/light_gray_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/light_gray_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/light_gray_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json new file mode 100644 index 000000000..4304825b5 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/lime_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/lime_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/lime_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json new file mode 100644 index 000000000..6eac125ee --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/magenta_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/magenta_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/magenta_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json new file mode 100644 index 000000000..a68106768 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/orange_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/orange_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/orange_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json new file mode 100644 index 000000000..3d4551d03 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/pink_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/pink_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/pink_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json new file mode 100644 index 000000000..cf37cb575 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/purple_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/purple_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/purple_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json new file mode 100644 index 000000000..7a0d917dd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/red_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/red_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/red_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json new file mode 100644 index 000000000..c0d7cf997 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/white_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/white_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/white_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json new file mode 100644 index 000000000..28300c863 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/advancements/recipes/misc/coloring/yellow_network_receiver.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_network_receivers": { + "conditions": { + "items": [ + { + "tag": "refinedstorage2:network_receivers" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage2:coloring/yellow_network_receiver" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_network_receivers", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage2:coloring/yellow_network_receiver" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json new file mode 100644 index 000000000..0ffff7793 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/black_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:black_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/black_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json new file mode 100644 index 000000000..dd9a16080 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/blue_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:blue_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/blue_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json new file mode 100644 index 000000000..126e8020a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/brown_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:brown_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/brown_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json new file mode 100644 index 000000000..09b99f3ff --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/cyan_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:cyan_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/cyan_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json new file mode 100644 index 000000000..0b6fa43d1 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/gray_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:gray_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/gray_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json new file mode 100644 index 000000000..db633f063 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/green_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:green_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/green_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json new file mode 100644 index 000000000..3e81cc321 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/light_gray_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:light_gray_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/light_gray_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json new file mode 100644 index 000000000..7e2244265 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/lime_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:lime_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/lime_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json new file mode 100644 index 000000000..eda8e2384 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/magenta_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:magenta_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/magenta_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json new file mode 100644 index 000000000..34a5d8900 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json new file mode 100644 index 000000000..f61f350bd --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/orange_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:orange_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/orange_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json new file mode 100644 index 000000000..962eea8de --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/pink_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:pink_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/pink_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json new file mode 100644 index 000000000..59612d49b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/purple_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:purple_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/purple_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json new file mode 100644 index 000000000..9019cb58b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/red_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:red_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/red_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json new file mode 100644 index 000000000..cccc597dc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/white_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:white_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/white_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json new file mode 100644 index 000000000..9aa605850 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/loot_tables/blocks/yellow_network_receiver.json @@ -0,0 +1,20 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage2:yellow_network_receiver" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage2:blocks/yellow_network_receiver" +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json new file mode 100644 index 000000000..10adc17ab --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/black_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:black_dye" + } + ], + "result": { + "item": "refinedstorage2:black_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json new file mode 100644 index 000000000..2cf78ae46 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/blue_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:blue_dye" + } + ], + "result": { + "item": "refinedstorage2:blue_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json new file mode 100644 index 000000000..8f315166a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/brown_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:brown_dye" + } + ], + "result": { + "item": "refinedstorage2:brown_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json new file mode 100644 index 000000000..1740e8a1b --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/cyan_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:cyan_dye" + } + ], + "result": { + "item": "refinedstorage2:cyan_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json new file mode 100644 index 000000000..d81adf188 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/gray_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:gray_dye" + } + ], + "result": { + "item": "refinedstorage2:gray_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json new file mode 100644 index 000000000..17bebbdbc --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/green_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:green_dye" + } + ], + "result": { + "item": "refinedstorage2:green_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json new file mode 100644 index 000000000..76b5e6fc4 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_blue_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:light_blue_dye" + } + ], + "result": { + "item": "refinedstorage2:network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json new file mode 100644 index 000000000..0e08e1676 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/light_gray_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:light_gray_dye" + } + ], + "result": { + "item": "refinedstorage2:light_gray_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json new file mode 100644 index 000000000..cc0ae467a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/lime_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:lime_dye" + } + ], + "result": { + "item": "refinedstorage2:lime_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json new file mode 100644 index 000000000..3a51f49ad --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/magenta_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:magenta_dye" + } + ], + "result": { + "item": "refinedstorage2:magenta_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json new file mode 100644 index 000000000..7f5f93995 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/orange_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:orange_dye" + } + ], + "result": { + "item": "refinedstorage2:orange_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json new file mode 100644 index 000000000..8108f41b8 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/pink_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:pink_dye" + } + ], + "result": { + "item": "refinedstorage2:pink_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json new file mode 100644 index 000000000..e62460fb2 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/purple_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:purple_dye" + } + ], + "result": { + "item": "refinedstorage2:purple_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json new file mode 100644 index 000000000..9648c407a --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/red_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:red_dye" + } + ], + "result": { + "item": "refinedstorage2:red_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json new file mode 100644 index 000000000..c8250b9ae --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/white_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:white_dye" + } + ], + "result": { + "item": "refinedstorage2:white_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json new file mode 100644 index 000000000..1c9a4ce3e --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/recipes/coloring/yellow_network_receiver.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage2:network_receivers" + }, + { + "item": "minecraft:yellow_dye" + } + ], + "result": { + "item": "refinedstorage2:yellow_network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json new file mode 100644 index 000000000..2e1d18612 --- /dev/null +++ b/refinedstorage2-platform-common/src/generated/resources/data/refinedstorage2/tags/items/network_receivers.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage2:white_network_receiver", + "refinedstorage2:orange_network_receiver", + "refinedstorage2:magenta_network_receiver", + "refinedstorage2:network_receiver", + "refinedstorage2:yellow_network_receiver", + "refinedstorage2:lime_network_receiver", + "refinedstorage2:pink_network_receiver", + "refinedstorage2:gray_network_receiver", + "refinedstorage2:light_gray_network_receiver", + "refinedstorage2:cyan_network_receiver", + "refinedstorage2:purple_network_receiver", + "refinedstorage2:blue_network_receiver", + "refinedstorage2:brown_network_receiver", + "refinedstorage2:green_network_receiver", + "refinedstorage2:red_network_receiver", + "refinedstorage2:black_network_receiver" + ] +} \ No newline at end of file diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java index 2b343c38d..ae08e3872 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/AbstractModInitializer.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.component.EnergyNetworkComponentImpl; import com.refinedmods.refinedstorage2.api.network.impl.component.GraphNetworkComponent; import com.refinedmods.refinedstorage2.api.network.impl.component.StorageNetworkComponentImpl; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.PlatformApiProxy; import com.refinedmods.refinedstorage2.platform.common.block.ControllerType; @@ -14,9 +15,9 @@ import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ItemDropConstructorStrategyFactory; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.PlaceBlockConstructorStrategy; @@ -129,6 +130,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.INTERFACE; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.ITEM_STORAGE_BLOCK; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.MACHINE_CASING; +import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.NETWORK_RECEIVER; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.PROCESSOR_BINDING; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON; import static com.refinedmods.refinedstorage2.platform.common.content.ContentIds.QUARTZ_ENRICHED_IRON_BLOCK; @@ -273,6 +275,7 @@ protected final void registerBlocks( Blocks.INSTANCE.setInterface(callback.register(INTERFACE, InterfaceBlock::new)); Blocks.INSTANCE.getWirelessTransmitter().registerBlocks(callback); Blocks.INSTANCE.setStorageMonitor(callback.register(STORAGE_MONITOR, StorageMonitorBlock::new)); + Blocks.INSTANCE.getNetworkReceiver().registerBlocks(callback); } protected final void registerItems( @@ -294,6 +297,7 @@ protected final void registerItems( Blocks.INSTANCE.getConstructor().registerItems(callback, Items.INSTANCE::addConstructor); Blocks.INSTANCE.getDestructor().registerItems(callback, Items.INSTANCE::addDestructor); Blocks.INSTANCE.getWirelessTransmitter().registerItems(callback, Items.INSTANCE::addWirelessTransmitter); + Blocks.INSTANCE.getNetworkReceiver().registerItems(callback, Items.INSTANCE::addNetworkReceiver); registerStorageItems(callback); registerUpgrades(callback, regulatorUpgradeItemSupplier); Items.INSTANCE.setWirelessGrid(callback.register(WIRELESS_GRID, wirelessGridItemSupplier)); @@ -476,7 +480,12 @@ protected final void registerBlockEntities( ) { BlockEntities.INSTANCE.setCable(callback.register( CABLE, - () -> typeFactory.create(CableBlockEntity::new, Blocks.INSTANCE.getCable().toArray()) + () -> typeFactory.create((pos, state) -> new NetworkNodeContainerBlockEntityImpl<>( + BlockEntities.INSTANCE.getCable(), + pos, + state, + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) + ), Blocks.INSTANCE.getCable().toArray()) )); BlockEntities.INSTANCE.setController(callback.register( CONTROLLER, @@ -563,6 +572,15 @@ protected final void registerBlockEntities( STORAGE_MONITOR, () -> typeFactory.create(StorageMonitorBlockEntity::new, Blocks.INSTANCE.getStorageMonitor()) )); + BlockEntities.INSTANCE.setNetworkReceiver(callback.register( + NETWORK_RECEIVER, + () -> typeFactory.create((pos, state) -> new NetworkNodeContainerBlockEntityImpl<>( + BlockEntities.INSTANCE.getNetworkReceiver(), + pos, + state, + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) + ), Blocks.INSTANCE.getNetworkReceiver().toArray()) + )); } protected final void registerMenus(final RegistryCallback> callback, diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java index 7f89c1abb..cf7e69c22 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/Config.java @@ -46,6 +46,8 @@ public interface Config { SimpleEnergyUsageEntry getStorageMonitor(); + SimpleEnergyUsageEntry getNetworkReceiver(); + interface SimpleEnergyUsageEntry { long getEnergyUsage(); } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java new file mode 100644 index 000000000..a674ae71f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/AbstractColoredBlock.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage2.platform.common.block; + +import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; + +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; + +public abstract class AbstractColoredBlock + extends AbstractBaseBlock implements ColorableBlock, BlockItemProvider { + private final DyeColor color; + private final MutableComponent name; + + protected AbstractColoredBlock(final Properties properties, final DyeColor color, final MutableComponent name) { + super(properties); + this.color = color; + this.name = name; + } + + @Override + public MutableComponent getName() { + return name; + } + + @Override + public DyeColor getColor() { + return color; + } + + @Override + public BlockItem createBlockItem() { + return new NamedBlockItem(this, new Item.Properties(), name); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java index 2895ff79e..b74a819aa 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/CableBlock.java @@ -1,21 +1,20 @@ package com.refinedmods.refinedstorage2.platform.common.block; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; -import com.refinedmods.refinedstorage2.platform.common.item.block.NamedBlockItem; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.DyeColor; -import net.minecraft.world.item.Item; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -35,23 +34,13 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -public class CableBlock extends AbstractBaseBlock +public class CableBlock extends AbstractColoredBlock implements ColorableBlock, SimpleWaterloggedBlock, EntityBlock, BlockItemProvider { - private static final AbstractBlockEntityTicker TICKER = + private static final AbstractBlockEntityTicker> TICKER = new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getCable); - private final DyeColor color; - private final MutableComponent name; - public CableBlock(final DyeColor color, final MutableComponent name) { - super(BlockConstants.CABLE_PROPERTIES); - this.color = color; - this.name = name; - } - - @Override - public DyeColor getColor() { - return color; + super(BlockConstants.CABLE_PROPERTIES, color, name); } @Override @@ -115,15 +104,12 @@ public VoxelShape getShape(final BlockState state, @Override public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { - return new CableBlockEntity(pos, state); - } - - @Nullable - @Override - public BlockEntityTicker getTicker(final Level level, - final BlockState blockState, - final BlockEntityType type) { - return TICKER.get(level, type); + return new NetworkNodeContainerBlockEntityImpl<>( + BlockEntities.INSTANCE.getCable(), + pos, + state, + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) + ); } @Override @@ -131,13 +117,11 @@ public BlockColorMap getBlockColorMap() { return Blocks.INSTANCE.getCable(); } + @Nullable @Override - public MutableComponent getName() { - return name; - } - - @Override - public BlockItem createBlockItem() { - return new NamedBlockItem(this, new Item.Properties(), name); + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java new file mode 100644 index 000000000..90ced803f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/NetworkReceiverBlock.java @@ -0,0 +1,71 @@ +package com.refinedmods.refinedstorage2.platform.common.block; + +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.block.ticker.NetworkNodeBlockEntityTicker; +import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; +import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; +import com.refinedmods.refinedstorage2.platform.common.content.Blocks; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BooleanProperty; + +public class NetworkReceiverBlock extends AbstractColoredBlock implements EntityBlock { + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + private static final AbstractBlockEntityTicker> TICKER = + new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getNetworkReceiver, ACTIVE); + + public NetworkReceiverBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.PROPERTIES, color, name); + } + + @Override + protected BlockState getDefaultState() { + return super.getDefaultState().setValue(ACTIVE, false); + } + + @Override + protected void createBlockStateDefinition(final StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(ACTIVE); + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getNetworkReceiver(); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(final BlockPos pos, final BlockState state) { + return new NetworkNodeContainerBlockEntityImpl<>( + BlockEntities.INSTANCE.getNetworkReceiver(), + pos, + state, + new SimpleNetworkNode(Platform.INSTANCE.getConfig().getNetworkReceiver().getEnergyUsage()) + ); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(final Level level, + final BlockState blockState, + final BlockEntityType type) { + return TICKER.get(level, type); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java index a0904f263..e0c9fa77b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractLevelInteractingNetworkNodeContainerBlockEntity.java @@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractLevelInteractingNetworkNodeContainerBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity { + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity { private static final Logger LOGGER = LoggerFactory.getLogger( AbstractLevelInteractingNetworkNodeContainerBlockEntity.class ); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java new file mode 100644 index 000000000..b35d96dac --- /dev/null +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractRedstoneModeNetworkNodeContainerBlockEntity.java @@ -0,0 +1,100 @@ +package com.refinedmods.refinedstorage2.platform.common.block.entity; + +import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; +import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; +import com.refinedmods.refinedstorage2.platform.common.Platform; +import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; + +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +public abstract class AbstractRedstoneModeNetworkNodeContainerBlockEntity + extends NetworkNodeContainerBlockEntityImpl implements PlayerAware, ConfigurationCardTarget { + private static final String TAG_REDSTONE_MODE = "rm"; + private static final String TAG_PLACED_BY_PLAYER_ID = "pbpid"; + + private RedstoneMode redstoneMode = RedstoneMode.IGNORE; + @Nullable + private UUID placedByPlayerId; + + protected AbstractRedstoneModeNetworkNodeContainerBlockEntity(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final T node) { + super(type, pos, state, node); + } + + @Override + protected boolean isActive() { + return super.isActive() && level != null && redstoneMode.isActive(level.hasNeighborSignal(worldPosition)); + } + + @Override + public void saveAdditional(final CompoundTag tag) { + super.saveAdditional(tag); + writeConfiguration(tag); + if (placedByPlayerId != null) { + tag.putUUID(TAG_PLACED_BY_PLAYER_ID, placedByPlayerId); + } + } + + @Override + public void writeConfiguration(final CompoundTag tag) { + tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); + } + + @Override + public void load(final CompoundTag tag) { + super.load(tag); + readConfiguration(tag); + if (tag.hasUUID(TAG_PLACED_BY_PLAYER_ID)) { + placedByPlayerId = tag.getUUID(TAG_PLACED_BY_PLAYER_ID); + } + } + + @Override + public void readConfiguration(final CompoundTag tag) { + if (tag.contains(TAG_REDSTONE_MODE)) { + redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); + } + } + + @Override + public List getUpgradeItems() { + return Collections.emptyList(); + } + + @Override + public boolean addUpgradeItem(final Item upgradeItem) { + return false; + } + + public RedstoneMode getRedstoneMode() { + return redstoneMode; + } + + public void setRedstoneMode(final RedstoneMode redstoneMode) { + this.redstoneMode = redstoneMode; + setChanged(); + } + + @Override + public void setPlacedBy(final UUID playerId) { + this.placedByPlayerId = playerId; + setChanged(); + } + + protected final Player getFakePlayer(final ServerLevel serverLevel) { + return Platform.INSTANCE.getFakePlayer(serverLevel, placedByPlayerId); + } +} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java deleted file mode 100644 index 7594f24bb..000000000 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/CableBlockEntity.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.common.block.entity; - -import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; - -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.state.BlockState; - -public class CableBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity { - public CableBlockEntity(final BlockPos pos, final BlockState state) { - super( - BlockEntities.INSTANCE.getCable(), - pos, - state, - new SimpleNetworkNode(Platform.INSTANCE.getConfig().getCable().getEnergyUsage()) - ); - } -} diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java index f45ad0545..86287650b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/ControllerBlockEntity.java @@ -29,7 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ControllerBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class ControllerBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, EnergyBlockEntity { private static final Logger LOGGER = LoggerFactory.getLogger(ControllerBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java similarity index 60% rename from refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java rename to refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java index 1fd6f3861..4e03b0369 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/AbstractInternalNetworkNodeContainerBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/NetworkNodeContainerBlockEntityImpl.java @@ -3,100 +3,42 @@ import com.refinedmods.refinedstorage2.api.network.component.EnergyNetworkComponent; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; import com.refinedmods.refinedstorage2.platform.api.blockentity.AbstractNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage2.platform.api.blockentity.ConfigurationCardTarget; -import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.AbstractDirectionalBlock; import com.refinedmods.refinedstorage2.platform.common.block.ColorableBlock; -import com.refinedmods.refinedstorage2.platform.common.util.RedstoneMode; -import java.util.Collections; -import java.util.List; -import java.util.UUID; import javax.annotation.Nullable; import com.google.common.util.concurrent.RateLimiter; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbstractInternalNetworkNodeContainerBlockEntity - extends AbstractNetworkNodeContainerBlockEntity - implements PlayerAware, ConfigurationCardTarget { - private static final Logger LOGGER = LoggerFactory.getLogger(AbstractInternalNetworkNodeContainerBlockEntity.class); - - private static final String TAG_REDSTONE_MODE = "rm"; - private static final String TAG_PLACED_BY_PLAYER_ID = "pbpid"; +public class NetworkNodeContainerBlockEntityImpl + extends AbstractNetworkNodeContainerBlockEntity { + private static final Logger LOGGER = LoggerFactory.getLogger(NetworkNodeContainerBlockEntityImpl.class); private final RateLimiter activenessChangeRateLimiter = RateLimiter.create(1); private boolean lastActive; - private RedstoneMode redstoneMode = RedstoneMode.IGNORE; - @Nullable - private UUID placedByPlayerId; - protected AbstractInternalNetworkNodeContainerBlockEntity(final BlockEntityType type, - final BlockPos pos, - final BlockState state, - final T node) { - super(type, pos, state, node); + public NetworkNodeContainerBlockEntityImpl(final BlockEntityType type, + final BlockPos pos, + final BlockState state, + final T networkNode) { + super(type, pos, state, networkNode); } - private boolean isActive() { + protected boolean isActive() { final long energyUsage = getNode().getEnergyUsage(); final boolean hasLevel = level != null && level.isLoaded(worldPosition); return hasLevel - && redstoneMode.isActive(level.hasNeighborSignal(worldPosition)) && getNode().getNetwork() != null && getNode().getNetwork().getComponent(EnergyNetworkComponent.class).getStored() >= energyUsage; } - @Override - public void saveAdditional(final CompoundTag tag) { - super.saveAdditional(tag); - writeConfiguration(tag); - if (placedByPlayerId != null) { - tag.putUUID(TAG_PLACED_BY_PLAYER_ID, placedByPlayerId); - } - } - - @Override - public void writeConfiguration(final CompoundTag tag) { - tag.putInt(TAG_REDSTONE_MODE, RedstoneModeSettings.getRedstoneMode(getRedstoneMode())); - } - - @Override - public void load(final CompoundTag tag) { - super.load(tag); - readConfiguration(tag); - if (tag.hasUUID(TAG_PLACED_BY_PLAYER_ID)) { - placedByPlayerId = tag.getUUID(TAG_PLACED_BY_PLAYER_ID); - } - } - - @Override - public void readConfiguration(final CompoundTag tag) { - if (tag.contains(TAG_REDSTONE_MODE)) { - redstoneMode = RedstoneModeSettings.getRedstoneMode(tag.getInt(TAG_REDSTONE_MODE)); - } - } - - @Override - public List getUpgradeItems() { - return Collections.emptyList(); - } - - @Override - public boolean addUpgradeItem(final Item upgradeItem) { - return false; - } - public void updateActiveness(final BlockState state, @Nullable final BooleanProperty activenessProperty) { final boolean newActive = isActive(); @@ -129,15 +71,6 @@ private void updateActivenessState(final BlockState state, } } - public RedstoneMode getRedstoneMode() { - return redstoneMode; - } - - public void setRedstoneMode(final RedstoneMode redstoneMode) { - this.redstoneMode = redstoneMode; - setChanged(); - } - public void doWork() { getNode().doWork(); } @@ -192,14 +125,4 @@ protected final Direction getDirection() { } return directionalBlock.extractDirection(blockState); } - - @Override - public void setPlacedBy(final UUID playerId) { - this.placedByPlayerId = playerId; - setChanged(); - } - - protected final Player getFakePlayer(final ServerLevel serverLevel) { - return Platform.INSTANCE.getFakePlayer(serverLevel, placedByPlayerId); - } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java index 4391e381e..d3ba29d42 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/detector/DetectorBlockEntity.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.containermenu.AbstractSingleAmountContainerMenu; import com.refinedmods.refinedstorage2.platform.common.containermenu.detector.DetectorContainerMenu; @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DetectorBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class DetectorBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(DetectorBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java index 625bcd74d..cbf9409ed 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/diskdrive/AbstractDiskDriveBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.network.impl.node.multistorage.MultiStorageStorageState; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.BlockEntityWithDrops; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; @@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractDiskDriveBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements BlockEntityWithDrops, MultiStorageListener, ExtendedMenuProvider { public static final int AMOUNT_OF_DISKS = 8; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java index d16595b60..37b7b9711 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/externalstorage/ExternalStorageBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.api.storage.external.ExternalStorageProvider; import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; import com.refinedmods.refinedstorage2.platform.common.containermenu.storage.ExternalStorageContainerMenu; @@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory; public class ExternalStorageBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(ExternalStorageBlockEntity.class); private static final String TAG_TRACKED_RESOURCES = "tr"; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java index 0c252a86d..b56d17283 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/grid/AbstractGridBlockEntity.java @@ -14,7 +14,7 @@ import com.refinedmods.refinedstorage2.platform.api.grid.Grid; import com.refinedmods.refinedstorage2.platform.api.resource.ItemResource; import com.refinedmods.refinedstorage2.platform.api.storage.channel.PlatformStorageChannelType; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.internal.storage.channel.StorageChannelTypes; import java.util.List; @@ -25,7 +25,8 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public abstract class AbstractGridBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public abstract class AbstractGridBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements Grid, MenuProvider { protected AbstractGridBlockEntity(final BlockEntityType type, final BlockPos pos, @@ -55,7 +56,7 @@ public GridOperations createOperations(final PlatformStorageChannelType + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, BlockEntityWithDrops { private static final String TAG_EXPORT_ITEMS = "ei"; private static final int EXPORT_SLOTS = 9; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java index df47b9537..aaa2d791a 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storage/AbstractStorageBlockBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage2.platform.api.resource.ResourceContainer; import com.refinedmods.refinedstorage2.platform.api.resource.ResourceFactory; import com.refinedmods.refinedstorage2.platform.api.storage.StorageRepository; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.block.entity.StorageConfigurationContainerImpl; import com.refinedmods.refinedstorage2.platform.common.internal.resource.ResourceContainerImpl; @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; public abstract class AbstractStorageBlockBlockEntity - extends AbstractInternalNetworkNodeContainerBlockEntity> + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity> implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractStorageBlockBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java index caee98062..19b42690d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/storagemonitor/StorageMonitorBlockEntity.java @@ -12,7 +12,7 @@ import com.refinedmods.refinedstorage2.platform.api.storage.PlayerActor; import com.refinedmods.refinedstorage2.platform.api.storage.channel.FuzzyStorageChannel; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.FilterWithFuzzyMode; import com.refinedmods.refinedstorage2.platform.common.containermenu.StorageMonitorContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -42,7 +42,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class StorageMonitorBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class StorageMonitorBlockEntity extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider { private static final Logger LOGGER = LoggerFactory.getLogger(StorageMonitorBlockEntity.class); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java index a45aede31..6b2e78e1d 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/entity/wirelesstransmitter/WirelessTransmitterBlockEntity.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.blockentity.wirelesstransmitter.WirelessTransmitter; import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractRedstoneModeNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.UpgradeContainer; import com.refinedmods.refinedstorage2.platform.common.containermenu.WirelessTransmitterContainerMenu; import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities; @@ -29,7 +29,8 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.Vec3; -public class WirelessTransmitterBlockEntity extends AbstractInternalNetworkNodeContainerBlockEntity +public class WirelessTransmitterBlockEntity + extends AbstractRedstoneModeNetworkNodeContainerBlockEntity implements ExtendedMenuProvider, WirelessTransmitter { private static final String TAG_UPGRADES = "u"; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java index f2e9a10fa..6fce3d6c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/block/ticker/NetworkNodeBlockEntityTicker.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage2.platform.common.block.ticker; import com.refinedmods.refinedstorage2.api.network.node.AbstractNetworkNode; -import com.refinedmods.refinedstorage2.platform.common.block.entity.AbstractInternalNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import java.util.function.Supplier; import javax.annotation.Nullable; @@ -14,7 +14,7 @@ public class NetworkNodeBlockEntityTicker< N extends AbstractNetworkNode, - T extends AbstractInternalNetworkNodeContainerBlockEntity + T extends NetworkNodeContainerBlockEntityImpl > extends AbstractBlockEntityTicker { @Nullable private final BooleanProperty activenessProperty; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java index 71f13a5c4..c77697a1e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/containermenu/grid/AbstractGridContainerMenu.java @@ -389,7 +389,7 @@ public void toggleStorageChannelType() { @Override public boolean onInsert(final GridInsertMode insertMode, final boolean tryAlternatives) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return insertionStrategy.onInsert(insertMode, tryAlternatives); @@ -400,7 +400,7 @@ public boolean onExtract(final PlatformStorageChannelType storageChannelT final T resource, final GridExtractMode extractMode, final boolean cursor) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return extractionStrategy.onExtract(storageChannelType, resource, extractMode, cursor); @@ -411,7 +411,7 @@ public boolean onScroll(final PlatformStorageChannelType storageChannelTy final T resource, final GridScrollMode scrollMode, final int slotIndex) { - if (grid != null && !grid.isActive()) { + if (grid != null && !grid.isGridActive()) { return false; } return scrollingStrategy.onScroll(storageChannelType, resource, scrollMode, slotIndex); @@ -424,7 +424,7 @@ public boolean onTransfer(final int slotIndex) { @Override public ItemStack quickMoveStack(final Player playerEntity, final int slotIndex) { - if (!playerEntity.level().isClientSide() && grid != null && grid.isActive()) { + if (!playerEntity.level().isClientSide() && grid != null && grid.isGridActive()) { final Slot slot = getSlot(slotIndex); if (slot.hasItem()) { insertionStrategy.onTransfer(slot.index); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java index 2a0bee746..f200fb29b 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/BlockEntities.java @@ -1,8 +1,9 @@ package com.refinedmods.refinedstorage2.platform.common.content; -import com.refinedmods.refinedstorage2.platform.common.block.entity.CableBlockEntity; +import com.refinedmods.refinedstorage2.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage2.platform.common.block.entity.ControllerBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.ImporterBlockEntity; +import com.refinedmods.refinedstorage2.platform.common.block.entity.NetworkNodeContainerBlockEntityImpl; import com.refinedmods.refinedstorage2.platform.common.block.entity.constructor.ConstructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.destructor.DestructorBlockEntity; import com.refinedmods.refinedstorage2.platform.common.block.entity.detector.DetectorBlockEntity; @@ -31,7 +32,7 @@ public final class BlockEntities { public static final BlockEntities INSTANCE = new BlockEntities(); @Nullable - private Supplier> cable; + private Supplier>> cable; @Nullable private Supplier> diskDrive; @Nullable @@ -64,15 +65,19 @@ public final class BlockEntities { private Supplier> wirelessTransmitter; @Nullable private Supplier> storageMonitor; + @Nullable + private Supplier>> networkReceiver; private BlockEntities() { } - public BlockEntityType getCable() { + public BlockEntityType> getCable() { return Objects.requireNonNull(cable).get(); } - public void setCable(final Supplier> supplier) { + public void setCable( + final Supplier>> supplier + ) { this.cable = supplier; } @@ -205,4 +210,14 @@ public BlockEntityType getStorageMonitor() { public void setStorageMonitor(final Supplier> supplier) { this.storageMonitor = supplier; } + + public BlockEntityType> getNetworkReceiver() { + return Objects.requireNonNull(networkReceiver).get(); + } + + public void setNetworkReceiver( + final Supplier>> supplier + ) { + this.networkReceiver = supplier; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java index 18c5e28d4..12832d9fd 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Blocks.java @@ -13,6 +13,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.InterfaceBlock; import com.refinedmods.refinedstorage2.platform.common.block.ItemStorageBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.SimpleBlock; import com.refinedmods.refinedstorage2.platform.common.block.StorageMonitorBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; @@ -117,6 +118,12 @@ public final class Blocks { ContentNames.WIRELESS_TRANSMITTER, COLOR ); + private final BlockColorMap networkReceiver = new BlockColorMap<>( + NetworkReceiverBlock::new, + ContentIds.NETWORK_RECEIVER, + ContentNames.NETWORK_RECEIVER, + COLOR + ); @Nullable private Supplier quartzEnrichedIronBlock; @@ -240,4 +247,8 @@ public void setStorageMonitor(final Supplier supplier) { public StorageMonitorBlock getStorageMonitor() { return Objects.requireNonNull(storageMonitor).get(); } + + public BlockColorMap getNetworkReceiver() { + return networkReceiver; + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java index 2ca3bd93a..4d78b1573 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentIds.java @@ -49,6 +49,7 @@ public final class ContentIds { public static final ResourceLocation CREATIVE_RANGE_UPGRADE = createIdentifier("creative_range_upgrade"); public static final ResourceLocation STORAGE_MONITOR = createIdentifier("storage_monitor"); public static final ResourceLocation CONFIGURATION_CARD = createIdentifier("configuration_card"); + public static final ResourceLocation NETWORK_RECEIVER = createIdentifier("network_receiver"); private ContentIds() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java index b1ac504ec..32a2e65d8 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/ContentNames.java @@ -22,6 +22,7 @@ public final class ContentNames { public static final MutableComponent STORAGE_MONITOR = createTranslation("block", "storage_monitor"); public static final MutableComponent INTERFACE = createTranslation("block", "interface"); public static final MutableComponent DISK_DRIVE = createTranslation("block", "disk_drive"); + public static final MutableComponent NETWORK_RECEIVER = createTranslation("block", "network_receiver"); private ContentNames() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java index 002b99b20..d2c58c041 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/CreativeModeTabItems.java @@ -47,6 +47,7 @@ private static void appendBlocks(final Consumer consumer) { itemConsumer.accept(Blocks.INSTANCE.getMachineCasing()); itemConsumer.accept(Blocks.INSTANCE.getQuartzEnrichedIronBlock()); itemConsumer.accept(Blocks.INSTANCE.getStorageMonitor()); + Items.INSTANCE.getNetworkReceivers().stream().map(Supplier::get).forEach(itemConsumer); } private static void appendBlockColors(final Consumer consumer, final BlockColorMap map) { diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java index ba04bd65e..733a39e42 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/DefaultEnergyUsage.java @@ -14,6 +14,7 @@ public final class DefaultEnergyUsage { public static final long DESTRUCTOR = 3; public static final long DISK_DRIVE_PER_DISK = 4; public static final long STORAGE_MONITOR = 4; + public static final long NETWORK_RECEIVER = 8; public static final long CONTROLLER_CAPACITY = 1000; diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java index fdfcdc5f3..9851418ac 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Items.java @@ -39,6 +39,7 @@ public final class Items { private final List> allDestructors = new ArrayList<>(); private final List> allConstructors = new ArrayList<>(); private final List> allWirelessTransmitters = new ArrayList<>(); + private final List> allNetworkReceivers = new ArrayList<>(); @Nullable private Supplier quartzEnrichedIron; @Nullable @@ -363,4 +364,12 @@ public Item getConfigurationCard() { public void setConfigurationCard(final Supplier supplier) { this.configurationCard = supplier; } + + public void addNetworkReceiver(final Supplier supplier) { + allNetworkReceivers.add(supplier); + } + + public List> getNetworkReceivers() { + return Collections.unmodifiableList(allNetworkReceivers); + } } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java index 658435383..cc62023c7 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/content/Tags.java @@ -21,6 +21,7 @@ public final class Tags { public static final TagKey CONSTRUCTORS = createTag("constructors"); public static final TagKey DESTRUCTORS = createTag("destructors"); public static final TagKey WIRELESS_TRANSMITTERS = createTag("wireless_transmitters"); + public static final TagKey NETWORK_RECEIVERS = createTag("network_receivers"); private Tags() { } diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java index c624df9ba..0090b8c2e 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/internal/grid/WirelessGrid.java @@ -57,7 +57,7 @@ public Storage getItemStorage() { } @Override - public boolean isActive() { + public boolean isGridActive() { final boolean networkActive = session.resolveNetwork().map( network -> network.getComponent(EnergyNetworkComponent.class).getStored() > 0 ).orElse(false); diff --git a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java index 364ec831b..a8e97e1b1 100644 --- a/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java +++ b/refinedstorage2-platform-common/src/main/java/com/refinedmods/refinedstorage2/platform/common/menu/GridExtendedMenuProvider.java @@ -34,7 +34,7 @@ public GridExtendedMenuProvider(final Grid grid, @Override public void writeScreenOpeningData(final ServerPlayer player, final FriendlyByteBuf buf) { - buf.writeBoolean(grid.isActive()); + buf.writeBoolean(grid.isGridActive()); final List> types = storageChannelTypeRegistry.getAll(); buf.writeInt(types.size()); types.forEach(type -> writeStorageChannel(type, buf)); diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index f2fc84abb..f5a4215a3 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -28,6 +28,7 @@ "block.refinedstorage2.destructor": "Destructor", "block.refinedstorage2.wireless_transmitter": "Wireless Transmitter", "block.refinedstorage2.storage_monitor": "Storage Monitor", + "block.refinedstorage2.network_receiver": "Network Receiver", "gui.refinedstorage2.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage2.disk_drive.disks": "Disks", "gui.refinedstorage2.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -301,7 +302,10 @@ "text.autoconfig.refinedstorage2.option.wirelessTransmitter": "Wireless Transmitter", "text.autoconfig.refinedstorage2.option.wirelessTransmitter.energyUsage": "Energy usage", "text.autoconfig.refinedstorage2.option.wirelessTransmitter.baseRange": "Base range", + "text.autoconfig.refinedstorage2.option.storageMonitor": "Storage Monitor", "text.autoconfig.refinedstorage2.option.storageMonitor.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage2.option.networkReceiver": "Network Receiver", + "text.autoconfig.refinedstorage2.option.networkReceiver.energyUsage": "Energy usage", "advancements.refinedstorage2.root.description": "Use one or multiple Controllers in a network to provide your network with energy", "advancements.refinedstorage2.connecting": "Connecting", "advancements.refinedstorage2.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png new file mode 100644 index 000000000..f0fdad1d7 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/base.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png new file mode 100644 index 000000000..58f7b9244 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/black.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png new file mode 100644 index 000000000..00d6eb6f0 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png new file mode 100644 index 000000000..63204a3af Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/brown.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/cyan.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/cyan.png new file mode 100644 index 000000000..dc7165708 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/cyan.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/gray.png new file mode 100644 index 000000000..f529f259e Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/green.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/green.png new file mode 100644 index 000000000..77523987d Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/green.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/inactive.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/inactive.png new file mode 100644 index 000000000..b5bc63f8f Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/inactive.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png new file mode 100644 index 000000000..a6b017a44 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_blue.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png new file mode 100644 index 000000000..fca72ba2e Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/light_gray.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png new file mode 100644 index 000000000..d2dc60135 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/lime.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/magenta.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/magenta.png new file mode 100644 index 000000000..039d61ef9 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/magenta.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/orange.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/orange.png new file mode 100644 index 000000000..7389d27e3 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/orange.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png new file mode 100644 index 000000000..7991ef0d9 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/pink.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/purple.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/purple.png new file mode 100644 index 000000000..204cbc55c Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/purple.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png new file mode 100644 index 000000000..d4b83ce38 Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/red.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/white.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/white.png new file mode 100644 index 000000000..ddbc7f2dd Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/white.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png new file mode 100644 index 000000000..b6fcecf4b Binary files /dev/null and b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/textures/block/network_receiver/cutouts/yellow.png differ diff --git a/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json new file mode 100644 index 000000000..4f9df536f --- /dev/null +++ b/refinedstorage2-platform-common/src/main/resources/data/refinedstorage2/recipes/network_receiver.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ANA", + "CMD", + "EEE" + ], + "key": { + "E": { + "item": "minecraft:ender_pearl" + }, + "C": { + "item": "refinedstorage2:construction_core" + }, + "M": { + "item": "refinedstorage2:machine_casing" + }, + "D": { + "item": "refinedstorage2:destruction_core" + }, + "A": { + "item": "refinedstorage2:advanced_processor" + }, + "N": { + "item": "minecraft:netherite_ingot" + } + }, + "result": { + "item": "refinedstorage2:network_receiver" + } +} \ No newline at end of file diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java index 338e5269d..f02216b03 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ClientModInitializerImpl.java @@ -108,6 +108,7 @@ private void setRenderLayers() { setCutout(Blocks.INSTANCE.getConstructor()); setCutout(Blocks.INSTANCE.getDestructor()); setCutout(Blocks.INSTANCE.getWirelessTransmitter()); + setCutout(Blocks.INSTANCE.getNetworkReceiver()); } private void setCutout(final BlockColorMap blockMap) { @@ -144,6 +145,9 @@ private void registerEmissiveModels() { Blocks.INSTANCE.getWirelessTransmitter().forEach( (color, id, block) -> registerEmissiveWirelessTransmitterModels(color, id) ); + Blocks.INSTANCE.getNetworkReceiver().forEach( + (color, id, block) -> registerEmissiveNetworkReceiverModels(color, id) + ); } private void registerEmissiveControllerModels(final DyeColor color) { @@ -223,6 +227,19 @@ private void registerEmissiveWirelessTransmitterModels(final DyeColor color, fin ); } + private void registerEmissiveNetworkReceiverModels(final DyeColor color, final ResourceLocation id) { + // Block + EmissiveModelRegistry.INSTANCE.register( + createIdentifier("block/network_receiver/" + color.getName()), + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + ); + // Item + EmissiveModelRegistry.INSTANCE.register( + id, + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + ); + } + private void registerPackets() { ClientPlayNetworking.registerGlobalReceiver(PacketIds.STORAGE_INFO_RESPONSE, new StorageInfoResponsePacket()); ClientPlayNetworking.registerGlobalReceiver(PacketIds.GRID_UPDATE, new GridUpdatePacket()); diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java index 49f8c4428..0a1468184 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/ConfigImpl.java @@ -75,6 +75,11 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage2.p DefaultEnergyUsage.STORAGE_MONITOR ); + @ConfigEntry.Gui.CollapsibleObject + private SimpleEnergyUsageEntryImpl networkReceiver = new SimpleEnergyUsageEntryImpl( + DefaultEnergyUsage.NETWORK_RECEIVER + ); + public static ConfigImpl get() { return AutoConfig.getConfigHolder(ConfigImpl.class).getConfig(); } @@ -169,6 +174,11 @@ public SimpleEnergyUsageEntry getStorageMonitor() { return storageMonitor; } + @Override + public SimpleEnergyUsageEntry getNetworkReceiver() { + return networkReceiver; + } + private static class GridEntryImpl implements GridEntry { private boolean largeFont = false; diff --git a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java index f11ede392..789a3d5a7 100644 --- a/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-fabric/src/main/java/com/refinedmods/refinedstorage2/platform/fabric/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -88,6 +88,7 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) ContentIds.WIRELESS_TRANSMITTER, Tags.WIRELESS_TRANSMITTERS ); + groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); } @Override diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java index 782b8fd36..b8ca777b6 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ConfigImpl.java @@ -36,6 +36,7 @@ public class ConfigImpl implements Config { private final WirelessGridEntry wirelessGrid; private final WirelessTransmitterEntry wirelessTransmitter; private final SimpleEnergyUsageEntry storageMonitor; + private final SimpleEnergyUsageEntry networkReceiver; public ConfigImpl() { cable = new SimpleEnergyUsageEntryImpl("cable", "Cable", DefaultEnergyUsage.CABLE); @@ -64,6 +65,11 @@ public ConfigImpl() { "Storage Monitor", DefaultEnergyUsage.STORAGE_MONITOR ); + networkReceiver = new SimpleEnergyUsageEntryImpl( + "networkReceiver", + "Network Receiver", + DefaultEnergyUsage.NETWORK_RECEIVER + ); spec = builder.build(); } @@ -161,6 +167,11 @@ public SimpleEnergyUsageEntry getStorageMonitor() { return storageMonitor; } + @Override + public SimpleEnergyUsageEntry getNetworkReceiver() { + return networkReceiver; + } + private class SimpleEnergyUsageEntryImpl implements SimpleEnergyUsageEntry { private final ForgeConfigSpec.LongValue energyUsage; diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java index 3b4a672b7..a726d4e1e 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockModelProvider.java @@ -24,6 +24,7 @@ protected void registerModels() { registerGrids(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid"); registerDetectors(); registerWirelessTransmitters(); + registerNetworkReceivers(); } private void registerCables() { @@ -110,4 +111,20 @@ private void registerWirelessTransmitters() { .forEach((color, id, block) -> withExistingParent("block/wireless_transmitter/" + color.getName(), parent) .texture("cutout", createIdentifier("block/wireless_transmitter/cutouts/" + color.getName()))); } + + private void registerNetworkReceivers() { + final ResourceLocation base = createIdentifier("block/emissive_all_cutout"); + final ResourceLocation baseTexture = createIdentifier("block/network_receiver/base"); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, receiver) -> { + final ResourceLocation cutout = createIdentifier("block/network_receiver/cutouts/" + color.getName()); + withExistingParent("block/network_receiver/" + color.getName(), base) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", cutout); + }); + withExistingParent("block/network_receiver/inactive", base) + .texture("particle", baseTexture) + .texture("all", baseTexture) + .texture("cutout", createIdentifier("block/network_receiver/cutouts/inactive")); + } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java index 208e90ddd..2a4249ef0 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/BlockStateProvider.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ControllerBlock; import com.refinedmods.refinedstorage2.platform.common.block.ControllerEnergyType; import com.refinedmods.refinedstorage2.platform.common.block.DetectorBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.block.direction.BiDirectionType; import com.refinedmods.refinedstorage2.platform.common.block.direction.DirectionTypeImpl; @@ -61,6 +62,7 @@ protected void registerStatesAndModels() { registerWirelessTransmitters(); registerConstructorDestructors(Blocks.INSTANCE.getConstructor(), "constructor"); registerConstructorDestructors(Blocks.INSTANCE.getDestructor(), "destructor"); + registerNetworkReceivers(); } private void registerCables() { @@ -257,6 +259,22 @@ private ConfiguredModel[] registerDetector(final ModelFile unpowered, return model.build(); } + private void registerNetworkReceivers() { + final ModelFile inactive = modelFile(createIdentifier("block/network_receiver/inactive")); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> { + final var builder = getVariantBuilder(block.get()); + builder.forAllStates(blockState -> { + final ConfiguredModel.Builder model = ConfiguredModel.builder(); + if (Boolean.TRUE.equals(blockState.getValue(NetworkReceiverBlock.ACTIVE))) { + model.modelFile(modelFile(createIdentifier("block/network_receiver/" + color.getName()))); + } else { + model.modelFile(inactive); + } + return model.build(); + }); + }); + } + private void addRotation(final ConfiguredModel.Builder model, final Direction direction) { final int rotationX; if (direction.getAxis() == Direction.Axis.Y) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java index 67778356c..cb5fcb142 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/ItemModelProvider.java @@ -8,6 +8,7 @@ import com.refinedmods.refinedstorage2.platform.common.block.ExporterBlock; import com.refinedmods.refinedstorage2.platform.common.block.ExternalStorageBlock; import com.refinedmods.refinedstorage2.platform.common.block.ImporterBlock; +import com.refinedmods.refinedstorage2.platform.common.block.NetworkReceiverBlock; import com.refinedmods.refinedstorage2.platform.common.block.WirelessTransmitterBlock; import com.refinedmods.refinedstorage2.platform.common.block.grid.CraftingGridBlock; import com.refinedmods.refinedstorage2.platform.common.block.grid.GridBlock; @@ -42,6 +43,7 @@ protected void registerModels() { registerConstructors(); registerDestructors(); registerWirelessTransmitters(); + registerNetworkReceivers(); } private void registerCables() { @@ -181,6 +183,17 @@ private void registerWirelessTransmitters() { )); } + private void registerNetworkReceivers() { + final ResourceLocation base = createIdentifier("block/network_receiver/inactive"); + final ColorMap blocks = Blocks.INSTANCE.getNetworkReceiver(); + blocks.forEach((color, id, block) -> singleTexture( + id.getPath(), + base, + "cutout", + createIdentifier("block/network_receiver/cutouts/" + color.getName()) + )); + } + private ModelFile modelFile(final ResourceLocation location) { return new ModelFile.ExistingModelFile(location, existingFileHelper); } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java index 799c7985d..c250309a8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/loot/BlockDropProvider.java @@ -30,6 +30,7 @@ protected void generate() { Blocks.INSTANCE.getConstructor().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getDestructor().forEach((color, id, block) -> dropSelf(block.get())); Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> dropSelf(block.get())); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> dropSelf(block.get())); } @Override @@ -44,6 +45,7 @@ protected Iterable getKnownBlocks() { blocks.addAll(Blocks.INSTANCE.getConstructor().values()); blocks.addAll(Blocks.INSTANCE.getDestructor().values()); blocks.addAll(Blocks.INSTANCE.getWirelessTransmitter().values()); + blocks.addAll(Blocks.INSTANCE.getNetworkReceiver().values()); return blocks; } } diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java index 9d6cd3443..0ccedf2a8 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/recipe/RecoloringRecipeProvider.java @@ -57,6 +57,9 @@ protected void buildRecipes(final Consumer provider) { Blocks.INSTANCE.getWirelessTransmitter().forEach((color, id, block) -> recolorItems(Tags.WIRELESS_TRANSMITTERS, block.get().asItem(), color) .save(provider, createIdentifier("coloring/" + color.getName() + "_wireless_transmitter"))); + Blocks.INSTANCE.getNetworkReceiver().forEach((color, id, block) -> + recolorItems(Tags.NETWORK_RECEIVERS, block.get().asItem(), color) + .save(provider, createIdentifier("coloring/" + color.getName() + "_network_receiver"))); } private ShapelessRecipeBuilder recolorItems(final TagKey dyeable, final Item result, final DyeColor color) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java index 7cd840ee3..0b04c869b 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/datagen/tag/ItemTagGenerator.java @@ -31,6 +31,7 @@ import static com.refinedmods.refinedstorage2.platform.common.content.Tags.FLUID_STORAGE_DISKS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.GRIDS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.IMPORTERS; +import static com.refinedmods.refinedstorage2.platform.common.content.Tags.NETWORK_RECEIVERS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.STORAGE_DISKS; import static com.refinedmods.refinedstorage2.platform.common.content.Tags.WIRELESS_TRANSMITTERS; import static com.refinedmods.refinedstorage2.platform.common.util.IdentifierUtil.MOD_ID; @@ -99,6 +100,10 @@ protected void addTags(final HolderLookup.Provider provider) { Blocks.INSTANCE.getWirelessTransmitter().values().stream() .map(block -> (Supplier) block::asItem) .toList()); + addAllToTag(NETWORK_RECEIVERS, + Blocks.INSTANCE.getNetworkReceiver().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); } private void addAllToTag(final TagKey t, final Collection> items) { diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java index 95f94a182..52aa07a34 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/integration/recipemod/rei/RefinedStorageREIClientPlugin.java @@ -87,6 +87,7 @@ public void registerCollapsibleEntries(final CollapsibleEntryRegistry registry) ContentIds.WIRELESS_TRANSMITTER, Tags.WIRELESS_TRANSMITTERS ); + groupItems(registry, Blocks.INSTANCE.getNetworkReceiver(), ContentIds.NETWORK_RECEIVER, Tags.NETWORK_RECEIVERS); } @Override diff --git a/settings.gradle b/settings.gradle index 48e8abd26..142a92e09 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -gradle.ext.refinedArchitectVersion = "0.9.0" +gradle.ext.refinedArchitectVersion = "0.9.1" dependencyResolutionManagement { repositories {