Doors, sirens and blocks

This commit is contained in:
Andrew-71 2023-08-06 14:37:17 +03:00
parent 9da21d3fe8
commit 6c6c90ed4b
40 changed files with 280 additions and 7 deletions

View file

@ -18,6 +18,7 @@ import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.Items;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.book.RecipeCategory;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;
@ -660,6 +661,9 @@ public class DataGeneration implements DataGeneratorEntrypoint {
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_MANGROVE_DOOR, Blocks.MANGROVE_DOOR);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_OAK_DOOR, Blocks.OAK_DOOR);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_SPRUCE_DOOR, Blocks.SPRUCE_DOOR);
offerStonecuttingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, NSE_Blocks.CHISELED_BIRCH_DOOR, Blocks.BIRCH_BUTTON);
createStairsRecipe(NSE_Blocks.SAND_TILES_STAIRS, Ingredient.ofItems(NSE_Blocks.SAND_TILES));
}
}

View file

@ -43,7 +43,7 @@ public class SirenBlock extends HorizontalFacingBlock {
if (bl) {
world.scheduleBlockTick(pos, this, 4);
} else {
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 1F, 1f);
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 5F, 1f);
world.setBlockState(pos, (BlockState)state.cycle(ON), 2);
world.scheduleBlockTick(pos, this, 140);
}
@ -88,7 +88,7 @@ public class SirenBlock extends HorizontalFacingBlock {
} else {
NewSoviet.LOG.info("Playing!");
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 1F, 1f);
world.playSound((PlayerEntity)null, pos.getX(), pos.getY(), pos.getZ(), NSE_Custom.SIREN_SOUND, SoundCategory.NEUTRAL, 5F, 1f);
world.scheduleBlockTick(pos, this, 140);
}
}

View file

