Skip to content

Commit

Permalink
🍱 roof ridge side textures
Browse files Browse the repository at this point in the history
Signed-off-by: LocusAzzurro <[email protected]>
  • Loading branch information
LocusAzzurro committed Jan 28, 2024
1 parent c2266f4 commit 973cfab
Show file tree
Hide file tree
Showing 68 changed files with 180 additions and 27 deletions.
50 changes: 50 additions & 0 deletions src/generated/resources/.cache/cache
Original file line number Diff line number Diff line change
Expand Up @@ -2787,6 +2787,31 @@ e7487305493a472b16b5ee41e95f93f669961d88 assets/ultramarine/models/item/yellow_r
acc04bfc3e44f34feb4f43a54d0b2d373d99cb42 assets/ultramarine/models/item/yellow_roof_tiles.json
e48e56ce7a08d5506893c975360626e425e808ea assets/ultramarine/models/item/yellow_sky_lantern.json
33fdaa88c4ccf5041a8c9cebe07f945d2e77f873 assets/ultramarine/models/item/yellow_su_style_caihua.json
45320117250a1e6bdb5f6015db46569eb9b2fab8 assets/ultramarine/textures/block/black_main_roof_ridge_connection_front_snow_stage_1.png
3a9771d9bfc8740b40a4b5197b4a1d691dd6773c assets/ultramarine/textures/block/black_main_roof_ridge_connection_front_snow_stage_2.png
6e87002c2a64d2cfc8970efb43582d253f8a256d assets/ultramarine/textures/block/black_main_roof_ridge_connection_front_snow_stage_3.png
f035e861ac72bf96b6e50710213505f7d3c9039a assets/ultramarine/textures/block/black_main_roof_ridge_connection_front_snow_stage_4.png
811b5a9163a9b9a2f1089e235489d292597bd215 assets/ultramarine/textures/block/black_main_roof_ridge_connection_front_snow_stage_5.png
9765fae47fb99ea1f843d338cff53de6f082e8db assets/ultramarine/textures/block/black_roof_ridge_connection_front_snow_stage_1.png
7c1ba16686fb86342ca4aa2111792cf523222cfe assets/ultramarine/textures/block/black_roof_ridge_connection_front_snow_stage_2.png
d53d69cc3fedc5e7bb3c0403710df65d4f9d613e assets/ultramarine/textures/block/black_roof_ridge_connection_front_snow_stage_3.png
7359e50f908690bdf804883f28a47ccf46877f53 assets/ultramarine/textures/block/black_roof_ridge_connection_front_snow_stage_4.png
f7aa20077426129cae7e3c7b473075e3965da504 assets/ultramarine/textures/block/black_roof_ridge_connection_front_snow_stage_5.png
a7106d8e793b6eac6f4ec57836b6c774c85bbb73 assets/ultramarine/textures/block/black_roof_ridge_connection_side_snow_stage_1.png
5c41b110d863d869ee1babc1a002956ebf9e2b04 assets/ultramarine/textures/block/black_roof_ridge_connection_side_snow_stage_2.png
bb6ca45660057cb53d62d41b3b9d48ae2393db45 assets/ultramarine/textures/block/black_roof_ridge_connection_side_snow_stage_3.png
131c1dc68c81219f7b6e72830d3e528937f4a27f assets/ultramarine/textures/block/black_roof_ridge_connection_side_snow_stage_4.png
9845a935a6088d3a88392221b9671d469b7fdd4c assets/ultramarine/textures/block/black_roof_ridge_connection_side_snow_stage_5.png
794fd831845e69736096d3eb68fcb321fccc3e60 assets/ultramarine/textures/block/black_roof_ridge_lower_side_snow_stage_1.png
2d66d7e604ae3ea358299f8969f1f83acec1cfa6 assets/ultramarine/textures/block/black_roof_ridge_lower_side_snow_stage_2.png
aa02ee1d62a7c01564b129e7c956f9b265ebb85a assets/ultramarine/textures/block/black_roof_ridge_lower_side_snow_stage_3.png
ec5b825e4c481ea2511c55bfcb9b67e04e82ce9b assets/ultramarine/textures/block/black_roof_ridge_lower_side_snow_stage_4.png
b1ac31b3d73911acffb6eebedfbc53dbaa9f7cbb assets/ultramarine/textures/block/black_roof_ridge_lower_side_snow_stage_5.png
819cafb7fb4eddbcb01614616cd68a84e021dfcd assets/ultramarine/textures/block/black_roof_ridge_upper_side_snow_stage_1.png
f6fd210dde0af7bd58ad80c6441891c20fb8df62 assets/ultramarine/textures/block/black_roof_ridge_upper_side_snow_stage_2.png
3ae87d477e3c4ce40e812e7c5f34f393c866539d assets/ultramarine/textures/block/black_roof_ridge_upper_side_snow_stage_3.png
3df7703d7a07945f4d4be832ef83c722fab31a32 assets/ultramarine/textures/block/black_roof_ridge_upper_side_snow_stage_4.png
8f3f147d97eed294624b8b11ae4993d9d3052213 assets/ultramarine/textures/block/black_roof_ridge_upper_side_snow_stage_5.png
188d4a96392e10ef1434a4441ae8064a4978270d assets/ultramarine/textures/block/black_roof_tile_edge_snow_stage_1.png
40da09595d3915133aca4d2d8dd0eaa5a1107746 assets/ultramarine/textures/block/black_roof_tile_edge_snow_stage_1_left.png
03ead663bec1c6f5161633a5b7334ffcc39e0060 assets/ultramarine/textures/block/black_roof_tile_edge_snow_stage_1_none.png
Expand Down Expand Up @@ -3062,6 +3087,31 @@ a3b92fb5712a3b8cad0542f1826be91a2d22b561 assets/ultramarine/textures/block/green
9728c0b58c3887827bcb7f179a05f0c3f0e75fbf assets/ultramarine/textures/block/green_roof_tiles_snow_stage_9_left.png
f20a136f52ad1b555ed0e6c3a99d364abd67bb0d assets/ultramarine/textures/block/green_roof_tiles_snow_stage_9_none.png
430a6be898f34d9d1ec408e8245f0b50e4f547d1 assets/ultramarine/textures/block/green_roof_tiles_snow_stage_9_right.png
4502da96d3c8443fad2da9ad9538c7b93cf6aa0e assets/ultramarine/textures/block/yellow_main_roof_ridge_connection_front_snow_stage_1.png
7b42c6091278452d74504d290cdccc361f882558 assets/ultramarine/textures/block/yellow_main_roof_ridge_connection_front_snow_stage_2.png
a7f3bef3e236349cc8354dd5c11e57fe70f9793d assets/ultramarine/textures/block/yellow_main_roof_ridge_connection_front_snow_stage_3.png
24cad8c719b1a92d942306820b673f90f32a25ed assets/ultramarine/textures/block/yellow_main_roof_ridge_connection_front_snow_stage_4.png
918900d71b5c53de73a1dae6a21033f332ad7f18 assets/ultramarine/textures/block/yellow_main_roof_ridge_connection_front_snow_stage_5.png
8f01903b834785f534085460a6a3b1bd63cbed9d assets/ultramarine/textures/block/yellow_roof_ridge_connection_front_snow_stage_1.png
c05c3085e55f0d63c85cb642ec0648cb11ea31c3 assets/ultramarine/textures/block/yellow_roof_ridge_connection_front_snow_stage_2.png
954eb6e340df75d96f902b9891113e210f311147 assets/ultramarine/textures/block/yellow_roof_ridge_connection_front_snow_stage_3.png
13f120a92d9b50bff14a4a11cbf4095749178a72 assets/ultramarine/textures/block/yellow_roof_ridge_connection_front_snow_stage_4.png
23983bb71aa5077bf47bd5917a9536030e41dc21 assets/ultramarine/textures/block/yellow_roof_ridge_connection_front_snow_stage_5.png
e49f0480d60efbb3be4206469f714a0b16f2989f assets/ultramarine/textures/block/yellow_roof_ridge_connection_side_snow_stage_1.png
c40172d27b9e0c50b13c29166c7ac0185fd8170a assets/ultramarine/textures/block/yellow_roof_ridge_connection_side_snow_stage_2.png
bbb901d0edf112d7416174aa437f4315ea6a5ca2 assets/ultramarine/textures/block/yellow_roof_ridge_connection_side_snow_stage_3.png
c4c12712604857430ded9d9146e1ed6385cda624 assets/ultramarine/textures/block/yellow_roof_ridge_connection_side_snow_stage_4.png
f9eb435f456437584c7993eee63df455faa64b49 assets/ultramarine/textures/block/yellow_roof_ridge_connection_side_snow_stage_5.png
9f0c25183d91b7b6d01987361a4535f7152122df assets/ultramarine/textures/block/yellow_roof_ridge_lower_side_snow_stage_1.png
3435af5ae5bc3a4741f1ab40f6c9cc3931aaa3a6 assets/ultramarine/textures/block/yellow_roof_ridge_lower_side_snow_stage_2.png
3ba2310019b696dee7f819cf6a8b412ee06436e9 assets/ultramarine/textures/block/yellow_roof_ridge_lower_side_snow_stage_3.png
9d22466807213d64fb40d35d7bd5d7c7f7306738 assets/ultramarine/textures/block/yellow_roof_ridge_lower_side_snow_stage_4.png
5f374e578ce1fcdce5e67802fd0864d442e7b0be assets/ultramarine/textures/block/yellow_roof_ridge_lower_side_snow_stage_5.png
1d10e67a13c811ed741b3dd858afac5f23a7739a assets/ultramarine/textures/block/yellow_roof_ridge_upper_side_snow_stage_1.png
cfb73fbd9dae38e12111eccb03d12c084e0ba26e assets/ultramarine/textures/block/yellow_roof_ridge_upper_side_snow_stage_2.png
e5d6757704de73f7d2d55164ac2ddcf078398128 assets/ultramarine/textures/block/yellow_roof_ridge_upper_side_snow_stage_3.png
fb1707398bcac6f6f845a0c98f5a00d6df9f50cd assets/ultramarine/textures/block/yellow_roof_ridge_upper_side_snow_stage_4.png
dc3c628e9fdb0847803f91dba4dbab73c54488cb assets/ultramarine/textures/block/yellow_roof_ridge_upper_side_snow_stage_5.png
660bb66ef74669f294bccd474e67cbf4cb8304c5 assets/ultramarine/textures/block/yellow_roof_tile_edge_snow_stage_1.png
5b3a9a1e3168827bcca40b00cbbc4bb0337fa960 assets/ultramarine/textures/block/yellow_roof_tile_edge_snow_stage_1_left.png
cd72094f9b29702f2b318730ed51f04649d3c250 assets/ultramarine/textures/block/yellow_roof_tile_edge_snow_stage_1_none.png
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,18 @@ public class BlockRegistry {

// ROOF RIDGE

public static final RegistryObject<Block> BLACK_ROOF_RIDGE_UPPER = BLOCKS.register("black_roof_ridge_upper", () -> new BaseBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_ROOF_RIDGE_LOWER = BLOCKS.register("black_roof_ridge_lower", () -> new BaseBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_ROOF_RIDGE_UPPER = BLOCKS.register("black_roof_ridge_upper", () -> new RoofRidge(DyeColor.BLACK, RoofRidge.RoofRidgeType.UPPER));
public static final RegistryObject<Block> BLACK_ROOF_RIDGE_LOWER = BLOCKS.register("black_roof_ridge_lower", () -> new RoofRidge(DyeColor.BLACK, RoofRidge.RoofRidgeType.LOWER));
public static final RegistryObject<Block> BLACK_ROOF_RIDGE_CONNECTION = BLOCKS.register("black_roof_ridge_connection", () -> new BaseAxialBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_MAIN_ROOF_RIDGE_CONNECTION = BLOCKS.register("black_main_roof_ridge_connection", () -> new BaseHorizontalDirectionalBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_ROOF_RIDGE_UPPER_SLAB = BLOCKS.register("black_roof_ridge_upper_slab", () -> new BaseSlab(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_MAIN_ROOF_RIDGE_SLAB = BLOCKS.register("black_main_roof_ridge_slab", () -> new BaseHorizontalDirectionalSlab(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_MAIN_ROOF_RIDGE_PANEL = BLOCKS.register("black_main_roof_ridge_panel", () -> new RoofRidgePanel(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_MAIN_ROOF_RIDGE_PLATE = BLOCKS.register("black_main_roof_ridge_plate", () -> new RoofRidgePlate(BaseBlockProperty.STONE));
public static final RegistryObject<Block> BLACK_MAIN_ROOF_RIDGE_STAIRS = BLOCKS.register("black_main_roof_ridge_stairs", () -> new StraightStairBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_UPPER = BLOCKS.register("yellow_roof_ridge_upper", () -> new BaseBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_LOWER = BLOCKS.register("yellow_roof_ridge_lower", () -> new BaseBlock(BaseBlockProperty.STONE));

public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_UPPER = BLOCKS.register("yellow_roof_ridge_upper", () -> new RoofRidge(DyeColor.YELLOW, RoofRidge.RoofRidgeType.UPPER));
public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_LOWER = BLOCKS.register("yellow_roof_ridge_lower", () -> new RoofRidge(DyeColor.YELLOW, RoofRidge.RoofRidgeType.LOWER));
public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_CONNECTION = BLOCKS.register("yellow_roof_ridge_connection", () -> new BaseAxialBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> YELLOW_MAIN_ROOF_RIDGE_CONNECTION = BLOCKS.register("yellow_main_roof_ridge_connection", () -> new BaseHorizontalDirectionalBlock(BaseBlockProperty.STONE));
public static final RegistryObject<Block> YELLOW_ROOF_RIDGE_UPPER_SLAB = BLOCKS.register("yellow_roof_ridge_upper_slab", () -> new BaseSlab(BaseBlockProperty.STONE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.voxelutopia.ultramarine.Ultramarine;
import com.voxelutopia.ultramarine.world.block.RoofTiles;
import com.voxelutopia.ultramarine.world.block.SnowRoofRidge;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.DataProvider;
import net.minecraft.data.HashCache;
Expand Down Expand Up @@ -33,6 +34,40 @@ public MergedTextureProvider(DataGenerator generator, ExistingFileHelper fileHel
@Override
public void run(HashCache pCache) throws IOException {

roofTilesTextureMerge(pCache);

BufferedImage roofRidgeSideBase, snowLayer, combinedTexture;
String[] roofRidgeColors = {"black", "yellow"};
String[] roofRidgeSideTypes = {
"roof_ridge_upper_side",
"roof_ridge_lower_side",
"roof_ridge_connection_front",
"roof_ridge_connection_side",
"main_roof_ridge_connection_front"};
int maxSnowStages = SnowRoofRidge.MAX_SNOW_STAGES;

for (String color : roofRidgeColors){
for (String type : roofRidgeSideTypes){
for (int stage = 1; stage <= maxSnowStages; stage++){

roofRidgeSideBase = ImageIO.read(getInputTexture(color + "_" + type));
snowLayer = ImageIO.read(getInputTexture("roof_ridge_side_snow_stage_" + stage));
combinedTexture = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);

Graphics graphics = combinedTexture.getGraphics();
graphics.drawImage(roofRidgeSideBase, 0, 0, null);
graphics.drawImage(snowLayer, 0, 0, null);

save(pCache, combinedTexture, getOutputPath(color + "_" + type + "_snow_stage_" + stage));
graphics.dispose();
}
}
}


}

private void roofTilesTextureMerge(HashCache pCache) throws IOException {
BufferedImage roofTileBase, snowLayer, snowSideUp, snowSideLeft, snowSideRight, combinedTexture;
String[] roofTileColors = {"gray", "yellow", "green", "blue", "cyan", "black"};
for (RoofTiles.RoofTileType type: RoofTiles.RoofTileType.values()){
Expand Down Expand Up @@ -92,6 +127,8 @@ public void run(HashCache pCache) throws IOException {
}
}



@Override
public String getName() {
return "Ultramarine Texture Merger";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,27 +247,7 @@ protected void registerStatesAndModels() {

BlockRegistry.BLOCKS.getEntries().stream().filter(blockRegistryObject -> blockRegistryObject.get() instanceof RoofTiles)
.forEach(tile -> roofTiles(tile.get()));
/*
roofTiles(BlockRegistry.GRAY_ROOF_TILES.get());
roofTiles(BlockRegistry.GRAY_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.GRAY_ROOF_TILE_EDGE.get());
roofTiles(BlockRegistry.YELLOW_ROOF_TILES.get());
roofTiles(BlockRegistry.YELLOW_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.YELLOW_ROOF_TILE_EDGE.get());
roofTiles(BlockRegistry.GREEN_ROOF_TILES.get());
roofTiles(BlockRegistry.GREEN_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.GREEN_ROOF_TILE_EDGE.get());
roofTiles(BlockRegistry.BLUE_ROOF_TILES.get());
roofTiles(BlockRegistry.BLUE_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.BLUE_ROOF_TILE_EDGE.get());
roofTiles(BlockRegistry.CYAN_ROOF_TILES.get());
roofTiles(BlockRegistry.CYAN_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.CYAN_ROOF_TILE_EDGE.get());
roofTiles(BlockRegistry.BLACK_ROOF_TILES.get());
roofTiles(BlockRegistry.BLACK_ROOF_TILE_STAIRS.get());
roofTiles(BlockRegistry.BLACK_ROOF_TILE_EDGE.get());
*/



sideBottomTop(BlockRegistry.BLACK_ROOF_RIDGE_UPPER.get());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.voxelutopia.ultramarine.world.block;

import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;

public class RoofRidge extends BaseBlock implements SnowRoofRidge{

private final DyeColor color;
private final RoofRidgeType type;

public RoofRidge(DyeColor color, RoofRidgeType type){
super(BaseBlockProperty.STONE);
this.type = type;
this.color = color;
this.registerDefaultState(this.stateDefinition.any()
.setValue(SNOW_LAYERS, 0));
}

@Override
public void handlePrecipitation(BlockState pState, Level pLevel, BlockPos pPos, Biome.Precipitation pPrecipitation) {
//todo
}

@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
super.createBlockStateDefinition(pBuilder);
pBuilder.add(SNOW_LAYERS);
}

public DyeColor getColor() {
return color;
}

public RoofRidgeType getType() {
return type;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.voxelutopia.ultramarine.world.block;

import com.voxelutopia.ultramarine.world.block.state.ModBlockStateProperties;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.StringRepresentable;
Expand Down Expand Up @@ -33,8 +34,8 @@ public class RoofTiles extends ShiftableBlock{
public static final BlockBehaviour.Properties PROPERTIES = BlockBehaviour.Properties.of(Material.STONE)
.requiresCorrectToolForDrops().strength(1.5F, 4.0F).sound(SoundType.DEEPSLATE_TILES);
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
public static final IntegerProperty SNOW_LAYERS = IntegerProperty.create("snow_layers", 0, 15);
public static final EnumProperty<SnowSide> SNOW_SIDE = EnumProperty.create("snow_side", SnowSide.class);
public static final IntegerProperty SNOW_LAYERS = ModBlockStateProperties.SNOW_LAYERS;
public static final EnumProperty<SnowSide> SNOW_SIDE = ModBlockStateProperties.SNOW_SIDE;

private static final VoxelShape BOTTOM_AABB = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
private static final VoxelShape BOTTOM_AABB_SHIFTED = Block.box(0.0D, -8.0D, 0.0D, 16.0D, 0.0D, 16.0D);
Expand Down Expand Up @@ -294,6 +295,7 @@ public RoofTileType getType() {
return type;
}


@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> pBuilder) {
super.createBlockStateDefinition(pBuilder);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.voxelutopia.ultramarine.world.block;

import com.google.common.collect.ImmutableMap;
import com.voxelutopia.ultramarine.world.block.state.ModBlockStateProperties;
import net.minecraft.util.StringRepresentable;
import net.minecraft.world.level.block.state.properties.IntegerProperty;

import java.util.Map;

public interface SnowRoofRidge {

IntegerProperty SNOW_LAYERS = ModBlockStateProperties.SNOW_LAYERS;

ImmutableMap<Integer, Integer> SNOW_STAGES = ImmutableMap.ofEntries(
Map.entry(0, 0), Map.entry(1, 0), Map.entry(2, 1), Map.entry(3, 1),
Map.entry(4, 1), Map.entry(5, 2), Map.entry(6, 2), Map.entry(7, 2),
Map.entry(8, 3), Map.entry(9, 3), Map.entry(10, 3), Map.entry(11, 4),
Map.entry(12, 4), Map.entry(13, 4), Map.entry(14, 5), Map.entry(15, 5));

int MAX_SNOW_STAGES = 5;

enum RoofRidgeType implements StringRepresentable {
UPPER("roof_ridge_upper"), LOWER("roof_ridge_lower"), CONNECTION("roof_ridge_connection"), MAIN_CONNECTION("main_roof_ridge_connection");

String name;

RoofRidgeType(String name){
this.name = name;
}

@Override
public String getSerializedName() {
return name;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.voxelutopia.ultramarine.world.block.state;

import com.voxelutopia.ultramarine.world.block.RoofTiles;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.properties.*;

Expand All @@ -15,5 +16,7 @@ public class ModBlockStateProperties {
public static final EnumProperty<ChiralBlockType> CHIRAL_BLOCK_TYPE = EnumProperty.create("type", ChiralBlockType.class);
public static final EnumProperty<OrientableBlockType> ORIENTABLE_BLOCK_TYPE = EnumProperty.create("type", OrientableBlockType.class);
public static final EnumProperty<StackableBlockType> STACKABLE_BLOCK_TYPE = EnumProperty.create("type", StackableBlockType.class);
public static final IntegerProperty SNOW_LAYERS = IntegerProperty.create("snow_layers", 0, 15);
public static final EnumProperty<RoofTiles.SnowSide> SNOW_SIDE = EnumProperty.create("snow_side", RoofTiles.SnowSide.class);

}

0 comments on commit 973cfab

Please sign in to comment.