Skip to content

Commit

Permalink
Added bottom texture
Browse files Browse the repository at this point in the history
If there is no bottom texture defined, the data generator will select the default texture
  • Loading branch information
SirEndii committed May 1, 2024
1 parent 2f19a8c commit 40a9bac
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19.2 2024-05-01T23:13:23.0739928 Block States: advancedperipherals
// 1.19.2 2024-05-02T00:18:31.0476401 Block States: advancedperipherals
5e28ce1be9a6996d982641e5df1fa7162090b8cc assets/advancedperipherals/blockstates/block_reader.json
f42bdde60f84fdb312f7cf3b2be461d9c11ebdc8 assets/advancedperipherals/blockstates/chat_box.json
1227aa092fcf1327547ace6ccc9db230e45891b0 assets/advancedperipherals/blockstates/colony_integrator.json
Expand All @@ -15,17 +15,17 @@ ff12c7217911184266589813a2c8f9b0d46cfd65 assets/advancedperipherals/blockstates/
726cf2599b0c765bcfacda88a1943be74f985877 assets/advancedperipherals/blockstates/redstone_integrator.json
6b176e8fdb048f7b6678bfbc1c4baf2bcfa67a1f assets/advancedperipherals/blockstates/rs_bridge.json
544ff1ecb58622350b58940036b4b1908e1146da assets/advancedperipherals/models/block/block_reader.json
dab55424ec184c5495c7ca11e5bbe77210e04c26 assets/advancedperipherals/models/block/chat_box.json
7e207db9b2b170f52565c8ed23bcc92762be6c4d assets/advancedperipherals/models/block/colony_integrator.json
1e9a2e3931bfe77f2d42a95c539b365c4517095d assets/advancedperipherals/models/block/energy_detector.json
434c2505b18d1313c0377c6bf8d5e4dba93765cc assets/advancedperipherals/models/block/environment_detector.json
583a56d88a31a4b0b6251c02fac76d32ed94fcff assets/advancedperipherals/models/block/fluid_detector.json
b97e72c395e4f3a78ab30cd6acf02adbfe29653c assets/advancedperipherals/models/block/gas_detector.json
51ab0a2a78453e711e6aa3c3020b9658bf379628 assets/advancedperipherals/models/block/geo_scanner.json
32f7941037838f9d77c5c3a4eb3b56c8786e500e assets/advancedperipherals/models/block/inventory_manager.json
674d6ee74ef7fd0360c0e1ea0b2e21734f67c096 assets/advancedperipherals/models/block/me_bridge.json
65cdb0ff57aa8439c5d80eea5c741866da9af81e assets/advancedperipherals/models/block/nbt_storage.json
36b6ac01be085492aa6298eeb89e6ecaa3cb6f82 assets/advancedperipherals/models/block/peripheral_casing.json
120df29f21059aa9d4dff53bbb80953dee8d5214 assets/advancedperipherals/models/block/player_detector.json
fbaa69d6c98549d3f2d4a1c7bebd9b6b80d56621 assets/advancedperipherals/models/block/chat_box.json
68f9d37bd85649937150ba0bb8f4496bb2ef218d assets/advancedperipherals/models/block/colony_integrator.json
b4c6645fda79d960e9201e2a60eb1c8063a07d18 assets/advancedperipherals/models/block/energy_detector.json
eca505b2bd8db5f1d13f1e28093db329b70af978 assets/advancedperipherals/models/block/environment_detector.json
f6ab51bcfc829c7db490f691e8eb491e5e7028f3 assets/advancedperipherals/models/block/fluid_detector.json
35bbc0e2edf74f6e27029cc23465e203d459f234 assets/advancedperipherals/models/block/gas_detector.json
46ebb4c9a31e224bac13ad20334469c0b55d285c assets/advancedperipherals/models/block/geo_scanner.json
2142aaccd0a0bc56aaa2091128466d2c9a733aab assets/advancedperipherals/models/block/inventory_manager.json
f089dda9e6ac12d638707fd24d099ccd56a54ccc assets/advancedperipherals/models/block/me_bridge.json
65afcae128339b244508dc66620c6c00729fce8e assets/advancedperipherals/models/block/nbt_storage.json
f6cb0dda1ce8217563903d2dfaf5ef0297939750 assets/advancedperipherals/models/block/peripheral_casing.json
5a1679b4dcc8da2d8c67674216d242456bb51366 assets/advancedperipherals/models/block/player_detector.json
d08b8946e1eb01cc9c8af4fa297b582614d1034b assets/advancedperipherals/models/block/redstone_integrator.json
15685a3c58f78db663609d56ee6fdb29652eef5f assets/advancedperipherals/models/block/rs_bridge.json
41cf7d22016a995aeda9df9d9cbf1d4069b99f9e assets/advancedperipherals/models/block/rs_bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/chat_box",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/chat_box_front",
"particle": "advancedperipherals:block/chat_box_front",
"up": "advancedperipherals:block/chat_box_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/colony_integrator",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/colony_integrator_front",
"particle": "advancedperipherals:block/colony_integrator_front",
"up": "advancedperipherals:block/colony_integrator_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/energy_detector",
"down": "advancedperipherals:block/bottom",
"east": "advancedperipherals:block/energy_detector_east",
"north": "advancedperipherals:block/energy_detector_front",
"particle": "advancedperipherals:block/energy_detector_front",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/environment_detector",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/environment_detector_front",
"particle": "advancedperipherals:block/environment_detector_front",
"up": "advancedperipherals:block/environment_detector_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/fluid_detector",
"down": "advancedperipherals:block/bottom",
"east": "advancedperipherals:block/fluid_detector_east",
"north": "advancedperipherals:block/fluid_detector_front",
"particle": "advancedperipherals:block/fluid_detector_front",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/gas_detector",
"down": "advancedperipherals:block/bottom",
"east": "advancedperipherals:block/gas_detector_east",
"north": "advancedperipherals:block/gas_detector_front",
"particle": "advancedperipherals:block/gas_detector_front",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/geo_scanner",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/geo_scanner_front",
"particle": "advancedperipherals:block/geo_scanner_front",
"up": "advancedperipherals:block/geo_scanner_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/inventory_manager",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/inventory_manager_front",
"particle": "advancedperipherals:block/inventory_manager_front",
"up": "advancedperipherals:block/inventory_manager_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/me_bridge",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/me_bridge_front",
"particle": "advancedperipherals:block/me_bridge_front",
"up": "advancedperipherals:block/me_bridge_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/nbt_storage",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/nbt_storage_front",
"particle": "advancedperipherals:block/nbt_storage_front",
"up": "advancedperipherals:block/nbt_storage_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/peripheral_casing",
"down": "advancedperipherals:block/bottom",
"particle": "advancedperipherals:block/peripheral_casing"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"down": "advancedperipherals:block/bottom",
"east": "advancedperipherals:block/player_detector_side",
"north": "advancedperipherals:block/player_detector_front",
"particle": "advancedperipherals:block/player_detector_front",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"parent": "minecraft:block/cube_all",
"textures": {
"all": "advancedperipherals:block/rs_bridge",
"down": "advancedperipherals:block/bottom",
"north": "advancedperipherals:block/rs_bridge_front",
"particle": "advancedperipherals:block/rs_bridge_front",
"up": "advancedperipherals:block/rs_bridge_top"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.registries.ForgeRegistries;

import java.lang.reflect.Array;
import java.util.Arrays;

public class BlockStatesAndModelsProvider extends BlockStateProvider {

public BlockStatesAndModelsProvider(DataGenerator packOutput, ExistingFileHelper exFileHelper) {
Expand Down Expand Up @@ -89,6 +92,12 @@ private BlockModelBuilder generateModel(Block block, boolean hasNormalSide, Stri
builder.texture(side, blockTexture(block, sideTexture));

}

// Add our default bottom texture if there is no other defined
if (!Arrays.asList(sides).contains("down") && !Arrays.asList(sides).contains("bottom")) {
builder.texture("down", AdvancedPeripherals.getRL(ModelProvider.BLOCK_FOLDER + "/" + "bottom"));
}

builder.texture("particle", particleTexture);
return builder;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 40a9bac

Please sign in to comment.