Skip to content

Commit

Permalink
✨ last window blocks
Browse files Browse the repository at this point in the history
Signed-off-by: LocusAzzurro <[email protected]>
  • Loading branch information
LocusAzzurro committed Jul 30, 2023
1 parent 3a03899 commit 26305a2
Show file tree
Hide file tree
Showing 23 changed files with 391 additions and 5 deletions.
16 changes: 13 additions & 3 deletions src/generated/resources/.cache/cache
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ d24e4229b5164a00b8b240b908902d8a424e7c66 assets/ultramarine/blockstates/pale_yel
654529a74e3a9efb2aac9ad32cf661f4b1b515f6 assets/ultramarine/blockstates/pale_yellow_stone_slab.json
9d318767225e5389b37ead2a302ba6ab28de83ad assets/ultramarine/blockstates/pale_yellow_stone_stairs.json
a3d0049c147ae768852061ead05cee34ce415225 assets/ultramarine/blockstates/paper.json
e3648f4a684180d17f394a7f35bafefc163db4f3 assets/ultramarine/blockstates/paper_strip_seal.json
1cfa9b6e943d5743386e8602cedc4077e171bf52 assets/ultramarine/blockstates/pear_basket.json
22deae290c7a5e06f9c0b0f48ef81f3efac92dee assets/ultramarine/blockstates/plaque.json
e6dd921fb3d2d726794ee8a1a9341666b7b1e197 assets/ultramarine/blockstates/plated_fish.json
3f8089e43c259cfa44895335091bf83456737680 assets/ultramarine/blockstates/plated_ham.json
bc9d9c8847d9db594ed0e46653c623c615bc3bb4 assets/ultramarine/blockstates/plated_mooncakes.json
Expand Down Expand Up @@ -301,6 +303,7 @@ aa1a1f976bfa72fcc0c3254541c1c2018fd561cf assets/ultramarine/blockstates/small_wo
7916b43e13f132b61b96b1ae8b5370a009124202 assets/ultramarine/blockstates/song_wooden_window.json
815a8d07be6257a92af7446cc221bd02e5bde357 assets/ultramarine/blockstates/square_palace_lantern.json
962ad42caa180fbc85c5d1af05d3bc6b6ebe5146 assets/ultramarine/blockstates/standing_lamp.json
5fada3304c74f055ae001afaad9f558a3176c64d assets/ultramarine/blockstates/stone_flower_window.json
10e2e745803200419dbe154e0a226c22addc8c86 assets/ultramarine/blockstates/stone_lamp.json
a5b12a5c2488a512bf9092ddf7d5249119aaec48 assets/ultramarine/blockstates/stone_pedestal.json
554ebb00cfbe7ca0e6b43f3a2e886ea6fcccc711 assets/ultramarine/blockstates/straw_hat.json
Expand Down Expand Up @@ -581,6 +584,7 @@ d091e3d18c44c49f26c94171840ad5cdcf875699 assets/ultramarine/models/block/rosewoo
5dc7fe87d561a47f752b9eb69681b6d30e8246ec assets/ultramarine/models/block/rosewood_stairs.json
2bc5863812dbb3dbee0e5c0865572e254f0ba2e8 assets/ultramarine/models/block/rosewood_stairs_inner.json
a34f51f167f46069c8cad3c11bea75a68786b0cf assets/ultramarine/models/block/rosewood_stairs_outer.json
7d147f9e3e73ff43c61a1fcc9033961af686cbed assets/ultramarine/models/block/stone_flower_window.json
04bdb8bed896220662cdc73dea0b3f938725cb0e assets/ultramarine/models/block/stripped_dark_oak_pillar_base.json
89ec4a243bb5f87d44d297e44e60e176d2990ef0 assets/ultramarine/models/block/variegated_rock_slab.json
9dffb400ae850a891ce7f75f7887aa66ed60fcbc assets/ultramarine/models/block/variegated_rock_slab_top.json
Expand Down Expand Up @@ -872,7 +876,9 @@ c9cb2c0ba64ddb482d57cf5897b63daa4b2fad60 assets/ultramarine/models/item/orange_a
47275b41fbc1d9d934371b3d1d04d9ae3647e6ec assets/ultramarine/models/item/pale_yellow_stone_slab.json
9146d2080f6bdf637647cde2f6cf16de1d365d73 assets/ultramarine/models/item/pale_yellow_stone_stairs.json
a2c7672091a1dbb623de7a6d1b75cd89ab5693fa assets/ultramarine/models/item/paper.json
eb5316e7e087df341dbb1c344d26c2f207176d73 assets/ultramarine/models/item/paper_strip_seal.json
77a6ea9b1e3826125a9e47e94d63fd2762fe3e34 assets/ultramarine/models/item/pear_basket.json
39858c3bcb1fe1082952d567dcc0fa157f1b450b assets/ultramarine/models/item/plaque.json
a29e8657775c07b0ed8ce9295b208383a300b2a1 assets/ultramarine/models/item/plated_fish.json
bc14ab22bd0913f28ffae7192b5f3a0fa27953a2 assets/ultramarine/models/item/plated_ham.json
bf936879b0c03eea09e32bfb6ddb2b042aeaaea0 assets/ultramarine/models/item/plated_mooncakes.json
Expand Down Expand Up @@ -953,6 +959,7 @@ d1fa040f0d534ca3ce2a889fc1d2ff845a4118b4 assets/ultramarine/models/item/small_ye
b26b64368b06f4d619570b1c83a70c4429a0a288 assets/ultramarine/models/item/song_wooden_window.json
ba1fbd7fea608d55edbe393de167b1ed5b0d3412 assets/ultramarine/models/item/square_palace_lantern.json
5c5bd70e9a4db58d44fcd1e4127f4caffd41a5bc assets/ultramarine/models/item/standing_lamp.json
5da588262747a2861488e5a7b9dbd4a7651dcae5 assets/ultramarine/models/item/stone_flower_window.json
142f17bd37fb8bf6cefc939ac3235a995f769118 assets/ultramarine/models/item/stone_lamp.json
9cecf685b5f961d5b2d7e4b06daeb7516690e572 assets/ultramarine/models/item/stone_pedestal.json
c37d0fddae1964fe01ec53f3b4bed582a5cc8e10 assets/ultramarine/models/item/straw_hat.json
Expand Down Expand Up @@ -1010,9 +1017,9 @@ e48e56ce7a08d5506893c975360626e425e808ea assets/ultramarine/models/item/yellow_s
67c3f3456e93f5361242cd02c815ee09b5824823 data/minecraft/advancements/recipes/decorations/white_candle.json
645284c5035f3bb0e95477cf7f70b5a9a5d5ac32 data/minecraft/recipes/white_candle.json
bb3cff8ef2b03825fc5bbeffb336436d70edcaa4 data/minecraft/tags/blocks/fences.json
cf950b371486794b68cbd17b132368152bcf0293 data/minecraft/tags/blocks/mineable/axe.json
c1fcbd5ff7d86b84bbfe684a4c815a9e2d794e14 data/minecraft/tags/blocks/mineable/axe.json
133ea1a4ce05c3a4696a95395d626b3e0d5e861e data/minecraft/tags/blocks/mineable/hoe.json
2fa6af250add335a7b1ed07804549e2d9d12a577 data/minecraft/tags/blocks/mineable/pickaxe.json
87cc5ffdceb24c37f919591cde28c8e964be7de8 data/minecraft/tags/blocks/mineable/pickaxe.json
17545dd0c9613eb0477c89b2b64307a497bc1d58 data/minecraft/tags/blocks/needs_iron_tool.json
9a78734519a787b16bc1a768f35bcbf3e480d116 data/minecraft/tags/blocks/needs_stone_tool.json
3186ba1b362c329daa8cf80a8536319b79fa838a data/minecraft/tags/blocks/planks.json
Expand Down Expand Up @@ -1374,6 +1381,8 @@ b3545373c621311f298df9dc5490665587467822 data/ultramarine/loot_tables/blocks/mem
69330bb178e5ecd8b526093d5302ad07a8cbe59f data/ultramarine/loot_tables/blocks/pale_yellow_stone_slab.json
45ab62be5eccb32bec09c6f11b6648b6ce91d6b9 data/ultramarine/loot_tables/blocks/pale_yellow_stone_stairs.json
520d2fdf89b1a80b751563217354be892938ebf3 data/ultramarine/loot_tables/blocks/paper.json
de89b3a631d2d20399b975d9625e7640f270ea26 data/ultramarine/loot_tables/blocks/paper_strip_seal.json
02135836192ace4693ec7996c4b070b61f90d3b3 data/ultramarine/loot_tables/blocks/plaque.json
b364e86b9a2b69e441eca0e6dfb7e53093cc6f22 data/ultramarine/loot_tables/blocks/plated_fish.json
c793cb3f2e39cac0c9579af9c659511141061d0a data/ultramarine/loot_tables/blocks/plated_ham.json
ab1293968a78ab426348a0bc8ed031f8c907ab73 data/ultramarine/loot_tables/blocks/plated_mooncakes.json
Expand Down Expand Up @@ -1427,6 +1436,7 @@ d09aafb8633851dfc93f68cd4c801c0caeefbd5a data/ultramarine/loot_tables/blocks/sma
ff505b0393c77094776634dd103ebbcc81e0a278 data/ultramarine/loot_tables/blocks/song_wooden_window.json
c9d09dc40d4c1388b594d26dc0c25f895828c265 data/ultramarine/loot_tables/blocks/square_palace_lantern.json
3adeb38563726c9a96e24e08c7de4a3a6829b706 data/ultramarine/loot_tables/blocks/standing_lamp.json
c4f2c03573f0349356f49b69a4a93070f55dbb14 data/ultramarine/loot_tables/blocks/stone_flower_window.json
37d97f83e3674150d1328d039a8e3469952417a3 data/ultramarine/loot_tables/blocks/stone_lamp.json
62e9130d78f9669f8a46a66e49ea805f703c0b10 data/ultramarine/loot_tables/blocks/stone_pedestal.json
d6627cdb0478d351c3b1e90992eab1e2ea61d579 data/ultramarine/loot_tables/blocks/straw_hat.json
Expand Down Expand Up @@ -1604,5 +1614,5 @@ daf52f68f622d70c0be6679947fc3eeb177e4753 data/ultramarine/recipes/yellow_roof_ti
9d963c46671a863353a8b469457bc55efd511e7f data/ultramarine/recipes/yellow_roof_tile_stairs.json
fcfeebbc3040cb32e94a29f1a90f1c0e18ab6b64 data/ultramarine/recipes/yellow_roof_tiles.json
0a749c939400810233b1bfc6fba83efc5d4ed0fe data/ultramarine/recipes/yellow_sky_lantern.json
1d966f72c52e9b1ff6bb117052b4dac06438ddc6 data/ultramarine/tags/blocks/mineable_with_shears.json
e21e701b4f91115320196e26811070813bf93fc0 data/ultramarine/tags/blocks/mineable_with_shears.json
c4efa9827b33be29f6dd9bff76d30e27d195bac6 data/ultramarine/tags/items/polished_planks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"variants": {
"facing=north,waterlogged=false": {
"model": "ultramarine:block/paper_strip_seal",
"y": 180
},
"facing=south,waterlogged=false": {
"model": "ultramarine:block/paper_strip_seal"
},
"facing=west,waterlogged=false": {
"model": "ultramarine:block/paper_strip_seal",
"y": 90
},
"facing=east,waterlogged=false": {
"model": "ultramarine:block/paper_strip_seal",
"y": 270
},
"facing=north,waterlogged=true": {
"model": "ultramarine:block/paper_strip_seal",
"y": 180
},
"facing=south,waterlogged=true": {
"model": "ultramarine:block/paper_strip_seal"
},
"facing=west,waterlogged=true": {
"model": "ultramarine:block/paper_strip_seal",
"y": 90
},
"facing=east,waterlogged=true": {
"model": "ultramarine:block/paper_strip_seal",
"y": 270
}
}
}
19 changes: 19 additions & 0 deletions src/generated/resources/assets/ultramarine/blockstates/plaque.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"variants": {
"facing=north": {
"model": "ultramarine:block/plaque",
"y": 180
},
"facing=south": {
"model": "ultramarine:block/plaque"
},
"facing=west": {
"model": "ultramarine:block/plaque",
"y": 90
},
"facing=east": {
"model": "ultramarine:block/plaque",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "ultramarine:block/stone_flower_window"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "ultramarine:block/stone_flower_window"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "ultramarine:block/paper_strip_seal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "ultramarine:block/plaque"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "ultramarine:block/stone_flower_window"
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"ultramarine:song_wooden_door",
"ultramarine:song_wooden_window",
"ultramarine:bamboo_curtain",
"ultramarine:plaque",
"ultramarine:octagonal_palace_lantern",
"ultramarine:square_palace_lantern",
"ultramarine:small_red_lantern",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"ultramarine:plated_mung_bean_cakes",
"ultramarine:wine_pot",
"ultramarine:glazed_tile_grid_window",
"ultramarine:stone_flower_window",
"ultramarine:stone_lamp",
"ultramarine:tricolor_candlestick",
"ultramarine:jade_candlestick",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "paper_strip_seal",
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:air"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "plaque",
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:air"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "stone_flower_window",
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:air"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"ultramarine:medium_blue_curtain",
"ultramarine:small_blue_curtain",
"ultramarine:red_curtain",
"ultramarine:red_curtain_corner"
"ultramarine:red_curtain_corner",
"ultramarine:paper_strip_seal"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@ public class BlockRegistry {
() -> new OpeningBlock(DecorativeBlock.with(BaseBlockProperty.WOOD).directional().noOcclusion()));
public static final RegistryObject<Block> BAMBOO_CURTAIN = BLOCKS.register("bamboo_curtain",
() -> new DecorativeBlock(DecorativeBlock.with(BaseBlockProperty.BAMBOO_WOOD).shaped(OpeningBlock.MIDDLE_AXIAL).directional().noOcclusion()));
public static final RegistryObject<Block> PLAQUE = BLOCKS.register("plaque",
() -> new DecorativeBlock(DecorativeBlock.with(BaseBlockProperty.WOOD).directional().noOcclusion()));
public static final RegistryObject<Block> PAPER_STRIP_SEAL = BLOCKS.register("paper_strip_seal",
() -> new WallSideBlock(BaseBlockProperty.PAPER));
public static final RegistryObject<Block> STONE_FLOWER_WINDOW = BLOCKS.register("stone_flower_window", () -> new BaseBlock(BaseBlockProperty.IRON));

public static final RegistryObject<Block> OCTAGONAL_PALACE_LANTERN = BLOCKS.register("octagonal_palace_lantern",
() -> DecorativeBlock.with(BaseBlockProperty.WOOD).shaped(DecorativeBlock.FULL_BLOCK).luminous().noOcclusion().placeOffset(Direction.DOWN).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ public class ItemRegistry {
public static final RegistryObject<Item> SONG_WOODEN_DOOR = fromBlock(BlockRegistry.SONG_WOODEN_DOOR, ModCreativeTab.WINDOWS_AND_DOORS);
public static final RegistryObject<Item> SONG_WOODEN_WINDOW = fromBlock(BlockRegistry.SONG_WOODEN_WINDOW, ModCreativeTab.WINDOWS_AND_DOORS);
public static final RegistryObject<Item> BAMBOO_CURTAIN = fromBlock(BlockRegistry.BAMBOO_CURTAIN, ModCreativeTab.WINDOWS_AND_DOORS);
public static final RegistryObject<Item> PLAQUE = fromBlock(BlockRegistry.PLAQUE, ModCreativeTab.WINDOWS_AND_DOORS);
public static final RegistryObject<Item> PAPER_STRIP_SEAL = fromBlock(BlockRegistry.PAPER_STRIP_SEAL, ModCreativeTab.WINDOWS_AND_DOORS);
public static final RegistryObject<Item> STONE_FLOWER_WINDOW = fromBlock(BlockRegistry.STONE_FLOWER_WINDOW, ModCreativeTab.WINDOWS_AND_DOORS);

public static final RegistryObject<Item> CYAN_BRICK = simpleItem("cyan_brick", ModCreativeTab.MATERIALS);
public static final RegistryObject<Item> BLACK_BRICK = simpleItem("black_brick", ModCreativeTab.MATERIALS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ protected void registerStatesAndModels() {
simpleBlock(BlockRegistry.BLUE_AND_YELLOW_CARVED_WOOD_VARIANT_1.get());
simpleBlock(BlockRegistry.BLUE_AND_YELLOW_CARVED_WOOD_VARIANT_2.get());
simpleBlock(BlockRegistry.BLUE_AND_YELLOW_CARVED_WOOD_VARIANT_3.get());
simpleBlock(BlockRegistry.STONE_FLOWER_WINDOW.get());


directionalSideEnd(BlockRegistry.GREEN_FANGXIN.get(), sideLoc(BlockRegistry.GREEN_FANGXIN.get()), endLoc(BlockRegistry.GREEN_FANGXIN.get()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;

import java.util.Map;
Expand All @@ -22,23 +23,29 @@ public class SixSideBlock extends Block implements BaseBlockPropertyHolder, Simp

protected final BaseBlockProperty property;
private final Map<Direction, VoxelShape> shapeByDirection;
private final boolean hasCollision;

public static final DirectionProperty FACING = BlockStateProperties.FACING;
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;

public SixSideBlock(BaseBlockProperty property, int sideThickness) {
public SixSideBlock(BaseBlockProperty property, int sideThickness, boolean hasCollision) {
super(property.properties.noOcclusion().noCollission());
this.property = property;
this.registerDefaultState(this.getStateDefinition().any()
.setValue(FACING, Direction.NORTH)
.setValue(WATERLOGGED, false));
this.shapeByDirection = faceShapeByDirection(sideThickness);
this.hasCollision = hasCollision;
}

public SixSideBlock(BaseBlockProperty property) {
this(property, 1);
}

public SixSideBlock(BaseBlockProperty property, int sideThickness){
this(property, sideThickness, false);
}

public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
return this.shapeByDirection.get(pState.getValue(FACING));
}
Expand All @@ -59,6 +66,11 @@ public FluidState getFluidState(BlockState pState) {
return pState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(pState);
}

@Override
public VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
return hasCollision ? this.getShape(pState, pLevel, pPos, pContext) : Shapes.empty();
}

@Override
public BaseBlockProperty getProperty() {
return this.property;
Expand Down
Loading

0 comments on commit 26305a2

Please sign in to comment.