@ -25,6 +25,7 @@ public class NSE_Blocks {
// BUILDING BRICKS/TILES ====================
public static final Block SAND_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.MUD_BRICKS).hardness(1.5f).requiresTool().resistance(6f).mapColor(MapColor.TERRACOTTA_BROWN));
public static final StairsBlock SAND_TILES_STAIRS = new StairsBlock(SAND_TILES.getDefaultState(), FabricBlockSettings.copy(SAND_TILES));
public static final Block CRACKED_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block MOSSY_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
public static final Block SMALL_SAND_TILES = new Block(FabricBlockSettings.copy(SAND_TILES));
@ -106,6 +107,11 @@ public class NSE_Blocks {
public static final Block CRACKED_TUFF_BRICKS = new Block(FabricBlockSettings.copy(Blocks.TUFF));
public static final Block MOSSY_TUFF_BRICKS = new Block(FabricBlockSettings.copy(Blocks.TUFF));
public static final Block SMALL_WHITE_TILES = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.WHITE));
public static final Block SMALL_CRACKED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block CRACKED_GLAZED_WHITE_TILES = new Block(FabricBlockSettings.copy(LIGHT_BLUE_TILES));
public static final Block WHITEWASH = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.STONE).strength(1.5f, 6f).requiresTool().mapColor(MapColor.OFF_WHITE));
public static final Block CRACKED_WHITEWASH = new Block(FabricBlockSettings.copy(WHITEWASH));
public static final Block VERY_CRACKED_WHITEWASH = new Block(FabricBlockSettings.copy(WHITEWASH));
@ -164,6 +170,7 @@ public class NSE_Blocks {
public static final DoorBlock CHISELED_MANGROVE_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.MANGROVE_DOOR), BlockSetType.MANGROVE);
public static final DoorBlock CHISELED_OAK_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.OAK_DOOR), BlockSetType.OAK);
public static final DoorBlock CHISELED_SPRUCE_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.SPRUCE_DOOR), BlockSetType.SPRUCE);
public static final DoorBlock CHISELED_BIRCH_DOOR = new DoorBlock(FabricBlockSettings.copy(Blocks.BIRCH_DOOR), BlockSetType.BIRCH);
// Industrial =====================================
public static final Block INDUSTRIAL_WARNING = new Block(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).hardness(4f).resistance(6f).requiresTool().mapColor(MapColor.BLACK));
@ -203,6 +210,7 @@ public class NSE_Blocks {
public static void init() {
Registry.register(Registries.ITEM_GROUP, new Identifier("new_soviet", "building_blocks"), NSE_BUILDING_TAB);
register("sand_tiles", () -> SAND_TILES, NSE_BUILDING_TAB);
register("sand_tiles_stairs", () -> SAND_TILES_STAIRS, NSE_BUILDING_TAB);
register("cracked_sand_tiles", () -> CRACKED_SAND_TILES, NSE_BUILDING_TAB);
register("mossy_sand_tiles", () -> MOSSY_SAND_TILES, NSE_BUILDING_TAB);
register("small_sand_tiles", () -> SMALL_SAND_TILES, NSE_BUILDING_TAB);
@ -273,6 +281,10 @@ public class NSE_Blocks {
register("tuff_bricks", () -> TUFF_BRICKS, NSE_BUILDING_TAB);
register("cracked_tuff_bricks", () -> CRACKED_TUFF_BRICKS, NSE_BUILDING_TAB);
register("mossy_tuff_bricks", () -> MOSSY_TUFF_BRICKS, NSE_BUILDING_TAB);
register("small_white_tiles", () -> SMALL_WHITE_TILES, NSE_BUILDING_TAB);
register("small_cracked_white_tiles", () -> SMALL_CRACKED_WHITE_TILES, NSE_BUILDING_TAB);
register("glazed_white_tiles", () -> GLAZED_WHITE_TILES, NSE_BUILDING_TAB);
register("cracked_glazed_white_tiles", () -> CRACKED_GLAZED_WHITE_TILES, NSE_BUILDING_TAB);
register("whitewash", () -> WHITEWASH, NSE_BUILDING_TAB);
register("cracked_whitewash", () -> CRACKED_WHITEWASH, NSE_BUILDING_TAB);
@ -331,6 +343,7 @@ public class NSE_Blocks {
register("chiseled_mangrove_door", () -> CHISELED_MANGROVE_DOOR, NSE_BUILDING_TAB);
register("chiseled_oak_door", () -> CHISELED_OAK_DOOR, NSE_BUILDING_TAB);
register("chiseled_spruce_door", () -> CHISELED_SPRUCE_DOOR, NSE_BUILDING_TAB);
register("chiseled_birch_door", () -> CHISELED_BIRCH_DOOR, NSE_BUILDING_TAB);
register("industrial_warning", () -> INDUSTRIAL_WARNING, NSE_BUILDING_TAB);
register("gray_warning", () -> GRAY_WARNING, NSE_BUILDING_TAB);

View file

@ -0,0 +1,124 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left"
},
"facing=east,half=lower,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left_open",
"y": 90
},
"facing=east,half=lower,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right"
},
"facing=east,half=lower,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right_open",
"y": 270
},
"facing=east,half=upper,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_left"
},
"facing=east,half=upper,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_left_open",
"y": 90
},
"facing=east,half=upper,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_right"
},
"facing=east,half=upper,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_right_open",
"y": 270
},
"facing=north,half=lower,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left",
"y": 270
},
"facing=north,half=lower,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left_open"
},
"facing=north,half=lower,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right",
"y": 270
},
"facing=north,half=lower,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right_open",
"y": 180
},
"facing=north,half=upper,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_left",
"y": 270
},
"facing=north,half=upper,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_left_open"
},
"facing=north,half=upper,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_right",
"y": 270
},
"facing=north,half=upper,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_right_open",
"y": 180
},
"facing=south,half=lower,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left",
"y": 90
},
"facing=south,half=lower,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left_open",
"y": 180
},
"facing=south,half=lower,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right",
"y": 90
},
"facing=south,half=lower,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right_open"
},
"facing=south,half=upper,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_left",
"y": 90
},
"facing=south,half=upper,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_left_open",
"y": 180
},
"facing=south,half=upper,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_right",
"y": 90
},
"facing=south,half=upper,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_right_open"
},
"facing=west,half=lower,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left",
"y": 180
},
"facing=west,half=lower,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_left_open",
"y": 270
},
"facing=west,half=lower,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right",
"y": 180
},
"facing=west,half=lower,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_bottom_right_open",
"y": 90
},
"facing=west,half=upper,hinge=left,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_left",
"y": 180
},
"facing=west,half=upper,hinge=left,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_left_open",
"y": 270
},
"facing=west,half=upper,hinge=right,open=false": {
"model": "new_soviet:block/chiseled_birch_door_top_right",
"y": 180
},
"facing=west,half=upper,hinge=right,open=true": {
"model": "new_soviet:block/chiseled_birch_door_top_right_open",
"y": 90
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "new_soviet:block/cracked_glazed_white_tiles"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "new_soviet:block/glazed_white_tiles"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "new_soviet:block/small_cracked_white_tiles"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "new_soviet:block/small_white_tiles"
}
}
}

