diff --git a/bin/main/assets/backrooms/blockstates/linedpipe.json b/bin/main/assets/backrooms/blockstates/linedpipe.json index 45d655a..f476037 100644 --- a/bin/main/assets/backrooms/blockstates/linedpipe.json +++ b/bin/main/assets/backrooms/blockstates/linedpipe.json @@ -1,20 +1,6 @@ { "variants": { - "type=1": [ - { - "model": "backrooms:block/linedpipe/lp0" - }, - { - "model": "backrooms:block/linedpipe/lp1" - }, - { - "model": "backrooms:block/linedpipe/lp2" - }, - { - "model": "backrooms:block/linedpipe/lp3" - } - ], - "type=2": [ + "": [ { "model": "backrooms:block/linedpipe/lp0" }, diff --git a/bin/main/assets/backrooms/lang/en_us.json b/bin/main/assets/backrooms/lang/en_us.json index 85ce80e..939a1bc 100644 --- a/bin/main/assets/backrooms/lang/en_us.json +++ b/bin/main/assets/backrooms/lang/en_us.json @@ -2,10 +2,14 @@ "item.backrooms.almond_water": "Almond Water", "item.backrooms.raw_almond_water": "Raw Almond Water", "item.backrooms.wrench": "Wrench", + "item.backrooms.wall_pickaxe": "Wall Pickaxe", + "item.backrooms.compressed_wall_pickaxe": "Compressed Wall Pickaxe", "block.backrooms.wallpaper": "Wallpaper", "block.backrooms.red_wallpaper": "Red Wallpaper", "block.backrooms.dotted_wallpaper": "Dotted Wallpaper", + "block.backrooms.dotted_red_wallpaper": "Dotted Red Wallpaper", "block.backrooms.wall": "Wall", + "block.backrooms.compressed_wall": "Compressed Wall", "block.backrooms.carpet": "Carpet", "block.backrooms.carpet_stairs": "Carpet Stairs", "block.backrooms.light": "Light", @@ -51,6 +55,7 @@ "block.backrooms.torn_wallpaper": "Torn Wallpaper", "block.backrooms.red_torn_wallpaper": "Torn Red Wallpaper", "block.backrooms.dotted_torn_wallpaper": "Torn Dotted Wallpaper", + "block.backrooms.dotted_red_torn_wallpaper": "Torn Dotted Red Wallpaper", "block.backrooms.vent": "Vent", "biome.backrooms.level0": "Level 0", "biome.backrooms.level1": "Level 1", @@ -75,30 +80,54 @@ "item.backrooms.music_disc_burgers_and_fries.desc": "LudoCrypt - Burgers And Fries", "item.backrooms.music_disc_pretzels_and_cheese": "Music Disc", "item.backrooms.music_disc_pretzels_and_cheese.desc": "LudoCrypt - Pretzels And Cheese", - "item.backrooms.wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.wallpaper_pattern.desc": "Normal Wallpaper Pattern", - "item.backrooms.red_wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.red_wallpaper_pattern.desc": "Red Wallpaper Pattern", - "item.backrooms.dotted_wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.dotted_wallpaper_pattern.desc": "Dotted Wallpaper Pattern", + "item.backrooms.wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.wallpaper_pattern.desc": "\u00A79Wallpaper Pattern", + "item.backrooms.red_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.red_wallpaper_pattern.desc": "\u00A74Red \u00A79Wallpaper Pattern", + "item.backrooms.dotted_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.dotted_wallpaper_pattern.desc": "\u00A7eDotted \u00A79Wallpaper Pattern", + "item.backrooms.dotted_red_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.dotted_red_wallpaper_pattern.desc": "\u00A7eDotted \u00A74Red \u00A79Wallpaper Pattern", "advancements.backrooms.title": "The Backrooms", "advancements.backrooms.descr": "The Whole of the backrooms", + "advancements.come_back.title": "You've Never Truly Left", + "advancements.come_back.descr": "Escape The Backrooms", "advancements.level0.title": "The Lobby", - "advancements.level0.descr": "Enter Level 0", - "advancements.level0red.title": "Smells like blood...", - "advancements.level0red.descr": "Enter The Redrooms", - "advancements.level0dotted.title": "That's Different...", - "advancements.level0dotted.descr": "Enter The Dotted Level 0", + "advancements.level0.descr": "Enter level 0", + "advancements.level0red.title": "Smells Like Blood...", + "advancements.level0red.descr": "Enter the redrooms", + "advancements.level0dotted.title": "This Looks Different", + "advancements.level0dotted.descr": "Enter the dottedrooms", + "advancements.level0dottedred.title": "*AU Accent* Bloody Different", + "advancements.level0dottedred.descr": "Enter the red dottedrooms", "advancements.level1.title": "Lurking Danger", - "advancements.level1.descr": "Enter Level 1", + "advancements.level1.descr": "Enter level 1", + "advancements.level1off.title": "Hey Who Turned Off The Lights", + "advancements.level1off.descr": "Enter level 1 off", "advancements.level2.title": "Pipe Dreams", - "advancements.level2.descr": "Enter Level 2", + "advancements.level2.descr": "Enter level 2", + "advancements.level2long.title": "Long Day Ahead", + "advancements.level2long.descr": "Enter the long level 2", + "advancements.level2messy.title": "What A Mess", + "advancements.level2messy.descr": "Enter the messy level 2", "advancements.level3.title": "Electrical Station", - "advancements.level3.descr": "Enter Level 3", - "advancements.timewaster.title": "Time Waster", - "advancements.timewaster.descr": "Get to the surface of EVERY LEVEL", + "advancements.level3.descr": "Enter level 3", "advancements.minewall.title": "How", "advancements.minewall.descr": "Obtain a wall block", + "advancements.wall_pick.title": "Pick and Choose", + "advancements.wall_pick.descr": "Obtain a wall pickaxe", + "advancements.compressed_wall_pick.title": "AND I CHOSE", + "advancements.compressed_wall_pick.descr": "Obtain a compressed wall pickaxe", + "advancements.break_pick.title": "How Long Did THAT Take?!", + "advancements.break_pick.descr": "Break a compressed wall pickaxe", + "advancements.compressedwall.title": "Dead Weight", + "advancements.compressedwall.descr": "Obtain compressed Wall", + "advancements.tear_wallpaper.title": "Tear This Place Down", + "advancements.tear_wallpaper.descr": "Use axe or shears on torn or normal wallpaper", + "advancements.untear_wallpaper.title": "From The Ground Up", + "advancements.untear_wallpaper.descr": "Use wallpaper patterns to reduce the torn level of torn wallpaper", + "advancements.void_block.title": "Holding The Future", + "advancements.void_block.descr": "Obtain a void block", "text.autoconfig.backrooms.title": "Backrooms Configurations", "text.autoconfig.backrooms.option.Level0DoorChance": "Chance for door to appear in level 0", "text.autoconfig.backrooms.option.Level1DoorChance": "Chance for door to appear in level 1", diff --git a/bin/main/assets/backrooms/models/block/pipe/side.json b/bin/main/assets/backrooms/models/block/pipe/side.json index 90fd46a..a80aea4 100644 --- a/bin/main/assets/backrooms/models/block/pipe/side.json +++ b/bin/main/assets/backrooms/models/block/pipe/side.json @@ -9,12 +9,12 @@ "from": [4, 4, 0], "to": [12, 12, 4], "faces": { - "north": {"uv": [1, 3, 9, 11], "texture": "#0"}, - "east": {"uv": [0, 7, 8, 15], "texture": "#0"}, - "south": {"uv": [8, 8, 16, 16], "texture": "#0"}, - "west": {"uv": [5, 2, 13, 10], "texture": "#0"}, - "up": {"uv": [7, 4, 15, 12], "texture": "#0"}, - "down": {"uv": [3, 1, 11, 9], "texture": "#0"} + "north": {"uv": [4, 4, 12, 12], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 12, 12], "texture": "#0"}, + "west": {"uv": [0, 4, 4, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "down": {"uv": [4, 12, 12, 16], "texture": "#0"} } } ] diff --git a/bin/main/assets/backrooms/sounds.json b/bin/main/assets/backrooms/sounds.json index fa48bbf..5cc3b0e 100644 --- a/bin/main/assets/backrooms/sounds.json +++ b/bin/main/assets/backrooms/sounds.json @@ -6,12 +6,6 @@ "name": "backrooms:music/ambient/episodic_lullaby", "stream": true }, - { - "name": "backrooms:music/ambient/lining_the_walls", - "volume": 0.8, - "stream": true, - "weight": 2 - }, { "name": "backrooms:music/ambient/parallax", "stream": true @@ -24,7 +18,7 @@ "name": "backrooms:music/ambient/backrooms", "stream": true, "volume": 0.35, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", @@ -32,7 +26,7 @@ } ] }, - "level.1.music": { + "level.0weighted.music": { "category": "music", "sounds": [ { @@ -40,8 +34,10 @@ "stream": true }, { - "name": "backrooms:music/ambient/it_darkens", - "stream": true + "name": "backrooms:music/ambient/lining_the_walls", + "volume": 0.8, + "stream": true, + "weight": 7 }, { "name": "backrooms:music/ambient/parallax", @@ -51,10 +47,27 @@ "name": "backrooms:music/ambient/nerve_receptors", "stream": true }, + { + "name": "backrooms:music/ambient/foggy_hands", + "stream": true + } + ] + }, + "level.1on.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/episodic_lullaby", + "stream": true + }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + }, { "name": "backrooms:music/ambient/cracked_tiles", "stream": true, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", @@ -62,19 +75,65 @@ } ] }, + "level.1off.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/episodic_lullaby", + "stream": true + }, + { + "name": "backrooms:music/ambient/it_darkens", + "stream": true, + "volume": 0.7, + "weight": 7 + }, + { + "name": "backrooms:music/ambient/nerve_receptors", + "stream": true + } + ] + }, "level.2.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/the_halls_lengthen", + "stream": true, + "volume": 0.5 + }, + { + "name": "backrooms:music/ambient/foggy_hands", + "stream": true + }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + } + ] + }, + "level.2long.music": { "category": "music", "sounds": [ { "name": "backrooms:music/ambient/the_halls_lengthen", "stream": true, "volume": 0.5, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", "stream": true }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + } + ] + }, + "level.2messy.music": { + "category": "music", + "sounds": [ { "name": "backrooms:music/ambient/parallax", "stream": true @@ -82,11 +141,12 @@ { "name": "backrooms:music/ambient/kirifiki", "stream": true, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/reposition", - "stream": true + "stream": true, + "weight": 7 } ] }, @@ -121,49 +181,56 @@ "music_disc.its_been_so_long": { "sounds": [ { - "name": "backrooms:music/records/its_been_so_long" + "name": "backrooms:music/records/its_been_so_long", + "stream": true } ] }, "music_disc.omae_wa_mou": { "sounds": [ { - "name": "backrooms:music/records/omae_wa_mou" + "name": "backrooms:music/records/omae_wa_mou", + "stream": true } ] }, "music_disc.glacial_cavern": { "sounds": [ { - "name": "backrooms:music/records/glacial_cavern" + "name": "backrooms:music/records/glacial_cavern", + "stream": true } ] }, "music_disc.012": { "sounds": [ { - "name": "backrooms:music/records/012" + "name": "backrooms:music/records/012", + "stream": true } ] }, "music_disc.those_torn_walls": { "sounds": [ { - "name": "backrooms:music/records/those_torn_walls" + "name": "backrooms:music/records/those_torn_walls", + "stream": true } ] }, "music_disc.burgers_and_fries": { "sounds": [ { - "name": "backrooms:music/records/burgers_and_fries" + "name": "backrooms:music/records/burgers_and_fries", + "stream": true } ] }, "music_disc.pretzels_and_cheese": { "sounds": [ { - "name": "backrooms:music/records/pretzels_and_cheese" + "name": "backrooms:music/records/pretzels_and_cheese", + "stream": true } ] }, @@ -181,6 +248,13 @@ } ] }, + "buzz": { + "sounds": [ + { + "name": "backrooms:buzz" + } + ] + }, "gulp": { "sounds": [ { diff --git a/bin/main/assets/backrooms/textures/block/carpet.png b/bin/main/assets/backrooms/textures/block/carpet.png index f8085a7..4bc9345 100644 Binary files a/bin/main/assets/backrooms/textures/block/carpet.png and b/bin/main/assets/backrooms/textures/block/carpet.png differ diff --git a/bin/main/assets/backrooms/textures/block/cement.png b/bin/main/assets/backrooms/textures/block/cement.png index 16ae976..31c1ed9 100644 Binary files a/bin/main/assets/backrooms/textures/block/cement.png and b/bin/main/assets/backrooms/textures/block/cement.png differ diff --git a/bin/main/assets/backrooms/textures/block/cement_bricks.png b/bin/main/assets/backrooms/textures/block/cement_bricks.png index c73ec9b..de43f0e 100644 Binary files a/bin/main/assets/backrooms/textures/block/cement_bricks.png and b/bin/main/assets/backrooms/textures/block/cement_bricks.png differ diff --git a/bin/main/assets/backrooms/textures/block/copper.png b/bin/main/assets/backrooms/textures/block/copper.png index 15403e9..160c1d9 100644 Binary files a/bin/main/assets/backrooms/textures/block/copper.png and b/bin/main/assets/backrooms/textures/block/copper.png differ diff --git a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png index 7853e4b..ed4961f 100644 Binary files a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png and b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png differ diff --git a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png index 2d01671..1d2b19a 100644 Binary files a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png and b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png differ diff --git a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png index a6d8f99..9208341 100644 Binary files a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png and b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png differ diff --git a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png index e131507..253ad14 100644 Binary files a/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png and b/bin/main/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png differ diff --git a/bin/main/assets/backrooms/textures/block/dotted_wallpaper.png b/bin/main/assets/backrooms/textures/block/dotted_wallpaper.png index 5221aab..95bef53 100644 Binary files a/bin/main/assets/backrooms/textures/block/dotted_wallpaper.png and b/bin/main/assets/backrooms/textures/block/dotted_wallpaper.png differ diff --git a/bin/main/assets/backrooms/textures/block/metal.png b/bin/main/assets/backrooms/textures/block/metal.png index 739b3f6..21e997a 100644 Binary files a/bin/main/assets/backrooms/textures/block/metal.png and b/bin/main/assets/backrooms/textures/block/metal.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png index b9ffdbd..91b9a21 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png index 5c48a84..f558641 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png index 19b2edf..10aaf4e 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png index c7a24a0..81db22e 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png index 05fc059..b90ae3a 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png index 8d03321..de283ed 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png differ diff --git a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png index f0e534b..0fce8f9 100644 Binary files a/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png and b/bin/main/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png differ diff --git a/bin/main/assets/backrooms/textures/block/poolstone_bricks.png b/bin/main/assets/backrooms/textures/block/poolstone_bricks.png index b599c6e..5d571a8 100644 Binary files a/bin/main/assets/backrooms/textures/block/poolstone_bricks.png and b/bin/main/assets/backrooms/textures/block/poolstone_bricks.png differ diff --git a/bin/main/assets/backrooms/textures/block/poolstone_path.png b/bin/main/assets/backrooms/textures/block/poolstone_path.png index 259d96b..a65fd3b 100644 Binary files a/bin/main/assets/backrooms/textures/block/poolstone_path.png and b/bin/main/assets/backrooms/textures/block/poolstone_path.png differ diff --git a/bin/main/assets/backrooms/textures/block/poolstone_tile.png b/bin/main/assets/backrooms/textures/block/poolstone_tile.png index a9e9a02..164a3fe 100644 Binary files a/bin/main/assets/backrooms/textures/block/poolstone_tile.png and b/bin/main/assets/backrooms/textures/block/poolstone_tile.png differ diff --git a/bin/main/assets/backrooms/textures/block/smooth_poolstone.png b/bin/main/assets/backrooms/textures/block/smooth_poolstone.png index 7426478..fa71895 100644 Binary files a/bin/main/assets/backrooms/textures/block/smooth_poolstone.png and b/bin/main/assets/backrooms/textures/block/smooth_poolstone.png differ diff --git a/bin/main/assets/backrooms/textures/block/steel.png b/bin/main/assets/backrooms/textures/block/steel.png index d7c790c..88952f4 100644 Binary files a/bin/main/assets/backrooms/textures/block/steel.png and b/bin/main/assets/backrooms/textures/block/steel.png differ diff --git a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_1.png b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_1.png index a7103bb..d821560 100644 Binary files a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_1.png and b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_1.png differ diff --git a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_2.png b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_2.png index 0115214..ddafe48 100644 Binary files a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_2.png and b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_2.png differ diff --git a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_3.png b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_3.png index 4efbe90..6abfdcb 100644 Binary files a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_3.png and b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_3.png differ diff --git a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_4.png b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_4.png index 88cb6ee..e35637f 100644 Binary files a/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_4.png and b/bin/main/assets/backrooms/textures/block/torn_wallpaper_level_4.png differ diff --git a/bin/main/assets/backrooms/textures/block/wall.png b/bin/main/assets/backrooms/textures/block/wall.png index 9e00684..94a6ba5 100644 Binary files a/bin/main/assets/backrooms/textures/block/wall.png and b/bin/main/assets/backrooms/textures/block/wall.png differ diff --git a/bin/main/assets/backrooms/textures/block/wallpaper.png b/bin/main/assets/backrooms/textures/block/wallpaper.png index acacfa5..b2fa403 100644 Binary files a/bin/main/assets/backrooms/textures/block/wallpaper.png and b/bin/main/assets/backrooms/textures/block/wallpaper.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_0.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_0.png index 858e092..a369eac 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_0.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_0.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_1.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_1.png index 5cc9158..86f3437 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_1.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_1.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_2.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_2.png index 7113cf8..a231d38 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_2.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_2.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_3.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_3.png index 6177d0f..c580c25 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_3.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_3.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_4.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_4.png index bbe50c4..21fe52e 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_4.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_4.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level0_5.png b/bin/main/assets/backrooms/textures/gui/title/background/level0_5.png index b2ff2bc..8c6e734 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level0_5.png and b/bin/main/assets/backrooms/textures/gui/title/background/level0_5.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_0.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_0.png index 7457091..e5ebdd6 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_0.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_0.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_1.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_1.png index 20b1fa8..c17650a 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_1.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_1.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_2.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_2.png index c82ff43..3b3a90e 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_2.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_2.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_3.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_3.png index 17c707e..4b45f3a 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_3.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_3.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_4.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_4.png index a3a2c94..8a80f2d 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_4.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_4.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level1_5.png b/bin/main/assets/backrooms/textures/gui/title/background/level1_5.png index 55692b7..f210cbe 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level1_5.png and b/bin/main/assets/backrooms/textures/gui/title/background/level1_5.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_0.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_0.png index 3970511..341dd17 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_0.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_0.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_1.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_1.png index a542feb..19e055e 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_1.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_1.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_2.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_2.png index 9bcdbed..e27e6fd 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_2.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_2.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_3.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_3.png index b90ca83..0dfe015 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_3.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_3.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_4.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_4.png index 9a1b4c2..da77870 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_4.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_4.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level2_5.png b/bin/main/assets/backrooms/textures/gui/title/background/level2_5.png index 150c0eb..d0471f8 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level2_5.png and b/bin/main/assets/backrooms/textures/gui/title/background/level2_5.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_0.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_0.png index f22b592..3a78760 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_0.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_0.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_1.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_1.png index 8586d65..8ca6f31 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_1.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_1.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_2.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_2.png index 0daa84b..f728207 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_2.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_2.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_3.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_3.png index f3df7e3..c21b1e1 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_3.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_3.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_4.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_4.png index 1cad4f3..1de66db 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_4.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_4.png differ diff --git a/bin/main/assets/backrooms/textures/gui/title/background/level3_5.png b/bin/main/assets/backrooms/textures/gui/title/background/level3_5.png index c8e3855..1024bff 100644 Binary files a/bin/main/assets/backrooms/textures/gui/title/background/level3_5.png and b/bin/main/assets/backrooms/textures/gui/title/background/level3_5.png differ diff --git a/bin/main/assets/backrooms/textures/items/almond_water.png b/bin/main/assets/backrooms/textures/items/almond_water.png index bb9e8fb..fa75471 100644 Binary files a/bin/main/assets/backrooms/textures/items/almond_water.png and b/bin/main/assets/backrooms/textures/items/almond_water.png differ diff --git a/bin/main/assets/backrooms/textures/items/dotted_wallpaper_pattern.png b/bin/main/assets/backrooms/textures/items/dotted_wallpaper_pattern.png index 2482e9d..d31664f 100644 Binary files a/bin/main/assets/backrooms/textures/items/dotted_wallpaper_pattern.png and b/bin/main/assets/backrooms/textures/items/dotted_wallpaper_pattern.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_012.png b/bin/main/assets/backrooms/textures/items/music_disc_012.png index 7e10228..1a0e906 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_012.png and b/bin/main/assets/backrooms/textures/items/music_disc_012.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_burgers_and_fries.png b/bin/main/assets/backrooms/textures/items/music_disc_burgers_and_fries.png index e802501..8be4176 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_burgers_and_fries.png and b/bin/main/assets/backrooms/textures/items/music_disc_burgers_and_fries.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_glacial_cavern.png b/bin/main/assets/backrooms/textures/items/music_disc_glacial_cavern.png index 7481f01..4ac6a2e 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_glacial_cavern.png and b/bin/main/assets/backrooms/textures/items/music_disc_glacial_cavern.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_its_been_so_long.png b/bin/main/assets/backrooms/textures/items/music_disc_its_been_so_long.png index 66b74fc..29c5afc 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_its_been_so_long.png and b/bin/main/assets/backrooms/textures/items/music_disc_its_been_so_long.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_omae_wa_mou.png b/bin/main/assets/backrooms/textures/items/music_disc_omae_wa_mou.png index ec33764..931d26c 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_omae_wa_mou.png and b/bin/main/assets/backrooms/textures/items/music_disc_omae_wa_mou.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png b/bin/main/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png index 2dbae9d..0ab319a 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png and b/bin/main/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png differ diff --git a/bin/main/assets/backrooms/textures/items/music_disc_those_torn_walls.png b/bin/main/assets/backrooms/textures/items/music_disc_those_torn_walls.png index 7d4a75b..bd63f36 100644 Binary files a/bin/main/assets/backrooms/textures/items/music_disc_those_torn_walls.png and b/bin/main/assets/backrooms/textures/items/music_disc_those_torn_walls.png differ diff --git a/bin/main/assets/backrooms/textures/items/pipe.png b/bin/main/assets/backrooms/textures/items/pipe.png index d643166..9d41482 100644 Binary files a/bin/main/assets/backrooms/textures/items/pipe.png and b/bin/main/assets/backrooms/textures/items/pipe.png differ diff --git a/bin/main/assets/backrooms/textures/items/raw_almond_water.png b/bin/main/assets/backrooms/textures/items/raw_almond_water.png index 0ca0d26..313c701 100644 Binary files a/bin/main/assets/backrooms/textures/items/raw_almond_water.png and b/bin/main/assets/backrooms/textures/items/raw_almond_water.png differ diff --git a/bin/main/assets/backrooms/textures/items/wallpaper_pattern.png b/bin/main/assets/backrooms/textures/items/wallpaper_pattern.png index 469e517..a0c0709 100644 Binary files a/bin/main/assets/backrooms/textures/items/wallpaper_pattern.png and b/bin/main/assets/backrooms/textures/items/wallpaper_pattern.png differ diff --git a/bin/main/assets/backrooms/textures/items/wrench.png b/bin/main/assets/backrooms/textures/items/wrench.png index 43c96bc..7540816 100644 Binary files a/bin/main/assets/backrooms/textures/items/wrench.png and b/bin/main/assets/backrooms/textures/items/wrench.png differ diff --git a/bin/main/data/backrooms/advancements/level_0.json b/bin/main/data/backrooms/advancements/level_0.json index 48702ed..0e6adcb 100644 --- a/bin/main/data/backrooms/advancements/level_0.json +++ b/bin/main/data/backrooms/advancements/level_0.json @@ -1,7 +1,7 @@ { "display": { "icon": { - "item": "backrooms:wallpaper" + "item": "backrooms:carpet" }, "title": { "translate": "advancements.level0.title" @@ -29,7 +29,8 @@ "backrooms:oak_planks", "backrooms:raw_almond_water", "backrooms:carpet", - "backrooms:carpet_stairs" + "backrooms:carpet_stairs", + "backrooms:vent" ], "experience": 10 }, diff --git a/bin/main/data/backrooms/advancements/level_1.json b/bin/main/data/backrooms/advancements/level_1.json index 1cc761a..763be35 100644 --- a/bin/main/data/backrooms/advancements/level_1.json +++ b/bin/main/data/backrooms/advancements/level_1.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level1": { diff --git a/bin/main/data/backrooms/advancements/level_2.json b/bin/main/data/backrooms/advancements/level_2.json index 71f0c4c..32fbd05 100644 --- a/bin/main/data/backrooms/advancements/level_2.json +++ b/bin/main/data/backrooms/advancements/level_2.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level2": { diff --git a/bin/main/data/backrooms/advancements/level_3.json b/bin/main/data/backrooms/advancements/level_3.json index 8c350e3..687e689 100644 --- a/bin/main/data/backrooms/advancements/level_3.json +++ b/bin/main/data/backrooms/advancements/level_3.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level3": { diff --git a/bin/main/data/backrooms/advancements/mine_wall.json b/bin/main/data/backrooms/advancements/mine_wall.json index 18a48ef..a322bdd 100644 --- a/bin/main/data/backrooms/advancements/mine_wall.json +++ b/bin/main/data/backrooms/advancements/mine_wall.json @@ -27,7 +27,7 @@ } }, "rewards": { - "experience": 500 + "experience": 10 }, - "parent": "backrooms:timewaster" + "parent": "backrooms:backrooms" } diff --git a/bin/main/data/backrooms/advancements/timewaster.json b/bin/main/data/backrooms/advancements/timewaster.json deleted file mode 100644 index 98f916f..0000000 --- a/bin/main/data/backrooms/advancements/timewaster.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "display": { - "icon": { - "item": "backrooms:wall" - }, - "title": { - "translate": "advancements.timewaster.title" - }, - "description": { - "translate": "advancements.timewaster.descr" - }, - "frame": "challenge", - "show_toast": true, - "announce_to_chat": true, - "hidden": true - }, - "criteria": { - "level0": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0", - "position": { - "y": 255 - } - } - }, - "level1": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_1", - "position": { - "y": 255 - } - } - }, - "level2": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_2", - "position": { - "y": 255 - } - } - }, - "level3": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_3", - "position": { - "y": 255 - } - } - }, - "level0dotted": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_dotted", - "position": { - "y": 255 - } - } - }, - "level0red": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_red", - "position": { - "y": 255 - } - } - } - }, - "rewards": { - "experience": 500 - }, - "parent": "backrooms:backrooms" -} diff --git a/bin/main/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json index 78c8777..096278b 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:dotted_torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:dotted_torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/blocks/dotted_wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/dotted_wallpaper.json index f1b8148..8db40f3 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/dotted_wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/dotted_wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:dotted_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:dotted_wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json index eaf690b..29bf279 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:red_torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:red_torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/blocks/red_wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/red_wallpaper.json index 9834639..0e1e221 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/red_wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/red_wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:red_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:red_wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/blocks/torn_wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/torn_wallpaper.json index 5abaae9..e6d0ef3 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/torn_wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/blocks/wallpaper.json b/bin/main/data/backrooms/loot_tables/blocks/wallpaper.json index d168a5a..4bb014d 100644 --- a/bin/main/data/backrooms/loot_tables/blocks/wallpaper.json +++ b/bin/main/data/backrooms/loot_tables/blocks/wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/bin/main/data/backrooms/loot_tables/chests/level3.json b/bin/main/data/backrooms/loot_tables/chests/level3.json index 71b63cb..0fc135f 100644 --- a/bin/main/data/backrooms/loot_tables/chests/level3.json +++ b/bin/main/data/backrooms/loot_tables/chests/level3.json @@ -99,17 +99,17 @@ { "type": "item", "name": "minecraft:iron_pickaxe", - "weight": 2 + "weight": 8 }, { "type": "item", - "name": "minecraft:gold_pickaxe", - "weight": 3 + "name": "minecraft:golden_pickaxe", + "weight": 15 }, { "type": "item", "name": "backrooms:music_disc_pretzels_and_cheese", - "weight": 3 + "weight": 10 }, { "type": "item", diff --git a/bin/main/data/minecraft/dimension/backrooms/level_0.json b/bin/main/data/minecraft/dimension/backrooms/level_0.json index 54f0825..9b72b0c 100644 --- a/bin/main/data/minecraft/dimension/backrooms/level_0.json +++ b/bin/main/data/minecraft/dimension/backrooms/level_0.json @@ -1,13 +1,332 @@ { - "type": "backrooms:level_0", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_0", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672760, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.1, + "humidity": 0.1 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.2 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0red" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.3 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.3 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.6 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dottedred" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672760, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/bin/main/data/minecraft/dimension/backrooms/level_0_dotted.json b/bin/main/data/minecraft/dimension/backrooms/level_0_dotted.json deleted file mode 100644 index 8b59867..0000000 --- a/bin/main/data/minecraft/dimension/backrooms/level_0_dotted.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "backrooms:level_0_dotted", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0dotted", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file diff --git a/bin/main/data/minecraft/dimension/backrooms/level_0_red.json b/bin/main/data/minecraft/dimension/backrooms/level_0_red.json deleted file mode 100644 index 6b88152..0000000 --- a/bin/main/data/minecraft/dimension/backrooms/level_0_red.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "backrooms:level_0_red", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0red", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file diff --git a/bin/main/data/minecraft/dimension/backrooms/level_1.json b/bin/main/data/minecraft/dimension/backrooms/level_1.json index 2c5196d..ea39564 100644 --- a/bin/main/data/minecraft/dimension/backrooms/level_1.json +++ b/bin/main/data/minecraft/dimension/backrooms/level_1.json @@ -1,13 +1,102 @@ { - "type": "backrooms:level_1", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level1", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_1", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672761, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 1.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 1.0 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.7, + "humidity": 0.7 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level1off" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.6, + "humidity": 0.4 + }, + "biome": "backrooms:level1off" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level1off" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672761, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/bin/main/data/minecraft/dimension/backrooms/level_2.json b/bin/main/data/minecraft/dimension/backrooms/level_2.json index a149b9c..64449b5 100644 --- a/bin/main/data/minecraft/dimension/backrooms/level_2.json +++ b/bin/main/data/minecraft/dimension/backrooms/level_2.json @@ -1,13 +1,152 @@ { - "type": "backrooms:level_2", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level2", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_2", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672762, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.2 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.1, + "humidity": 0.3 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.1 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 1.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 1.0 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.7, + "humidity": 0.7 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.3 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.6, + "humidity": 0.4 + }, + "biome": "backrooms:level2messy" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level2messy" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672762, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_0.json b/bin/main/data/minecraft/dimension_type/backrooms/level_0.json index 5c20644..d147d7e 100644 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_0.json +++ b/bin/main/data/minecraft/dimension_type/backrooms/level_0.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_0_dotted.json b/bin/main/data/minecraft/dimension_type/backrooms/level_0_dotted.json deleted file mode 100644 index 5c20644..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_0_dotted.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ultrawarm": false, - "natural": true, - "shrunk": false, - "piglin_safe": false, - "respawn_anchor_works": false, - "bed_works": false, - "has_raids": false, - "has_skylight": true, - "has_ceiling": false, - "ambient_light": 0.1, - "logical_height": 256, - "infiniburn": "minecraft:infiniburn_overworld" -} diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_0_red.json b/bin/main/data/minecraft/dimension_type/backrooms/level_0_red.json deleted file mode 100644 index 5c20644..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_0_red.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ultrawarm": false, - "natural": true, - "shrunk": false, - "piglin_safe": false, - "respawn_anchor_works": false, - "bed_works": false, - "has_raids": false, - "has_skylight": true, - "has_ceiling": false, - "ambient_light": 0.1, - "logical_height": 256, - "infiniburn": "minecraft:infiniburn_overworld" -} diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_1.json b/bin/main/data/minecraft/dimension_type/backrooms/level_1.json index 5c20644..d147d7e 100644 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_1.json +++ b/bin/main/data/minecraft/dimension_type/backrooms/level_1.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_2.json b/bin/main/data/minecraft/dimension_type/backrooms/level_2.json index 5c20644..d147d7e 100644 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_2.json +++ b/bin/main/data/minecraft/dimension_type/backrooms/level_2.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_3.json b/bin/main/data/minecraft/dimension_type/backrooms/level_3.json index 5c20644..d147d7e 100644 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_3.json +++ b/bin/main/data/minecraft/dimension_type/backrooms/level_3.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/bin/main/fabric.mod.json b/bin/main/fabric.mod.json index 7ca49b2..f4e0845 100644 --- a/bin/main/fabric.mod.json +++ b/bin/main/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "backrooms", - "version": "1.1.0", + "version": "1.1.1", "name": "The Backrooms", "description": "The backrooms, endless mono yellow rooms to traverse.", @@ -22,8 +22,7 @@ "entrypoints": { "main": ["net.ludocrypt.backrooms.Backrooms"], "client": ["net.ludocrypt.backrooms.BackroomsClient"], - "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"], - "mm:early_risers": ["net.ludocrypt.backrooms.misc.PreInitialize::initialize"] + "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"] }, "mixins": [ "backrooms.mixins.json" diff --git a/bin/main/net/ludocrypt/backrooms/Backrooms.class b/bin/main/net/ludocrypt/backrooms/Backrooms.class index 4c7dca6..78ed639 100644 Binary files a/bin/main/net/ludocrypt/backrooms/Backrooms.class and b/bin/main/net/ludocrypt/backrooms/Backrooms.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level0.class b/bin/main/net/ludocrypt/backrooms/biome/Level0.class index 6a7062c..0e4d639 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0.class and b/bin/main/net/ludocrypt/backrooms/biome/Level0.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class b/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class index e5b8efa..83d3ee9 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class and b/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class b/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class index 3aadfda..362547c 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class and b/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level1.class b/bin/main/net/ludocrypt/backrooms/biome/Level1.class index a8ef26c..01cdd53 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level1.class and b/bin/main/net/ludocrypt/backrooms/biome/Level1.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level2.class b/bin/main/net/ludocrypt/backrooms/biome/Level2.class index 5ed67e8..c88e5de 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level2.class and b/bin/main/net/ludocrypt/backrooms/biome/Level2.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level3.class b/bin/main/net/ludocrypt/backrooms/biome/Level3.class index 3dff18c..c8732fc 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level3.class and b/bin/main/net/ludocrypt/backrooms/biome/Level3.class differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class b/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class index d86044e..72e4f1c 100644 Binary files a/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class and b/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/Light.class b/bin/main/net/ludocrypt/backrooms/blocks/Light.class index 156dba1..59fabd3 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/Light.class and b/bin/main/net/ludocrypt/backrooms/blocks/Light.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/LinedPipe.class b/bin/main/net/ludocrypt/backrooms/blocks/LinedPipe.class index baed7e3..22c45cf 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/LinedPipe.class and b/bin/main/net/ludocrypt/backrooms/blocks/LinedPipe.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/Pipe.class b/bin/main/net/ludocrypt/backrooms/blocks/Pipe.class index 6b3996e..ac7d83c 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/Pipe.class and b/bin/main/net/ludocrypt/backrooms/blocks/Pipe.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/TornWallpaper.class b/bin/main/net/ludocrypt/backrooms/blocks/TornWallpaper.class index f7e8d94..991b937 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/TornWallpaper.class and b/bin/main/net/ludocrypt/backrooms/blocks/TornWallpaper.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class b/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class index db4197f..4fe0256 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class and b/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/Wall.class b/bin/main/net/ludocrypt/backrooms/blocks/Wall.class index b533d77..cc55c31 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/Wall.class and b/bin/main/net/ludocrypt/backrooms/blocks/Wall.class differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/Wallpaper.class b/bin/main/net/ludocrypt/backrooms/blocks/Wallpaper.class index b7a07d7..81c7c88 100644 Binary files a/bin/main/net/ludocrypt/backrooms/blocks/Wallpaper.class and b/bin/main/net/ludocrypt/backrooms/blocks/Wallpaper.class differ diff --git a/bin/main/net/ludocrypt/backrooms/client/render/EndPortalRenderer.class b/bin/main/net/ludocrypt/backrooms/client/render/EndPortalRenderer.class index 1fa50c9..00a005b 100644 Binary files a/bin/main/net/ludocrypt/backrooms/client/render/EndPortalRenderer.class and b/bin/main/net/ludocrypt/backrooms/client/render/EndPortalRenderer.class differ diff --git a/bin/main/net/ludocrypt/backrooms/dimension/BDimension.class b/bin/main/net/ludocrypt/backrooms/dimension/BDimension.class index 1edb4ac..95c6b89 100644 Binary files a/bin/main/net/ludocrypt/backrooms/dimension/BDimension.class and b/bin/main/net/ludocrypt/backrooms/dimension/BDimension.class differ diff --git a/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class b/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class index 3227511..b002bea 100644 Binary files a/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class and b/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class b/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class index e0bb42f..f079f6d 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class and b/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level0RedRoom.class b/bin/main/net/ludocrypt/backrooms/features/Level0RedRoom.class index 2b8c832..d94ac4f 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level0RedRoom.class and b/bin/main/net/ludocrypt/backrooms/features/Level0RedRoom.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level0Room.class b/bin/main/net/ludocrypt/backrooms/features/Level0Room.class index 8faa6ca..ae4c06c 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level0Room.class and b/bin/main/net/ludocrypt/backrooms/features/Level0Room.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level3Room.class b/bin/main/net/ludocrypt/backrooms/features/Level3Room.class index ddb714c..965281a 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level3Room.class and b/bin/main/net/ludocrypt/backrooms/features/Level3Room.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/LevelsFeatureInit.class b/bin/main/net/ludocrypt/backrooms/features/LevelsFeatureInit.class index c7e539d..afd9c6b 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/LevelsFeatureInit.class and b/bin/main/net/ludocrypt/backrooms/features/LevelsFeatureInit.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.class deleted file mode 100644 index 381ff0a..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.class deleted file mode 100644 index 502abe8..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class index 2305989..6ececd5 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class and b/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class differ diff --git a/bin/main/net/ludocrypt/backrooms/items/WallpaperPattern.class b/bin/main/net/ludocrypt/backrooms/items/WallpaperPattern.class index 6bbf4c2..4f94b4a 100644 Binary files a/bin/main/net/ludocrypt/backrooms/items/WallpaperPattern.class and b/bin/main/net/ludocrypt/backrooms/items/WallpaperPattern.class differ diff --git a/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class b/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class index 352ae1d..c402a08 100644 Binary files a/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class and b/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class differ diff --git a/bin/main/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.class b/bin/main/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.class deleted file mode 100644 index 075da5a..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.class b/bin/main/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.class index ff7f9c1..58dcfb9 100644 Binary files a/bin/main/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.class and b/bin/main/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.class differ diff --git a/bin/main/net/ludocrypt/backrooms/misc/PreInitialize.class b/bin/main/net/ludocrypt/backrooms/misc/PreInitialize.class deleted file mode 100644 index 22e1fbc..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/misc/PreInitialize.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class b/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class index 9ac2f87..61e7d34 100644 Binary files a/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class and b/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class differ diff --git a/bin/main/net/ludocrypt/backrooms/mixin/MusicMixin.class b/bin/main/net/ludocrypt/backrooms/mixin/MusicMixin.class index 243e116..cff1f13 100644 Binary files a/bin/main/net/ludocrypt/backrooms/mixin/MusicMixin.class and b/bin/main/net/ludocrypt/backrooms/mixin/MusicMixin.class differ diff --git a/bin/main/net/ludocrypt/backrooms/mixin/PlayerMixin.class b/bin/main/net/ludocrypt/backrooms/mixin/PlayerMixin.class index ce4ea88..af0d7fb 100644 Binary files a/bin/main/net/ludocrypt/backrooms/mixin/PlayerMixin.class and b/bin/main/net/ludocrypt/backrooms/mixin/PlayerMixin.class differ diff --git a/gradle.properties b/gradle.properties index 13b07f5..98e1d4f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.16.1+build.21 loader_version=0.9.0+build.204 # Mod Properties - mod_version = 1.1.1 + mod_version = 1.2.0 maven_group = net.ludocrypt archives_base_name = the-backrooms diff --git a/src/main/java/net/ludocrypt/backrooms/Backrooms.java b/src/main/java/net/ludocrypt/backrooms/Backrooms.java index 502828d..b0c8ce1 100644 --- a/src/main/java/net/ludocrypt/backrooms/Backrooms.java +++ b/src/main/java/net/ludocrypt/backrooms/Backrooms.java @@ -1,5 +1,6 @@ package net.ludocrypt.backrooms; +import java.util.Iterator; import java.util.Random; import java.util.Set; import java.util.function.Consumer; @@ -10,12 +11,19 @@ import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; import me.sargunvohra.mcmods.autoconfig1u.serializer.GsonConfigSerializer; import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback; +import net.fabricmc.fabric.api.dimension.v1.FabricDimensions; import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback; import net.ludocrypt.backrooms.biome.Level0; +import net.ludocrypt.backrooms.biome.Level0Decrepit; import net.ludocrypt.backrooms.biome.Level0Dotted; +import net.ludocrypt.backrooms.biome.Level0DottedRed; import net.ludocrypt.backrooms.biome.Level0Red; import net.ludocrypt.backrooms.biome.Level1; +import net.ludocrypt.backrooms.biome.Level1Off; import net.ludocrypt.backrooms.biome.Level2; +import net.ludocrypt.backrooms.biome.Level2Long; +import net.ludocrypt.backrooms.biome.Level2Messy; import net.ludocrypt.backrooms.biome.Level3; import net.ludocrypt.backrooms.blocks.BackroomsSlab; import net.ludocrypt.backrooms.blocks.BackroomsStairs; @@ -40,12 +48,18 @@ import net.ludocrypt.backrooms.blocks.entity.VoidBlockEntity; import net.ludocrypt.backrooms.config.BackroomsConfig; import net.ludocrypt.backrooms.dimension.BDimension; +import net.ludocrypt.backrooms.dimension.BackroomsPlacers; import net.ludocrypt.backrooms.items.AlmondWaterItem; import net.ludocrypt.backrooms.items.BackroomsMusicDiscItem; +import net.ludocrypt.backrooms.items.CompressedWallPickaxe; import net.ludocrypt.backrooms.items.RawAlmondWaterItem; +import net.ludocrypt.backrooms.items.WallPickaxe; import net.ludocrypt.backrooms.items.WallpaperPattern; import net.ludocrypt.backrooms.items.Wrench; import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.ludocrypt.backrooms.misc.WallMaterial; +import net.minecraft.advancement.Advancement; +import net.minecraft.advancement.AdvancementProgress; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; @@ -56,6 +70,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.server.command.CommandManager; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; import net.minecraft.util.Identifier; @@ -68,6 +84,7 @@ import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.OreFeatureConfig; +@SuppressWarnings("deprecation") public class Backrooms implements ModInitializer { // loot tables private static final Set LOOT_TABLES = Sets.newHashSet(); @@ -89,16 +106,25 @@ public class Backrooms implements ModInitializer { public static final Item WALLPAPER_PATTERN = new WallpaperPattern(new Item.Settings().group(ItemGroup.MISC)); public static final Item DOTTED_WALLPAPER_PATTERN = new WallpaperPattern(new Item.Settings().group(ItemGroup.MISC)); public static final Item RED_WALLPAPER_PATTERN = new WallpaperPattern(new Item.Settings().group(ItemGroup.MISC)); + public static final Item DOTTED_RED_WALLPAPER_PATTERN = new WallpaperPattern( + new Item.Settings().group(ItemGroup.MISC)); + public static final Item WALL_PICKAXE = new WallPickaxe(WallMaterial.WALL, 1, -3, + (new Item.Settings()).group(ItemGroup.SEARCH)); + public static final Item COMPRESSED_WALL_PICKAXE = new CompressedWallPickaxe(WallMaterial.COMPRESSED_WALL, 1, -3, + (new Item.Settings()).group(ItemGroup.SEARCH)); // blocks public static final Block WALLPAPER = new Wallpaper(); public static final Block DOTTED_WALLPAPER = new Wallpaper(); public static final Block RED_WALLPAPER = new Wallpaper(); + public static final Block DOTTED_RED_WALLPAPER = new Wallpaper(); public static final Block TORN_WALLPAPER = new TornWallpaper(); public static final Block RED_TORN_WALLPAPER = new TornWallpaper(); public static final Block DOTTED_TORN_WALLPAPER = new TornWallpaper(); + public static final Block DOTTED_RED_TORN_WALLPAPER = new TornWallpaper(); public static final Block LIGHT = new Light(); public static final Block WALL = new Wall(); + public static final Block COMPRESSED_WALL = new Wall(); public static final Block CARPET = new Carpet(); public static final Block CARPET_STAIRS = new BackroomsStairs(CARPET.getDefaultState(), Block.Settings.copy(CARPET)); @@ -163,10 +189,20 @@ public class Backrooms implements ModInitializer { new Level0Red()); public static final Biome LEVEL0DOTTED = Registry.register(Registry.BIOME, new Identifier("backrooms", "level0dotted"), new Level0Dotted()); + public static final Biome LEVEL0DECREPIT = Registry.register(Registry.BIOME, + new Identifier("backrooms", "level0decrepit"), new Level0Decrepit()); + public static final Biome LEVEL0DOTTEDRED = Registry.register(Registry.BIOME, + new Identifier("backrooms", "level0dottedred"), new Level0DottedRed()); public static final Biome LEVEL1 = Registry.register(Registry.BIOME, new Identifier("backrooms", "level1"), new Level1()); + public static final Biome LEVEL1OFF = Registry.register(Registry.BIOME, new Identifier("backrooms", "level1off"), + new Level1Off()); + public static final Biome LEVEL2LONG = Registry.register(Registry.BIOME, new Identifier("backrooms", "level2long"), + new Level2Long()); public static final Biome LEVEL2 = Registry.register(Registry.BIOME, new Identifier("backrooms", "level2"), new Level2()); + public static final Biome LEVEL2MESSY = Registry.register(Registry.BIOME, + new Identifier("backrooms", "level2messy"), new Level2Messy()); public static final Biome LEVEL3 = Registry.register(Registry.BIOME, new Identifier("backrooms", "level3"), new Level3()); // record discs @@ -229,7 +265,31 @@ public static Identifier getId(String id) { @Override public void onInitialize() { - + // commands + CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> { + dispatcher.register(CommandManager.literal("backrooms").requires(source -> source.hasPermissionLevel(2)) + .then(CommandManager.literal("level").then(CommandManager.literal("0").executes(context -> { + PlayerEntity player = context.getSource().getPlayer(); + FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL0WORLD), + BackroomsPlacers.LEVEL01); + return 1; + })).then(CommandManager.literal("1").executes(context -> { + PlayerEntity player = context.getSource().getPlayer(); + FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL1WORLD), + BackroomsPlacers.LEVEL01); + return 1; + })).then(CommandManager.literal("2").executes(context -> { + PlayerEntity player = context.getSource().getPlayer(); + FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL2WORLD), + BackroomsPlacers.LEVEL2); + return 1; + })).then(CommandManager.literal("3").executes(context -> { + PlayerEntity player = context.getSource().getPlayer(); + FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL3WORLD), + BackroomsPlacers.LEVEL3); + return 1; + })))); + }); // dimensions BDimension.register(); // items @@ -240,14 +300,22 @@ public void onInitialize() { Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_wallpaper_pattern"), DOTTED_WALLPAPER_PATTERN); Registry.register(Registry.ITEM, new Identifier("backrooms", "red_wallpaper_pattern"), RED_WALLPAPER_PATTERN); + Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_red_wallpaper_pattern"), + DOTTED_RED_WALLPAPER_PATTERN); + Registry.register(Registry.ITEM, new Identifier("backrooms", "wall_pickaxe"), WALL_PICKAXE); + Registry.register(Registry.ITEM, new Identifier("backrooms", "compressed_wall_pickaxe"), COMPRESSED_WALL_PICKAXE); // blocks Registry.register(Registry.BLOCK, new Identifier("backrooms", "wallpaper"), WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "dotted_wallpaper"), DOTTED_WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "red_wallpaper"), RED_WALLPAPER); + Registry.register(Registry.BLOCK, new Identifier("backrooms", "dotted_red_wallpaper"), DOTTED_RED_WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "torn_wallpaper"), TORN_WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "red_torn_wallpaper"), RED_TORN_WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "dotted_torn_wallpaper"), DOTTED_TORN_WALLPAPER); + Registry.register(Registry.BLOCK, new Identifier("backrooms", "dotted_red_torn_wallpaper"), + DOTTED_RED_TORN_WALLPAPER); Registry.register(Registry.BLOCK, new Identifier("backrooms", "wall"), WALL); + Registry.register(Registry.BLOCK, new Identifier("backrooms", "compressed_wall"), COMPRESSED_WALL); Registry.register(Registry.BLOCK, new Identifier("backrooms", "carpet"), CARPET); Registry.register(Registry.BLOCK, new Identifier("backrooms", "carpet_stairs"), CARPET_STAIRS); Registry.register(Registry.BLOCK, new Identifier("backrooms", "light"), LIGHT); @@ -303,18 +371,24 @@ public void onInitialize() { // blockitems Registry.register(Registry.ITEM, new Identifier("backrooms", "wall"), new BlockItem(WALL, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); + Registry.register(Registry.ITEM, new Identifier("backrooms", "compressed_wall"), + new BlockItem(COMPRESSED_WALL, new Item.Settings().group(ItemGroup.SEARCH))); Registry.register(Registry.ITEM, new Identifier("backrooms", "wallpaper"), new BlockItem(WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_wallpaper"), new BlockItem(DOTTED_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "red_wallpaper"), new BlockItem(RED_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); + Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_red_wallpaper"), + new BlockItem(DOTTED_RED_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "torn_wallpaper"), new BlockItem(TORN_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "red_torn_wallpaper"), new BlockItem(RED_TORN_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_torn_wallpaper"), new BlockItem(DOTTED_TORN_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); + Registry.register(Registry.ITEM, new Identifier("backrooms", "dotted_red_torn_wallpaper"), + new BlockItem(DOTTED_RED_TORN_WALLPAPER, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "carpet"), new BlockItem(CARPET, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); Registry.register(Registry.ITEM, new Identifier("backrooms", "carpet_stairs"), @@ -482,4 +556,17 @@ public static void ambientSoundGenerator(PlayerEntity target, SoundEvent sound, target.playSound(sound, category, d, e); } + public static void grantAdvancement(PlayerEntity player, Identifier id) { + if (player instanceof ServerPlayerEntity) { + Advancement adv = ((ServerPlayerEntity) player).server.getAdvancementLoader().get(id); + AdvancementProgress advp = ((ServerPlayerEntity) player).getAdvancementTracker().getProgress(adv); + if (!advp.isDone()) { + Iterator itr = advp.getUnobtainedCriteria().iterator(); + while (itr.hasNext()) { + String crit = itr.next(); + ((ServerPlayerEntity) player).getAdvancementTracker().grantCriterion(adv, crit); + } + } + } + } } diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0.java index 5fbead0..78210ba 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level0.java @@ -5,7 +5,9 @@ import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; import net.minecraft.world.biome.Biome; @@ -29,9 +31,9 @@ public Level0() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(14402413) - .waterFogColor(14402413).fogColor(14402413).build())); + .waterFogColor(14402413).fogColor(14402413).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL0MUSIC)).build())); - this.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL0ROOM.configure(FeatureConfig.DEFAULT) .createDecoratedFeature(LEVEL0PLACER.configure(DecoratorConfig.DEFAULT))); diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0Decrepit.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0Decrepit.java new file mode 100644 index 0000000..b933d23 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level0Decrepit.java @@ -0,0 +1,57 @@ +package net.ludocrypt.backrooms.biome; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class Level0Decrepit extends Biome { + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final Decorator LEVEL0DECREPITPLACER = new Level0RoomDecorator( + NopeDecoratorConfig.field_24891); + + public Level0Decrepit() { + + super(new Biome.Settings() + .configureSurfaceBuilder(new LevelSurfaceBuilder(TernarySurfaceConfig.CODEC), + new TernarySurfaceConfig(WALL, WALL, WALL)) + .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) + .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(14402413) + .waterFogColor(14402413).fogColor(14402413).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)).build())); + + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0DECREPITROOM.configure(FeatureConfig.DEFAULT) + .createDecoratedFeature(LEVEL0DECREPITPLACER.configure(DecoratorConfig.DEFAULT))); + + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.ENDERMAN, 5, 0, 2)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)); + + } + + @Override + @Environment(EnvType.CLIENT) + public int getGrassColorAt(double p_225528_1_, double p_225528_3_) { + return 226217111; + } + + @Override + @Environment(EnvType.CLIENT) + public int getFoliageColor() { + return 226217111; + } + +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0Dotted.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0Dotted.java index dd1d911..2ade780 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0Dotted.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level0Dotted.java @@ -4,8 +4,10 @@ import net.fabricmc.api.Environment; import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; -import net.ludocrypt.backrooms.features.decorators.Level0DottedRoomDecorator; +import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeEffects; import net.minecraft.world.gen.GenerationStep; @@ -18,7 +20,7 @@ public class Level0Dotted extends Biome { protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL0DOTTEDPLACER = new Level0DottedRoomDecorator( + public static final Decorator LEVEL0DOTTEDPLACER = new Level0RoomDecorator( NopeDecoratorConfig.field_24891); public Level0Dotted() { @@ -28,7 +30,7 @@ public Level0Dotted() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(14402413) - .waterFogColor(14402413).fogColor(14402413).build())); + .waterFogColor(14402413).fogColor(14402413).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL0MUSIC)).build())); this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL0DOTTEDROOM.configure(FeatureConfig.DEFAULT) diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0DottedRed.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0DottedRed.java new file mode 100644 index 0000000..367f6d1 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level0DottedRed.java @@ -0,0 +1,51 @@ +package net.ludocrypt.backrooms.biome; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class Level0DottedRed extends Biome { + + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final Decorator PLACER = new Level0RoomDecorator( + NopeDecoratorConfig.field_24891); + + public Level0DottedRed() { + + super(new Biome.Settings() + .configureSurfaceBuilder(new LevelSurfaceBuilder(TernarySurfaceConfig.CODEC), + new TernarySurfaceConfig(WALL, WALL, WALL)) + .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) + .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(14402413) + .waterFogColor(14402413).fogColor(14402413).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)).build())); + + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL0DOTTEDREDROOM + .configure(FeatureConfig.DEFAULT).createDecoratedFeature(PLACER.configure(DecoratorConfig.DEFAULT))); + } + + @Override + @Environment(EnvType.CLIENT) + public int getGrassColorAt(double p_225528_1_, double p_225528_3_) { + return 226217111; + } + + @Override + @Environment(EnvType.CLIENT) + public int getFoliageColor() { + return 226217111; + } + +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0Red.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0Red.java index d4fefeb..5369986 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0Red.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level0Red.java @@ -4,8 +4,10 @@ import net.fabricmc.api.Environment; import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; -import net.ludocrypt.backrooms.features.decorators.Level0RedRoomDecorator; +import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; import net.minecraft.world.biome.Biome; @@ -19,7 +21,7 @@ public class Level0Red extends Biome { protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL0REDPLACER = new Level0RedRoomDecorator( + public static final Decorator LEVEL0REDPLACER = new Level0RoomDecorator( NopeDecoratorConfig.field_24891); public Level0Red() { @@ -29,12 +31,12 @@ public Level0Red() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-5171911) - .waterFogColor(-5171911).fogColor(-5171911).build())); + .waterFogColor(-5171911).fogColor(-5171911).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)).build())); this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL0REDROOM.configure(FeatureConfig.DEFAULT) .createDecoratedFeature(LEVEL0REDPLACER.configure(DecoratorConfig.DEFAULT))); - + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.ENDERMAN, 4, 0, 2)); this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)); diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level1.java b/src/main/java/net/ludocrypt/backrooms/biome/Level1.java index 480140f..b2e9be9 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level1.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level1.java @@ -5,7 +5,9 @@ import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; import net.ludocrypt.backrooms.features.decorators.Level1RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; import net.minecraft.world.biome.Biome; @@ -29,7 +31,7 @@ public Level1() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) - .waterFogColor(-6710887).fogColor(-6710887).build())); + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL1ONMUSIC)).build())); this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL1ROOM.configure(FeatureConfig.DEFAULT) diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level1Off.java b/src/main/java/net/ludocrypt/backrooms/biome/Level1Off.java new file mode 100644 index 0000000..40db815 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level1Off.java @@ -0,0 +1,57 @@ +package net.ludocrypt.backrooms.biome; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +import net.ludocrypt.backrooms.features.decorators.Level1RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class Level1Off extends Biome { + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final Decorator LEVEL1PLACER = new Level1RoomDecorator( + NopeDecoratorConfig.field_24891); + + public Level1Off() { + + super(new Biome.Settings() + .configureSurfaceBuilder(new LevelSurfaceBuilder(TernarySurfaceConfig.CODEC), + new TernarySurfaceConfig(WALL, WALL, WALL)) + .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) + .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL1OFFMUSIC)).build())); + + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL1OFFROOM.configure(FeatureConfig.DEFAULT) + .createDecoratedFeature(LEVEL1PLACER.configure(DecoratorConfig.DEFAULT))); + + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.ENDERMAN, 4, 0, 2)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SILVERFISH, 4, 0, 3)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)); + } + + @Override + @Environment(EnvType.CLIENT) + public int getGrassColorAt(double p_225528_1_, double p_225528_3_) { + return 226217111; + } + + @Override + @Environment(EnvType.CLIENT) + public int getFoliageColor() { + return 226217111; + } + +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level2.java b/src/main/java/net/ludocrypt/backrooms/biome/Level2.java index 383afc2..e4e808a 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level2.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level2.java @@ -5,7 +5,9 @@ import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; import net.ludocrypt.backrooms.features.decorators.Level2RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; import net.minecraft.world.biome.Biome; @@ -29,7 +31,7 @@ public Level2() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) - .waterFogColor(-6710887).fogColor(-6710887).build())); + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL2MUSIC)).build())); this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL2ROOM.configure(FeatureConfig.DEFAULT) diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level2Long.java b/src/main/java/net/ludocrypt/backrooms/biome/Level2Long.java new file mode 100644 index 0000000..4428954 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level2Long.java @@ -0,0 +1,59 @@ +package net.ludocrypt.backrooms.biome; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +import net.ludocrypt.backrooms.features.decorators.Level2RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class Level2Long extends Biome { + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final Decorator LEVEL2PLACER = new Level2RoomDecorator( + NopeDecoratorConfig.field_24891); + + public Level2Long() { + + super(new Biome.Settings() + .configureSurfaceBuilder(new LevelSurfaceBuilder(TernarySurfaceConfig.CODEC), + new TernarySurfaceConfig(WALL, WALL, WALL)) + .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) + .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL2LONGMUSIC)).build())); + + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL2LONGROOM.configure(FeatureConfig.DEFAULT) + .createDecoratedFeature(LEVEL2PLACER.configure(DecoratorConfig.DEFAULT))); + + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.VEX, 2, 0, 3)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)); + + } + + @Override + @Environment(EnvType.CLIENT) + public int getGrassColorAt(double p_225528_1_, double p_225528_3_) { + return 226217111; + } + + @Override + @Environment(EnvType.CLIENT) + public int getFoliageColor() { + return 226217111; + } + +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level2Messy.java b/src/main/java/net/ludocrypt/backrooms/biome/Level2Messy.java new file mode 100644 index 0000000..f71de16 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level2Messy.java @@ -0,0 +1,59 @@ +package net.ludocrypt.backrooms.biome; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +import net.ludocrypt.backrooms.features.decorators.Level2RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; +import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeEffects; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class Level2Messy extends Biome { + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final Decorator LEVEL2PLACER = new Level2RoomDecorator( + NopeDecoratorConfig.field_24891); + + public Level2Messy() { + + super(new Biome.Settings() + .configureSurfaceBuilder(new LevelSurfaceBuilder(TernarySurfaceConfig.CODEC), + new TernarySurfaceConfig(WALL, WALL, WALL)) + .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) + .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL2LONGMUSIC)).build())); + + this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL2MESSYROOM.configure(FeatureConfig.DEFAULT) + .createDecoratedFeature(LEVEL2PLACER.configure(DecoratorConfig.DEFAULT))); + + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.VEX, 2, 0, 3)); + this.addSpawn(SpawnGroup.AMBIENT, new Biome.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)); + + } + + @Override + @Environment(EnvType.CLIENT) + public int getGrassColorAt(double p_225528_1_, double p_225528_3_) { + return 226217111; + } + + @Override + @Environment(EnvType.CLIENT) + public int getFoliageColor() { + return 226217111; + } + +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level3.java b/src/main/java/net/ludocrypt/backrooms/biome/Level3.java index 90b42a6..83f0bc9 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level3.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/Level3.java @@ -5,7 +5,9 @@ import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.features.LevelsFeatureInit; import net.ludocrypt.backrooms.features.decorators.Level2RoomDecorator; +import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.BlockState; +import net.minecraft.client.sound.MusicType; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; import net.minecraft.world.biome.Biome; @@ -29,7 +31,7 @@ public Level3() { new TernarySurfaceConfig(WALL, WALL, WALL)) .precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F).scale(0F) .temperature(1.0F).downfall(0F).effects(new BiomeEffects.Builder().waterColor(-6710887) - .waterFogColor(-6710887).fogColor(-6710887).build())); + .waterFogColor(-6710887).fogColor(-6710887).music(MusicType.method_27283(BackroomsSoundEvents.LEVEL3MUSIC)).build())); this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, LevelsFeatureInit.LEVEL3ROOM.configure(FeatureConfig.DEFAULT) diff --git a/src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java b/src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java index ddfe689..7542c76 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java @@ -5,6 +5,7 @@ import com.mojang.serialization.Codec; import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.config.BackroomsConfig; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.biome.Biome; @@ -25,9 +26,19 @@ public void generate(Random random, Chunk chunkIn, Biome biomeIn, int x, int z, seaLevel, seed, config); int xpos = x & 15; int zpos = z & 15; + int yheight = 75; BlockPos.Mutable blockpos$Mutable = new BlockPos.Mutable(); - - for (int ypos = 255; ypos >= 0; --ypos) { + if (biomeIn == Backrooms.LEVEL0 || biomeIn == Backrooms.LEVEL0DECREPIT || biomeIn == Backrooms.LEVEL0DOTTED + || biomeIn == Backrooms.LEVEL0DOTTEDRED || biomeIn == Backrooms.LEVEL0RED) { + if (BackroomsConfig.getInstance().Level0LayerCount > 11) { + yheight = (BackroomsConfig.getInstance().Level0LayerCount * 6) + 8; + } + } else if (biomeIn == Backrooms.LEVEL1 || biomeIn == Backrooms.LEVEL1OFF) { + if (BackroomsConfig.getInstance().Level1LayerCount > 11) { + yheight = (BackroomsConfig.getInstance().Level1LayerCount * 6) + 8; + } + } + for (int ypos = 0; ypos <= yheight; ++ypos) { blockpos$Mutable.set(xpos, ypos, zpos); BlockState currentBlockState = chunkIn.getBlockState(blockpos$Mutable); @@ -35,5 +46,6 @@ public void generate(Random random, Chunk chunkIn, Biome biomeIn, int x, int z, chunkIn.setBlockState(blockpos$Mutable, WALL, false); } } + } } diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/Light.java b/src/main/java/net/ludocrypt/backrooms/blocks/Light.java index f1ccb73..1727b69 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/Light.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/Light.java @@ -17,7 +17,7 @@ public class Light extends Block { public Light() { super(FabricBlockSettings.of(Material.GLASS).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.GLASS) - .hardness(2).resistance(1).lightLevel(createLightLevelFromBlockState(10))); + .hardness(2).resistance(1).lightLevel(createLightLevelFromBlockState(15))); setDefaultState(getStateManager().getDefaultState().with(ON, true)); } diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/LinedPipe.java b/src/main/java/net/ludocrypt/backrooms/blocks/LinedPipe.java index 8ec4caf..f773e91 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/LinedPipe.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/LinedPipe.java @@ -12,8 +12,6 @@ import net.minecraft.block.ShapeContext; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.BlockSoundGroup; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.IntProperty; import net.minecraft.util.math.BlockPos; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; @@ -21,14 +19,11 @@ public class LinedPipe extends Block { - public static final IntProperty TYPE = IntProperty.of("type", 1, 2); - public static final VoxelShape SHAPE = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 14.0D, 16.0D); public LinedPipe() { super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.STONE) .hardness(6).resistance(6).lightLevel(5)); - setDefaultState(getStateManager().getDefaultState().with(TYPE, 1)); } @Override @@ -36,11 +31,6 @@ public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos return SHAPE; } - @Override - protected void appendProperties(StateManager.Builder stateManager) { - stateManager.add(TYPE); - } - @Override @Environment(EnvType.CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) { diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/Pipe.java b/src/main/java/net/ludocrypt/backrooms/blocks/Pipe.java index f40f032..0ad1a98 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/Pipe.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/Pipe.java @@ -12,11 +12,15 @@ import net.minecraft.block.ConnectingBlock; import net.minecraft.block.Material; import net.minecraft.block.ShapeContext; +import net.minecraft.block.Waterloggable; +import net.minecraft.fluid.FluidState; +import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemPlacementContext; import net.minecraft.particle.ParticleTypes; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.state.StateManager; import net.minecraft.state.property.BooleanProperty; +import net.minecraft.state.property.Properties; import net.minecraft.state.property.Property; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; @@ -26,7 +30,7 @@ import net.minecraft.world.World; import net.minecraft.world.WorldAccess; -public class Pipe extends Block { +public class Pipe extends Block implements Waterloggable { public static final BooleanProperty UP = BooleanProperty.of("up"); public static final BooleanProperty DOWN = BooleanProperty.of("down"); @@ -34,6 +38,7 @@ public class Pipe extends Block { public static final BooleanProperty WEST = BooleanProperty.of("west"); public static final BooleanProperty NORTH = BooleanProperty.of("north"); public static final BooleanProperty SOUTH = BooleanProperty.of("south"); + public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public static final VoxelShape MIDDLESHAPE = Block.createCuboidShape(4.0D, 4.0D, 4.0D, 12.0D, 12.0D, 12.0D); public static final VoxelShape UPSHAPE = Block.createCuboidShape(4.0D, 12.0D, 4.0D, 12.0D, 16.0D, 12.0D); public static final VoxelShape DOWNSHAPE = Block.createCuboidShape(4.0D, 0.0D, 4.0D, 12.0D, 4.0D, 12.0D); @@ -46,7 +51,7 @@ public Pipe() { super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.STONE) .hardness(6).resistance(6).lightLevel(5)); setDefaultState(getStateManager().getDefaultState().with(UP, false).with(DOWN, false).with(EAST, false) - .with(WEST, false).with(NORTH, false).with(SOUTH, false)); + .with(WEST, false).with(NORTH, false).with(SOUTH, false).with(WATERLOGGED, false)); } @Override @@ -81,7 +86,7 @@ public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos @Override protected void appendProperties(StateManager.Builder stateManager) { - stateManager.add(UP, DOWN, EAST, WEST, NORTH, SOUTH); + stateManager.add(UP, DOWN, EAST, WEST, NORTH, SOUTH, WATERLOGGED); } @Override @@ -125,5 +130,10 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction facing, boolean bl = block == Backrooms.PIPE; return (BlockState) state.with((Property) ConnectingBlock.FACING_PROPERTIES.get(facing), bl); } - + + @Override + public FluidState getFluidState(BlockState state) { + return (Boolean) state.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state); + } + } diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/TornWallpaper.java b/src/main/java/net/ludocrypt/backrooms/blocks/TornWallpaper.java index 9993d3b..cac16d6 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/TornWallpaper.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/TornWallpaper.java @@ -1,28 +1,32 @@ package net.ludocrypt.backrooms.blocks; -import java.util.Random; +import java.util.function.Consumer; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.items.WallpaperPattern; import net.ludocrypt.backrooms.misc.BackroomsSoundEvents; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.Material; +import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.AxeItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundCategory; import net.minecraft.state.StateManager; import net.minecraft.state.property.IntProperty; +import net.minecraft.tag.BlockTags; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; +import net.minecraft.util.Identifier; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -45,11 +49,12 @@ protected void appendProperties(StateManager.Builder stateMan @Override public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { - Random rand = world.random; ItemStack itemStack = player.getStackInHand(hand); if (itemStack.getItem() == Items.SHEARS || itemStack.getItem() instanceof AxeItem) { - if (player instanceof ServerPlayerEntity && !player.isCreative()) { - itemStack.damage(1, rand, (ServerPlayerEntity) player); + if (!world.isClient && !state.getBlock().isIn(BlockTags.FIRE)) { + itemStack.damage(1, (LivingEntity) player, (Consumer) ((e) -> { + ((LivingEntity) e).sendEquipmentBreakStatus(EquipmentSlot.MAINHAND); + })); } if (world.getBlockState(pos) == Backrooms.TORN_WALLPAPER.getDefaultState().with(TORN_LEVEL, 1)) { this.TornWallpaperSpawn(world, 4, Backrooms.WALLPAPER_PATTERN, pos); @@ -83,7 +88,60 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt } world.setBlockState(pos, Blocks.OAK_PLANKS.getDefaultState()); player.playSound(BackroomsSoundEvents.TEAR, SoundCategory.BLOCKS, 1, 1); + Backrooms.grantAdvancement(player, new Identifier("backrooms", "tear_wallpaper")); return ActionResult.SUCCESS; + } else if (itemStack.getItem() instanceof WallpaperPattern) { + if (itemStack.getItem() == Backrooms.WALLPAPER_PATTERN + && world.getBlockState(pos) == Backrooms.TORN_WALLPAPER.getDefaultState().with(TORN_LEVEL, + state.get(TORN_LEVEL))) { + if (state.get(TORN_LEVEL) > 1) { + world.setBlockState(pos, state.with(TORN_LEVEL, (state.get(TORN_LEVEL) - 1))); + this.decrease(player, itemStack, 1); + } else { + world.setBlockState(pos, Backrooms.WALLPAPER.getDefaultState()); + this.decrease(player, itemStack, 1); + } + Backrooms.grantAdvancement(player, new Identifier("backrooms", "untear_wallpaper")); + return ActionResult.SUCCESS; + } else if (itemStack.getItem() == Backrooms.DOTTED_WALLPAPER_PATTERN + && world.getBlockState(pos) == Backrooms.DOTTED_TORN_WALLPAPER.getDefaultState().with(TORN_LEVEL, + state.get(TORN_LEVEL))) { + if (state.get(TORN_LEVEL) > 1) { + world.setBlockState(pos, state.with(TORN_LEVEL, (state.get(TORN_LEVEL) - 1))); + this.decrease(player, itemStack, 1); + } else { + world.setBlockState(pos, Backrooms.DOTTED_WALLPAPER.getDefaultState()); + this.decrease(player, itemStack, 1); + } + Backrooms.grantAdvancement(player, new Identifier("backrooms", "untear_wallpaper")); + return ActionResult.SUCCESS; + } else if (itemStack.getItem() == Backrooms.RED_WALLPAPER_PATTERN + && world.getBlockState(pos) == Backrooms.RED_TORN_WALLPAPER.getDefaultState().with(TORN_LEVEL, + state.get(TORN_LEVEL))) { + if (state.get(TORN_LEVEL) > 1) { + world.setBlockState(pos, state.with(TORN_LEVEL, (state.get(TORN_LEVEL) - 1))); + this.decrease(player, itemStack, 1); + } else { + world.setBlockState(pos, Backrooms.RED_WALLPAPER.getDefaultState()); + this.decrease(player, itemStack, 1); + } + Backrooms.grantAdvancement(player, new Identifier("backrooms", "untear_wallpaper")); + return ActionResult.SUCCESS; + } else if (itemStack.getItem() == Backrooms.DOTTED_RED_WALLPAPER_PATTERN + && world.getBlockState(pos) == Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState() + .with(TORN_LEVEL, state.get(TORN_LEVEL))) { + if (state.get(TORN_LEVEL) > 1) { + world.setBlockState(pos, state.with(TORN_LEVEL, (state.get(TORN_LEVEL) - 1))); + this.decrease(player, itemStack, 1); + } else { + world.setBlockState(pos, Backrooms.DOTTED_RED_WALLPAPER.getDefaultState()); + this.decrease(player, itemStack, 1); + } + Backrooms.grantAdvancement(player, new Identifier("backrooms", "untear_wallpaper")); + return ActionResult.SUCCESS; + } else { + return ActionResult.FAIL; + } } else { return ActionResult.FAIL; } @@ -95,4 +153,10 @@ public void TornWallpaperSpawn(World world, int level, Item item, BlockPos pos) world.spawnEntity(entity); } + public void decrease(PlayerEntity entity, ItemStack stack, int amount) { + if (!entity.isCreative()) { + stack.decrement(amount); + } + } + } diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java b/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java index 08fd2e2..4a9e60b 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java @@ -13,7 +13,10 @@ import net.minecraft.block.Material; import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.Entity; +import net.minecraft.entity.ItemEntity; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.util.Identifier; import net.minecraft.util.function.BooleanBiFunction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; @@ -26,7 +29,7 @@ public class VoidBlock extends BlockWithEntity { public VoidBlock() { - super(FabricBlockSettings.of(Material.PORTAL).strength(-1.0F, 3600000.8F).sounds(BlockSoundGroup.METAL) + super(FabricBlockSettings.of(Material.PORTAL).strength(100000F, 3600000.8F).sounds(BlockSoundGroup.METAL) .collidable(false).nonOpaque()); } @@ -56,27 +59,30 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit generator = new Random(o); Random rand = generator; double t = 0.0; - entity.slowMovement(state, new Vec3d(0.25D, 0.05000000074505806D, 0.25D)); - if (!world.isClient && !entity.hasVehicle() && !entity.hasPassengers() && entity.canUsePortals() + if (!(entity instanceof ItemEntity)) { + entity.slowMovement(state, new Vec3d(0.25D, 0.05000000074505806D, 0.25D)); + } + if ((!world.isClient && !entity.hasVehicle() && !entity.hasPassengers() && entity.canUsePortals() && VoxelShapes.matchesAnywhere( VoxelShapes.cuboid(entity.getBoundingBox().offset((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()))), - state.getOutlineShape(world, pos), BooleanBiFunction.AND)) { - if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL0 - || entity.world.getDimensionRegistryKey() == BDimension.LEVEL0DOTTED - || entity.world.getDimensionRegistryKey() == BDimension.LEVEL0RED) { + state.getOutlineShape(world, pos), BooleanBiFunction.AND)) && !(entity instanceof ItemEntity)) { + if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL0) { t = rand.nextDouble(); if (t < 0.001) { FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), BackroomsPlacers.HOME); + if (entity instanceof ServerPlayerEntity) { + Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + } } else if (t < 0.25) { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), BackroomsPlacers.LEVEL01); } else if (t < 0.5) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0DOTTEDWORLD), + FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), BackroomsPlacers.LEVEL01); } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0REDWORLD), + FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), BackroomsPlacers.LEVEL01); } else { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), @@ -88,13 +94,13 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), BackroomsPlacers.LEVEL01); } else if (t < 0.25) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), + FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), BackroomsPlacers.LEVEL01); } else if (t < 0.5) { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), BackroomsPlacers.LEVEL2); } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), + FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), BackroomsPlacers.LEVEL2); } else { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), @@ -105,6 +111,9 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit if (t < 0.05) { FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), BackroomsPlacers.HOME); + if (entity instanceof ServerPlayerEntity) { + Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + } } else if (t < 0.25) { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), BackroomsPlacers.LEVEL2); @@ -126,6 +135,9 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit } else if (t < 0.15) { FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), BackroomsPlacers.HOME); + if (entity instanceof ServerPlayerEntity) { + Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + } } else if (t < 0.5) { FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), BackroomsPlacers.LEVEL2); diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/Wall.java b/src/main/java/net/ludocrypt/backrooms/blocks/Wall.java index 79c4cd5..8171e6e 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/Wall.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/Wall.java @@ -9,6 +9,6 @@ public class Wall extends Block { public Wall() { super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.STONE) - .strength(3600000.8F, 3600000.8F)); + .strength(40000F, 3600000.8F)); } } diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/Wallpaper.java b/src/main/java/net/ludocrypt/backrooms/blocks/Wallpaper.java index 1168660..0d37b7a 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/Wallpaper.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/Wallpaper.java @@ -1,6 +1,7 @@ package net.ludocrypt.backrooms.blocks; import java.util.Random; +import java.util.function.Consumer; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; @@ -10,15 +11,18 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.Material; +import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.AxeItem; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.tag.BlockTags; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; +import net.minecraft.util.Identifier; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -37,18 +41,22 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt Random rand = world.random; ItemStack itemStack = player.getStackInHand(hand); if (itemStack.getItem() == Items.SHEARS || itemStack.getItem() instanceof AxeItem) { - if (player instanceof ServerPlayerEntity && !player.isCreative()) { - itemStack.damage(1, rand, (ServerPlayerEntity) player); + if (!world.isClient && !state.getBlock().isIn(BlockTags.FIRE)) { + itemStack.damage(1, (LivingEntity) player, (Consumer) ((e) -> { + ((LivingEntity) e).sendEquipmentBreakStatus(EquipmentSlot.MAINHAND); + })); } ItemStack normal = new ItemStack(Backrooms.WALLPAPER_PATTERN, rand.nextInt(4) + 1); ItemStack dotted = new ItemStack(Backrooms.DOTTED_WALLPAPER_PATTERN, rand.nextInt(4) + 1); ItemStack red = new ItemStack(Backrooms.RED_WALLPAPER_PATTERN, rand.nextInt(4) + 1); - ItemEntity normalItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), normal); - ItemEntity dottedItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), dotted); - ItemEntity redItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), red); - - + ItemEntity normalItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), + normal); + ItemEntity dottedItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), + dotted); + ItemEntity redItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(), + red); + if (world.getBlockState(pos) == Backrooms.WALLPAPER.getDefaultState()) { world.spawnEntity(normalItem); } @@ -61,6 +69,7 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt world.setBlockState(pos, Blocks.OAK_PLANKS.getDefaultState()); player.playSound(BackroomsSoundEvents.TEAR, 1, 1); + Backrooms.grantAdvancement(player, new Identifier("backrooms", "tear_wallpaper")); return ActionResult.SUCCESS; } else { return ActionResult.FAIL; diff --git a/src/main/java/net/ludocrypt/backrooms/client/render/BRenderLayer.java b/src/main/java/net/ludocrypt/backrooms/client/render/BRenderLayer.java new file mode 100644 index 0000000..559ad5a --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/client/render/BRenderLayer.java @@ -0,0 +1,398 @@ +package net.ludocrypt.backrooms.client.render; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import com.google.common.collect.ImmutableList; + +import it.unimi.dsi.fastutil.Hash.Strategy; +import it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet; +import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.annotation.Nullable; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.render.BufferBuilder; +import net.minecraft.client.render.BufferRenderer; +import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.RenderPhase; +import net.minecraft.client.render.VertexFormat; +import net.minecraft.client.render.VertexFormats; +import net.minecraft.client.render.block.entity.EndPortalBlockEntityRenderer; + +@Environment(EnvType.CLIENT) +public abstract class BRenderLayer extends RenderLayer { + private final VertexFormat vertexFormat; + private final int drawMode; + private final int expectedBufferSize; + private final boolean hasCrumbling; + private final boolean translucent; + private final Optional optionalThis; + + public static BRenderLayer getEndPortal(int layer) { + RenderPhase.Transparency transparency2; + RenderPhase.Texture texture2; + if (layer <= 1) { + transparency2 = NO_TRANSPARENCY; + texture2 = new RenderPhase.Texture(EndPortalRenderer.TEXTURE, false, false); + } else { + transparency2 = ADDITIVE_TRANSPARENCY; + texture2 = new RenderPhase.Texture(EndPortalBlockEntityRenderer.PORTAL_TEXTURE, false, false); + } + + return of("end_portal", VertexFormats.POSITION_COLOR, 7, 256, false, false, + BRenderLayer.MultiPhaseParameters.builder().transparency(transparency2).texture(texture2) + .texturing(new RenderPhase.PortalTexturing(layer)).fog(BLACK_FOG).build(false)); + } + + public BRenderLayer(String name, VertexFormat vertexFormat, int drawMode, int expectedBufferSize, + boolean hasCrumbling, boolean translucent, Runnable startAction, Runnable endAction) { + super(name, vertexFormat, expectedBufferSize, expectedBufferSize, translucent, translucent, startAction, + endAction); + this.vertexFormat = vertexFormat; + this.drawMode = drawMode; + this.expectedBufferSize = expectedBufferSize; + this.hasCrumbling = hasCrumbling; + this.translucent = translucent; + this.optionalThis = Optional.of(this); + } + + public static BRenderLayer.MultiPhase of(String name, VertexFormat vertexFormat, int drawMode, + int expectedBufferSize, boolean hasCrumbling, boolean translucent, + BRenderLayer.MultiPhaseParameters phases) { + return BRenderLayer.MultiPhase.of(name, vertexFormat, drawMode, expectedBufferSize, hasCrumbling, translucent, + phases); + } + + public void draw(BufferBuilder buffer, int cameraX, int cameraY, int cameraZ) { + if (buffer.isBuilding()) { + if (this.translucent) { + buffer.sortQuads((float) cameraX, (float) cameraY, (float) cameraZ); + } + + buffer.end(); + this.startDrawing(); + BufferRenderer.draw(buffer); + this.endDrawing(); + } + } + + public String toString() { + return this.name; + } + + public static List getBlockLayers() { + return ImmutableList.of(getSolid(), getCutoutMipped(), getCutout(), getTranslucent(), getTripwire()); + } + + public int getExpectedBufferSize() { + return this.expectedBufferSize; + } + + public VertexFormat getVertexFormat() { + return this.vertexFormat; + } + + public int getDrawMode() { + return this.drawMode; + } + + public Optional getAffectedOutline() { + return Optional.empty(); + } + + public boolean isOutline() { + return false; + } + + public boolean hasCrumbling() { + return this.hasCrumbling; + } + + public Optional asOptional() { + return this.optionalThis; + } + + @Environment(EnvType.CLIENT) + static final class MultiPhase extends BRenderLayer { + private static final ObjectOpenCustomHashSet CACHE; + private final BRenderLayer.MultiPhaseParameters phases; + private final int hash; + private final Optional affectedOutline; + private final boolean outline; + + private MultiPhase(String name, VertexFormat vertexFormat, int drawMode, int expectedBufferSize, + boolean hasCrumbling, boolean translucent, BRenderLayer.MultiPhaseParameters phases) { + super(name, vertexFormat, drawMode, expectedBufferSize, hasCrumbling, translucent, () -> { + phases.phases.forEach(RenderPhase::startDrawing); + }, () -> { + phases.phases.forEach(RenderPhase::endDrawing); + }); + this.phases = phases; + this.affectedOutline = Optional.empty(); + this.outline = phases.outlineMode == BRenderLayer.OutlineMode.IS_OUTLINE; + this.hash = Objects.hash(new Object[] { super.hashCode(), phases }); + } + + public static BRenderLayer.MultiPhase of(String name, VertexFormat vertexFormat, int drawMode, + int expectedBufferSize, boolean hasCrumbling, boolean translucent, + BRenderLayer.MultiPhaseParameters phases) { + return (BRenderLayer.MultiPhase) CACHE.addOrGet(new BRenderLayer.MultiPhase(name, vertexFormat, drawMode, + expectedBufferSize, hasCrumbling, translucent, phases)); + } + + public Optional getAffectedOutline() { + return this.affectedOutline; + } + + public boolean isOutline() { + return this.outline; + } + + public boolean equals(@Nullable Object object) { + return this == object; + } + + public int hashCode() { + return this.hash; + } + + public String toString() { + return "RenderType[" + this.phases + ']'; + } + + static { + CACHE = new ObjectOpenCustomHashSet(BRenderLayer.MultiPhase.HashStrategy.INSTANCE); + } + + @Environment(EnvType.CLIENT) + static enum HashStrategy implements Strategy { + INSTANCE; + + public int hashCode(@Nullable BRenderLayer.MultiPhase multiPhase) { + return multiPhase == null ? 0 : multiPhase.hash; + } + + public boolean equals(@Nullable BRenderLayer.MultiPhase multiPhase, + @Nullable BRenderLayer.MultiPhase multiPhase2) { + if (multiPhase == multiPhase2) { + return true; + } else { + return multiPhase != null && multiPhase2 != null + ? Objects.equals(multiPhase.phases, multiPhase2.phases) + : false; + } + } + } + } + + @Environment(EnvType.CLIENT) + public static final class MultiPhaseParameters { + private final RenderPhase.Texture texture; + private final RenderPhase.Transparency transparency; + private final RenderPhase.DiffuseLighting diffuseLighting; + private final RenderPhase.ShadeModel shadeModel; + private final RenderPhase.Alpha alpha; + private final RenderPhase.DepthTest depthTest; + private final RenderPhase.Cull cull; + private final RenderPhase.Lightmap lightmap; + private final RenderPhase.Overlay overlay; + private final RenderPhase.Fog fog; + private final RenderPhase.Layering layering; + private final RenderPhase.Target target; + private final RenderPhase.Texturing texturing; + private final RenderPhase.WriteMaskState writeMaskState; + private final RenderPhase.LineWidth lineWidth; + private final BRenderLayer.OutlineMode outlineMode; + private final ImmutableList phases; + + private MultiPhaseParameters(RenderPhase.Texture texture, RenderPhase.Transparency transparency, + RenderPhase.DiffuseLighting diffuseLighting, RenderPhase.ShadeModel shadeModel, RenderPhase.Alpha alpha, + RenderPhase.DepthTest depthTest, RenderPhase.Cull cull, RenderPhase.Lightmap lightmap, + RenderPhase.Overlay overlay, RenderPhase.Fog fog, RenderPhase.Layering layering, + RenderPhase.Target target, RenderPhase.Texturing texturing, RenderPhase.WriteMaskState writeMaskState, + RenderPhase.LineWidth lineWidth, BRenderLayer.OutlineMode outlineMode) { + this.texture = texture; + this.transparency = transparency; + this.diffuseLighting = diffuseLighting; + this.shadeModel = shadeModel; + this.alpha = alpha; + this.depthTest = depthTest; + this.cull = cull; + this.lightmap = lightmap; + this.overlay = overlay; + this.fog = fog; + this.layering = layering; + this.target = target; + this.texturing = texturing; + this.writeMaskState = writeMaskState; + this.lineWidth = lineWidth; + this.outlineMode = outlineMode; + this.phases = ImmutableList.of(this.texture, this.transparency, this.diffuseLighting, this.shadeModel, + this.alpha, this.depthTest, this.cull, this.lightmap, this.overlay, this.fog, this.layering, + this.target, new RenderPhase[] { this.texturing, this.writeMaskState, this.lineWidth }); + } + + public boolean equals(Object object) { + if (this == object) { + return true; + } else if (object != null && this.getClass() == object.getClass()) { + BRenderLayer.MultiPhaseParameters multiPhaseParameters = (BRenderLayer.MultiPhaseParameters) object; + return this.outlineMode == multiPhaseParameters.outlineMode + && this.phases.equals(multiPhaseParameters.phases); + } else { + return false; + } + } + + public int hashCode() { + return Objects.hash(new Object[] { this.phases, this.outlineMode }); + } + + public String toString() { + return "CompositeState[" + this.phases + ", outlineProperty=" + this.outlineMode + ']'; + } + + public static BRenderLayer.MultiPhaseParameters.Builder builder() { + return new BRenderLayer.MultiPhaseParameters.Builder(); + } + + @Environment(EnvType.CLIENT) + public static class Builder { + private RenderPhase.Texture texture; + private RenderPhase.Transparency transparency; + private RenderPhase.DiffuseLighting diffuseLighting; + private RenderPhase.ShadeModel shadeModel; + private RenderPhase.Alpha alpha; + private RenderPhase.DepthTest depthTest; + private RenderPhase.Cull cull; + private RenderPhase.Lightmap lightmap; + private RenderPhase.Overlay overlay; + private RenderPhase.Fog fog; + private RenderPhase.Layering layering; + private RenderPhase.Target target; + private RenderPhase.Texturing texturing; + private RenderPhase.WriteMaskState writeMaskState; + private RenderPhase.LineWidth lineWidth; + + private Builder() { + this.texture = RenderPhase.NO_TEXTURE; + this.transparency = RenderPhase.NO_TRANSPARENCY; + this.diffuseLighting = RenderPhase.DISABLE_DIFFUSE_LIGHTING; + this.shadeModel = RenderPhase.SHADE_MODEL; + this.alpha = RenderPhase.ZERO_ALPHA; + this.depthTest = RenderPhase.LEQUAL_DEPTH_TEST; + this.cull = RenderPhase.ENABLE_CULLING; + this.lightmap = RenderPhase.DISABLE_LIGHTMAP; + this.overlay = RenderPhase.DISABLE_OVERLAY_COLOR; + this.fog = RenderPhase.FOG; + this.layering = RenderPhase.NO_LAYERING; + this.target = RenderPhase.MAIN_TARGET; + this.texturing = RenderPhase.DEFAULT_TEXTURING; + this.writeMaskState = RenderPhase.ALL_MASK; + this.lineWidth = RenderPhase.FULL_LINE_WIDTH; + } + + public BRenderLayer.MultiPhaseParameters.Builder texture(RenderPhase.Texture texture) { + this.texture = texture; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder transparency(RenderPhase.Transparency transparency) { + this.transparency = transparency; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder diffuseLighting( + RenderPhase.DiffuseLighting diffuseLighting) { + this.diffuseLighting = diffuseLighting; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder shadeModel(RenderPhase.ShadeModel shadeModel) { + this.shadeModel = shadeModel; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder alpha(RenderPhase.Alpha alpha) { + this.alpha = alpha; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder depthTest(RenderPhase.DepthTest depthTest) { + this.depthTest = depthTest; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder cull(RenderPhase.Cull cull) { + this.cull = cull; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder lightmap(RenderPhase.Lightmap lightmap) { + this.lightmap = lightmap; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder overlay(RenderPhase.Overlay overlay) { + this.overlay = overlay; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder fog(RenderPhase.Fog fog) { + this.fog = fog; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder layering(RenderPhase.Layering layering) { + this.layering = layering; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder target(RenderPhase.Target target) { + this.target = target; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder texturing(RenderPhase.Texturing texturing) { + this.texturing = texturing; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder writeMaskState(RenderPhase.WriteMaskState writeMaskState) { + this.writeMaskState = writeMaskState; + return this; + } + + public BRenderLayer.MultiPhaseParameters.Builder lineWidth(RenderPhase.LineWidth lineWidth) { + this.lineWidth = lineWidth; + return this; + } + + public BRenderLayer.MultiPhaseParameters build(boolean affectsOutline) { + return this.build( + affectsOutline ? BRenderLayer.OutlineMode.AFFECTS_OUTLINE : BRenderLayer.OutlineMode.NONE); + } + + public BRenderLayer.MultiPhaseParameters build(BRenderLayer.OutlineMode outlineMode) { + return new BRenderLayer.MultiPhaseParameters(this.texture, this.transparency, this.diffuseLighting, + this.shadeModel, this.alpha, this.depthTest, this.cull, this.lightmap, this.overlay, this.fog, + this.layering, this.target, this.texturing, this.writeMaskState, this.lineWidth, outlineMode); + } + } + } + + @Environment(EnvType.CLIENT) + static enum OutlineMode { + NONE("none"), IS_OUTLINE("is_outline"), AFFECTS_OUTLINE("affects_outline"); + + private final String name; + + private OutlineMode(String name) { + this.name = name; + } + + public String toString() { + return this.name; + } + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/client/render/EndPortalRenderer.java b/src/main/java/net/ludocrypt/backrooms/client/render/EndPortalRenderer.java index 27db1b2..d3e154b 100644 --- a/src/main/java/net/ludocrypt/backrooms/client/render/EndPortalRenderer.java +++ b/src/main/java/net/ludocrypt/backrooms/client/render/EndPortalRenderer.java @@ -15,13 +15,15 @@ import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.Identifier; import net.minecraft.util.math.Matrix4f; @Environment(EnvType.CLIENT) public class EndPortalRenderer extends BlockEntityRenderer { private static final Random RANDOM = new Random(9500L); + public static final Identifier TEXTURE = new Identifier("backrooms", "textures/block/void_block.png"); private static final List renderLayers = IntStream.range(0, 16) - .mapToObj(i -> RenderLayer.getEndPortal(i + 1)).collect(ImmutableList.toImmutableList()); + .mapToObj(i -> BRenderLayer.getEndPortal(i + 1)).collect(ImmutableList.toImmutableList()); public EndPortalRenderer(BlockEntityRenderDispatcher dispatcher) { super(dispatcher); @@ -34,15 +36,17 @@ public void render(T blockEntity, float tickDelta, MatrixStack matrixStack, RANDOM.setSeed(9500L); int iterations = renderIterations(d); Matrix4f matrix = matrixStack.peek().getModel(); - renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(0)), 0.15F); - for (int i = 1; i < iterations; ++i) - renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(i)), 2.0F / (18 - i)); + renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(0)), 1.0F); + for (int i = 1; i < iterations; ++i) { + renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(i)), 1.0F); + } + } private static void renderLayer(Matrix4f matrix, VertexConsumer vertexConsumer, float colourScalar) { - float red = (RANDOM.nextFloat() * 0.5F + 1.0F) * colourScalar; - float green = (RANDOM.nextFloat() * 0.5F + 0.9F) * colourScalar; - float blue = (RANDOM.nextFloat() * 0.5F + 0.4F) * colourScalar; + float red = (1.0F) * colourScalar; + float green = (1.0F) * colourScalar; + float blue = (1.0F) * colourScalar; renderFace(matrix, vertexConsumer, 0, 1, 1, 0, 0, 0, 0, 0, red, green, blue); // Direction.NORTH renderFace(matrix, vertexConsumer, 1, 1, 1, 0, 0, 1, 1, 0, red, green, blue); // Direction.EAST renderFace(matrix, vertexConsumer, 0, 1, 0, 1, 1, 1, 1, 1, red, green, blue); // Direction.SOUTH @@ -91,9 +95,10 @@ public static void renderInHand(MatrixStack matrixStack, VertexConsumerProvider int iterations = renderIterations(cameraDistance); Matrix4f matrix = matrixStack.peek().getModel(); - renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(0)), 0.15F); - for (int i = 1; i < iterations; ++i) - renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(i)), 2.0F / (18 - i)); + renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(0)), 1.0F); + for (int i = 1; i < iterations; ++i) { + renderLayer(matrix, vertexConsumerProvider.getBuffer(renderLayers.get(i)), 1.0F); + } } } diff --git a/src/main/java/net/ludocrypt/backrooms/dimension/BDimension.java b/src/main/java/net/ludocrypt/backrooms/dimension/BDimension.java index d1ff614..364800a 100644 --- a/src/main/java/net/ludocrypt/backrooms/dimension/BDimension.java +++ b/src/main/java/net/ludocrypt/backrooms/dimension/BDimension.java @@ -12,16 +12,6 @@ public class BDimension { public static final RegistryKey LEVEL0WORLD = RegistryKey.of(Registry.DIMENSION, new Identifier("backrooms", "level_0")); - public static final RegistryKey LEVEL0RED = RegistryKey.of(Registry.DIMENSION_TYPE_KEY, - new Identifier("backrooms", "level_0_red")); - public static final RegistryKey LEVEL0REDWORLD = RegistryKey.of(Registry.DIMENSION, - new Identifier("backrooms", "level_0_red")); - - public static final RegistryKey LEVEL0DOTTED = RegistryKey.of(Registry.DIMENSION_TYPE_KEY, - new Identifier("backrooms", "level_0_dotted")); - public static final RegistryKey LEVEL0DOTTEDWORLD = RegistryKey.of(Registry.DIMENSION, - new Identifier("backrooms", "level_0_dotted")); - public static final RegistryKey LEVEL1 = RegistryKey.of(Registry.DIMENSION_TYPE_KEY, new Identifier("backrooms", "level_1")); public static final RegistryKey LEVEL1WORLD = RegistryKey.of(Registry.DIMENSION, diff --git a/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java b/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java index 682269f..2390a86 100644 --- a/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java +++ b/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java @@ -11,22 +11,22 @@ public class BackroomsPlacers { public static final EntityPlacer LEVEL01 = (oldEntity, destination, portalDir, horizontalOffset, verticalOffset) -> { return new BlockPattern.TeleportTarget( - new Vec3d(oldEntity.getX() + ((destination.random.nextInt(20) - 10) * 16) + 3.5, 6, - oldEntity.getZ() + ((destination.random.nextInt(20) - 10) * 16) + 3.5), + new Vec3d(oldEntity.getX() + ((destination.random.nextInt(100) - 50) * 16) + 3.5, 6, + oldEntity.getZ() + ((destination.random.nextInt(100) - 50) * 16) + 3.5), oldEntity.getVelocity(), (int) oldEntity.yaw); }; public static final EntityPlacer LEVEL2 = (oldEntity, destination, portalDir, horizontalOffset, verticalOffset) -> { return new BlockPattern.TeleportTarget( - new Vec3d(oldEntity.getX() + ((destination.random.nextInt(20) - 10) * 16) + 3.5, 5, - oldEntity.getZ() + ((destination.random.nextInt(20) - 10) * 16) + 3.5), + new Vec3d(oldEntity.getX() + ((destination.random.nextInt(100) - 10) * 16) + 3.5, 5, + oldEntity.getZ() + ((destination.random.nextInt(100) - 10) * 16) + 3.5), oldEntity.getVelocity(), (int) oldEntity.yaw); }; public static final EntityPlacer LEVEL3 = (oldEntity, destination, portalDir, horizontalOffset, verticalOffset) -> { return new BlockPattern.TeleportTarget( - new Vec3d(oldEntity.getX() + ((destination.random.nextInt(20) - 10) * 16) + 3.5, 4, - oldEntity.getZ() + ((destination.random.nextInt(20) - 10) * 16) + 3.5), + new Vec3d(oldEntity.getX() + ((destination.random.nextInt(100) - 50) * 16) + 3.5, 4, + oldEntity.getZ() + ((destination.random.nextInt(100) - 50) * 16) + 3.5), oldEntity.getVelocity(), (int) oldEntity.yaw); }; diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0DecrepitRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0DecrepitRoom.java new file mode 100644 index 0000000..e1a457a --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DecrepitRoom.java @@ -0,0 +1,474 @@ +package net.ludocrypt.backrooms.features; + +import java.util.Random; + +import com.mojang.serialization.Codec; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.blocks.BackroomsStairs; +import net.ludocrypt.backrooms.blocks.Carpet; +import net.ludocrypt.backrooms.blocks.Light; +import net.ludocrypt.backrooms.blocks.Tile; +import net.ludocrypt.backrooms.blocks.TornWallpaper; +import net.ludocrypt.backrooms.config.BackroomsConfig; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ChestBlock; +import net.minecraft.block.entity.LootableContainerBlockEntity; +import net.minecraft.block.enums.BlockHalf; +import net.minecraft.block.enums.ChestType; +import net.minecraft.block.enums.StairShape; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; + +public class Level0DecrepitRoom extends Feature { + public Level0DecrepitRoom(Codec configFactory) { + super(configFactory); + } + + public static boolean door1 = true; + public static boolean door2 = true; + public static boolean door3 = true; + public static boolean door4 = true; + + private int[][] One = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Two = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Three = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Four = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] OneNoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] TwoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall1 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall2 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1Light = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 1, 10, 4, 4, 4, 4, 4, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1NoLight = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 1, 10, 4, 4, 4, 4, 4, 3, 3, 2, 11 }, { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private int[][] StairWall = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private static final BlockState WALLPAPER = Backrooms.WALLPAPER.getDefaultState(); + private static final BlockState CARPET = Backrooms.CARPET.getDefaultState(); + private static final BlockState CARPET_STAIRS = Backrooms.CARPET_STAIRS.getDefaultState() + .with(BackroomsStairs.FACING, Direction.NORTH).with(BackroomsStairs.HALF, BlockHalf.BOTTOM) + .with(BackroomsStairs.SHAPE, StairShape.STRAIGHT); + private static final BlockState MOLDY_CARPET = Backrooms.CARPET.getDefaultState().with(Carpet.MOLDY, true); + private static final BlockState SOUTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.SOUTH) + .with(Tile.SINGLE, false); + private static final BlockState NORTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.NORTH) + .with(Tile.SINGLE, false); + private static final BlockState TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.EAST) + .with(Tile.SINGLE, true); + private static final BlockState LIGHT = Backrooms.LIGHT.getDefaultState().with(Light.ON, false); + private static final BlockState AIR = Blocks.AIR.getDefaultState(); + private static final BlockState CHEST = Blocks.CHEST.getDefaultState().with(ChestBlock.CHEST_TYPE, ChestType.SINGLE) + .with(ChestBlock.FACING, Direction.NORTH).with(ChestBlock.WATERLOGGED, false); + private static final BlockState VOID_BLOCK = Backrooms.VOID_BLOCK.getDefaultState(); + private static final BlockState TORN_WALLPAPER_1 = Backrooms.TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 1); + private static final BlockState TORN_WALLPAPER_2 = Backrooms.TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 2); + private static final BlockState TORN_WALLPAPER_3 = Backrooms.TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 3); + private static final BlockState TORN_WALLPAPER_4 = Backrooms.TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 4); + private static final BlockState VENT = Backrooms.VENT.getDefaultState(); + + public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, + Random rand, BlockPos position, DefaultFeatureConfig config) { + + Random generator = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = position.getX() * l ^ position.getY() * m ^ position.getZ() * n ^ seed; + generator = new Random(o); + BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); + + if (generator.nextDouble() < 0.7) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else if (generator.nextDouble() < 0.8) { + if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall1, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall2, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } + } else if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + } + + return true; + + } + + private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int[][] slice, Random rand) { + + BlockPos currentPositionOffsetted = new BlockPos(centerPos.add(-1, 3, slice[0].length)); + BlockPos.Mutable currentPosition = new BlockPos.Mutable(currentPositionOffsetted.getX(), + currentPositionOffsetted.getY(), currentPositionOffsetted.getZ()); + + Random generator = new Random(world.getSeed()); + Random generator2 = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = currentPosition.getX() * l ^ currentPosition.getY() * m ^ currentPosition.getZ() * n ^ seed; + generator = new Random(o); + generator2 = new Random(o + 2); + + for (int y = 0; y < slice.length; y++) { + for (int z = 0; z < slice[0].length; z++) { + int sliceBlock = slice[y][z]; + + if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) + && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { + + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DecrepitRoom.door1 = true; + } else { + Level0DecrepitRoom.door1 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DecrepitRoom.door2 = true; + } else { + Level0DecrepitRoom.door2 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DecrepitRoom.door3 = true; + } else { + Level0DecrepitRoom.door3 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DecrepitRoom.door4 = true; + } else { + Level0DecrepitRoom.door4 = false; + } + + switch (sliceBlock) { + case 0: + break; + case 2: + world.setBlockState(currentPosition, SOUTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 11: + world.setBlockState(currentPosition, NORTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 12: + world.setBlockState(currentPosition, TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 3: + world.setBlockState(currentPosition, LIGHT, 8); + break; + case 4: + world.setBlockState(currentPosition, AIR, 2); + break; + case 5: + if (rand.nextDouble() < 0.35) { + int k = rand.nextInt(4); + switch (k) { + case 0: + world.setBlockState(currentPosition, TORN_WALLPAPER_1, 2); + break; + case 1: + world.setBlockState(currentPosition, TORN_WALLPAPER_2, 2); + break; + case 2: + world.setBlockState(currentPosition, TORN_WALLPAPER_3, 2); + break; + case 3: + world.setBlockState(currentPosition, TORN_WALLPAPER_4, 2); + break; + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 6: + if (door1) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 7: + if (door2) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + world.setBlockState(currentPosition, VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 2, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 0, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), VOID_BLOCK, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), VOID_BLOCK, 2); + } + } else { + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 3); + } + + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 8: + if (door3) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 9: + if (door4) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 10: + world.setBlockState(currentPosition, CARPET_STAIRS, 2); + break; + case 1: + if (rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition, MOLDY_CARPET, 2); + } else { + world.setBlockState(currentPosition, CARPET, 2); + } + if (rand.nextDouble() < 0.001) { + if (rand.nextDouble() < BackroomsConfig.getInstance().ChestSpawnChance) { + world.setBlockState(currentPosition.add(0, 1, 0), CHEST, 2); + LootableContainerBlockEntity.setLootTable(world, rand, currentPosition.add(0, 1, 0), + Backrooms.LEVEL0CHEST); + } + } + break; + } + } + currentPosition.move(Direction.SOUTH); + } + currentPosition.move(0, -1, -slice[0].length); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java new file mode 100644 index 0000000..cedb02d --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java @@ -0,0 +1,474 @@ +package net.ludocrypt.backrooms.features; + +import java.util.Random; + +import com.mojang.serialization.Codec; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.blocks.BackroomsStairs; +import net.ludocrypt.backrooms.blocks.Carpet; +import net.ludocrypt.backrooms.blocks.Tile; +import net.ludocrypt.backrooms.blocks.TornWallpaper; +import net.ludocrypt.backrooms.config.BackroomsConfig; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ChestBlock; +import net.minecraft.block.entity.LootableContainerBlockEntity; +import net.minecraft.block.enums.BlockHalf; +import net.minecraft.block.enums.ChestType; +import net.minecraft.block.enums.StairShape; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; + +public class Level0DottedRedRoom extends Feature { + public Level0DottedRedRoom(Codec configFactory) { + super(configFactory); + } + + public static boolean door1 = true; + public static boolean door2 = true; + public static boolean door3 = true; + public static boolean door4 = true; + + private int[][] One = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Two = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Three = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Four = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] OneNoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] TwoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall1 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall2 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1Light = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 1, 10, 4, 4, 4, 4, 4, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1NoLight = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 1, 10, 4, 4, 4, 4, 4, 3, 3, 2, 11 }, { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private int[][] StairWall = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private static final BlockState WALLPAPER = Backrooms.DOTTED_RED_WALLPAPER.getDefaultState(); + private static final BlockState CARPET = Backrooms.CARPET.getDefaultState(); + private static final BlockState CARPET_STAIRS = Backrooms.CARPET_STAIRS.getDefaultState() + .with(BackroomsStairs.FACING, Direction.NORTH).with(BackroomsStairs.HALF, BlockHalf.BOTTOM) + .with(BackroomsStairs.SHAPE, StairShape.STRAIGHT); + private static final BlockState MOLDY_CARPET = Backrooms.CARPET.getDefaultState().with(Carpet.MOLDY, true); + private static final BlockState SOUTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.SOUTH) + .with(Tile.SINGLE, false); + private static final BlockState NORTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.NORTH) + .with(Tile.SINGLE, false); + private static final BlockState TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.EAST) + .with(Tile.SINGLE, true); + private static final BlockState LIGHT = Backrooms.LIGHT.getDefaultState(); + private static final BlockState AIR = Blocks.AIR.getDefaultState(); + private static final BlockState CHEST = Blocks.CHEST.getDefaultState().with(ChestBlock.CHEST_TYPE, ChestType.SINGLE) + .with(ChestBlock.FACING, Direction.NORTH).with(ChestBlock.WATERLOGGED, false); + private static final BlockState VOID_BLOCK = Backrooms.VOID_BLOCK.getDefaultState(); + private static final BlockState TORN_WALLPAPER_1 = Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 1); + private static final BlockState TORN_WALLPAPER_2 = Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 2); + private static final BlockState TORN_WALLPAPER_3 = Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 3); + private static final BlockState TORN_WALLPAPER_4 = Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState() + .with(TornWallpaper.TORN_LEVEL, 4); + private static final BlockState VENT = Backrooms.VENT.getDefaultState(); + + public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, + Random rand, BlockPos position, DefaultFeatureConfig config) { + + Random generator = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = position.getX() * l ^ position.getY() * m ^ position.getZ() * n ^ seed; + generator = new Random(o); + BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); + + if (generator.nextDouble() < 0.7) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else if (generator.nextDouble() < 0.8) { + if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall1, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall2, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } + } else if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + } + + return true; + + } + + private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int[][] slice, Random rand) { + + BlockPos currentPositionOffsetted = new BlockPos(centerPos.add(-1, 3, slice[0].length)); + BlockPos.Mutable currentPosition = new BlockPos.Mutable(currentPositionOffsetted.getX(), + currentPositionOffsetted.getY(), currentPositionOffsetted.getZ()); + + Random generator = new Random(world.getSeed()); + Random generator2 = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = currentPosition.getX() * l ^ currentPosition.getY() * m ^ currentPosition.getZ() * n ^ seed; + generator = new Random(o); + generator2 = new Random(o * 3); + + for (int y = 0; y < slice.length; y++) { + for (int z = 0; z < slice[0].length; z++) { + int sliceBlock = slice[y][z]; + + if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) + && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { + + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DottedRedRoom.door1 = true; + } else { + Level0DottedRedRoom.door1 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DottedRedRoom.door2 = true; + } else { + Level0DottedRedRoom.door2 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DottedRedRoom.door3 = true; + } else { + Level0DottedRedRoom.door3 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + Level0DottedRedRoom.door4 = true; + } else { + Level0DottedRedRoom.door4 = false; + } + + switch (sliceBlock) { + case 0: + break; + case 2: + world.setBlockState(currentPosition, SOUTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 11: + world.setBlockState(currentPosition, NORTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 12: + world.setBlockState(currentPosition, TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 3: + world.setBlockState(currentPosition, LIGHT, 2); + break; + case 4: + world.setBlockState(currentPosition, AIR, 2); + break; + case 5: + if (rand.nextDouble() < 0.005) { + int k = rand.nextInt(4); + switch (k) { + case 0: + world.setBlockState(currentPosition, TORN_WALLPAPER_1, 2); + break; + case 1: + world.setBlockState(currentPosition, TORN_WALLPAPER_2, 2); + break; + case 2: + world.setBlockState(currentPosition, TORN_WALLPAPER_3, 2); + break; + case 3: + world.setBlockState(currentPosition, TORN_WALLPAPER_4, 2); + break; + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 6: + if (door1) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 7: + if (door2) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + world.setBlockState(currentPosition, VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 2, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 0, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), VOID_BLOCK, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), VOID_BLOCK, 2); + } + } else { + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 3); + } + + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 8: + if (door3) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 9: + if (door4) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, WALLPAPER, 2); + } + break; + case 10: + world.setBlockState(currentPosition, CARPET_STAIRS, 2); + break; + case 1: + if (generator.nextDouble() < 0.01) { + world.setBlockState(currentPosition, MOLDY_CARPET, 2); + } else { + world.setBlockState(currentPosition, CARPET, 2); + } + + if (rand.nextDouble() < 0.001) { + if (rand.nextDouble() < BackroomsConfig.getInstance().ChestSpawnChance) { + world.setBlockState(currentPosition.add(0, 1, 0), CHEST, 2); + LootableContainerBlockEntity.setLootTable(world, rand, currentPosition.add(0, 1, 0), + Backrooms.LEVEL0CHEST); + } + } + break; + } + } + currentPosition.move(Direction.SOUTH); + } + currentPosition.move(0, -1, -slice[0].length); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java index 38a7ca5..14fb62a 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java @@ -266,6 +266,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRoom.door1 = true; } else { @@ -315,7 +316,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, AIR, 2); break; case 5: - if (rand.nextDouble() < 0.01) { + if (rand.nextDouble() < 0.005) { int k = rand.nextInt(4); switch (k) { case 0: diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java index 0ffc460..00206bf 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java @@ -237,7 +237,9 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int sliceBlock = slice[y][z]; if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) - || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK))) { + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) + && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0RedRoom.door1 = true; } else { @@ -287,7 +289,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, AIR, 2); break; case 5: - if (rand.nextDouble() < 0.01) { + if (rand.nextDouble() < 0.005) { int k = rand.nextInt(4); switch (k) { case 0: diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java index 7f5beec..61664e4 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java @@ -316,7 +316,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, AIR, 2); break; case 5: - if (rand.nextDouble() < 0.01) { + if (rand.nextDouble() < 0.005) { int k = rand.nextInt(4); switch (k) { case 0: diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java new file mode 100644 index 0000000..640a100 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java @@ -0,0 +1,440 @@ +package net.ludocrypt.backrooms.features; + +import java.util.Random; + +import com.mojang.serialization.Codec; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.blocks.BackroomsStairs; +import net.ludocrypt.backrooms.blocks.Light; +import net.ludocrypt.backrooms.blocks.Tile; +import net.ludocrypt.backrooms.config.BackroomsConfig; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.ChestBlock; +import net.minecraft.block.entity.LootableContainerBlockEntity; +import net.minecraft.block.enums.BlockHalf; +import net.minecraft.block.enums.ChestType; +import net.minecraft.block.enums.StairShape; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; + +public class Level1OffRoom extends Feature { + public Level1OffRoom(Codec configFactory) { + super(configFactory); + } + + public static boolean door1 = true; + public static boolean door2 = true; + public static boolean door3 = true; + public static boolean door4 = true; + + private int[][] One = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Two = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Three = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Four = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] OneNoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] TwoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway1Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 7, 4, 4, 4, 4, 8, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall1 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 6, 5, 6, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Wall2 = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 9, 5, 9, 5, 9, 9, 9, 9, 5, 9, 5, 9, 5, 5 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2NoLight = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Hallway2Light = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 11, 12, 3, 3, 12, 2, 11, 3, 3, 2, 11 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 }, { 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1Light = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 1, 10, 4, 4, 4, 4, 4, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + private int[][] Stair1NoLight = { { 0, 0, 0, 0, 0, 10, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 }, + { 2, 11, 3, 3, 2, 1, 10, 4, 4, 4, 4, 4, 3, 3, 2, 11 }, { 5, 5, 5, 5, 5, 1, 1, 10, 4, 4, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 10, 4, 4, 4, 4, 4, 4, 5 }, { 5, 5, 5, 5, 5, 1, 1, 1, 1, 10, 4, 4, 4, 4, 4, 5 }, + { 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 10, 4, 4, 4, 4, 8 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private int[][] StairWall = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8 }, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; + + private static final BlockState CEMENT_BRICKS = Backrooms.CEMENT_BRICKS.getDefaultState(); + private static final BlockState CEMENT = Backrooms.CEMENT.getDefaultState(); + private static final BlockState CEMENT_STAIRS = Backrooms.CEMENT_STAIRS.getDefaultState() + .with(BackroomsStairs.FACING, Direction.NORTH).with(BackroomsStairs.HALF, BlockHalf.BOTTOM) + .with(BackroomsStairs.SHAPE, StairShape.STRAIGHT); + private static final BlockState SOUTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.SOUTH) + .with(Tile.SINGLE, false); + private static final BlockState NORTH_TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.NORTH) + .with(Tile.SINGLE, false); + private static final BlockState TILE = Backrooms.TILE.getDefaultState().with(Tile.FACING, Direction.EAST) + .with(Tile.SINGLE, true); + private static final BlockState LIGHT = Backrooms.LIGHT.getDefaultState().with(Light.ON, false); + private static final BlockState AIR = Blocks.AIR.getDefaultState(); + private static final BlockState CHEST = Blocks.CHEST.getDefaultState().with(ChestBlock.CHEST_TYPE, ChestType.SINGLE) + .with(ChestBlock.FACING, Direction.NORTH).with(ChestBlock.WATERLOGGED, false); + private static final BlockState VOID_BLOCK = Backrooms.VOID_BLOCK.getDefaultState(); + private static final BlockState VENT = Backrooms.VENT.getDefaultState(); + + public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, + Random rand, BlockPos position, DefaultFeatureConfig config) { + + Random generator = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = position.getX() * l ^ position.getY() * m ^ position.getZ() * n ^ seed * 5; + generator = new Random(o); + + BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); + + if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else if (generator.nextDouble() < 0.5) { + if (generator.nextDouble() < 0.5) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall1, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Wall2, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway2NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Hallway1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } + } else if (generator.nextDouble() < 0.3) { + generateSlice(world, mutableBlockPos.move(Direction.EAST), One, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1Light, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Stair1NoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), StairWall, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Three, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Two, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), Four, rand); + } else { + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), TwoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + generateSlice(world, mutableBlockPos.move(Direction.EAST), OneNoLight, rand); + } + + return true; + + } + + private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int[][] slice, Random rand) { + + BlockPos currentPositionOffsetted = new BlockPos(centerPos.add(-1, 3, -slice[0].length)); + BlockPos.Mutable currentPosition = new BlockPos.Mutable(currentPositionOffsetted.getX(), + currentPositionOffsetted.getY(), currentPositionOffsetted.getZ()); + + Random generator = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = currentPosition.getX() * l ^ currentPosition.getY() * m ^ currentPosition.getZ() * n ^ seed * 5; + generator = new Random(o); + + for (int y = 0; y < slice.length; y++) { + for (int z = 0; z < slice[0].length; z++) { + int sliceBlock = slice[y][z]; + + if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) + && (world.getBlockState(currentPosition).getBlock() != Backrooms.CEMENT_STAIRS)) { + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + Level1OffRoom.door1 = true; + } else { + Level1OffRoom.door1 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + Level1OffRoom.door2 = true; + } else { + Level1OffRoom.door2 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + Level1OffRoom.door3 = true; + } else { + Level1OffRoom.door3 = false; + } + if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + Level1OffRoom.door4 = true; + } else { + Level1OffRoom.door4 = false; + } + + switch (sliceBlock) { + case 0: + break; + case 2: + + world.setBlockState(currentPosition, SOUTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 11: + world.setBlockState(currentPosition, NORTH_TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 12: + world.setBlockState(currentPosition, TILE, 2); + if (world.getBlockState(currentPosition.add(0, -1, 0)) == AIR && rand.nextDouble() < 0.25) { + world.setBlockState(currentPosition.add(0, -1, 0), VENT, 2); + } + break; + case 3: + world.setBlockState(currentPosition, LIGHT, 2); + break; + case 4: + world.setBlockState(currentPosition, AIR, 2); + break; + case 5: + world.setBlockState(currentPosition, CEMENT_BRICKS, 2); + break; + case 6: + if (door1) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, CEMENT_BRICKS, 2); + } + break; + case 7: + if (door2) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 3); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 0, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 1, -1), AIR, 3); + world.setBlockState(currentPosition.add(-1, 2, -1), AIR, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); + } + if (generator.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + world.setBlockState(currentPosition, VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(0, 2, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 0, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 1, 0), VOID_BLOCK, 3); + world.setBlockState(currentPosition.add(-1, 2, 0), VOID_BLOCK, 3); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), VOID_BLOCK, 2); + } + } else { + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 3); + } + + } else { + world.setBlockState(currentPosition, CEMENT_BRICKS, 2); + } + break; + case 8: + if (door3) { + world.setBlockState(currentPosition, AIR, 3); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 0, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 1, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 2, 1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, 1), AIR, 2); + world.setBlockState(currentPosition.add(-1, 3, 1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, CEMENT_BRICKS, 2); + } + break; + case 9: + if (door4) { + world.setBlockState(currentPosition, AIR, 2); + world.setBlockState(currentPosition.add(0, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(0, 2, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 0, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 1, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 2, -1), AIR, 2); + if (BackroomsConfig.getInstance().TallDoors) { + world.setBlockState(currentPosition.add(0, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, 0), AIR, 2); + world.setBlockState(currentPosition.add(1, 3, -1), AIR, 2); + } + } else { + world.setBlockState(currentPosition, CEMENT_BRICKS, 2); + } + break; + case 10: + world.setBlockState(currentPosition, CEMENT_STAIRS, 2); + break; + case 1: + if (generator.nextDouble() < 0.005) { + if (rand.nextDouble() < BackroomsConfig.getInstance().ChestSpawnChance) { + world.setBlockState(currentPosition.add(0, 1, 0), CHEST, 2); + LootableContainerBlockEntity.setLootTable(world, rand, currentPosition.add(0, 1, 0), + Backrooms.LEVEL1CHEST); + } + } + world.setBlockState(currentPosition, CEMENT, 2); + break; + } + } + currentPosition.move(Direction.SOUTH); + } + currentPosition.move(0, -1, -slice[0].length); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java new file mode 100644 index 0000000..5550029 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java @@ -0,0 +1,85 @@ +package net.ludocrypt.backrooms.features; + +import java.util.Random; + +import com.mojang.serialization.Codec; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.blocks.Pipe; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; + +public class Level2LongRoom extends Feature { + public Level2LongRoom(Codec configFactory) { + super(configFactory); + } + + private int[][] Orange = { { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 } }; + private int[][] Red = { { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, { 4, 4, 4, 4 }, { 1, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Brown = { { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 2, 2, 2, 2 } }; + + private static final BlockState AIR = Blocks.AIR.getDefaultState(); + private static final BlockState CEMENT = Backrooms.CEMENT.getDefaultState(); + private static final BlockState PIPENORTHSOUTH = Backrooms.PIPE.getDefaultState().with(Pipe.NORTH, true) + .with(Pipe.SOUTH, true); + private static final BlockState PIPENORTHSOUTHEAST = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.SOUTH, true).with(Pipe.NORTH, true); + + public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, + Random rand, BlockPos position, DefaultFeatureConfig config) { + + BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); + + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Red, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Brown, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + + return true; + + } + + private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int[][] slice, Random rand) { + + BlockPos currentPositionOffsetted = new BlockPos(centerPos.add(0, 3, slice[0].length)); + BlockPos.Mutable currentPosition = new BlockPos.Mutable(currentPositionOffsetted.getX(), + currentPositionOffsetted.getY(), currentPositionOffsetted.getZ()); + + for (int y = 0; y < slice.length; y++) { + for (int z = 0; z < slice[0].length; z++) { + int sliceBlock = slice[y][z]; + + if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK))) { + + switch (sliceBlock) { + case 0: + break; + case 1: + world.setBlockState(currentPosition, AIR, 2); + break; + case 2: + world.setBlockState(currentPosition, CEMENT, 2); + break; + case 4: + if (rand.nextDouble() > 0.1) { + world.setBlockState(currentPosition, PIPENORTHSOUTH, 2); + } else { + world.setBlockState(currentPosition, PIPENORTHSOUTHEAST, 2); + } + break; + } + } + currentPosition.move(Direction.SOUTH); + } + currentPosition.move(0, -1, -slice[0].length); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java new file mode 100644 index 0000000..165dc04 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java @@ -0,0 +1,320 @@ +package net.ludocrypt.backrooms.features; + +import java.util.Random; + +import com.mojang.serialization.Codec; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.blocks.Pipe; +import net.ludocrypt.backrooms.config.BackroomsConfig; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.minecraft.world.gen.feature.DefaultFeatureConfig; +import net.minecraft.world.gen.feature.Feature; + +public class Level2MessyRoom extends Feature { + public Level2MessyRoom(Codec configFactory) { + super(configFactory); + } + + private int[][] White = { { 2, 2, 2, 2 }, { 2, 1, 1, 2 }, { 2, 3, 1, 2 }, { 2, 1, 1, 2 }, { 2, 9, 2, 2 } }; + private int[][] Orange = { { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 }, { 2, 2, 2, 2 } }; + private int[][] Red = { { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, { 4, 4, 4, 4 }, { 1, 1, 1, 1 }, { 2, 10, 2, 2 } }; + private int[][] Brown = { { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Lime = { { 2, 2, 2, 2 }, { 1, 1, 1, 2 }, { 1, 1, 1, 2 }, { 1, 1, 1, 2 }, { 2, 2, 2, 2 } }; + private int[][] Blue = { { 2, 2, 2, 2 }, { 2, 1, 1, 2 }, { 2, 5, 1, 2 }, { 2, 1, 1, 2 }, { 2, 2, 2, 2 } }; + private int[][] Pink = { { 2, 2, 2, 2 }, { 1, 1, 1, 2 }, { 6, 1, 1, 2 }, { 1, 1, 1, 2 }, { 2, 2, 2, 2 } }; + private int[][] Yellow = { { 2, 2, 2, 2 }, { 1, 1, 1, 2 }, { 4, 4, 4, 2 }, { 1, 1, 1, 2 }, { 2, 2, 2, 2 } }; + private int[][] Magenta = { { 2, 2, 2, 2 }, { 2, 1, 1, 1 }, { 2, 4, 4, 4 }, { 2, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Green = { { 2, 2, 2, 2 }, { 1, 1, 1, 1 }, { 6, 1, 1, 7 }, { 1, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Gray = { { 2, 2, 2, 2 }, { 2, 1, 1, 2 }, { 2, 6, 1, 2 }, { 2, 1, 1, 2 }, { 2, 2, 2, 2 } }; + private int[][] LightGray = { { 2, 2, 2, 2 }, { 2, 1, 1, 1 }, { 2, 3, 1, 1 }, { 2, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Cyan = { { 2, 2, 2, 2 }, { 2, 1, 1, 1 }, { 2, 3, 1, 7 }, { 2, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] Purple = { { 2, 2, 2, 2 }, { 2, 1, 1, 1 }, { 2, 8, 4, 4 }, { 2, 1, 1, 1 }, { 2, 2, 2, 2 } }; + private int[][] LightBlue = { { 2, 2, 2, 2 }, { 2, 1, 1, 1 }, { 2, 1, 1, 1 }, { 2, 1, 1, 1 }, { 2, 2, 2, 2 } }; + + private static final BlockState AIR = Blocks.AIR.getDefaultState(); + private static final BlockState CEMENT = Backrooms.CEMENT.getDefaultState(); + private static final BlockState PIPEEASTWEST = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.WEST, true); + private static final BlockState PIPEEASTWESTNORTH = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.WEST, true).with(Pipe.NORTH, true); + private static final BlockState PIPENORTHSOUTH = Backrooms.PIPE.getDefaultState().with(Pipe.NORTH, true) + .with(Pipe.SOUTH, true); + private static final BlockState PIPENORTHWEST = Backrooms.PIPE.getDefaultState().with(Pipe.WEST, true) + .with(Pipe.NORTH, true); + private static final BlockState PIPENORTHEAST = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.NORTH, true); + private static final BlockState PIPESOUTHEAST = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.SOUTH, true); + private static final BlockState PIPESOUTHWEST = Backrooms.PIPE.getDefaultState().with(Pipe.WEST, true) + .with(Pipe.SOUTH, true); + private static final BlockState PIPENORTHSOUTHEAST = Backrooms.PIPE.getDefaultState().with(Pipe.EAST, true) + .with(Pipe.SOUTH, true).with(Pipe.NORTH, true); + private static final BlockState VOID_BLOCK = Backrooms.VOID_BLOCK.getDefaultState(); + + public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, + Random rand, BlockPos position, DefaultFeatureConfig config) { + + BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); + + Random generator = new Random(world.getSeed()); + Random generator2 = new Random(world.getSeed()); + Random generatorFront = new Random(world.getSeed()); + Random generatorLeft = new Random(world.getSeed()); + long seed = world.getSeed(); + long l = generator.nextLong(); + long m = generator.nextLong(); + long n = generator.nextLong(); + long o = position.getX() * l ^ position.getY() * m ^ position.getZ() * n ^ seed; + long p = position.getX() * l ^ position.getY() * m ^ (position.getZ() - 4) * n ^ seed; + long q = (position.getX() - 4) * l ^ position.getY() * m ^ position.getZ() * n ^ seed; + generator = new Random(o); + generatorFront = new Random(p); + generatorLeft = new Random(q); + generator2 = new Random(o * 8); + + int k = generator.nextInt(16); + int r = generatorFront.nextInt(16); + int s = generatorLeft.nextInt(16); + int t = generator2.nextInt(7); + int u = generator2.nextInt(3); + + if (s == 3 || s == 6 || s == 7 || s == 9 || s == 10 || s == 11 || s == 12 || s == 15) { + switch (t) { + case 0: + k = 4; + break; + case 1: + k = 5; + break; + case 2: + k = 8; + break; + case 3: + k = 9; + break; + case 4: + k = 11; + break; + case 5: + k = 12; + break; + case 6: + k = 15; + break; + } + } + + if (r == 2 || r == 5 || r == 6 || r == 8 || r == 9 || r == 10 || r == 13 || r == 15) { + switch (u) { + case 0: + k = 9; + break; + case 1: + k = 11; + break; + case 2: + k = 12; + break; + case 3: + k = 15; + break; + } + } + + switch (k) { + case 0: + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 1: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Magenta, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), LightBlue, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 2: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + break; + case 3: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Yellow, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Lime, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 4: + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Cyan, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), LightGray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 5: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Purple, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), LightGray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + break; + case 6: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Yellow, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Lime, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Blue, rand); + break; + case 7: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Gray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Pink, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Lime, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 8: + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Cyan, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), LightGray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + break; + case 9: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Red, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Brown, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Blue, rand); + break; + case 10: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Gray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Pink, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Lime, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Blue, rand); + break; + case 11: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Gray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Green, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Brown, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 12: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Red, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Brown, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 13: + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), White, rand); + break; + case 14: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Orange, rand); + break; + case 15: + generateSlice(world, mutableBlockPos.move(Direction.WEST), Gray, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Green, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Brown, rand); + generateSlice(world, mutableBlockPos.move(Direction.WEST), Blue, rand); + break; + } + + return true; + + } + + private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, int[][] slice, Random rand) { + + BlockPos currentPositionOffsetted = new BlockPos(centerPos.add(0, 3, slice[0].length)); + BlockPos.Mutable currentPosition = new BlockPos.Mutable(currentPositionOffsetted.getX(), + currentPositionOffsetted.getY(), currentPositionOffsetted.getZ()); + + for (int y = 0; y < slice.length; y++) { + for (int z = 0; z < slice[0].length; z++) { + int sliceBlock = slice[y][z]; + + if (((world.getBlockState(currentPosition).getBlock() == Backrooms.WALL) + || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK))) { + + switch (sliceBlock) { + case 0: + break; + case 1: + world.setBlockState(currentPosition, AIR, 2); + break; + case 2: + world.setBlockState(currentPosition, CEMENT, 2); + break; + case 3: + if (rand.nextDouble() > 0.1) { + world.setBlockState(currentPosition, PIPEEASTWEST, 2); + } else { + world.setBlockState(currentPosition, PIPEEASTWESTNORTH, 2); + } + break; + case 4: + if (rand.nextDouble() > 0.1) { + world.setBlockState(currentPosition, PIPENORTHSOUTH, 2); + } else { + world.setBlockState(currentPosition, PIPENORTHSOUTHEAST, 2); + } + break; + case 5: + world.setBlockState(currentPosition, PIPENORTHWEST, 2); + break; + case 6: + if (world.getBlockState(currentPosition.add(1, 0, 1)) == PIPENORTHEAST) { + world.setBlockState(currentPosition, PIPENORTHSOUTH, 2); + world.setBlockState(currentPosition.add(0, 0, 1), PIPENORTHEAST, 2); + world.setBlockState(currentPosition.add(1, 0, 1), PIPEEASTWEST, 2); + } else { + world.setBlockState(currentPosition, PIPENORTHEAST, 2); + } + + break; + case 7: + world.setBlockState(currentPosition, PIPESOUTHEAST, 2); + break; + case 8: + world.setBlockState(currentPosition, PIPESOUTHWEST, 2); + break; + case 9: + world.setBlockState(currentPosition, CEMENT, 2); + if (rand.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + world.setBlockState(currentPosition.add(0, 1, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 2, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 3, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 1, 1), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 2, 1), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 3, 1), VOID_BLOCK, 2); + } + break; + case 10: + world.setBlockState(currentPosition, CEMENT, 2); + if (rand.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.nextDouble() < 0.1) { + world.setBlockState(currentPosition.add(0, 1, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 2, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(0, 3, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 1, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 2, 0), VOID_BLOCK, 2); + world.setBlockState(currentPosition.add(-1, 3, 0), VOID_BLOCK, 2); + } + } + break; + } + } + currentPosition.move(Direction.SOUTH); + } + currentPosition.move(0, -1, -slice[0].length); + } + } +} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java index c652791..2259a0f 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java @@ -239,7 +239,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, break; case 2: world.setBlockState(currentPosition, FLOOR, 2); - if (rand.nextDouble() < 0.001) { + if (rand.nextDouble() < 0.01) { if (rand.nextDouble() < BackroomsConfig.getInstance().ChestSpawnChance) { world.setBlockState(currentPosition.add(0, 1, 0), CHEST, 2); LootableContainerBlockEntity.setLootTable(world, rand, currentPosition.add(0, 1, 0), diff --git a/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java b/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java index 4829c7f..33abe72 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java +++ b/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java @@ -9,16 +9,26 @@ public class LevelsFeatureInit { public static Feature LEVEL0ROOM = new Level0Room(DefaultFeatureConfig.CODEC); public static Feature LEVEL0REDROOM = new Level0RedRoom(DefaultFeatureConfig.CODEC); public static Feature LEVEL0DOTTEDROOM = new Level0DottedRoom(DefaultFeatureConfig.CODEC); + public static Feature LEVEL0DECREPITROOM = new Level0DecrepitRoom(DefaultFeatureConfig.CODEC); + public static Feature LEVEL0DOTTEDREDROOM = new Level0DottedRedRoom(DefaultFeatureConfig.CODEC); public static Feature LEVEL1ROOM = new Level1Room(DefaultFeatureConfig.CODEC); + public static Feature LEVEL1OFFROOM = new Level1OffRoom(DefaultFeatureConfig.CODEC); public static Feature LEVEL2ROOM = new Level2Room(DefaultFeatureConfig.CODEC); + public static Feature LEVEL2LONGROOM = new Level2LongRoom(DefaultFeatureConfig.CODEC); + public static Feature LEVEL2MESSYROOM = new Level2MessyRoom(DefaultFeatureConfig.CODEC); public static Feature LEVEL3ROOM = new Level3Room(DefaultFeatureConfig.CODEC); public static void registerFeatures() { Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0room"), LEVEL0ROOM); Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0redroom"), LEVEL0REDROOM); Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0dottedroom"), LEVEL0DOTTEDROOM); + Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0decrepitroom"), LEVEL0DECREPITROOM); + Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0dottedredroom"), LEVEL0DOTTEDREDROOM); Registry.register(Registry.FEATURE, new Identifier("backrooms", "level1room"), LEVEL1ROOM); + Registry.register(Registry.FEATURE, new Identifier("backrooms", "level1offroom"), LEVEL1OFFROOM); Registry.register(Registry.FEATURE, new Identifier("backrooms", "level2room"), LEVEL2ROOM); + Registry.register(Registry.FEATURE, new Identifier("backrooms", "level2longroom"), LEVEL2LONGROOM); + Registry.register(Registry.FEATURE, new Identifier("backrooms", "level2messyroom"), LEVEL2MESSYROOM); Registry.register(Registry.FEATURE, new Identifier("backrooms", "level3room"), LEVEL3ROOM); } } \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.java deleted file mode 100644 index 381f07d..0000000 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0DottedRoomDecorator.java +++ /dev/null @@ -1,36 +0,0 @@ -package net.ludocrypt.backrooms.features.decorators; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.stream.Stream; - -import com.mojang.serialization.Codec; - -import net.ludocrypt.backrooms.config.BackroomsConfig; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldAccess; -import net.minecraft.world.gen.chunk.ChunkGenerator; -import net.minecraft.world.gen.decorator.Decorator; -import net.minecraft.world.gen.decorator.NopeDecoratorConfig; - -public class Level0DottedRoomDecorator extends Decorator { - - public Level0DottedRoomDecorator(Codec codec) { - super(codec); - } - - @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { - - BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 0, pos.getZ()); - List blockPosList = new ArrayList(); - - for (int repeat = 0; repeat < BackroomsConfig.getInstance().Level0LayerCount; repeat++) { - mutableBlockPos.move(0, 6, 0); - blockPosList.add(mutableBlockPos.toImmutable()); - } - return blockPosList.stream(); - } -} diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.java deleted file mode 100644 index 2e071fc..0000000 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RedRoomDecorator.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.ludocrypt.backrooms.features.decorators; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.stream.Stream; - -import com.mojang.serialization.Codec; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.WorldAccess; -import net.minecraft.world.gen.chunk.ChunkGenerator; -import net.minecraft.world.gen.decorator.Decorator; -import net.minecraft.world.gen.decorator.NopeDecoratorConfig; - -public class Level0RedRoomDecorator extends Decorator { - - public Level0RedRoomDecorator(Codec codec) { - super(codec); - } - - @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { - - BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 6, pos.getZ()); - List blockPosList = new ArrayList(); - - blockPosList.add(mutableBlockPos.toImmutable()); - return blockPosList.stream(); - } -} diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java index 894c279..9c87681 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java +++ b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java @@ -27,7 +27,7 @@ public Stream getPositions(WorldAccess world, ChunkGenerator generator BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 0, pos.getZ()); List blockPosList = new ArrayList(); - for (int repeat = 0; repeat < BackroomsConfig.getInstance().Level0LayerCount; repeat++) { + for (int repeat = 0; repeat < BackroomsConfig.getInstance().Level1LayerCount; repeat++) { mutableBlockPos.move(0, 6, 0); blockPosList.add(mutableBlockPos.toImmutable()); } diff --git a/src/main/java/net/ludocrypt/backrooms/items/CompressedWallPickaxe.java b/src/main/java/net/ludocrypt/backrooms/items/CompressedWallPickaxe.java new file mode 100644 index 0000000..5220fcd --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/items/CompressedWallPickaxe.java @@ -0,0 +1,41 @@ +package net.ludocrypt.backrooms.items; + +import net.ludocrypt.backrooms.Backrooms; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.PickaxeItem; +import net.minecraft.item.ToolMaterial; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class CompressedWallPickaxe extends PickaxeItem { + + public CompressedWallPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) { + super(material, attackDamage, attackSpeed, settings); + } + + @Override + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { + if (state == Backrooms.WALL.getDefaultState()) { + return 15000; + } else if (state == Backrooms.COMPRESSED_WALL.getDefaultState()) { + return 10000; + } else if (state == Backrooms.VOID_BLOCK.getDefaultState()) { + return 25000; + } else { + return 32767; + } + } + + @Override + public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner) { + if (state == Backrooms.WALL.getDefaultState() || state == Backrooms.COMPRESSED_WALL.getDefaultState() + || state == Backrooms.VOID_BLOCK.getDefaultState()) { + return true; + } else { + return false; + } + } + +} diff --git a/src/main/java/net/ludocrypt/backrooms/items/WallPickaxe.java b/src/main/java/net/ludocrypt/backrooms/items/WallPickaxe.java new file mode 100644 index 0000000..71d024b --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/items/WallPickaxe.java @@ -0,0 +1,38 @@ +package net.ludocrypt.backrooms.items; + +import net.ludocrypt.backrooms.Backrooms; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.PickaxeItem; +import net.minecraft.item.ToolMaterial; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class WallPickaxe extends PickaxeItem { + + public WallPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) { + super(material, attackDamage, attackSpeed, settings); + } + + @Override + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { + if (state == Backrooms.WALL.getDefaultState()) { + return 2000; + } else if (state == Backrooms.COMPRESSED_WALL.getDefaultState()) { + return 500; + } else { + return 32767; + } + } + + @Override + public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner) { + if (state == Backrooms.WALL.getDefaultState() || state == Backrooms.COMPRESSED_WALL.getDefaultState()) { + return true; + } else { + return false; + } + } + +} diff --git a/src/main/java/net/ludocrypt/backrooms/items/WallpaperPattern.java b/src/main/java/net/ludocrypt/backrooms/items/WallpaperPattern.java index 581bed5..5279af6 100644 --- a/src/main/java/net/ludocrypt/backrooms/items/WallpaperPattern.java +++ b/src/main/java/net/ludocrypt/backrooms/items/WallpaperPattern.java @@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; -import net.minecraft.util.Formatting; import net.minecraft.world.World; public class WallpaperPattern extends Item { @@ -22,6 +21,6 @@ public WallpaperPattern(Settings settings) { @Environment(EnvType.CLIENT) @Override public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { - tooltip.add(new TranslatableText(this.getTranslationKey() + ".desc").formatted(Formatting.GOLD)); + tooltip.add(new TranslatableText(this.getTranslationKey() + ".desc")); } } diff --git a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java index b82cf26..b9b964c 100644 --- a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java +++ b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java @@ -18,13 +18,13 @@ public static MusicSound method_27283(SoundEvent soundEvent) { } static { - LEVEL0MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL0MUSIC, 500, 1000, true); - LEVEL1MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL1MUSIC, 500, 1000, true); - LEVEL2MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL2MUSIC, 500, 1000, true); - LEVEL3MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL3MUSIC, 500, 1000, true); + LEVEL0MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL0MUSIC, 1000, 5000, true); + LEVEL1MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL1ONMUSIC, 1000, 5000, true); + LEVEL2MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL2MUSIC, 1000, 5000, true); + LEVEL3MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL3MUSIC, 1000, 5000, true); LEVEL0MENU = new MusicSound(BackroomsSoundEvents.LEVEL0MUSIC, 20, 600, true); - LEVEL1MENU = new MusicSound(BackroomsSoundEvents.LEVEL1MUSIC, 20, 600, true); - LEVEL2MENU = new MusicSound(BackroomsSoundEvents.LEVEL2MUSIC, 20, 600, true); + LEVEL1MENU = new MusicSound(BackroomsSoundEvents.LEVEL1ONMUSIC, 20, 600, true); + LEVEL2MENU = new MusicSound(BackroomsSoundEvents.LEVEL2LONGMUSIC, 20, 600, true); LEVEL3MENU = new MusicSound(BackroomsSoundEvents.LEVEL3MUSIC, 20, 600, true); } diff --git a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.java b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.java deleted file mode 100644 index a3c8adf..0000000 --- a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsPaintingMotive.java +++ /dev/null @@ -1,38 +0,0 @@ -package net.ludocrypt.backrooms.misc; - -import net.minecraft.entity.decoration.painting.PaintingMotive; -import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; - -public class BackroomsPaintingMotive extends PaintingMotive { - - public static final PaintingMotive KEBAB = register("backrooms:kebab", 16, 16); - public static final PaintingMotive AZTEC = register("backrooms:aztec", 16, 16); - public static final PaintingMotive ALBAN = register("backrooms:alban", 16, 16); - public static final PaintingMotive AZTEC2 = register("backrooms:aztec2", 16, 16); - public static final PaintingMotive BOMB = register("backrooms:bomb", 16, 16); - public static final PaintingMotive PLANT = register("backrooms:plant", 16, 16); - public static final PaintingMotive WASTELAND = register("backrooms:wasteland", 16, 16); - public static final PaintingMotive POOL = register("backrooms:pool", 32, 16); - public static final PaintingMotive COURBET = register("backrooms:courbet", 32, 16); - private final int width; - private final int height; - - private static PaintingMotive register(String id, int width, int height) { - return Registry.register(Registry.PAINTING_MOTIVE, new Identifier("backrooms", "magenta_checkered"), KEBAB); - } - - public BackroomsPaintingMotive(int width, int height) { - super(width, height); - this.width = width; - this.height = height; - } - - public int getWidth() { - return this.width; - } - - public int getHeight() { - return this.height; - } -} diff --git a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.java b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.java index efd0a9f..1ea4980 100644 --- a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.java +++ b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsSoundEvents.java @@ -7,8 +7,12 @@ public class BackroomsSoundEvents { public static final SoundEvent LEVEL0MUSIC = register("backrooms:level.0.music"); - public static final SoundEvent LEVEL1MUSIC = register("backrooms:level.1.music"); + public static final SoundEvent LEVEL0WEIGHTEDMUSIC = register("backrooms:level.0weighted.music"); + public static final SoundEvent LEVEL1OFFMUSIC = register("backrooms:level.1off.music"); + public static final SoundEvent LEVEL1ONMUSIC = register("backrooms:level.1on.music"); public static final SoundEvent LEVEL2MUSIC = register("backrooms:level.2.music"); + public static final SoundEvent LEVEL2LONGMUSIC = register("backrooms:level.2long.music"); + public static final SoundEvent LEVEL2MESSYMUSIC = register("backrooms:level.2messy.music"); public static final SoundEvent LEVEL3MUSIC = register("backrooms:level.3.music"); public static final SoundEvent MUSIC_DISC_ITS_BEEN_SO_LONG = register("backrooms:music_disc.its_been_so_long"); public static final SoundEvent MUSIC_DISC_OMAE_WA_MOU = register("backrooms:music_disc.omae_wa_mou"); diff --git a/src/main/java/net/ludocrypt/backrooms/misc/PreInitialize.java b/src/main/java/net/ludocrypt/backrooms/misc/PreInitialize.java deleted file mode 100644 index 7da0d73..0000000 --- a/src/main/java/net/ludocrypt/backrooms/misc/PreInitialize.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.ludocrypt.backrooms.misc; - -import com.chocohead.mm.api.ClassTinkerers; - -import net.fabricmc.api.EnvType; -import net.fabricmc.loader.api.FabricLoader; -import net.fabricmc.loader.api.MappingResolver; - -public interface PreInitialize { - - static void initialize() { - if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) { - initializeClient(); - } - } - - static void initializeClient() { - MappingResolver remapper = FabricLoader.getInstance().getMappingResolver(); - - String musicType = remapper.mapClassName("intermediary", "net.minecraft.class_1142$class_1143"); - String soundEvent = remapper.mapClassName("intermediary", "net.minecraft.class_3414"); - - ClassTinkerers.enumBuilder(musicType, 'L' + soundEvent + ';', "I", "I") - .addEnum("LEVEL0MUSIC", () -> new Object[] { BackroomsSoundEvents.LEVEL0MUSIC, 500, 1000 }) - .addEnum("LEVEL1MUSIC", () -> new Object[] { BackroomsSoundEvents.LEVEL1MUSIC, 500, 1000 }) - .addEnum("LEVEL2MUSIC", () -> new Object[] { BackroomsSoundEvents.LEVEL2MUSIC, 500, 1000 }) - .addEnum("LEVEL3MUSIC", () -> new Object[] { BackroomsSoundEvents.LEVEL3MUSIC, 500, 1000 }) - .addEnum("LEVEL0MENU", () -> new Object[] { BackroomsSoundEvents.LEVEL0MUSIC, 20, 600 }) - .addEnum("LEVEL1MENU", () -> new Object[] { BackroomsSoundEvents.LEVEL1MUSIC, 20, 600 }) - .addEnum("LEVEL2MENU", () -> new Object[] { BackroomsSoundEvents.LEVEL2MUSIC, 20, 600 }) - .addEnum("LEVEL3MENU", () -> new Object[] { BackroomsSoundEvents.LEVEL3MUSIC, 20, 600 }) - .build(); - } -} \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/misc/WallMaterial.java b/src/main/java/net/ludocrypt/backrooms/misc/WallMaterial.java new file mode 100644 index 0000000..63ec133 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/misc/WallMaterial.java @@ -0,0 +1,59 @@ +package net.ludocrypt.backrooms.misc; + +import java.util.function.Supplier; + +import net.ludocrypt.backrooms.Backrooms; +import net.minecraft.item.ToolMaterial; +import net.minecraft.recipe.Ingredient; +import net.minecraft.util.Lazy; + +public enum WallMaterial implements ToolMaterial { + WALL(4, 5000, 20.0F, 4.0F, 15, () -> { + return Ingredient.ofItems(Backrooms.WALL); + }), + + COMPRESSED_WALL(4, 10000, 20.0F, 4.0F, 15, () -> { + return Ingredient.ofItems(Backrooms.COMPRESSED_WALL); + }); + + private final int miningLevel; + private final int itemDurability; + private final float miningSpeed; + private final float attackDamage; + private final int enchantability; + private final Lazy repairIngredient; + + private WallMaterial(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, + Supplier repairIngredient) { + this.miningLevel = miningLevel; + this.itemDurability = itemDurability; + this.miningSpeed = miningSpeed; + this.attackDamage = attackDamage; + this.enchantability = enchantability; + this.repairIngredient = new Lazy(repairIngredient); + } + + public int getDurability() { + return this.itemDurability; + } + + public float getMiningSpeedMultiplier() { + return this.miningSpeed; + } + + public float getAttackDamage() { + return this.attackDamage; + } + + public int getMiningLevel() { + return this.miningLevel; + } + + public int getEnchantability() { + return this.enchantability; + } + + public Ingredient getRepairIngredient() { + return (Ingredient) this.repairIngredient.get(); + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java index f730e81..f48d68c 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java @@ -5,11 +5,14 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.config.BackroomsConfig; import net.ludocrypt.backrooms.dimension.BDimension; import net.minecraft.entity.SpawnGroup; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.world.SpawnHelper; +import net.minecraft.world.biome.Biome; import net.minecraft.world.chunk.Chunk; @Mixin(SpawnHelper.class) @@ -17,16 +20,26 @@ public class MobSpawnLocationMixin { // Pretty much stolen directly from the bumblezone - // Prevents mobs from spawning above y = 256. + // Prevents mobs from spawning above @Inject(method = "Lnet/minecraft/world/SpawnHelper;spawnEntitiesInChunk(Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/SpawnHelper$Checker;Lnet/minecraft/world/SpawnHelper$Runner;)V", at = @At(value = "HEAD"), cancellable = true) private static void spawnEntitiesInChunk(SpawnGroup group, ServerWorld world, Chunk chunk, BlockPos pos, SpawnHelper.Checker checker, SpawnHelper.Runner runner, CallbackInfo ci) { - + int yheight = 75; + Biome biomeIn = world.getBiome(pos); + if (biomeIn == Backrooms.LEVEL0 || biomeIn == Backrooms.LEVEL0DECREPIT || biomeIn == Backrooms.LEVEL0DOTTED + || biomeIn == Backrooms.LEVEL0DOTTEDRED || biomeIn == Backrooms.LEVEL0RED) { + if (BackroomsConfig.getInstance().Level0LayerCount > 11) { + yheight = (BackroomsConfig.getInstance().Level0LayerCount * 6) + 8; + } + } else if (biomeIn == Backrooms.LEVEL1 || biomeIn == Backrooms.LEVEL1OFF) { + if (BackroomsConfig.getInstance().Level1LayerCount > 11) { + yheight = (BackroomsConfig.getInstance().Level1LayerCount * 6) + 8; + } + } // No mobs allowed to spawn on roof - if ((world.getRegistryKey() == BDimension.LEVEL0WORLD || world.getRegistryKey() == BDimension.LEVEL0DOTTEDWORLD - || world.getRegistryKey() == BDimension.LEVEL0REDWORLD - || world.getRegistryKey() == BDimension.LEVEL1WORLD || world.getRegistryKey() == BDimension.LEVEL2WORLD - || world.getRegistryKey() == BDimension.LEVEL3WORLD ) && pos.getY() > 255) { + if ((world.getRegistryKey() == BDimension.LEVEL0WORLD || world.getRegistryKey() == BDimension.LEVEL1WORLD + || world.getRegistryKey() == BDimension.LEVEL2WORLD || world.getRegistryKey() == BDimension.LEVEL3WORLD) + && pos.getY() > yheight) { ci.cancel(); } } diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java index d2bd575..f7fecb2 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java @@ -39,16 +39,18 @@ private void getMusicType(CallbackInfoReturnable callbackInfoReturna callbackInfoReturnable.setReturnValue(BackroomsMusicType.LEVEL3MENU); } else if (this.player == null && Backrooms.Display == false) { callbackInfoReturnable.setReturnValue(MusicType.MENU); - } else if (world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL0 - || world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL0DOTTED - || world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL0RED) { - callbackInfoReturnable.setReturnValue(BackroomsMusicType.LEVEL0MUSIC); + } else if (world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL0) { + callbackInfoReturnable.setReturnValue((MusicSound) this.world.getBiomeAccess() + .method_27344(this.player.getBlockPos()).method_27343().orElse(BackroomsMusicType.LEVEL0MUSIC)); } else if (world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL1) { - callbackInfoReturnable.setReturnValue(BackroomsMusicType.LEVEL1MUSIC); + callbackInfoReturnable.setReturnValue((MusicSound) this.world.getBiomeAccess() + .method_27344(this.player.getBlockPos()).method_27343().orElse(BackroomsMusicType.LEVEL1MUSIC)); } else if (world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL2) { - callbackInfoReturnable.setReturnValue(BackroomsMusicType.LEVEL2MUSIC); + callbackInfoReturnable.setReturnValue((MusicSound) this.world.getBiomeAccess() + .method_27344(this.player.getBlockPos()).method_27343().orElse(BackroomsMusicType.LEVEL2MUSIC)); } else if (world != null && this.world.getDimensionRegistryKey() == BDimension.LEVEL3) { - callbackInfoReturnable.setReturnValue(BackroomsMusicType.LEVEL3MUSIC); + callbackInfoReturnable.setReturnValue((MusicSound) this.world.getBiomeAccess() + .method_27344(this.player.getBlockPos()).method_27343().orElse(BackroomsMusicType.LEVEL3MUSIC)); } } } diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/PlayerMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/PlayerMixin.java index adb609e..95b0664 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/PlayerMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/PlayerMixin.java @@ -28,17 +28,34 @@ private void onEntityTick(CallbackInfo ci) { && !playerEntity.isCreative()) { if (Math.random() < 0.75) { if (Math.random() < BackroomsConfig.getInstance().SuffocationChance) { - FabricDimensions.teleport(playerEntity, playerEntity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL01); + if (Math.random() < 0.02) { + FabricDimensions.teleport(playerEntity, + playerEntity.getServer().getWorld(BDimension.LEVEL1WORLD), + BackroomsPlacers.LEVEL01); + } else if (Math.random() < 0.01) { + FabricDimensions.teleport(playerEntity, + playerEntity.getServer().getWorld(BDimension.LEVEL2WORLD), BackroomsPlacers.LEVEL2); + } else { + FabricDimensions.teleport(playerEntity, + playerEntity.getServer().getWorld(BDimension.LEVEL0WORLD), + BackroomsPlacers.LEVEL01); + } } } } if (Backrooms.teleportedEntity == playerEntity) { - FabricDimensions.teleport(playerEntity, playerEntity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL01); + if (Math.random() < 0.02) { + FabricDimensions.teleport(playerEntity, playerEntity.getServer().getWorld(BDimension.LEVEL1WORLD), + BackroomsPlacers.LEVEL01); + } else if (Math.random() < 0.01) { + FabricDimensions.teleport(playerEntity, playerEntity.getServer().getWorld(BDimension.LEVEL2WORLD), + BackroomsPlacers.LEVEL2); + } else { + FabricDimensions.teleport(playerEntity, playerEntity.getServer().getWorld(BDimension.LEVEL0WORLD), + BackroomsPlacers.LEVEL01); + } Backrooms.teleportedEntity = null; } } } - } \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/blockstates/compressed_wall.json b/src/main/resources/assets/backrooms/blockstates/compressed_wall.json new file mode 100644 index 0000000..78f7b6b --- /dev/null +++ b/src/main/resources/assets/backrooms/blockstates/compressed_wall.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "backrooms:block/compressed_wall"} + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/blockstates/dotted_red_torn_wallpaper.json b/src/main/resources/assets/backrooms/blockstates/dotted_red_torn_wallpaper.json new file mode 100644 index 0000000..ccec3a3 --- /dev/null +++ b/src/main/resources/assets/backrooms/blockstates/dotted_red_torn_wallpaper.json @@ -0,0 +1,8 @@ +{ + "variants": { + "torn_level=1": { "model": "backrooms:block/dotted_red_torn_wallpaper_1"}, + "torn_level=2": { "model": "backrooms:block/dotted_red_torn_wallpaper_2"}, + "torn_level=3": { "model": "backrooms:block/dotted_red_torn_wallpaper_3"}, + "torn_level=4": { "model": "backrooms:block/dotted_red_torn_wallpaper_4"} + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/blockstates/dotted_red_wallpaper.json b/src/main/resources/assets/backrooms/blockstates/dotted_red_wallpaper.json new file mode 100644 index 0000000..ea48d02 --- /dev/null +++ b/src/main/resources/assets/backrooms/blockstates/dotted_red_wallpaper.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "backrooms:block/dotted_red_wallpaper"} + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/blockstates/linedpipe.json b/src/main/resources/assets/backrooms/blockstates/linedpipe.json index 45d655a..f476037 100644 --- a/src/main/resources/assets/backrooms/blockstates/linedpipe.json +++ b/src/main/resources/assets/backrooms/blockstates/linedpipe.json @@ -1,20 +1,6 @@ { "variants": { - "type=1": [ - { - "model": "backrooms:block/linedpipe/lp0" - }, - { - "model": "backrooms:block/linedpipe/lp1" - }, - { - "model": "backrooms:block/linedpipe/lp2" - }, - { - "model": "backrooms:block/linedpipe/lp3" - } - ], - "type=2": [ + "": [ { "model": "backrooms:block/linedpipe/lp0" }, diff --git a/src/main/resources/assets/backrooms/lang/en_us.json b/src/main/resources/assets/backrooms/lang/en_us.json index 85ce80e..939a1bc 100644 --- a/src/main/resources/assets/backrooms/lang/en_us.json +++ b/src/main/resources/assets/backrooms/lang/en_us.json @@ -2,10 +2,14 @@ "item.backrooms.almond_water": "Almond Water", "item.backrooms.raw_almond_water": "Raw Almond Water", "item.backrooms.wrench": "Wrench", + "item.backrooms.wall_pickaxe": "Wall Pickaxe", + "item.backrooms.compressed_wall_pickaxe": "Compressed Wall Pickaxe", "block.backrooms.wallpaper": "Wallpaper", "block.backrooms.red_wallpaper": "Red Wallpaper", "block.backrooms.dotted_wallpaper": "Dotted Wallpaper", + "block.backrooms.dotted_red_wallpaper": "Dotted Red Wallpaper", "block.backrooms.wall": "Wall", + "block.backrooms.compressed_wall": "Compressed Wall", "block.backrooms.carpet": "Carpet", "block.backrooms.carpet_stairs": "Carpet Stairs", "block.backrooms.light": "Light", @@ -51,6 +55,7 @@ "block.backrooms.torn_wallpaper": "Torn Wallpaper", "block.backrooms.red_torn_wallpaper": "Torn Red Wallpaper", "block.backrooms.dotted_torn_wallpaper": "Torn Dotted Wallpaper", + "block.backrooms.dotted_red_torn_wallpaper": "Torn Dotted Red Wallpaper", "block.backrooms.vent": "Vent", "biome.backrooms.level0": "Level 0", "biome.backrooms.level1": "Level 1", @@ -75,30 +80,54 @@ "item.backrooms.music_disc_burgers_and_fries.desc": "LudoCrypt - Burgers And Fries", "item.backrooms.music_disc_pretzels_and_cheese": "Music Disc", "item.backrooms.music_disc_pretzels_and_cheese.desc": "LudoCrypt - Pretzels And Cheese", - "item.backrooms.wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.wallpaper_pattern.desc": "Normal Wallpaper Pattern", - "item.backrooms.red_wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.red_wallpaper_pattern.desc": "Red Wallpaper Pattern", - "item.backrooms.dotted_wallpaper_pattern": "Wallpaper Pattern", - "item.backrooms.dotted_wallpaper_pattern.desc": "Dotted Wallpaper Pattern", + "item.backrooms.wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.wallpaper_pattern.desc": "\u00A79Wallpaper Pattern", + "item.backrooms.red_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.red_wallpaper_pattern.desc": "\u00A74Red \u00A79Wallpaper Pattern", + "item.backrooms.dotted_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.dotted_wallpaper_pattern.desc": "\u00A7eDotted \u00A79Wallpaper Pattern", + "item.backrooms.dotted_red_wallpaper_pattern": "\u00A76Wallpaper Pattern", + "item.backrooms.dotted_red_wallpaper_pattern.desc": "\u00A7eDotted \u00A74Red \u00A79Wallpaper Pattern", "advancements.backrooms.title": "The Backrooms", "advancements.backrooms.descr": "The Whole of the backrooms", + "advancements.come_back.title": "You've Never Truly Left", + "advancements.come_back.descr": "Escape The Backrooms", "advancements.level0.title": "The Lobby", - "advancements.level0.descr": "Enter Level 0", - "advancements.level0red.title": "Smells like blood...", - "advancements.level0red.descr": "Enter The Redrooms", - "advancements.level0dotted.title": "That's Different...", - "advancements.level0dotted.descr": "Enter The Dotted Level 0", + "advancements.level0.descr": "Enter level 0", + "advancements.level0red.title": "Smells Like Blood...", + "advancements.level0red.descr": "Enter the redrooms", + "advancements.level0dotted.title": "This Looks Different", + "advancements.level0dotted.descr": "Enter the dottedrooms", + "advancements.level0dottedred.title": "*AU Accent* Bloody Different", + "advancements.level0dottedred.descr": "Enter the red dottedrooms", "advancements.level1.title": "Lurking Danger", - "advancements.level1.descr": "Enter Level 1", + "advancements.level1.descr": "Enter level 1", + "advancements.level1off.title": "Hey Who Turned Off The Lights", + "advancements.level1off.descr": "Enter level 1 off", "advancements.level2.title": "Pipe Dreams", - "advancements.level2.descr": "Enter Level 2", + "advancements.level2.descr": "Enter level 2", + "advancements.level2long.title": "Long Day Ahead", + "advancements.level2long.descr": "Enter the long level 2", + "advancements.level2messy.title": "What A Mess", + "advancements.level2messy.descr": "Enter the messy level 2", "advancements.level3.title": "Electrical Station", - "advancements.level3.descr": "Enter Level 3", - "advancements.timewaster.title": "Time Waster", - "advancements.timewaster.descr": "Get to the surface of EVERY LEVEL", + "advancements.level3.descr": "Enter level 3", "advancements.minewall.title": "How", "advancements.minewall.descr": "Obtain a wall block", + "advancements.wall_pick.title": "Pick and Choose", + "advancements.wall_pick.descr": "Obtain a wall pickaxe", + "advancements.compressed_wall_pick.title": "AND I CHOSE", + "advancements.compressed_wall_pick.descr": "Obtain a compressed wall pickaxe", + "advancements.break_pick.title": "How Long Did THAT Take?!", + "advancements.break_pick.descr": "Break a compressed wall pickaxe", + "advancements.compressedwall.title": "Dead Weight", + "advancements.compressedwall.descr": "Obtain compressed Wall", + "advancements.tear_wallpaper.title": "Tear This Place Down", + "advancements.tear_wallpaper.descr": "Use axe or shears on torn or normal wallpaper", + "advancements.untear_wallpaper.title": "From The Ground Up", + "advancements.untear_wallpaper.descr": "Use wallpaper patterns to reduce the torn level of torn wallpaper", + "advancements.void_block.title": "Holding The Future", + "advancements.void_block.descr": "Obtain a void block", "text.autoconfig.backrooms.title": "Backrooms Configurations", "text.autoconfig.backrooms.option.Level0DoorChance": "Chance for door to appear in level 0", "text.autoconfig.backrooms.option.Level1DoorChance": "Chance for door to appear in level 1", diff --git a/src/main/resources/assets/backrooms/models/block/compressed_wall.json b/src/main/resources/assets/backrooms/models/block/compressed_wall.json new file mode 100644 index 0000000..87886f2 --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/compressed_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/compressed_wall" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_1.json b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_1.json new file mode 100644 index 0000000..02c44eb --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_1.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/dotted_red_torn_wallpaper_level_1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_2.json b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_2.json new file mode 100644 index 0000000..1d8a9d2 --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_2.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/dotted_red_torn_wallpaper_level_2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_3.json b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_3.json new file mode 100644 index 0000000..3905582 --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_3.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/dotted_red_torn_wallpaper_level_3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_4.json b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_4.json new file mode 100644 index 0000000..2acb1ed --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/dotted_red_torn_wallpaper_4.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/dotted_red_torn_wallpaper_level_4" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/dotted_red_wallpaper.json b/src/main/resources/assets/backrooms/models/block/dotted_red_wallpaper.json new file mode 100644 index 0000000..e14b94b --- /dev/null +++ b/src/main/resources/assets/backrooms/models/block/dotted_red_wallpaper.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "backrooms:block/dotted_red_wallpaper" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/block/pipe/side.json b/src/main/resources/assets/backrooms/models/block/pipe/side.json index 90fd46a..a80aea4 100644 --- a/src/main/resources/assets/backrooms/models/block/pipe/side.json +++ b/src/main/resources/assets/backrooms/models/block/pipe/side.json @@ -9,12 +9,12 @@ "from": [4, 4, 0], "to": [12, 12, 4], "faces": { - "north": {"uv": [1, 3, 9, 11], "texture": "#0"}, - "east": {"uv": [0, 7, 8, 15], "texture": "#0"}, - "south": {"uv": [8, 8, 16, 16], "texture": "#0"}, - "west": {"uv": [5, 2, 13, 10], "texture": "#0"}, - "up": {"uv": [7, 4, 15, 12], "texture": "#0"}, - "down": {"uv": [3, 1, 11, 9], "texture": "#0"} + "north": {"uv": [4, 4, 12, 12], "texture": "#0"}, + "east": {"uv": [12, 4, 16, 12], "texture": "#0"}, + "south": {"uv": [4, 4, 12, 12], "texture": "#0"}, + "west": {"uv": [0, 4, 4, 12], "texture": "#0"}, + "up": {"uv": [4, 0, 12, 4], "texture": "#0"}, + "down": {"uv": [4, 12, 12, 16], "texture": "#0"} } } ] diff --git a/src/main/resources/assets/backrooms/models/item/compressed_wall.json b/src/main/resources/assets/backrooms/models/item/compressed_wall.json new file mode 100644 index 0000000..833da8a --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/compressed_wall.json @@ -0,0 +1,3 @@ +{ + "parent": "backrooms:block/compressed_wall" +} diff --git a/src/main/resources/assets/backrooms/models/item/compressed_wall_pickaxe.json b/src/main/resources/assets/backrooms/models/item/compressed_wall_pickaxe.json new file mode 100644 index 0000000..7ba1f34 --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/compressed_wall_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "backrooms:items/compressed_wall_pickaxe" + } +} diff --git a/src/main/resources/assets/backrooms/models/item/dotted_red_torn_wallpaper.json b/src/main/resources/assets/backrooms/models/item/dotted_red_torn_wallpaper.json new file mode 100644 index 0000000..352ac7d --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/dotted_red_torn_wallpaper.json @@ -0,0 +1,3 @@ +{ + "parent": "backrooms:block/dotted_red_torn_wallpaper_3" +} diff --git a/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper.json b/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper.json new file mode 100644 index 0000000..e76e0fe --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper.json @@ -0,0 +1,3 @@ +{ + "parent": "backrooms:block/dotted_red_wallpaper" +} diff --git a/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper_pattern.json b/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper_pattern.json new file mode 100644 index 0000000..d28bbfb --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/dotted_red_wallpaper_pattern.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "backrooms:items/dotted_red_wallpaper_pattern" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/backrooms/models/item/wall_pickaxe.json b/src/main/resources/assets/backrooms/models/item/wall_pickaxe.json new file mode 100644 index 0000000..724494e --- /dev/null +++ b/src/main/resources/assets/backrooms/models/item/wall_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/handheld", + "textures": { + "layer0": "backrooms:items/wall_pickaxe" + } +} diff --git a/src/main/resources/assets/backrooms/sounds.json b/src/main/resources/assets/backrooms/sounds.json index fa48bbf..5cc3b0e 100644 --- a/src/main/resources/assets/backrooms/sounds.json +++ b/src/main/resources/assets/backrooms/sounds.json @@ -6,12 +6,6 @@ "name": "backrooms:music/ambient/episodic_lullaby", "stream": true }, - { - "name": "backrooms:music/ambient/lining_the_walls", - "volume": 0.8, - "stream": true, - "weight": 2 - }, { "name": "backrooms:music/ambient/parallax", "stream": true @@ -24,7 +18,7 @@ "name": "backrooms:music/ambient/backrooms", "stream": true, "volume": 0.35, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", @@ -32,7 +26,7 @@ } ] }, - "level.1.music": { + "level.0weighted.music": { "category": "music", "sounds": [ { @@ -40,8 +34,10 @@ "stream": true }, { - "name": "backrooms:music/ambient/it_darkens", - "stream": true + "name": "backrooms:music/ambient/lining_the_walls", + "volume": 0.8, + "stream": true, + "weight": 7 }, { "name": "backrooms:music/ambient/parallax", @@ -51,10 +47,27 @@ "name": "backrooms:music/ambient/nerve_receptors", "stream": true }, + { + "name": "backrooms:music/ambient/foggy_hands", + "stream": true + } + ] + }, + "level.1on.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/episodic_lullaby", + "stream": true + }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + }, { "name": "backrooms:music/ambient/cracked_tiles", "stream": true, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", @@ -62,19 +75,65 @@ } ] }, + "level.1off.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/episodic_lullaby", + "stream": true + }, + { + "name": "backrooms:music/ambient/it_darkens", + "stream": true, + "volume": 0.7, + "weight": 7 + }, + { + "name": "backrooms:music/ambient/nerve_receptors", + "stream": true + } + ] + }, "level.2.music": { + "category": "music", + "sounds": [ + { + "name": "backrooms:music/ambient/the_halls_lengthen", + "stream": true, + "volume": 0.5 + }, + { + "name": "backrooms:music/ambient/foggy_hands", + "stream": true + }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + } + ] + }, + "level.2long.music": { "category": "music", "sounds": [ { "name": "backrooms:music/ambient/the_halls_lengthen", "stream": true, "volume": 0.5, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/foggy_hands", "stream": true }, + { + "name": "backrooms:music/ambient/parallax", + "stream": true + } + ] + }, + "level.2messy.music": { + "category": "music", + "sounds": [ { "name": "backrooms:music/ambient/parallax", "stream": true @@ -82,11 +141,12 @@ { "name": "backrooms:music/ambient/kirifiki", "stream": true, - "weight": 2 + "weight": 7 }, { "name": "backrooms:music/ambient/reposition", - "stream": true + "stream": true, + "weight": 7 } ] }, @@ -121,49 +181,56 @@ "music_disc.its_been_so_long": { "sounds": [ { - "name": "backrooms:music/records/its_been_so_long" + "name": "backrooms:music/records/its_been_so_long", + "stream": true } ] }, "music_disc.omae_wa_mou": { "sounds": [ { - "name": "backrooms:music/records/omae_wa_mou" + "name": "backrooms:music/records/omae_wa_mou", + "stream": true } ] }, "music_disc.glacial_cavern": { "sounds": [ { - "name": "backrooms:music/records/glacial_cavern" + "name": "backrooms:music/records/glacial_cavern", + "stream": true } ] }, "music_disc.012": { "sounds": [ { - "name": "backrooms:music/records/012" + "name": "backrooms:music/records/012", + "stream": true } ] }, "music_disc.those_torn_walls": { "sounds": [ { - "name": "backrooms:music/records/those_torn_walls" + "name": "backrooms:music/records/those_torn_walls", + "stream": true } ] }, "music_disc.burgers_and_fries": { "sounds": [ { - "name": "backrooms:music/records/burgers_and_fries" + "name": "backrooms:music/records/burgers_and_fries", + "stream": true } ] }, "music_disc.pretzels_and_cheese": { "sounds": [ { - "name": "backrooms:music/records/pretzels_and_cheese" + "name": "backrooms:music/records/pretzels_and_cheese", + "stream": true } ] }, @@ -181,6 +248,13 @@ } ] }, + "buzz": { + "sounds": [ + { + "name": "backrooms:buzz" + } + ] + }, "gulp": { "sounds": [ { diff --git a/src/main/resources/assets/backrooms/textures/block/carpet.png b/src/main/resources/assets/backrooms/textures/block/carpet.png index f8085a7..4bc9345 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/carpet.png and b/src/main/resources/assets/backrooms/textures/block/carpet.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/cement.png b/src/main/resources/assets/backrooms/textures/block/cement.png index 16ae976..31c1ed9 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/cement.png and b/src/main/resources/assets/backrooms/textures/block/cement.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/cement_bricks.png b/src/main/resources/assets/backrooms/textures/block/cement_bricks.png index c73ec9b..de43f0e 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/cement_bricks.png and b/src/main/resources/assets/backrooms/textures/block/cement_bricks.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/compressed_wall.png b/src/main/resources/assets/backrooms/textures/block/compressed_wall.png new file mode 100644 index 0000000..d75a3e3 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/compressed_wall.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/compressed_wall.png.mcmeta b/src/main/resources/assets/backrooms/textures/block/compressed_wall.png.mcmeta new file mode 100644 index 0000000..1b76007 --- /dev/null +++ b/src/main/resources/assets/backrooms/textures/block/compressed_wall.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation": { + "frametime": 8, + "interpolate": true + } +} diff --git a/src/main/resources/assets/backrooms/textures/block/copper.png b/src/main/resources/assets/backrooms/textures/block/copper.png index 15403e9..160c1d9 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/copper.png and b/src/main/resources/assets/backrooms/textures/block/copper.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_1.png b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_1.png new file mode 100644 index 0000000..adbda91 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_2.png b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_2.png new file mode 100644 index 0000000..2fd27a4 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_3.png b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_3.png new file mode 100644 index 0000000..b782363 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_4.png b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_4.png new file mode 100644 index 0000000..39749b6 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/dotted_red_torn_wallpaper_level_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_red_wallpaper.png b/src/main/resources/assets/backrooms/textures/block/dotted_red_wallpaper.png new file mode 100644 index 0000000..abd8707 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/dotted_red_wallpaper.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png index 7853e4b..ed4961f 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png and b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png index 2d01671..1d2b19a 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png and b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png index a6d8f99..9208341 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png and b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png index e131507..253ad14 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png and b/src/main/resources/assets/backrooms/textures/block/dotted_torn_wallpaper_level_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/dotted_wallpaper.png b/src/main/resources/assets/backrooms/textures/block/dotted_wallpaper.png index 5221aab..95bef53 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/dotted_wallpaper.png and b/src/main/resources/assets/backrooms/textures/block/dotted_wallpaper.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/metal.png b/src/main/resources/assets/backrooms/textures/block/metal.png index 739b3f6..21e997a 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/metal.png and b/src/main/resources/assets/backrooms/textures/block/metal.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png index b9ffdbd..91b9a21 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet0.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png index 5c48a84..f558641 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet1.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png index 19b2edf..10aaf4e 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet2.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png index c7a24a0..81db22e 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet3.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png index 05fc059..b90ae3a 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet4.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png index 8d03321..de283ed 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet5.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png index f0e534b..0fce8f9 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png and b/src/main/resources/assets/backrooms/textures/block/moldy_carpet/moldy_carpet6.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/poolstone_bricks.png b/src/main/resources/assets/backrooms/textures/block/poolstone_bricks.png index b599c6e..5d571a8 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/poolstone_bricks.png and b/src/main/resources/assets/backrooms/textures/block/poolstone_bricks.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/poolstone_path.png b/src/main/resources/assets/backrooms/textures/block/poolstone_path.png index 259d96b..a65fd3b 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/poolstone_path.png and b/src/main/resources/assets/backrooms/textures/block/poolstone_path.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/poolstone_tile.png b/src/main/resources/assets/backrooms/textures/block/poolstone_tile.png index a9e9a02..164a3fe 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/poolstone_tile.png and b/src/main/resources/assets/backrooms/textures/block/poolstone_tile.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/smooth_poolstone.png b/src/main/resources/assets/backrooms/textures/block/smooth_poolstone.png index 7426478..fa71895 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/smooth_poolstone.png and b/src/main/resources/assets/backrooms/textures/block/smooth_poolstone.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/steel.png b/src/main/resources/assets/backrooms/textures/block/steel.png index d7c790c..88952f4 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/steel.png and b/src/main/resources/assets/backrooms/textures/block/steel.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_1.png b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_1.png index a7103bb..d821560 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_1.png and b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_2.png b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_2.png index 0115214..ddafe48 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_2.png and b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_3.png b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_3.png index 4efbe90..6abfdcb 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_3.png and b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_4.png b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_4.png index 88cb6ee..e35637f 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_4.png and b/src/main/resources/assets/backrooms/textures/block/torn_wallpaper_level_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/void_block.png b/src/main/resources/assets/backrooms/textures/block/void_block.png new file mode 100644 index 0000000..f2fa443 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/void_block.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/wall.png b/src/main/resources/assets/backrooms/textures/block/wall.png index 9e00684..94a6ba5 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/wall.png and b/src/main/resources/assets/backrooms/textures/block/wall.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/wall.png.mcmeta b/src/main/resources/assets/backrooms/textures/block/wall.png.mcmeta new file mode 100644 index 0000000..89c9445 --- /dev/null +++ b/src/main/resources/assets/backrooms/textures/block/wall.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation": { + "frametime": 32, + "interpolate": true + } +} diff --git a/src/main/resources/assets/backrooms/textures/block/wallpaper.png b/src/main/resources/assets/backrooms/textures/block/wallpaper.png index acacfa5..b2fa403 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/wallpaper.png and b/src/main/resources/assets/backrooms/textures/block/wallpaper.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_0.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_0.png index 858e092..a369eac 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_0.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_0.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_1.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_1.png index 5cc9158..86f3437 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_1.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_2.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_2.png index 7113cf8..a231d38 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_2.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_3.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_3.png index 6177d0f..c580c25 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_3.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_4.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_4.png index bbe50c4..21fe52e 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_4.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_5.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_5.png index b2ff2bc..8c6e734 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level0_5.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level0_5.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_0.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_0.png index 7457091..e5ebdd6 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_0.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_0.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_1.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_1.png index 20b1fa8..c17650a 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_1.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_2.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_2.png index c82ff43..3b3a90e 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_2.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_3.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_3.png index 17c707e..4b45f3a 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_3.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_4.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_4.png index a3a2c94..8a80f2d 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_4.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_5.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_5.png index 55692b7..f210cbe 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level1_5.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level1_5.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_0.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_0.png index 3970511..341dd17 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_0.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_0.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_1.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_1.png index a542feb..19e055e 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_1.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_2.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_2.png index 9bcdbed..e27e6fd 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_2.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_3.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_3.png index b90ca83..0dfe015 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_3.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_4.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_4.png index 9a1b4c2..da77870 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_4.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_5.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_5.png index 150c0eb..d0471f8 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level2_5.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level2_5.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_0.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_0.png index f22b592..3a78760 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_0.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_0.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_1.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_1.png index 8586d65..8ca6f31 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_1.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_2.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_2.png index 0daa84b..f728207 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_2.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_3.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_3.png index f3df7e3..c21b1e1 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_3.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_4.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_4.png index 1cad4f3..1de66db 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_4.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_5.png b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_5.png index c8e3855..1024bff 100644 Binary files a/src/main/resources/assets/backrooms/textures/gui/title/background/level3_5.png and b/src/main/resources/assets/backrooms/textures/gui/title/background/level3_5.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/almond_water.png b/src/main/resources/assets/backrooms/textures/items/almond_water.png index bb9e8fb..fa75471 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/almond_water.png and b/src/main/resources/assets/backrooms/textures/items/almond_water.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/compressed_wall_pickaxe.png b/src/main/resources/assets/backrooms/textures/items/compressed_wall_pickaxe.png new file mode 100644 index 0000000..19f4a52 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/items/compressed_wall_pickaxe.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/dotted_red_wallpaper_pattern.png b/src/main/resources/assets/backrooms/textures/items/dotted_red_wallpaper_pattern.png new file mode 100644 index 0000000..74f14a8 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/items/dotted_red_wallpaper_pattern.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/dotted_wallpaper_pattern.png b/src/main/resources/assets/backrooms/textures/items/dotted_wallpaper_pattern.png index 2482e9d..d31664f 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/dotted_wallpaper_pattern.png and b/src/main/resources/assets/backrooms/textures/items/dotted_wallpaper_pattern.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_012.png b/src/main/resources/assets/backrooms/textures/items/music_disc_012.png index 7e10228..1a0e906 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_012.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_012.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_burgers_and_fries.png b/src/main/resources/assets/backrooms/textures/items/music_disc_burgers_and_fries.png index e802501..8be4176 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_burgers_and_fries.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_burgers_and_fries.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_glacial_cavern.png b/src/main/resources/assets/backrooms/textures/items/music_disc_glacial_cavern.png index 7481f01..4ac6a2e 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_glacial_cavern.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_glacial_cavern.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_its_been_so_long.png b/src/main/resources/assets/backrooms/textures/items/music_disc_its_been_so_long.png index 66b74fc..29c5afc 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_its_been_so_long.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_its_been_so_long.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_omae_wa_mou.png b/src/main/resources/assets/backrooms/textures/items/music_disc_omae_wa_mou.png index ec33764..931d26c 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_omae_wa_mou.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_omae_wa_mou.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png b/src/main/resources/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png index 2dbae9d..0ab319a 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_pretzels_and_cheese.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/music_disc_those_torn_walls.png b/src/main/resources/assets/backrooms/textures/items/music_disc_those_torn_walls.png index 7d4a75b..bd63f36 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/music_disc_those_torn_walls.png and b/src/main/resources/assets/backrooms/textures/items/music_disc_those_torn_walls.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/pipe.png b/src/main/resources/assets/backrooms/textures/items/pipe.png index d643166..9d41482 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/pipe.png and b/src/main/resources/assets/backrooms/textures/items/pipe.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/raw_almond_water.png b/src/main/resources/assets/backrooms/textures/items/raw_almond_water.png index 0ca0d26..313c701 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/raw_almond_water.png and b/src/main/resources/assets/backrooms/textures/items/raw_almond_water.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/wall_pickaxe.png b/src/main/resources/assets/backrooms/textures/items/wall_pickaxe.png new file mode 100644 index 0000000..3b6153e Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/items/wall_pickaxe.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/wallpaper_pattern.png b/src/main/resources/assets/backrooms/textures/items/wallpaper_pattern.png index 469e517..a0c0709 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/wallpaper_pattern.png and b/src/main/resources/assets/backrooms/textures/items/wallpaper_pattern.png differ diff --git a/src/main/resources/assets/backrooms/textures/items/wrench.png b/src/main/resources/assets/backrooms/textures/items/wrench.png index 43c96bc..7540816 100644 Binary files a/src/main/resources/assets/backrooms/textures/items/wrench.png and b/src/main/resources/assets/backrooms/textures/items/wrench.png differ diff --git a/src/main/resources/data/backrooms/advancements/break_wall_pick.json b/src/main/resources/data/backrooms/advancements/break_wall_pick.json new file mode 100644 index 0000000..4ff0811 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/break_wall_pick.json @@ -0,0 +1,32 @@ +{ + "parent": "backrooms:compressed_wall_pick", + "display": { + "icon": { + "item": "minecraft:clock" + }, + "title": { + "translate": "advancements.break_pick.title" + }, + "description": { + "translate": "advancements.break_pick.descr" + }, + "frame": "challenge", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "rewards": { + "experience": 100 + }, + "criteria": { + "broke_hoe": { + "trigger": "minecraft:item_durability_changed", + "conditions": { + "item": { + "item": "backrooms:compressed_wall_pickaxe" + }, + "durability": 0 + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/advancements/come_back.json b/src/main/resources/data/backrooms/advancements/come_back.json new file mode 100644 index 0000000..8995b62 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/come_back.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "minecraft:grass_block" + }, + "title": { + "translate": "advancements.come_back.title" + }, + "description": { + "translate": "advancements.come_back.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "tear": { + "trigger": "minecraft:impossible" + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:backrooms" +} diff --git a/src/main/resources/data/backrooms/advancements/compressed_wall.json b/src/main/resources/data/backrooms/advancements/compressed_wall.json new file mode 100644 index 0000000..2748620 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/compressed_wall.json @@ -0,0 +1,33 @@ +{ + "display": { + "icon": { + "item": "backrooms:compressed_wall" + }, + "title": { + "translate": "advancements.compressedwall.title" + }, + "description": { + "translate": "advancements.compressedwall.descr" + }, + "frame": "challenge", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "wall": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "backrooms:compressed_wall" + } + ] + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:wall_pick" +} diff --git a/src/main/resources/data/backrooms/advancements/compressed_wall_pick.json b/src/main/resources/data/backrooms/advancements/compressed_wall_pick.json new file mode 100644 index 0000000..6f17e79 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/compressed_wall_pick.json @@ -0,0 +1,33 @@ +{ + "display": { + "icon": { + "item": "backrooms:compressed_wall_pickaxe" + }, + "title": { + "translate": "advancements.compressed_wall_pick.title" + }, + "description": { + "translate": "advancements.compressed_wall_pick.descr" + }, + "frame": "challenge", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "wall_pick": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "backrooms:compressed_wall_pickaxe" + } + ] + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:compressed_wall" +} diff --git a/src/main/resources/data/backrooms/advancements/dottedredrooms.json b/src/main/resources/data/backrooms/advancements/dottedredrooms.json new file mode 100644 index 0000000..a287b6d --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/dottedredrooms.json @@ -0,0 +1,29 @@ +{ + "display": { + "icon": { + "item": "backrooms:dotted_red_wallpaper" + }, + "title": { + "translate": "advancements.level0dottedred.title" + }, + "description": { + "translate": "advancements.level0dottedred.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "level0": { + "trigger": "minecraft:location", + "conditions": { + "biome": "backrooms:level0dottedred" + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:redrooms" +} diff --git a/bin/main/data/backrooms/advancements/level_0_dotted.json b/src/main/resources/data/backrooms/advancements/dottedrooms.json similarity index 77% rename from bin/main/data/backrooms/advancements/level_0_dotted.json rename to src/main/resources/data/backrooms/advancements/dottedrooms.json index 2104671..1de697c 100644 --- a/bin/main/data/backrooms/advancements/level_0_dotted.json +++ b/src/main/resources/data/backrooms/advancements/dottedrooms.json @@ -12,20 +12,17 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { - "level0dotted": { + "level0": { "trigger": "minecraft:location", "conditions": { - "dimension": "backrooms:level_0_dotted" + "biome": "backrooms:level0dotted" } } }, "rewards": { - "recipes": [ - "backrooms:oak_planks3" - ], "experience": 10 }, "parent": "backrooms:level_0" diff --git a/src/main/resources/data/backrooms/advancements/level1off.json b/src/main/resources/data/backrooms/advancements/level1off.json new file mode 100644 index 0000000..b280b76 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/level1off.json @@ -0,0 +1,35 @@ +{ + "display": { + "icon": { + "item": "backrooms:light" + }, + "title": { + "translate": "advancements.level1off.title" + }, + "description": { + "translate": "advancements.level1off.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "level0": { + "trigger": "minecraft:location", + "conditions": { + "biome": "backrooms:level1off", + "light": { + "light": { + "min": 0, + "max": 2 + } + } + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:level_1" +} diff --git a/src/main/resources/data/backrooms/advancements/level2long.json b/src/main/resources/data/backrooms/advancements/level2long.json new file mode 100644 index 0000000..51ae01d --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/level2long.json @@ -0,0 +1,29 @@ +{ + "display": { + "icon": { + "item": "backrooms:cement" + }, + "title": { + "translate": "advancements.level2long.title" + }, + "description": { + "translate": "advancements.level2long.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "level0": { + "trigger": "minecraft:location", + "conditions": { + "biome": "backrooms:level2long" + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:level_2" +} diff --git a/src/main/resources/data/backrooms/advancements/level2messy.json b/src/main/resources/data/backrooms/advancements/level2messy.json new file mode 100644 index 0000000..1d0f8bc --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/level2messy.json @@ -0,0 +1,29 @@ +{ + "display": { + "icon": { + "item": "backrooms:cement" + }, + "title": { + "translate": "advancements.level2messy.title" + }, + "description": { + "translate": "advancements.level2messy.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "level0": { + "trigger": "minecraft:location", + "conditions": { + "biome": "backrooms:level2messy" + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:level_2" +} diff --git a/src/main/resources/data/backrooms/advancements/level_0.json b/src/main/resources/data/backrooms/advancements/level_0.json index 48702ed..0e6adcb 100644 --- a/src/main/resources/data/backrooms/advancements/level_0.json +++ b/src/main/resources/data/backrooms/advancements/level_0.json @@ -1,7 +1,7 @@ { "display": { "icon": { - "item": "backrooms:wallpaper" + "item": "backrooms:carpet" }, "title": { "translate": "advancements.level0.title" @@ -29,7 +29,8 @@ "backrooms:oak_planks", "backrooms:raw_almond_water", "backrooms:carpet", - "backrooms:carpet_stairs" + "backrooms:carpet_stairs", + "backrooms:vent" ], "experience": 10 }, diff --git a/src/main/resources/data/backrooms/advancements/level_0_dotted.json b/src/main/resources/data/backrooms/advancements/level_0_dotted.json deleted file mode 100644 index 2104671..0000000 --- a/src/main/resources/data/backrooms/advancements/level_0_dotted.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "display": { - "icon": { - "item": "backrooms:dotted_wallpaper" - }, - "title": { - "translate": "advancements.level0dotted.title" - }, - "description": { - "translate": "advancements.level0dotted.descr" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, - "criteria": { - "level0dotted": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_dotted" - } - } - }, - "rewards": { - "recipes": [ - "backrooms:oak_planks3" - ], - "experience": 10 - }, - "parent": "backrooms:level_0" -} diff --git a/src/main/resources/data/backrooms/advancements/level_0_red.json b/src/main/resources/data/backrooms/advancements/level_0_red.json deleted file mode 100644 index df0948a..0000000 --- a/src/main/resources/data/backrooms/advancements/level_0_red.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "display": { - "icon": { - "item": "backrooms:red_wallpaper" - }, - "title": { - "translate": "advancements.level0red.title" - }, - "description": { - "translate": "advancements.level0red.descr" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, - "criteria": { - "level0red": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_red" - } - } - }, - "rewards": { - "recipes": [ - "backrooms:oak_planks2" - ], - "experience": 10 - }, - "parent": "backrooms:level_0" -} diff --git a/src/main/resources/data/backrooms/advancements/level_1.json b/src/main/resources/data/backrooms/advancements/level_1.json index 1cc761a..763be35 100644 --- a/src/main/resources/data/backrooms/advancements/level_1.json +++ b/src/main/resources/data/backrooms/advancements/level_1.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level1": { diff --git a/src/main/resources/data/backrooms/advancements/level_2.json b/src/main/resources/data/backrooms/advancements/level_2.json index 71f0c4c..32fbd05 100644 --- a/src/main/resources/data/backrooms/advancements/level_2.json +++ b/src/main/resources/data/backrooms/advancements/level_2.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level2": { diff --git a/src/main/resources/data/backrooms/advancements/level_3.json b/src/main/resources/data/backrooms/advancements/level_3.json index 8c350e3..687e689 100644 --- a/src/main/resources/data/backrooms/advancements/level_3.json +++ b/src/main/resources/data/backrooms/advancements/level_3.json @@ -12,7 +12,7 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { "level3": { diff --git a/src/main/resources/data/backrooms/advancements/mine_wall.json b/src/main/resources/data/backrooms/advancements/mine_wall.json index 18a48ef..a322bdd 100644 --- a/src/main/resources/data/backrooms/advancements/mine_wall.json +++ b/src/main/resources/data/backrooms/advancements/mine_wall.json @@ -27,7 +27,7 @@ } }, "rewards": { - "experience": 500 + "experience": 10 }, - "parent": "backrooms:timewaster" + "parent": "backrooms:backrooms" } diff --git a/bin/main/data/backrooms/advancements/level_0_red.json b/src/main/resources/data/backrooms/advancements/redrooms.json similarity index 77% rename from bin/main/data/backrooms/advancements/level_0_red.json rename to src/main/resources/data/backrooms/advancements/redrooms.json index df0948a..42f6792 100644 --- a/bin/main/data/backrooms/advancements/level_0_red.json +++ b/src/main/resources/data/backrooms/advancements/redrooms.json @@ -12,20 +12,17 @@ "frame": "task", "show_toast": true, "announce_to_chat": true, - "hidden": false + "hidden": true }, "criteria": { - "level0red": { + "level0": { "trigger": "minecraft:location", "conditions": { - "dimension": "backrooms:level_0_red" + "biome": "backrooms:level0red" } } }, "rewards": { - "recipes": [ - "backrooms:oak_planks2" - ], "experience": 10 }, "parent": "backrooms:level_0" diff --git a/src/main/resources/data/backrooms/advancements/tear_wallpaper.json b/src/main/resources/data/backrooms/advancements/tear_wallpaper.json new file mode 100644 index 0000000..0e11245 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/tear_wallpaper.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "backrooms:wallpaper_pattern" + }, + "title": { + "translate": "advancements.tear_wallpaper.title" + }, + "description": { + "translate": "advancements.tear_wallpaper.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "tear": { + "trigger": "minecraft:impossible" + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:level_0" +} diff --git a/src/main/resources/data/backrooms/advancements/timewaster.json b/src/main/resources/data/backrooms/advancements/timewaster.json deleted file mode 100644 index 98f916f..0000000 --- a/src/main/resources/data/backrooms/advancements/timewaster.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "display": { - "icon": { - "item": "backrooms:wall" - }, - "title": { - "translate": "advancements.timewaster.title" - }, - "description": { - "translate": "advancements.timewaster.descr" - }, - "frame": "challenge", - "show_toast": true, - "announce_to_chat": true, - "hidden": true - }, - "criteria": { - "level0": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0", - "position": { - "y": 255 - } - } - }, - "level1": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_1", - "position": { - "y": 255 - } - } - }, - "level2": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_2", - "position": { - "y": 255 - } - } - }, - "level3": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_3", - "position": { - "y": 255 - } - } - }, - "level0dotted": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_dotted", - "position": { - "y": 255 - } - } - }, - "level0red": { - "trigger": "minecraft:location", - "conditions": { - "dimension": "backrooms:level_0_red", - "position": { - "y": 255 - } - } - } - }, - "rewards": { - "experience": 500 - }, - "parent": "backrooms:backrooms" -} diff --git a/src/main/resources/data/backrooms/advancements/untear_wallpaper.json b/src/main/resources/data/backrooms/advancements/untear_wallpaper.json new file mode 100644 index 0000000..500edad --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/untear_wallpaper.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "backrooms:dotted_wallpaper_pattern" + }, + "title": { + "translate": "advancements.untear_wallpaper.title" + }, + "description": { + "translate": "advancements.untear_wallpaper.descr" + }, + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "tear": { + "trigger": "minecraft:impossible" + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:tear_wallpaper" +} diff --git a/src/main/resources/data/backrooms/advancements/void_block.json b/src/main/resources/data/backrooms/advancements/void_block.json new file mode 100644 index 0000000..4629b64 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/void_block.json @@ -0,0 +1,33 @@ +{ + "display": { + "icon": { + "item": "backrooms:void_block" + }, + "title": { + "translate": "advancements.void_block.title" + }, + "description": { + "translate": "advancements.void_block.descr" + }, + "frame": "challenge", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "wall": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "backrooms:void_block" + } + ] + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:compressed_wall_pick" +} diff --git a/src/main/resources/data/backrooms/advancements/wall_pick.json b/src/main/resources/data/backrooms/advancements/wall_pick.json new file mode 100644 index 0000000..881f0a8 --- /dev/null +++ b/src/main/resources/data/backrooms/advancements/wall_pick.json @@ -0,0 +1,33 @@ +{ + "display": { + "icon": { + "item": "backrooms:wall_pickaxe" + }, + "title": { + "translate": "advancements.wall_pick.title" + }, + "description": { + "translate": "advancements.wall_pick.descr" + }, + "frame": "challenge", + "show_toast": true, + "announce_to_chat": true, + "hidden": true + }, + "criteria": { + "wall_pick": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "backrooms:wall_pickaxe" + } + ] + } + } + }, + "rewards": { + "experience": 10 + }, + "parent": "backrooms:mine_wall" +} diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/compressed_wall.json b/src/main/resources/data/backrooms/loot_tables/blocks/compressed_wall.json new file mode 100644 index 0000000..6c4631b --- /dev/null +++ b/src/main/resources/data/backrooms/loot_tables/blocks/compressed_wall.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:compressed_wall" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_torn_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_torn_wallpaper.json new file mode 100644 index 0000000..2ef2191 --- /dev/null +++ b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_torn_wallpaper.json @@ -0,0 +1,43 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:dotted_red_torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_wallpaper.json new file mode 100644 index 0000000..668a0cf --- /dev/null +++ b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_red_wallpaper.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:dotted_red_wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json index 78c8777..096278b 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:dotted_torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:dotted_torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_wallpaper.json index f1b8148..8db40f3 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/dotted_wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/dotted_wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:dotted_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:dotted_wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json index eaf690b..29bf279 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/red_torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:red_torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:red_torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/red_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/red_wallpaper.json index 9834639..0e1e221 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/red_wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/red_wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:red_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:red_wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/torn_wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/torn_wallpaper.json index 5abaae9..e6d0ef3 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/torn_wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/torn_wallpaper.json @@ -1,14 +1,43 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:torn_wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "backrooms:torn_wallpaper" + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], + "name": "minecraft:oak_planks" + } + ] + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/void_block.json b/src/main/resources/data/backrooms/loot_tables/blocks/void_block.json new file mode 100644 index 0000000..8e1e25c --- /dev/null +++ b/src/main/resources/data/backrooms/loot_tables/blocks/void_block.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:void_block" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/blocks/wallpaper.json b/src/main/resources/data/backrooms/loot_tables/blocks/wallpaper.json index d168a5a..4bb014d 100644 --- a/src/main/resources/data/backrooms/loot_tables/blocks/wallpaper.json +++ b/src/main/resources/data/backrooms/loot_tables/blocks/wallpaper.json @@ -1,14 +1,19 @@ { - "type": "minecraft:block", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "backrooms:wallpaper" - } - ] - } - ] + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "backrooms:wallpaper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/backrooms/loot_tables/chests/level3.json b/src/main/resources/data/backrooms/loot_tables/chests/level3.json index 71b63cb..0fc135f 100644 --- a/src/main/resources/data/backrooms/loot_tables/chests/level3.json +++ b/src/main/resources/data/backrooms/loot_tables/chests/level3.json @@ -99,17 +99,17 @@ { "type": "item", "name": "minecraft:iron_pickaxe", - "weight": 2 + "weight": 8 }, { "type": "item", - "name": "minecraft:gold_pickaxe", - "weight": 3 + "name": "minecraft:golden_pickaxe", + "weight": 15 }, { "type": "item", "name": "backrooms:music_disc_pretzels_and_cheese", - "weight": 3 + "weight": 10 }, { "type": "item", diff --git a/src/main/resources/data/backrooms/recipes/compressed_wall.json b/src/main/resources/data/backrooms/recipes/compressed_wall.json new file mode 100644 index 0000000..3eb1846 --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/compressed_wall.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "###", + "###" + ], + "key": { + "#": { + "item": "backrooms:wall" + } + }, + "result": { + "item": "backrooms:compressed_wall", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/recipes/compressed_wall_pickaxe.json b/src/main/resources/data/backrooms/recipes/compressed_wall_pickaxe.json new file mode 100644 index 0000000..4497164 --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/compressed_wall_pickaxe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "XXX", + " # ", + " # " + ], + "key": { + "#": { + "item": "minecraft:stick" + }, + "X": { + "item": "backrooms:compressed_wall" + } + }, + "result": { + "item": "backrooms:compressed_wall_pickaxe" + } +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/recipes/vent.json b/src/main/resources/data/backrooms/recipes/vent.json new file mode 100644 index 0000000..d8f191b --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/vent.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "#i#", + "###" + ], + "key": { + "#": { + "item": "minecraft:iron_bars" + }, + "i": { + "item": "minecraft:iron_ingot" + } + }, + "result": { + "item": "backrooms:vent", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/recipes/wall_pickaxe.json b/src/main/resources/data/backrooms/recipes/wall_pickaxe.json new file mode 100644 index 0000000..7ec176d --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/wall_pickaxe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "XXX", + " # ", + " # " + ], + "key": { + "#": { + "item": "minecraft:stick" + }, + "X": { + "item": "backrooms:wall" + } + }, + "result": { + "item": "backrooms:wall_pickaxe" + } +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/dimension/backrooms/level_0.json b/src/main/resources/data/minecraft/dimension/backrooms/level_0.json index 54f0825..9b72b0c 100644 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_0.json +++ b/src/main/resources/data/minecraft/dimension/backrooms/level_0.json @@ -1,13 +1,332 @@ { - "type": "backrooms:level_0", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_0", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672760, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.1, + "humidity": 0.1 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.2 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0decrepit" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.5, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0red" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.3 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.5 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.3 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.4, + "humidity": 0.6 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dottedred" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0dotted" + }, + { + "parameters": { + "altitude": 0.6, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 0.4 + }, + "biome": "backrooms:level0" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.0 + }, + "biome": "backrooms:level0" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672760, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/src/main/resources/data/minecraft/dimension/backrooms/level_0_dotted.json b/src/main/resources/data/minecraft/dimension/backrooms/level_0_dotted.json deleted file mode 100644 index 8b59867..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_0_dotted.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "backrooms:level_0_dotted", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0dotted", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/dimension/backrooms/level_0_red.json b/src/main/resources/data/minecraft/dimension/backrooms/level_0_red.json deleted file mode 100644 index 6b88152..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_0_red.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "backrooms:level_0_red", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level0red", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/dimension/backrooms/level_1.json b/src/main/resources/data/minecraft/dimension/backrooms/level_1.json index 2c5196d..ea39564 100644 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_1.json +++ b/src/main/resources/data/minecraft/dimension/backrooms/level_1.json @@ -1,13 +1,102 @@ { - "type": "backrooms:level_1", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level1", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_1", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672761, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 1.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 1.0 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.7, + "humidity": 0.7 + }, + "biome": "backrooms:level1" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level1off" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.6, + "humidity": 0.4 + }, + "biome": "backrooms:level1off" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level1off" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672761, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/src/main/resources/data/minecraft/dimension/backrooms/level_2.json b/src/main/resources/data/minecraft/dimension/backrooms/level_2.json index a149b9c..64449b5 100644 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_2.json +++ b/src/main/resources/data/minecraft/dimension/backrooms/level_2.json @@ -1,13 +1,152 @@ { - "type": "backrooms:level_2", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level2", - "type": "minecraft:fixed" - }, - "seed": 0, - "settings": "minecraft:overworld", - "type": "minecraft:noise" - } -} \ No newline at end of file + "type": "backrooms:level_2", + "generator": { + "biome_source": { + "humidity_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "altitude_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "weirdness_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "seed": 672762, + "biomes": [ + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.0, + "humidity": 0.0 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.1, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.2 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.1, + "humidity": 0.3 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.2, + "humidity": 0.1 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 1.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 1.0, + "humidity": 1.0 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.7, + "humidity": 0.7 + }, + "biome": "backrooms:level2long" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.3, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.3 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.3, + "humidity": 0.2 + }, + "biome": "backrooms:level2" + }, + { + "parameters": { + "altitude": 0.2, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.6, + "humidity": 0.4 + }, + "biome": "backrooms:level2messy" + }, + { + "parameters": { + "altitude": 0.0, + "weirdness": 0.0, + "offset": 0.0, + "temperature": 0.5, + "humidity": 0.5 + }, + "biome": "backrooms:level2messy" + } + ], + "temperature_noise": { + "firstOctave": -7, + "amplitudes": [ + 1.0, + 1.0 + ] + }, + "type": "minecraft:multi_noise" + }, + "seed": 672762, + "settings": "minecraft:overworld", + "type": "minecraft:noise" + } +} diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.json index 5c20644..d147d7e 100644 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.json +++ b/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_dotted.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_dotted.json deleted file mode 100644 index 5c20644..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_dotted.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ultrawarm": false, - "natural": true, - "shrunk": false, - "piglin_safe": false, - "respawn_anchor_works": false, - "bed_works": false, - "has_raids": false, - "has_skylight": true, - "has_ceiling": false, - "ambient_light": 0.1, - "logical_height": 256, - "infiniburn": "minecraft:infiniburn_overworld" -} diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_red.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_red.json deleted file mode 100644 index 5c20644..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0_red.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ultrawarm": false, - "natural": true, - "shrunk": false, - "piglin_safe": false, - "respawn_anchor_works": false, - "bed_works": false, - "has_raids": false, - "has_skylight": true, - "has_ceiling": false, - "ambient_light": 0.1, - "logical_height": 256, - "infiniburn": "minecraft:infiniburn_overworld" -} diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_1.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_1.json index 5c20644..d147d7e 100644 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_1.json +++ b/src/main/resources/data/minecraft/dimension_type/backrooms/level_1.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_2.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_2.json index 5c20644..d147d7e 100644 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_2.json +++ b/src/main/resources/data/minecraft/dimension_type/backrooms/level_2.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/src/main/resources/data/minecraft/dimension_type/backrooms/level_3.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_3.json index 5c20644..d147d7e 100644 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_3.json +++ b/src/main/resources/data/minecraft/dimension_type/backrooms/level_3.json @@ -8,7 +8,7 @@ "has_raids": false, "has_skylight": true, "has_ceiling": false, - "ambient_light": 0.1, + "ambient_light": 0.0, "logical_height": 256, "infiniburn": "minecraft:infiniburn_overworld" } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2bc6d1c..06f5d63 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "backrooms", - "version": "1.1.1", + "version": "1.2.0", "name": "The Backrooms", "description": "The backrooms, endless mono yellow rooms to traverse.", @@ -22,8 +22,7 @@ "entrypoints": { "main": ["net.ludocrypt.backrooms.Backrooms"], "client": ["net.ludocrypt.backrooms.BackroomsClient"], - "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"], - "mm:early_risers": ["net.ludocrypt.backrooms.misc.PreInitialize::initialize"] + "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"] }, "mixins": [ "backrooms.mixins.json"