diff --git a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png index d3d157c..8714d8a 100644 Binary files a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png and b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png differ diff --git a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png index 54a6b94..15403d8 100644 Binary files a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png and b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png differ diff --git a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png index 2535142..9ebd80a 100644 Binary files a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png and b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png differ diff --git a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png index 254cae1..c29689d 100644 Binary files a/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png and b/bin/main/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png differ diff --git a/bin/main/assets/backrooms/textures/block/red_wallpaper.png b/bin/main/assets/backrooms/textures/block/red_wallpaper.png index 0066737..3df678f 100644 Binary files a/bin/main/assets/backrooms/textures/block/red_wallpaper.png and b/bin/main/assets/backrooms/textures/block/red_wallpaper.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 d821560..aa1c763 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 ddafe48..f7030fb 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 6abfdcb..34c1579 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 e35637f..209ed20 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/wallpaper.png b/bin/main/assets/backrooms/textures/block/wallpaper.png index b2fa403..7ec781f 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 a369eac..7d4bcc2 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 86f3437..c0ce182 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 a231d38..8016fca 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 c580c25..0272044 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 21fe52e..2714767 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 8c6e734..5da1f6f 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 e5ebdd6..9f9083b 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 c17650a..bbc997a 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 3b3a90e..6ae2470 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 4b45f3a..dd789d0 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 8a80f2d..81b0137 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 f210cbe..81b0137 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/backrooms.mixins.json b/bin/main/backrooms.mixins.json index 571cadc..8e51f94 100644 --- a/bin/main/backrooms.mixins.json +++ b/bin/main/backrooms.mixins.json @@ -4,8 +4,8 @@ "compatibilityLevel": "JAVA_8", "mixins": [ "GoToBackroomsMixin", - "PlayerMixin", - "MobSpawnLocationMixin" + "MobSpawnLocationMixin", + "EntityMixin" ], "client": [ "BuiltinModelItemRendererMixin", diff --git a/bin/main/data/minecraft/dimension_type/backrooms/level_0.json b/bin/main/data/minecraft/dimension_type/backrooms/level_0.json deleted file mode 100644 index d147d7e..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_0.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.0, - "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 deleted file mode 100644 index d147d7e..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_1.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.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 deleted file mode 100644 index d147d7e..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_2.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.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 deleted file mode 100644 index d147d7e..0000000 --- a/bin/main/data/minecraft/dimension_type/backrooms/level_3.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.0, - "logical_height": 256, - "infiniburn": "minecraft:infiniburn_overworld" -} diff --git a/bin/main/fabric.mod.json b/bin/main/fabric.mod.json index 06f5d63..cb57585 100644 --- a/bin/main/fabric.mod.json +++ b/bin/main/fabric.mod.json @@ -1,38 +1,41 @@ { - "schemaVersion": 1, - "id": "backrooms", - "version": "1.2.0", - - "name": "The Backrooms", - "description": "The backrooms, endless mono yellow rooms to traverse.", - "authors": [ - "LudoCrypt", - "Angel Craig" - ], - "contact": { - "homepage": "https://www.curseforge.com/minecraft/mc-mods/the-backrooms", - "sources": "https://github.com/LudoCrypt/Backrooms", - "issues": "https://github.com/LudoCrypt/Backrooms/issues" - }, - - "license": "CC0-1.0", - "icon": "assets/backrooms/icon.png", - - "environment": "*", - "entrypoints": { - "main": ["net.ludocrypt.backrooms.Backrooms"], - "client": ["net.ludocrypt.backrooms.BackroomsClient"], - "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"] - }, - "mixins": [ - "backrooms.mixins.json" - ], - "depends": { - "fabricloader": ">=0.7.4", - "fabric": "*", - "minecraft": "1.16.x" - }, - "suggests": { - "flamingo": "*" - } + "schemaVersion": 1, + "id": "backrooms", + "version": "1.2.2", + "name": "The Backrooms", + "description": "The backrooms, endless mono yellow rooms to traverse.", + "authors": [ + "LudoCrypt", + "Angel Craig" + ], + "contact": { + "homepage": "https://www.curseforge.com/minecraft/mc-mods/the-backrooms", + "sources": "https://github.com/LudoCrypt/Backrooms", + "issues": "https://github.com/LudoCrypt/Backrooms/issues" + }, + "license": "CC0-1.0", + "icon": "assets/backrooms/icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "net.ludocrypt.backrooms.Backrooms" + ], + "client": [ + "net.ludocrypt.backrooms.BackroomsClient" + ], + "modmenu": [ + "net.ludocrypt.backrooms.config.ModMenuConfig" + ] + }, + "mixins": [ + "backrooms.mixins.json" + ], + "depends": { + "fabricloader": ">=0.7.4", + "fabric": "*", + "minecraft": "1.16.x" + }, + "suggests": { + "flamingo": "*" + } } diff --git a/bin/main/net/ludocrypt/backrooms/Backrooms.class b/bin/main/net/ludocrypt/backrooms/Backrooms.class index 78ed639..d8914a8 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 deleted file mode 100644 index 0e4d639..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class b/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class deleted file mode 100644 index 83d3ee9..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0Dotted.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class b/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class deleted file mode 100644 index 362547c..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level0Red.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level1.class b/bin/main/net/ludocrypt/backrooms/biome/Level1.class deleted file mode 100644 index 01cdd53..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level1.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level2.class b/bin/main/net/ludocrypt/backrooms/biome/Level2.class deleted file mode 100644 index c88e5de..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level2.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/Level3.class b/bin/main/net/ludocrypt/backrooms/biome/Level3.class deleted file mode 100644 index c8732fc..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/Level3.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class b/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class deleted file mode 100644 index 72e4f1c..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class b/bin/main/net/ludocrypt/backrooms/blocks/VoidBlock.class index 4fe0256..ad45086 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/dimension/BackroomsPlacers.class b/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class deleted file mode 100644 index b002bea..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/dimension/BackroomsPlacers.class and /dev/null differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class b/bin/main/net/ludocrypt/backrooms/features/Level0DottedRoom.class index f079f6d..5b22244 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 d94ac4f..0c5823d 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 ae4c06c..4904099 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/Level1Room.class b/bin/main/net/ludocrypt/backrooms/features/Level1Room.class index 78565ff..3d729e2 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level1Room.class and b/bin/main/net/ludocrypt/backrooms/features/Level1Room.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level2Room.class b/bin/main/net/ludocrypt/backrooms/features/Level2Room.class index 8a006e5..a332be0 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/Level2Room.class and b/bin/main/net/ludocrypt/backrooms/features/Level2Room.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/Level3Room.class b/bin/main/net/ludocrypt/backrooms/features/Level3Room.class index 965281a..d1e880f 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 afd9c6b..e9454b6 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/Level0RoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.class index 99920f2..75ba43f 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.class and b/bin/main/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.class index 6ececd5..c2738de 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/features/decorators/Level2RoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.class index 0b89663..c73749e 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.class and b/bin/main/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.class differ diff --git a/bin/main/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.class b/bin/main/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.class index ab825df..42f9183 100644 Binary files a/bin/main/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.class and b/bin/main/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.class differ diff --git a/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class b/bin/main/net/ludocrypt/backrooms/misc/BackroomsMusicType.class index c402a08..15ed072 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/mixin/GoToBackroomsMixin.class b/bin/main/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.class index 41217c7..c71fe2f 100644 Binary files a/bin/main/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.class and b/bin/main/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.class differ diff --git a/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class b/bin/main/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.class index 61e7d34..4e63c4c 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 cff1f13..4f1a3f9 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 deleted file mode 100644 index af0d7fb..0000000 Binary files a/bin/main/net/ludocrypt/backrooms/mixin/PlayerMixin.class and /dev/null differ diff --git a/build.gradle b/build.gradle index 374cdf0..60936c1 100644 --- a/build.gradle +++ b/build.gradle @@ -27,16 +27,18 @@ repositories { dependencies { - minecraft "com.mojang:minecraft:1.16.1" - mappings "net.fabricmc:yarn:1.16.1+build.21:v2" - modImplementation "net.fabricmc:fabric-loader:0.9.0+build.204" - modImplementation "net.fabricmc.fabric-api:fabric-api:0.16.0+build.384-1.16.1" - include(modImplementation('com.github.Chocohead:Fabric-ASM:v2.0.1')) - modApi "me.shedaniel.cloth:config-2:4.6.0" - include "me.shedaniel.cloth:config-2:4.6.0" + minecraft "com.mojang:minecraft:1.16.2" + mappings "net.fabricmc:yarn:1.16.2+build.9:v2" + modImplementation "net.fabricmc:fabric-loader:0.9.1+build.205" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.17.2+build.396-1.16" + modApi("me.shedaniel.cloth:config-2:4.7.0-unstable") { + exclude(group: "net.fabricmc.fabric-api") + } + include "me.shedaniel.cloth:config-2:4.7.0-unstable" modApi "me.sargunvohra.mcmods:autoconfig1u:3.2.0-unstable" include "me.sargunvohra.mcmods:autoconfig1u:3.2.0-unstable" - modImplementation "io.github.prospector:modmenu:1.14.5+build.30" + modImplementation "io.github.prospector:modmenu:1.14.6+build.31" + include(modImplementation('com.github.Chocohead:Fabric-ASM:v2.1')) } processResources { diff --git a/gradle.properties b/gradle.properties index 7cd5d08..d8a0215 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,11 @@ -# Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx8G +org.gradle.jvmargs=-Xmx2G +mod_version = 1.2.2 +maven_group = net.ludocrypt +archives_base_name = the-backrooms -# Fabric Properties - # check these on https://fabricmc.net/use -minecraft_version=1.16.1 -yarn_mappings=1.16.1+build.21 -loader_version=0.9.0+build.204 +minecraft_version=1.16.2 +yarn_mappings=1.16.2+build.9 +loader_version=0.9.1+build.205 +fabric_version=0.17.2+build.396-1.16 -# Mod Properties - mod_version = 1.2.1 - maven_group = net.ludocrypt - archives_base_name = the-backrooms -# Dependencies - # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.16.0+build.384-1.16.1 diff --git a/logs/latest.log b/logs/latest.log new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/net/ludocrypt/backrooms/Backrooms.java b/src/main/java/net/ludocrypt/backrooms/Backrooms.java index b0c8ce1..6e566e9 100644 --- a/src/main/java/net/ludocrypt/backrooms/Backrooms.java +++ b/src/main/java/net/ludocrypt/backrooms/Backrooms.java @@ -1,7 +1,6 @@ package net.ludocrypt.backrooms; import java.util.Iterator; -import java.util.Random; import java.util.Set; import java.util.function.Consumer; import java.util.function.Supplier; @@ -12,19 +11,10 @@ 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.biome.BkBiomeKeys; +import net.ludocrypt.backrooms.biome.BkBuiltInBiomes; +import net.ludocrypt.backrooms.biome.ConfiguratedSurfaceBuilders; +import net.ludocrypt.backrooms.biome.SurfaceBuilders; import net.ludocrypt.backrooms.blocks.BackroomsSlab; import net.ludocrypt.backrooms.blocks.BackroomsStairs; import net.ludocrypt.backrooms.blocks.Carpet; @@ -48,7 +38,7 @@ 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.features.LevelsFeatureInit; import net.ludocrypt.backrooms.items.AlmondWaterItem; import net.ludocrypt.backrooms.items.BackroomsMusicDiscItem; import net.ludocrypt.backrooms.items.CompressedWallPickaxe; @@ -72,19 +62,10 @@ 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; import net.minecraft.util.Rarity; import net.minecraft.util.registry.Registry; -import net.minecraft.world.biome.Biome; -import net.minecraft.world.gen.GenerationStep; -import net.minecraft.world.gen.decorator.Decorator; -import net.minecraft.world.gen.decorator.RangeDecoratorConfig; -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(); @@ -182,29 +163,6 @@ public class Backrooms implements ModInitializer { public static final Block RED_CHECKERED = new Checkered_Block(); public static final Block WHITE_CHECKERED = new Checkered_Block(); public static final Block YELLOW_CHECKERED = new Checkered_Block(); - // biomes - public static final Biome LEVEL0 = Registry.register(Registry.BIOME, new Identifier("backrooms", "level0"), - new Level0()); - public static final Biome LEVEL0RED = Registry.register(Registry.BIOME, new Identifier("backrooms", "level0red"), - 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 public static final Item MUSIC_DISC_GLACIAL_CAVERN = new BackroomsMusicDiscItem(1, BackroomsSoundEvents.MUSIC_DISC_GLACIAL_CAVERN, @@ -242,21 +200,9 @@ public class Backrooms implements ModInitializer { public static final PaintingMotive SEA_LIFE = new PaintingMotive(64, 64); public static final PaintingMotive WOLF = new PaintingMotive(64, 64); - // Ore Gen - private void handleBiome(Biome biome) { - if (biome.getCategory() != Biome.Category.NETHER && biome.getCategory() != Biome.Category.THEEND) { - biome.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, - Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Target.NATURAL_STONE, - Backrooms.POOLSTONE.getDefaultState(), 25 // Ore vein size - )).createDecoratedFeature(Decorator.COUNT_RANGE.configure(new RangeDecoratorConfig(6, // Number of - // veins per - // chunk - 0, // Bottom Offset - 0, // Min y level - 64 // Max y level - )))); - } - } + // builders +// public static SurfaceBuilder LEVELBUILDER; +// public static ConfiguredSurfaceBuilder CONFIGUREDLEVELBUILDER; // identifier public static Identifier getId(String id) { @@ -270,28 +216,30 @@ public void onInitialize() { 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); + player.moveToWorld(player.getServer().getWorld(BDimension.LEVEL0WORLD)); return 1; })).then(CommandManager.literal("1").executes(context -> { PlayerEntity player = context.getSource().getPlayer(); - FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL1WORLD), - BackroomsPlacers.LEVEL01); + player.moveToWorld(player.getServer().getWorld(BDimension.LEVEL1WORLD)); return 1; })).then(CommandManager.literal("2").executes(context -> { PlayerEntity player = context.getSource().getPlayer(); - FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + player.moveToWorld(player.getServer().getWorld(BDimension.LEVEL2WORLD)); return 1; })).then(CommandManager.literal("3").executes(context -> { PlayerEntity player = context.getSource().getPlayer(); - FabricDimensions.teleport(player, player.getServer().getWorld(BDimension.LEVEL3WORLD), - BackroomsPlacers.LEVEL3); + player.moveToWorld(player.getServer().getWorld(BDimension.LEVEL3WORLD)); return 1; })))); }); // dimensions BDimension.register(); + // biomes + LevelsFeatureInit.registerFeatures(); + BkBiomeKeys.turnOn(); + BkBuiltInBiomes.turnOn(); + ConfiguratedSurfaceBuilders.turnOn(); + SurfaceBuilders.turnOn(); // items Registry.register(Registry.ITEM, new Identifier("backrooms", "almond_water"), ALMOND_WATER); Registry.register(Registry.ITEM, new Identifier("backrooms", "raw_almond_water"), RAW_ALMOND_WATER); @@ -303,7 +251,8 @@ public void onInitialize() { 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); + 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); @@ -509,11 +458,10 @@ public void onInitialize() { Registry.register(Registry.ITEM, new Identifier("backrooms", "music_disc_012"), MUSIC_DISC_012); Registry.register(Registry.ITEM, new Identifier("backrooms", "music_disc_pretzels_and_cheese"), MUSIC_DISC_PRETZELS_AND_CHEESE); + // config AutoConfig.register(BackroomsConfig.class, GsonConfigSerializer::new); - // Ore Generation - Registry.BIOME.forEach(this::handleBiome); - RegistryEntryAddedCallback.event(Registry.BIOME).register((i, identifier, biome) -> handleBiome(biome)); + // blocks registerBlockEntity("void_block", VOID_BLOCK, VoidBlockEntity::new, (blockEntityType) -> VoidBlockEntity.blockEntityType = blockEntityType); @@ -525,7 +473,7 @@ private ItemStack registerBlockEntity(String identifier, Registry.register(Registry.BLOCK, getId(identifier), block); - BlockEntityType blockEntityType = Registry.register(Registry.BLOCK_ENTITY_TYPE, getId(identifier), + BlockEntityType blockEntityType = Registry.register(Registry.BLOCK_ENTITY_TYPE, getId(identifier), BlockEntityType.Builder.create(blockEntitySupplier, block).build(null)); blockEntityConsumer.accept(blockEntityType); @@ -549,13 +497,6 @@ private static Identifier registerLootTable(Identifier id) { } } - public static void ambientSoundGenerator(PlayerEntity target, SoundEvent sound, SoundCategory category, - float volume, float pitch, Random random) { - float d = volume + random.nextFloat(); - float e = pitch + random.nextFloat(); - 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); diff --git a/src/main/java/net/ludocrypt/backrooms/biome/BkBiomeKeys.java b/src/main/java/net/ludocrypt/backrooms/biome/BkBiomeKeys.java new file mode 100644 index 0000000..f981388 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/BkBiomeKeys.java @@ -0,0 +1,28 @@ +package net.ludocrypt.backrooms.biome; + +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import net.minecraft.util.registry.RegistryKey; +import net.minecraft.world.biome.Biome; + +public abstract class BkBiomeKeys { + + public static final RegistryKey LEVEL0KEY = register(new Identifier("backrooms", "level0")); + public static final RegistryKey LEVEL0DECREPITKEY = register(new Identifier("backrooms", "level0decrepit")); + public static final RegistryKey LEVEL0DOTTEDKEY = register(new Identifier("backrooms", "level0dotted")); + public static final RegistryKey LEVEL0DOTTEDREDKEY = register(new Identifier("backrooms", "level0dottedred")); + public static final RegistryKey LEVEL0REDKEY = register(new Identifier("backrooms", "level0red")); + public static final RegistryKey LEVEL1KEY = register(new Identifier("backrooms", "level1")); + public static final RegistryKey LEVEL1OFFKEY = register(new Identifier("backrooms", "level1off")); + public static final RegistryKey LEVEL2KEY = register(new Identifier("backrooms", "level2")); + public static final RegistryKey LEVEL2LONGKEY = register(new Identifier("backrooms", "level2long")); + public static final RegistryKey LEVEL2MESSYKEY = register(new Identifier("backrooms", "level2messy")); + public static final RegistryKey LEVEL3KEY = register(new Identifier("backrooms", "level3")); + + private static RegistryKey register(Identifier id) { + return RegistryKey.of(Registry.BIOME_KEY, id); + } + + public static void turnOn() { + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/biome/BkBiomes.java b/src/main/java/net/ludocrypt/backrooms/biome/BkBiomes.java new file mode 100644 index 0000000..c64c38b --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/BkBiomes.java @@ -0,0 +1,215 @@ +package net.ludocrypt.backrooms.biome; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.features.LevelsFeatureInit; +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.biome.GenerationSettings; +import net.minecraft.world.biome.SpawnSettings; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.decorator.DecoratorConfig; +import net.minecraft.world.gen.feature.FeatureConfig; + +public abstract class BkBiomes { + + protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); + + public static Biome Level0() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 5, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0ROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL0DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.THEEND).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(14402413).waterFogColor(14402413).fogColor(14402413) + .skyColor(14402413).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL0MUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level0Decrepit() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 5, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0DECREPITROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL0DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.THEEND).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(14402413).waterFogColor(14402413).fogColor(14402413) + .skyColor(14402413).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level0Dotted() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0DOTTEDROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL0DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.THEEND).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(14402413).waterFogColor(14402413).fogColor(14402413) + .skyColor(14402413).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL0MUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level0DottedRed() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0DOTTEDREDROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL0DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.THEEND).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(14402413).waterFogColor(14402413).fogColor(-5171911) + .skyColor(-5171911).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level0Red() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 4, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL0REDROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL0DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.THEEND).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(14402413).waterFogColor(14402413).fogColor(-5171911) + .skyColor(-5171911).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL0WEIGHTEDMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level1() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 4, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 4, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL1ROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL1DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NETHER).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL1ONMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level1Off() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 4, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 4, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL1OFFROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL1DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NETHER).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL1OFFMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level2() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.VEX, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL2ROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL2DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL2MUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level2Long() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.VEX, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL2LONGROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL2DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL2LONGMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level2Messy() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.VEX, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL2MESSYROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL2DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL2MESSYMUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + + public static Biome Level3() { + SpawnSettings spawnSettings = (new SpawnSettings.Builder()) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.ENDERMAN, 2, 0, 2)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SILVERFISH, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.VEX, 2, 0, 3)) + .spawn(SpawnGroup.AMBIENT, new SpawnSettings.SpawnEntry(EntityType.SNOWBALL, 500, 0, 2)).build(); + GenerationSettings.Builder builder = (new GenerationSettings.Builder()) + .surfaceBuilder(ConfiguratedSurfaceBuilders.LEVELBUILDER) + .feature(GenerationStep.Feature.LOCAL_MODIFICATIONS, + LevelsFeatureInit.LEVEL3ROOM.configure(FeatureConfig.DEFAULT) + .decorate(LevelsFeatureInit.LEVEL3DECORATOR.configure(DecoratorConfig.DEFAULT))); + return (new Biome.Builder()).precipitation(Biome.Precipitation.NONE).category(Biome.Category.NONE).depth(0F) + .scale(0F).temperature(1.0F).downfall(0.0F) + .effects((new BiomeEffects.Builder()).waterColor(-6710887).waterFogColor(-6710887).fogColor(-6710887) + .skyColor(-6710887).music(MusicType.createIngameMusic(BackroomsSoundEvents.LEVEL3MUSIC)) + .build()) + .spawnSettings(spawnSettings).generationSettings(builder.build()).build(); + } + +} diff --git a/src/main/java/net/ludocrypt/backrooms/biome/BkBuiltInBiomes.java b/src/main/java/net/ludocrypt/backrooms/biome/BkBuiltInBiomes.java new file mode 100644 index 0000000..a1c0eb6 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/BkBuiltInBiomes.java @@ -0,0 +1,38 @@ +package net.ludocrypt.backrooms.biome; + +import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import net.minecraft.util.registry.BuiltinRegistries; +import net.minecraft.util.registry.RegistryKey; +import net.minecraft.world.biome.Biome; + +public abstract class BkBuiltInBiomes { + private static final Int2ObjectMap> BY_RAW_ID = new Int2ObjectArrayMap>(); + + private static Biome register(int rawId, RegistryKey registryKey, Biome biome) { + BY_RAW_ID.put(rawId, registryKey); + return (Biome) BuiltinRegistries.set(BuiltinRegistries.BIOME, rawId, registryKey, biome); + } + + public static RegistryKey fromRawId(int rawId) { + return (RegistryKey) BY_RAW_ID.get(rawId); + } + + static { + register(672760, BkBiomeKeys.LEVEL0KEY, BkBiomes.Level0()); + register(673760, BkBiomeKeys.LEVEL0DECREPITKEY, BkBiomes.Level0Decrepit()); + register(674760, BkBiomeKeys.LEVEL0DOTTEDKEY, BkBiomes.Level0Dotted()); + register(675760, BkBiomeKeys.LEVEL0DOTTEDREDKEY, BkBiomes.Level0DottedRed()); + register(676760, BkBiomeKeys.LEVEL0REDKEY, BkBiomes.Level0Red()); + register(672761, BkBiomeKeys.LEVEL1KEY, BkBiomes.Level1()); + register(673761, BkBiomeKeys.LEVEL1OFFKEY, BkBiomes.Level1Off()); + + register(672762, BkBiomeKeys.LEVEL2KEY, BkBiomes.Level2()); + register(673762, BkBiomeKeys.LEVEL2LONGKEY, BkBiomes.Level2Long()); + register(674762, BkBiomeKeys.LEVEL2MESSYKEY, BkBiomes.Level2Messy()); + register(672763, BkBiomeKeys.LEVEL3KEY, BkBiomes.Level3()); + } + + public static void turnOn() { + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/biome/ConfiguratedSurfaceBuilders.java b/src/main/java/net/ludocrypt/backrooms/biome/ConfiguratedSurfaceBuilders.java new file mode 100644 index 0000000..8ba5dfc --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/ConfiguratedSurfaceBuilders.java @@ -0,0 +1,28 @@ +package net.ludocrypt.backrooms.biome; + +import net.ludocrypt.backrooms.Backrooms; +import net.minecraft.block.BlockState; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.BuiltinRegistries; +import net.minecraft.world.gen.surfacebuilder.ConfiguredSurfaceBuilder; +import net.minecraft.world.gen.surfacebuilder.SurfaceConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class ConfiguratedSurfaceBuilders { + private static final BlockState WALL = Backrooms.WALL.getDefaultState(); + public static final ConfiguredSurfaceBuilder LEVELBUILDER; + + private static ConfiguredSurfaceBuilder registerConfigBuilder(Identifier id, + ConfiguredSurfaceBuilder configuredSurfaceBuilder) { + return (ConfiguredSurfaceBuilder) BuiltinRegistries.add(BuiltinRegistries.CONFIGURED_SURFACE_BUILDER, id, + configuredSurfaceBuilder); + } + + static { + LEVELBUILDER = registerConfigBuilder(new Identifier("backrooms", "level_builder"), + SurfaceBuilders.LEVELBUILDER.method_30478(new TernarySurfaceConfig(WALL, WALL, WALL))); + } + + public static void turnOn() { + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/biome/Level0.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0.java deleted file mode 100644 index 78210ba..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0.java +++ /dev/null @@ -1,57 +0,0 @@ -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 Level0 extends Biome { - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL0PLACER = new Level0RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level0() { - - 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.LEVEL0MUSIC)).build())); - - this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, - LevelsFeatureInit.LEVEL0ROOM.configure(FeatureConfig.DEFAULT) - .createDecoratedFeature(LEVEL0PLACER.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/Level0Decrepit.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0Decrepit.java deleted file mode 100644 index b933d23..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0Decrepit.java +++ /dev/null @@ -1,57 +0,0 @@ -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 deleted file mode 100644 index 2ade780..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0Dotted.java +++ /dev/null @@ -1,52 +0,0 @@ -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 Level0Dotted extends Biome { - - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL0DOTTEDPLACER = new Level0RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level0Dotted() { - - 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.LEVEL0MUSIC)).build())); - - this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, - LevelsFeatureInit.LEVEL0DOTTEDROOM.configure(FeatureConfig.DEFAULT) - .createDecoratedFeature(LEVEL0DOTTEDPLACER.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/Level0DottedRed.java b/src/main/java/net/ludocrypt/backrooms/biome/Level0DottedRed.java deleted file mode 100644 index 367f6d1..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0DottedRed.java +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index 5369986..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level0Red.java +++ /dev/null @@ -1,57 +0,0 @@ -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 Level0Red extends Biome { - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL0REDPLACER = new Level0RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level0Red() { - - 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(-5171911) - .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)); - - } - - @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/Level1.java b/src/main/java/net/ludocrypt/backrooms/biome/Level1.java deleted file mode 100644 index b2e9be9..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level1.java +++ /dev/null @@ -1,57 +0,0 @@ -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 Level1 extends Biome { - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL1PLACER = new Level1RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level1() { - - 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.LEVEL1ONMUSIC)).build())); - - this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, - LevelsFeatureInit.LEVEL1ROOM.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/Level1Off.java b/src/main/java/net/ludocrypt/backrooms/biome/Level1Off.java deleted file mode 100644 index 40db815..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level1Off.java +++ /dev/null @@ -1,57 +0,0 @@ -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 deleted file mode 100644 index e4e808a..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level2.java +++ /dev/null @@ -1,59 +0,0 @@ -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 Level2 extends Biome { - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL2PLACER = new Level2RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level2() { - - 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.LEVEL2MUSIC)).build())); - - this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, - LevelsFeatureInit.LEVEL2ROOM.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/Level2Long.java b/src/main/java/net/ludocrypt/backrooms/biome/Level2Long.java deleted file mode 100644 index 4428954..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level2Long.java +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index f71de16..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level2Messy.java +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 83f0bc9..0000000 --- a/src/main/java/net/ludocrypt/backrooms/biome/Level3.java +++ /dev/null @@ -1,58 +0,0 @@ -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 Level3 extends Biome { - protected static final BlockState WALL = Backrooms.WALL.getDefaultState(); - public static final Decorator LEVEL3PLACER = new Level2RoomDecorator( - NopeDecoratorConfig.field_24891); - - public Level3() { - - 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.LEVEL3MUSIC)).build())); - - this.addFeature(GenerationStep.Feature.LOCAL_MODIFICATIONS, - LevelsFeatureInit.LEVEL3ROOM.configure(FeatureConfig.DEFAULT) - .createDecoratedFeature(LEVEL3PLACER.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/LevelSurfaceBuilder.java b/src/main/java/net/ludocrypt/backrooms/biome/LevelBuilder.java similarity index 72% rename from src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java rename to src/main/java/net/ludocrypt/backrooms/biome/LevelBuilder.java index 7542c76..e96565a 100644 --- a/src/main/java/net/ludocrypt/backrooms/biome/LevelSurfaceBuilder.java +++ b/src/main/java/net/ludocrypt/backrooms/biome/LevelBuilder.java @@ -13,8 +13,9 @@ import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder; import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; -public class LevelSurfaceBuilder extends SurfaceBuilder { - public LevelSurfaceBuilder(Codec codec) { +public class LevelBuilder extends SurfaceBuilder { + + public LevelBuilder(Codec codec) { super(codec); } @@ -22,18 +23,17 @@ public LevelSurfaceBuilder(Codec codec) { public void generate(Random random, Chunk chunkIn, Biome biomeIn, int x, int z, int startHeight, double noise, BlockState defaultBlock, BlockState defaultFluid, int seaLevel, long seed, TernarySurfaceConfig config) { - SurfaceBuilder.DEFAULT.generate(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, + SurfaceBuilder.NOPE.generate(random, chunkIn, biomeIn, x, z, startHeight, noise, defaultBlock, defaultFluid, seaLevel, seed, config); int xpos = x & 15; int zpos = z & 15; int yheight = 75; BlockPos.Mutable blockpos$Mutable = new BlockPos.Mutable(); - if (biomeIn == Backrooms.LEVEL0 || biomeIn == Backrooms.LEVEL0DECREPIT || biomeIn == Backrooms.LEVEL0DOTTED - || biomeIn == Backrooms.LEVEL0DOTTEDRED || biomeIn == Backrooms.LEVEL0RED) { + if (biomeIn.getCategory() == Biome.Category.THEEND) { if (BackroomsConfig.getInstance().Level0LayerCount > 11) { yheight = (BackroomsConfig.getInstance().Level0LayerCount * 6) + 8; } - } else if (biomeIn == Backrooms.LEVEL1 || biomeIn == Backrooms.LEVEL1OFF) { + } else if (biomeIn.getCategory() == Biome.Category.NETHER) { if (BackroomsConfig.getInstance().Level1LayerCount > 11) { yheight = (BackroomsConfig.getInstance().Level1LayerCount * 6) + 8; } @@ -42,7 +42,7 @@ public void generate(Random random, Chunk chunkIn, Biome biomeIn, int x, int z, blockpos$Mutable.set(xpos, ypos, zpos); BlockState currentBlockState = chunkIn.getBlockState(blockpos$Mutable); - if (currentBlockState.getBlock() != null) { + if (currentBlockState != WALL) { chunkIn.setBlockState(blockpos$Mutable, WALL, false); } } diff --git a/src/main/java/net/ludocrypt/backrooms/biome/SurfaceBuilders.java b/src/main/java/net/ludocrypt/backrooms/biome/SurfaceBuilders.java new file mode 100644 index 0000000..27a6555 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/biome/SurfaceBuilders.java @@ -0,0 +1,25 @@ +package net.ludocrypt.backrooms.biome; + +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder; +import net.minecraft.world.gen.surfacebuilder.SurfaceConfig; +import net.minecraft.world.gen.surfacebuilder.TernarySurfaceConfig; + +public class SurfaceBuilders { + + public static final SurfaceBuilder LEVELBUILDER; + + private static > F register(Identifier id, F surfaceBuilder) { + return (F) Registry.register(Registry.SURFACE_BUILDER, id, surfaceBuilder); + } + + static { + LEVELBUILDER = register(new Identifier("backrooms", "level_builder"), + new LevelBuilder(TernarySurfaceConfig.CODEC)); + } + + public static void turnOn() { + } + +} diff --git a/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java b/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java index 4a9e60b..7adc80f 100644 --- a/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java +++ b/src/main/java/net/ludocrypt/backrooms/blocks/VoidBlock.java @@ -2,12 +2,10 @@ import java.util.Random; -import net.fabricmc.fabric.api.dimension.v1.FabricDimensions; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.ludocrypt.backrooms.Backrooms; import net.ludocrypt.backrooms.blocks.entity.VoidBlockEntity; import net.ludocrypt.backrooms.dimension.BDimension; -import net.ludocrypt.backrooms.dimension.BackroomsPlacers; import net.minecraft.block.BlockState; import net.minecraft.block.BlockWithEntity; import net.minecraft.block.Material; @@ -15,6 +13,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.Identifier; import net.minecraft.util.function.BooleanBiFunction; @@ -23,9 +22,7 @@ import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import net.minecraft.world.dimension.DimensionType; -@SuppressWarnings("deprecation") public class VoidBlock extends BlockWithEntity { public VoidBlock() { @@ -66,91 +63,88 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit && VoxelShapes.matchesAnywhere( VoxelShapes.cuboid(entity.getBoundingBox().offset((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()))), - state.getOutlineShape(world, pos), BooleanBiFunction.AND)) && !(entity instanceof ItemEntity)) { - if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL0) { + state.getOutlineShape(world, pos), BooleanBiFunction.AND)) + && !(entity instanceof ItemEntity)) { + ServerWorld overworld = entity.getServer().getWorld(World.OVERWORLD); + ServerWorld lvl0 = entity.getServer().getWorld(BDimension.LEVEL0WORLD); + ServerWorld lvl1 = entity.getServer().getWorld(BDimension.LEVEL1WORLD); + ServerWorld lvl2 = entity.getServer().getWorld(BDimension.LEVEL2WORLD); + ServerWorld lvl3 = entity.getServer().getWorld(BDimension.LEVEL3WORLD); + + if (world.getRegistryKey() == BDimension.LEVEL0WORLD) { t = rand.nextDouble(); if (t < 0.001) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), - BackroomsPlacers.HOME); + entity.moveToWorld(overworld); if (entity instanceof ServerPlayerEntity) { - Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + Backrooms.grantAdvancement((ServerPlayerEntity) entity, + new Identifier("backrooms", "come_back")); } } else if (t < 0.25) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl1); } else if (t < 0.5) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl1); } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl0); } else { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl0); } - } else if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL1) { + } else if (entity.world.getRegistryKey() == BDimension.LEVEL1WORLD) { t = rand.nextDouble(); if (t < 0.005) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl1); } else if (t < 0.25) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl2); } else if (t < 0.5) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl2); } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl0); } else { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL1WORLD), - BackroomsPlacers.LEVEL01); + entity.moveToWorld(lvl1); } - } else if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL2) { + } else if (entity.world.getRegistryKey() == BDimension.LEVEL2WORLD) { t = rand.nextDouble(); if (t < 0.05) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), - BackroomsPlacers.HOME); + entity.moveToWorld(overworld); if (entity instanceof ServerPlayerEntity) { - Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + Backrooms.grantAdvancement((ServerPlayerEntity) entity, + new Identifier("backrooms", "come_back")); } } else if (t < 0.25) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl3); } else if (t < 0.5) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL3WORLD), - BackroomsPlacers.LEVEL3); + entity.moveToWorld(overworld); + if (entity instanceof ServerPlayerEntity) { + Backrooms.grantAdvancement((ServerPlayerEntity) entity, + new Identifier("backrooms", "come_back")); + } } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl2); } else { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL3WORLD), - BackroomsPlacers.LEVEL3); + entity.moveToWorld(lvl3); } - } else if (entity.world.getDimensionRegistryKey() == BDimension.LEVEL3) { + } else if (entity.world.getRegistryKey() == BDimension.LEVEL3WORLD) { t = rand.nextDouble(); if (t < 0.05) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl2); } else if (t < 0.15) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(World.OVERWORLD), - BackroomsPlacers.HOME); + entity.moveToWorld(overworld); if (entity instanceof ServerPlayerEntity) { - Backrooms.grantAdvancement((ServerPlayerEntity) entity, new Identifier("backrooms", "come_back")); + Backrooms.grantAdvancement((ServerPlayerEntity) entity, + new Identifier("backrooms", "come_back")); } } else if (t < 0.5) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL2WORLD), - BackroomsPlacers.LEVEL2); + entity.moveToWorld(lvl2); } else if (t < 0.75) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL3WORLD), - BackroomsPlacers.LEVEL3); + entity.moveToWorld(overworld); + if (entity instanceof ServerPlayerEntity) { + Backrooms.grantAdvancement((ServerPlayerEntity) entity, + new Identifier("backrooms", "come_back")); + } } else { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL3WORLD), - BackroomsPlacers.LEVEL3); + entity.moveToWorld(lvl3); } - } else if (entity.world.getDimensionRegistryKey() == DimensionType.OVERWORLD_REGISTRY_KEY) { - FabricDimensions.teleport(entity, entity.getServer().getWorld(BDimension.LEVEL0WORLD), - BackroomsPlacers.LEVEL01); + } else if (entity.world.getRegistryKey() == World.OVERWORLD) { + entity.moveToWorld(lvl0); } } } diff --git a/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java b/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java deleted file mode 100644 index 2390a86..0000000 --- a/src/main/java/net/ludocrypt/backrooms/dimension/BackroomsPlacers.java +++ /dev/null @@ -1,41 +0,0 @@ -package net.ludocrypt.backrooms.dimension; - -import net.fabricmc.fabric.api.dimension.v1.EntityPlacer; -import net.minecraft.block.pattern.BlockPattern; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.Heightmap; - -@SuppressWarnings("deprecation") -public class BackroomsPlacers { - - public static final EntityPlacer LEVEL01 = (oldEntity, destination, portalDir, horizontalOffset, - verticalOffset) -> { - return new BlockPattern.TeleportTarget( - 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(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(100) - 50) * 16) + 3.5, 4, - oldEntity.getZ() + ((destination.random.nextInt(100) - 50) * 16) + 3.5), - oldEntity.getVelocity(), (int) oldEntity.yaw); - }; - - public static final EntityPlacer HOME = (oldEntity, destination, portalDir, horizontalOffset, verticalOffset) -> { - return new BlockPattern.TeleportTarget( - new Vec3d(destination.getSpawnPos().getX(), - destination.getTopY(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, destination.getSpawnPos().getX(), - destination.getSpawnPos().getZ()), - destination.getSpawnPos().getZ()), - 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 index e1a457a..8ecf898 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0DecrepitRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DecrepitRoom.java @@ -21,7 +21,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -139,8 +139,8 @@ public Level0DecrepitRoom(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -250,16 +250,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -268,22 +258,22 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DecrepitRoom.door1 = true; } else { Level0DecrepitRoom.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DecrepitRoom.door2 = true; } else { Level0DecrepitRoom.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DecrepitRoom.door3 = true; } else { Level0DecrepitRoom.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DecrepitRoom.door4 = true; } else { Level0DecrepitRoom.door4 = false; @@ -380,7 +370,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java index cedb02d..4f216ab 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRedRoom.java @@ -20,7 +20,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -138,8 +138,8 @@ public Level0DottedRedRoom(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -249,16 +249,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -267,22 +257,22 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRedRoom.door1 = true; } else { Level0DottedRedRoom.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRedRoom.door2 = true; } else { Level0DottedRedRoom.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRedRoom.door3 = true; } else { Level0DottedRedRoom.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRedRoom.door4 = true; } else { Level0DottedRedRoom.door4 = false; @@ -379,7 +369,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); @@ -450,7 +440,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, CARPET_STAIRS, 2); break; case 1: - if (generator.nextDouble() < 0.01) { + if (rand.nextDouble() < 0.01) { world.setBlockState(currentPosition, MOLDY_CARPET, 2); } else { world.setBlockState(currentPosition, CARPET, 2); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java index 14fb62a..b78efcd 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0DottedRoom.java @@ -20,7 +20,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -138,8 +138,8 @@ public Level0DottedRoom(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -249,16 +249,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -267,22 +257,22 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRoom.door1 = true; } else { Level0DottedRoom.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRoom.door2 = true; } else { Level0DottedRoom.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRoom.door3 = true; } else { Level0DottedRoom.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0DottedRoom.door4 = true; } else { Level0DottedRoom.door4 = false; @@ -379,7 +369,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); @@ -450,7 +440,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, CARPET_STAIRS, 2); break; case 1: - if (generator.nextDouble() < 0.01) { + if (rand.nextDouble() < 0.01) { world.setBlockState(currentPosition, MOLDY_CARPET, 2); } else { world.setBlockState(currentPosition, CARPET, 2); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java index 00206bf..5413478 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0RedRoom.java @@ -13,7 +13,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -110,8 +110,8 @@ public Level0RedRoom(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -222,16 +222,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -240,22 +230,22 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0RedRoom.door1 = true; } else { Level0RedRoom.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0RedRoom.door2 = true; } else { Level0RedRoom.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0RedRoom.door3 = true; } else { Level0RedRoom.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0RedRoom.door4 = true; } else { Level0RedRoom.door4 = false; @@ -352,7 +342,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java index 61664e4..6e075fe 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level0Room.java @@ -20,7 +20,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -138,8 +138,8 @@ public Level0Room(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -249,16 +249,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -267,22 +257,22 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, || (world.getBlockState(currentPosition).getBlock() == Blocks.BEDROCK)) && (world.getBlockState(currentPosition).getBlock() != Backrooms.CARPET_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0Room.door1 = true; } else { Level0Room.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0Room.door2 = true; } else { Level0Room.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0Room.door3 = true; } else { Level0Room.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level0DoorChance))) { Level0Room.door4 = true; } else { Level0Room.door4 = false; @@ -379,7 +369,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator2.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java index 640a100..4d43b1b 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level1OffRoom.java @@ -19,7 +19,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -128,8 +128,8 @@ public Level1OffRoom(Codec configFactory) { 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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -240,14 +240,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -255,22 +247,22 @@ 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.CEMENT_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1OffRoom.door1 = true; } else { Level1OffRoom.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1OffRoom.door2 = true; } else { Level1OffRoom.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1OffRoom.door3 = true; } else { Level1OffRoom.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1OffRoom.door4 = true; } else { Level1OffRoom.door4 = false; @@ -350,7 +342,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); @@ -421,7 +413,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition, CEMENT_STAIRS, 2); break; case 1: - if (generator.nextDouble() < 0.005) { + if (rand.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), diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level1Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level1Room.java index daf67da..121dc2d 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level1Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level1Room.java @@ -18,7 +18,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -127,8 +127,8 @@ public Level1Room(Codec configFactory) { 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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { Random generator = new Random(world.getSeed()); long seed = world.getSeed(); @@ -239,14 +239,6 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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]; @@ -254,22 +246,22 @@ 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.CEMENT_STAIRS)) { - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1Room.door1 = true; } else { Level1Room.door1 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1Room.door2 = true; } else { Level1Room.door2 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1Room.door3 = true; } else { Level1Room.door3 = false; } - if ((generator.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { + if ((rand.nextDouble()) < ((BackroomsConfig.getInstance().Level1DoorChance))) { Level1Room.door4 = true; } else { Level1Room.door4 = false; @@ -349,7 +341,7 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, world.setBlockState(currentPosition.add(0, 3, -1), AIR, 2); world.setBlockState(currentPosition.add(-1, 3, -1), AIR, 2); } - if (generator.nextDouble() < BackroomsConfig.getInstance().VBDoor) { + if (rand.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); @@ -416,11 +408,12 @@ private void generateSlice(ServerWorldAccess world, BlockPos.Mutable centerPos, 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() < 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), diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java index 5550029..4631255 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level2LongRoom.java @@ -11,7 +11,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -32,8 +32,8 @@ public Level2LongRoom(Codec configFactory) { 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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java b/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java index 165dc04..722e64f 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level2MessyRoom.java @@ -12,7 +12,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -58,8 +58,8 @@ public Level2MessyRoom(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level2Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level2Room.java index 35377d6..2251a24 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level2Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level2Room.java @@ -12,7 +12,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -58,8 +58,8 @@ public Level2Room(Codec configFactory) { .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) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); diff --git a/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java b/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java index 2259a0f..8646cff 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java +++ b/src/main/java/net/ludocrypt/backrooms/features/Level3Room.java @@ -14,7 +14,7 @@ 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.StructureWorldAccess; import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -45,8 +45,8 @@ public Level3Room(Codec configFactory) { private static final BlockState CHEST = Blocks.CHEST.getDefaultState().with(ChestBlock.CHEST_TYPE, ChestType.SINGLE) .with(ChestBlock.FACING, Direction.NORTH).with(ChestBlock.WATERLOGGED, false); - public boolean generate(ServerWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGen, - Random rand, BlockPos position, DefaultFeatureConfig config) { + public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random rand, BlockPos position, + DefaultFeatureConfig featureConfig) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable().set(position); diff --git a/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java b/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java index 33abe72..6b114ac 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java +++ b/src/main/java/net/ludocrypt/backrooms/features/LevelsFeatureInit.java @@ -1,7 +1,13 @@ package net.ludocrypt.backrooms.features; +import net.ludocrypt.backrooms.features.decorators.Level0RoomDecorator; +import net.ludocrypt.backrooms.features.decorators.Level1RoomDecorator; +import net.ludocrypt.backrooms.features.decorators.Level2RoomDecorator; +import net.ludocrypt.backrooms.features.decorators.Level3RoomDecorator; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; +import net.minecraft.world.gen.decorator.Decorator; +import net.minecraft.world.gen.decorator.NopeDecoratorConfig; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.Feature; @@ -10,13 +16,18 @@ public class LevelsFeatureInit { 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 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 Decorator LEVEL0DECORATOR = new Level0RoomDecorator(NopeDecoratorConfig.CODEC); + public static Decorator LEVEL1DECORATOR = new Level1RoomDecorator(NopeDecoratorConfig.CODEC); + public static Decorator LEVEL2DECORATOR = new Level2RoomDecorator(NopeDecoratorConfig.CODEC); + public static Decorator LEVEL3DECORATOR = new Level3RoomDecorator(NopeDecoratorConfig.CODEC); public static void registerFeatures() { Registry.register(Registry.FEATURE, new Identifier("backrooms", "level0room"), LEVEL0ROOM); @@ -30,5 +41,9 @@ public static void registerFeatures() { 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); + Registry.register(Registry.DECORATOR, new Identifier("backrooms", "level0decorator"), LEVEL0DECORATOR); + Registry.register(Registry.DECORATOR, new Identifier("backrooms", "level1decorator"), LEVEL1DECORATOR); + Registry.register(Registry.DECORATOR, new Identifier("backrooms", "level2decorator"), LEVEL2DECORATOR); + Registry.register(Registry.DECORATOR, new Identifier("backrooms", "level3decorator"), LEVEL3DECORATOR); } } \ No newline at end of file diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.java index f9aa27a..69ad6b8 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.java +++ b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level0RoomDecorator.java @@ -9,20 +9,19 @@ 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.DecoratorContext; import net.minecraft.world.gen.decorator.NopeDecoratorConfig; public class Level0RoomDecorator extends Decorator { public Level0RoomDecorator(Codec codec) { - super(codec); - } + super(codec); + } @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { + public Stream getPositions(DecoratorContext context, Random random, NopeDecoratorConfig config, + BlockPos pos) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 0, pos.getZ()); List blockPosList = new ArrayList(); 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 9c87681..6af1f5b 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java +++ b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level1RoomDecorator.java @@ -9,20 +9,19 @@ 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.DecoratorContext; import net.minecraft.world.gen.decorator.NopeDecoratorConfig; public class Level1RoomDecorator extends Decorator { public Level1RoomDecorator(Codec codec) { super(codec); - } + } @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { + public Stream getPositions(DecoratorContext context, Random random, NopeDecoratorConfig config, + BlockPos pos) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 0, pos.getZ()); List blockPosList = new ArrayList(); diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.java index e14486e..e3cff11 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.java +++ b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level2RoomDecorator.java @@ -8,9 +8,8 @@ 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.DecoratorContext; import net.minecraft.world.gen.decorator.NopeDecoratorConfig; public class Level2RoomDecorator extends Decorator { @@ -20,8 +19,8 @@ public Level2RoomDecorator(Codec codec) { } @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { + public Stream getPositions(DecoratorContext context, Random random, NopeDecoratorConfig config, + BlockPos pos) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 4, pos.getZ()); List blockPosList = new ArrayList(); diff --git a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.java b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.java index 134d8d7..ac3835a 100644 --- a/src/main/java/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.java +++ b/src/main/java/net/ludocrypt/backrooms/features/decorators/Level3RoomDecorator.java @@ -8,9 +8,8 @@ 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.DecoratorContext; import net.minecraft.world.gen.decorator.NopeDecoratorConfig; public class Level3RoomDecorator extends Decorator { @@ -20,8 +19,8 @@ public Level3RoomDecorator(Codec codec) { } @Override - public Stream getPositions(WorldAccess world, ChunkGenerator generator, Random random, - NopeDecoratorConfig config, BlockPos pos) { + public Stream getPositions(DecoratorContext context, Random random, NopeDecoratorConfig config, + BlockPos pos) { BlockPos.Mutable mutableBlockPos = new BlockPos.Mutable(pos.getX(), 5, pos.getZ()); List blockPosList = new ArrayList(); diff --git a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java index b9b964c..4bc1c23 100644 --- a/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java +++ b/src/main/java/net/ludocrypt/backrooms/misc/BackroomsMusicType.java @@ -1,7 +1,6 @@ package net.ludocrypt.backrooms.misc; import net.minecraft.sound.MusicSound; -import net.minecraft.sound.SoundEvent; public class BackroomsMusicType { public static final MusicSound LEVEL0MUSIC; @@ -13,10 +12,6 @@ public class BackroomsMusicType { public static final MusicSound LEVEL2MENU; public static final MusicSound LEVEL3MENU; - public static MusicSound method_27283(SoundEvent soundEvent) { - return new MusicSound(soundEvent, 12000, 24000, false); - } - static { LEVEL0MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL0MUSIC, 1000, 5000, true); LEVEL1MUSIC = new MusicSound(BackroomsSoundEvents.LEVEL1ONMUSIC, 1000, 5000, true); @@ -26,6 +21,6 @@ public static MusicSound method_27283(SoundEvent soundEvent) { 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/mixin/EntityMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/EntityMixin.java new file mode 100644 index 0000000..2fe4185 --- /dev/null +++ b/src/main/java/net/ludocrypt/backrooms/mixin/EntityMixin.java @@ -0,0 +1,79 @@ +package net.ludocrypt.backrooms.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import net.ludocrypt.backrooms.Backrooms; +import net.ludocrypt.backrooms.config.BackroomsConfig; +import net.ludocrypt.backrooms.dimension.BDimension; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.Heightmap; +import net.minecraft.world.TeleportTarget; +import net.minecraft.world.World; + +@Mixin(Entity.class) +public class EntityMixin { + + @Inject(method = "getTeleportTarget", at = @At(value = "HEAD"), cancellable = true) + private void getTeleportTarget(ServerWorld destination, CallbackInfoReturnable ci) { + Entity entity = ((Entity) (Object) this); + ServerWorld overworld = entity.getServer().getOverworld(); + ServerWorld lvl0 = entity.getServer().getWorld(BDimension.LEVEL0WORLD); + ServerWorld lvl1 = entity.getServer().getWorld(BDimension.LEVEL1WORLD); + ServerWorld lvl2 = entity.getServer().getWorld(BDimension.LEVEL2WORLD); + ServerWorld lvl3 = entity.getServer().getWorld(BDimension.LEVEL3WORLD); + if (destination == lvl0 || destination == lvl1 || destination == lvl2 || destination == lvl3) { + ci.setReturnValue(new TeleportTarget( + new Vec3d(entity.getX() + ((destination.random.nextInt(120) - 60) * 16) + 3.5, 4, + entity.getZ() + ((destination.random.nextInt(120) - 60) * 16) + 3.5), + new Vec3d(0, 0, 0), entity.yaw, entity.pitch)); + } else if ((entity.world == lvl0 || entity.world == lvl1 || entity.world == lvl2 || entity.world == lvl3) + && destination == overworld) { + ci.setReturnValue(new TeleportTarget(new Vec3d(destination.getSpawnPos().getX(), + destination.getTopY(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, destination.getSpawnPos().getX(), + destination.getSpawnPos().getZ()), + destination.getSpawnPos().getZ()), new Vec3d(0, 0, 0), entity.yaw, entity.pitch)); + } + } + + @Inject(method = "tick", at = @At(value = "HEAD")) + private void onEntityTick(CallbackInfo ci) { + World world = ((Entity) (Object) this).world; + Entity entity = ((Entity) (Object) this); + if (entity instanceof PlayerEntity) { + if (!world.isClient) { + if (entity.isInsideWall() && entity.world.getRegistryKey() == World.OVERWORLD + && ((PlayerEntity) entity).isCreative()) { + if (Math.random() < 0.75) { + if (Math.random() < BackroomsConfig.getInstance().SuffocationChance) { + if (Math.random() < 0.02) { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL1WORLD)); + } else if (Math.random() < 0.01) { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL2WORLD)); + } else { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL0WORLD)); + } + } + } + } + + if (Backrooms.teleportedEntity == (PlayerEntity) entity) { + if (Math.random() < 0.02) { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL1WORLD)); + } else if (Math.random() < 0.01) { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL2WORLD)); + } else { + entity.moveToWorld(entity.getServer().getWorld(BDimension.LEVEL0WORLD)); + } + Backrooms.teleportedEntity = null; + } + } + } + } +} diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.java index 64ac42a..919c6ca 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/GoToBackroomsMixin.java @@ -21,7 +21,7 @@ private void onPearlHit(HitResult hitResult, CallbackInfo ci) { if ((!world.isClient && pearlEntity.getOwner() instanceof ServerPlayerEntity)) { ServerPlayerEntity playerEntity = (ServerPlayerEntity) pearlEntity.getOwner(); if (world.random.nextDouble() < (BackroomsConfig.getInstance().EnderPearlChance)) { - if ((world.getWorld().getRegistryKey() == World.OVERWORLD)) { + if ((world.getRegistryKey() == World.OVERWORLD)) { ci.cancel(); pearlEntity.kill(); Backrooms.teleportedEntity = playerEntity; diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java index f48d68c..0670fd7 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/MobSpawnLocationMixin.java @@ -5,7 +5,6 @@ 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; @@ -24,14 +23,13 @@ public class MobSpawnLocationMixin { @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) { + int yheight = 75; + if (biomeIn.getCategory() == Biome.Category.THEEND) { if (BackroomsConfig.getInstance().Level0LayerCount > 11) { yheight = (BackroomsConfig.getInstance().Level0LayerCount * 6) + 8; } - } else if (biomeIn == Backrooms.LEVEL1 || biomeIn == Backrooms.LEVEL1OFF) { + } else if (biomeIn.getCategory() == Biome.Category.NETHER) { if (BackroomsConfig.getInstance().Level1LayerCount > 11) { yheight = (BackroomsConfig.getInstance().Level1LayerCount * 6) + 8; } diff --git a/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java b/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java index f7fecb2..810c737 100644 --- a/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java +++ b/src/main/java/net/ludocrypt/backrooms/mixin/MusicMixin.java @@ -39,18 +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) { + } else if (world != null && this.world.getRegistryKey() == BDimension.LEVEL0WORLD) { 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) { + .method_27344(this.player.getBlockPos()).getMusic().orElse(BackroomsMusicType.LEVEL0MUSIC)); + } else if (world != null && this.world.getRegistryKey() == BDimension.LEVEL1WORLD) { 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) { + .method_27344(this.player.getBlockPos()).getMusic().orElse(BackroomsMusicType.LEVEL1MUSIC)); + } else if (world != null && this.world.getRegistryKey() == BDimension.LEVEL2WORLD) { 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) { + .method_27344(this.player.getBlockPos()).getMusic().orElse(BackroomsMusicType.LEVEL2MUSIC)); + } else if (world != null && this.world.getRegistryKey() == BDimension.LEVEL3WORLD) { callbackInfoReturnable.setReturnValue((MusicSound) this.world.getBiomeAccess() - .method_27344(this.player.getBlockPos()).method_27343().orElse(BackroomsMusicType.LEVEL3MUSIC)); + .method_27344(this.player.getBlockPos()).getMusic().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 deleted file mode 100644 index 95b0664..0000000 --- a/src/main/java/net/ludocrypt/backrooms/mixin/PlayerMixin.java +++ /dev/null @@ -1,61 +0,0 @@ -package net.ludocrypt.backrooms.mixin; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import net.fabricmc.fabric.api.dimension.v1.FabricDimensions; -import net.ludocrypt.backrooms.Backrooms; -import net.ludocrypt.backrooms.config.BackroomsConfig; -import net.ludocrypt.backrooms.dimension.BDimension; -import net.ludocrypt.backrooms.dimension.BackroomsPlacers; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.world.World; -import net.minecraft.world.dimension.DimensionType; - -@SuppressWarnings("deprecation") -@Mixin(PlayerEntity.class) -public class PlayerMixin { - - @Inject(method = "tick", at = @At(value = "HEAD")) - private void onEntityTick(CallbackInfo ci) { - World world = ((PlayerEntity) (Object) this).world; - PlayerEntity playerEntity = ((PlayerEntity) (Object) this); - if (!world.isClient) { - if (playerEntity.isInsideWall() - && playerEntity.world.getDimensionRegistryKey() == DimensionType.OVERWORLD_REGISTRY_KEY - && !playerEntity.isCreative()) { - if (Math.random() < 0.75) { - if (Math.random() < BackroomsConfig.getInstance().SuffocationChance) { - 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) { - 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/textures/block/red_torn_wallpaper_level_1.png b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png index d3d157c..8714d8a 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png and b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_1.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png index 54a6b94..15403d8 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png and b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_2.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png index 2535142..9ebd80a 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png and b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_3.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png index 254cae1..c29689d 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png and b/src/main/resources/assets/backrooms/textures/block/red_torn_wallpaper_level_4.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/red_wallpaper.png b/src/main/resources/assets/backrooms/textures/block/red_wallpaper.png index 0066737..3df678f 100644 Binary files a/src/main/resources/assets/backrooms/textures/block/red_wallpaper.png and b/src/main/resources/assets/backrooms/textures/block/red_wallpaper.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 d821560..aa1c763 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 ddafe48..f7030fb 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 6abfdcb..34c1579 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 e35637f..209ed20 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/wall_stem.png b/src/main/resources/assets/backrooms/textures/block/wall_stem.png new file mode 100644 index 0000000..d2679d5 Binary files /dev/null and b/src/main/resources/assets/backrooms/textures/block/wall_stem.png differ diff --git a/src/main/resources/assets/backrooms/textures/block/wall_stem.png.mcmeta b/src/main/resources/assets/backrooms/textures/block/wall_stem.png.mcmeta new file mode 100644 index 0000000..89c9445 --- /dev/null +++ b/src/main/resources/assets/backrooms/textures/block/wall_stem.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 b2fa403..7ec781f 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 a369eac..7d4bcc2 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 86f3437..c0ce182 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 a231d38..8016fca 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 c580c25..0272044 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 21fe52e..2714767 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 8c6e734..5da1f6f 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 e5ebdd6..9f9083b 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 c17650a..bbc997a 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 3b3a90e..6ae2470 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 4b45f3a..dd789d0 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 8a80f2d..81b0137 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 f210cbe..81b0137 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/backrooms.mixins.json b/src/main/resources/backrooms.mixins.json index 571cadc..8e51f94 100644 --- a/src/main/resources/backrooms.mixins.json +++ b/src/main/resources/backrooms.mixins.json @@ -4,8 +4,8 @@ "compatibilityLevel": "JAVA_8", "mixins": [ "GoToBackroomsMixin", - "PlayerMixin", - "MobSpawnLocationMixin" + "MobSpawnLocationMixin", + "EntityMixin" ], "client": [ "BuiltinModelItemRendererMixin", diff --git a/bin/main/data/minecraft/dimension/backrooms/level_0.json b/src/main/resources/data/backrooms/dimension/level_0.json similarity index 100% rename from bin/main/data/minecraft/dimension/backrooms/level_0.json rename to src/main/resources/data/backrooms/dimension/level_0.json diff --git a/bin/main/data/minecraft/dimension/backrooms/level_1.json b/src/main/resources/data/backrooms/dimension/level_1.json similarity index 100% rename from bin/main/data/minecraft/dimension/backrooms/level_1.json rename to src/main/resources/data/backrooms/dimension/level_1.json diff --git a/bin/main/data/minecraft/dimension/backrooms/level_2.json b/src/main/resources/data/backrooms/dimension/level_2.json similarity index 100% rename from bin/main/data/minecraft/dimension/backrooms/level_2.json rename to src/main/resources/data/backrooms/dimension/level_2.json diff --git a/bin/main/data/minecraft/dimension/backrooms/level_3.json b/src/main/resources/data/backrooms/dimension/level_3.json similarity index 100% rename from bin/main/data/minecraft/dimension/backrooms/level_3.json rename to src/main/resources/data/backrooms/dimension/level_3.json diff --git a/src/main/resources/data/backrooms/dimension_type/level_0.json b/src/main/resources/data/backrooms/dimension_type/level_0.json new file mode 100644 index 0000000..5da795f --- /dev/null +++ b/src/main/resources/data/backrooms/dimension_type/level_0.json @@ -0,0 +1,15 @@ +{ + "logical_height": 256, + "infiniburn": "minecraft:infiniburn_overworld", + "effects": "minecraft:overworld", + "ambient_light": 0.0, + "bed_works": false, + "respawn_anchor_works": true, + "has_raids": false, + "ultrawarm": false, + "natural": false, + "coordinate_scale": 1.0, + "piglin_safe": false, + "has_skylight": false, + "has_ceiling": false +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/dimension_type/level_1.json b/src/main/resources/data/backrooms/dimension_type/level_1.json new file mode 100644 index 0000000..5da795f --- /dev/null +++ b/src/main/resources/data/backrooms/dimension_type/level_1.json @@ -0,0 +1,15 @@ +{ + "logical_height": 256, + "infiniburn": "minecraft:infiniburn_overworld", + "effects": "minecraft:overworld", + "ambient_light": 0.0, + "bed_works": false, + "respawn_anchor_works": true, + "has_raids": false, + "ultrawarm": false, + "natural": false, + "coordinate_scale": 1.0, + "piglin_safe": false, + "has_skylight": false, + "has_ceiling": false +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/dimension_type/level_2.json b/src/main/resources/data/backrooms/dimension_type/level_2.json new file mode 100644 index 0000000..5da795f --- /dev/null +++ b/src/main/resources/data/backrooms/dimension_type/level_2.json @@ -0,0 +1,15 @@ +{ + "logical_height": 256, + "infiniburn": "minecraft:infiniburn_overworld", + "effects": "minecraft:overworld", + "ambient_light": 0.0, + "bed_works": false, + "respawn_anchor_works": true, + "has_raids": false, + "ultrawarm": false, + "natural": false, + "coordinate_scale": 1.0, + "piglin_safe": false, + "has_skylight": false, + "has_ceiling": false +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/dimension_type/level_3.json b/src/main/resources/data/backrooms/dimension_type/level_3.json new file mode 100644 index 0000000..5da795f --- /dev/null +++ b/src/main/resources/data/backrooms/dimension_type/level_3.json @@ -0,0 +1,15 @@ +{ + "logical_height": 256, + "infiniburn": "minecraft:infiniburn_overworld", + "effects": "minecraft:overworld", + "ambient_light": 0.0, + "bed_works": false, + "respawn_anchor_works": true, + "has_raids": false, + "ultrawarm": false, + "natural": false, + "coordinate_scale": 1.0, + "piglin_safe": false, + "has_skylight": false, + "has_ceiling": false +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/recipes/dotted_red_wallpaper.json b/src/main/resources/data/backrooms/recipes/dotted_red_wallpaper.json new file mode 100644 index 0000000..2a6ac98 --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/dotted_red_wallpaper.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "backrooms:dotted_red_wallpaper_pattern" + }, + { + "item": "backrooms:dotted_red_wallpaper_pattern" + }, + { + "item": "minecraft:oak_planks" + }, + { + "item": "backrooms:dotted_red_wallpaper_pattern" + }, + { + "item": "backrooms:dotted_red_wallpaper_pattern" + } + ], + "result": { + "item": "backrooms:dotted_red_wallpaper", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/backrooms/recipes/wall.json b/src/main/resources/data/backrooms/recipes/wall.json new file mode 100644 index 0000000..42c1606 --- /dev/null +++ b/src/main/resources/data/backrooms/recipes/wall.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "#" + ], + "key": { + "#": { + "item": "backrooms:compressed_wall" + } + }, + "result": { + "item": "backrooms:wall", + "count": 9 + } +} \ 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 deleted file mode 100644 index 9b72b0c..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_0.json +++ /dev/null @@ -1,332 +0,0 @@ -{ - "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_1.json b/src/main/resources/data/minecraft/dimension/backrooms/level_1.json deleted file mode 100644 index ea39564..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_1.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "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 deleted file mode 100644 index 64449b5..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_2.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "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/backrooms/level_3.json b/src/main/resources/data/minecraft/dimension/backrooms/level_3.json deleted file mode 100644 index fd69aab..0000000 --- a/src/main/resources/data/minecraft/dimension/backrooms/level_3.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "backrooms:level_3", - "generator": { - "biome_source": { - "seed": 0, - "biome": "backrooms:level3", - "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_type/backrooms/level_0.json b/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.json deleted file mode 100644 index d147d7e..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_0.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.0, - "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 deleted file mode 100644 index d147d7e..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_1.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.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 deleted file mode 100644 index d147d7e..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_2.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.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 deleted file mode 100644 index d147d7e..0000000 --- a/src/main/resources/data/minecraft/dimension_type/backrooms/level_3.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.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 c7a6798..cb57585 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,38 +1,41 @@ { - "schemaVersion": 1, - "id": "backrooms", - "version": "1.2.1", - - "name": "The Backrooms", - "description": "The backrooms, endless mono yellow rooms to traverse.", - "authors": [ - "LudoCrypt", - "Angel Craig" - ], - "contact": { - "homepage": "https://www.curseforge.com/minecraft/mc-mods/the-backrooms", - "sources": "https://github.com/LudoCrypt/Backrooms", - "issues": "https://github.com/LudoCrypt/Backrooms/issues" - }, - - "license": "CC0-1.0", - "icon": "assets/backrooms/icon.png", - - "environment": "*", - "entrypoints": { - "main": ["net.ludocrypt.backrooms.Backrooms"], - "client": ["net.ludocrypt.backrooms.BackroomsClient"], - "modmenu": ["net.ludocrypt.backrooms.config.ModMenuConfig"] - }, - "mixins": [ - "backrooms.mixins.json" - ], - "depends": { - "fabricloader": ">=0.7.4", - "fabric": "*", - "minecraft": "1.16.x" - }, - "suggests": { - "flamingo": "*" - } + "schemaVersion": 1, + "id": "backrooms", + "version": "1.2.2", + "name": "The Backrooms", + "description": "The backrooms, endless mono yellow rooms to traverse.", + "authors": [ + "LudoCrypt", + "Angel Craig" + ], + "contact": { + "homepage": "https://www.curseforge.com/minecraft/mc-mods/the-backrooms", + "sources": "https://github.com/LudoCrypt/Backrooms", + "issues": "https://github.com/LudoCrypt/Backrooms/issues" + }, + "license": "CC0-1.0", + "icon": "assets/backrooms/icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "net.ludocrypt.backrooms.Backrooms" + ], + "client": [ + "net.ludocrypt.backrooms.BackroomsClient" + ], + "modmenu": [ + "net.ludocrypt.backrooms.config.ModMenuConfig" + ] + }, + "mixins": [ + "backrooms.mixins.json" + ], + "depends": { + "fabricloader": ">=0.7.4", + "fabric": "*", + "minecraft": "1.16.x" + }, + "suggests": { + "flamingo": "*" + } }