View file

@ -141,6 +141,7 @@
"block.new_soviet.chiseled_mangrove_door": "Chiseled Mangrove Door",
"block.new_soviet.chiseled_oak_door": "Chiseled Oak Door",
"block.new_soviet.chiseled_spruce_door": "Chiseled Spruce Door",
"block.new_soviet.chiseled_birch_door": "Chiseled Birch Door",
"subtitles.new_soviet.siren": "Siren goes off",
"block.new_soviet.yellow_concrete_with_bars": "Yellow Concrete With Bars",
"block.new_soviet.beige_concrete_with_bars": "Beige Concrete With Bars",

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_left",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_left_open",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_right",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_right_open",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_left",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_left_open",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_right",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_right_open",
"textures": {
"bottom": "new_soviet:block/doors/chiseled_birch_door_lower",
"top": "new_soviet:block/doors/chiseled_birch_door_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "new_soviet:block/white/cracked_glazed_white_tiles",
"particle": "new_soviet:block/white/cracked_glazed_white_tiles"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "new_soviet:block/white/glazed_white_tiles",
"particle": "new_soviet:block/white/glazed_white_tiles"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "new_soviet:block/white/small_cracked_white_tiles",
"particle": "new_soviet:block/white/small_cracked_white_tiles"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "block/cube_all",
"textures": {
"all": "new_soviet:block/white/small_white_tiles",
"particle": "new_soviet:block/white/small_white_tiles"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "new_soviet:item/doors/chiseled_birch_door"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "new_soviet:item/chiseled_mangrove_door"
"layer0": "new_soviet:item/doors/chiseled_mangrove_door"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "new_soviet:item/chiseled_oak_door"
"layer0": "new_soviet:item/doors/chiseled_oak_door"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "new_soviet:item/chiseled_spruce_door"
"layer0": "new_soviet:item/doors/chiseled_spruce_door"
}
}

View file

@ -0,0 +1,4 @@
{
"parent": "new_soviet:block/cracked_glazed_white_tiles"
}

View file

@ -0,0 +1,4 @@
{
"parent": "new_soviet:block/small_cracked_white_tiles"
}

View file

@ -0,0 +1,4 @@
{
"parent": "new_soviet:block/small_white_tiles"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

View file

@ -9,8 +9,8 @@
"Karoter2"
],
"contact": {
"homepage": "https://fabricmc.net/",
"sources": "https://github.com/FabricMC/fabric-example-mod"
"homepage": "https://nse.a71.su/",
"sources": "https://git.a71.su/Ethyl/New-Soviet-Era"
},
"license": "All rights reserved",
"icon": "assets/new_soviet/icon.png",