Skip to content

Commit

Permalink
Fixed Bug(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
LudoCrypt committed Aug 3, 2020
1 parent f0aa1bd commit 3f579d9
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bin/main/data/backrooms/advancements/level_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level1": {
Expand Down
2 changes: 1 addition & 1 deletion bin/main/data/backrooms/advancements/level_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level2": {
Expand Down
2 changes: 1 addition & 1 deletion bin/main/data/backrooms/advancements/level_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level3": {
Expand Down
2 changes: 1 addition & 1 deletion bin/main/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "backrooms",
"version": "1.1.1",
"version": "1.2.0",

"name": "The Backrooms",
"description": "The backrooms, endless mono yellow rooms to traverse.",
Expand Down
Binary file modified bin/main/net/ludocrypt/backrooms/blocks/TornWallpaper.class
Binary file not shown.
Binary file modified bin/main/net/ludocrypt/backrooms/blocks/Wallpaper.class
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.16.1+build.21
loader_version=0.9.0+build.204

# Mod Properties
mod_version = 1.2.0
mod_version = 1.2.1
maven_group = net.ludocrypt
archives_base_name = the-backrooms

Expand Down
12 changes: 12 additions & 0 deletions src/main/java/net/ludocrypt/backrooms/blocks/TornWallpaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
4)) {
this.TornWallpaperSpawn(world, 1, Backrooms.DOTTED_WALLPAPER_PATTERN, pos);
}
if (world.getBlockState(pos) == Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState().with(TORN_LEVEL, 1)) {
this.TornWallpaperSpawn(world, 4, Backrooms.DOTTED_RED_WALLPAPER_PATTERN, pos);
} else if (world.getBlockState(pos) == Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState()
.with(TORN_LEVEL, 2)) {
this.TornWallpaperSpawn(world, 3, Backrooms.DOTTED_RED_WALLPAPER_PATTERN, pos);
} else if (world.getBlockState(pos) == Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState()
.with(TORN_LEVEL, 3)) {
this.TornWallpaperSpawn(world, 2, Backrooms.DOTTED_RED_WALLPAPER_PATTERN, pos);
} else if (world.getBlockState(pos) == Backrooms.DOTTED_RED_TORN_WALLPAPER.getDefaultState()
.with(TORN_LEVEL, 4)) {
this.TornWallpaperSpawn(world, 1, Backrooms.DOTTED_RED_WALLPAPER_PATTERN, pos);
}
world.setBlockState(pos, Blocks.OAK_PLANKS.getDefaultState());
player.playSound(BackroomsSoundEvents.TEAR, SoundCategory.BLOCKS, 1, 1);
Backrooms.grantAdvancement(player, new Identifier("backrooms", "tear_wallpaper"));
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/net/ludocrypt/backrooms/blocks/Wallpaper.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
ItemStack normal = new ItemStack(Backrooms.WALLPAPER_PATTERN, rand.nextInt(4) + 1);
ItemStack dotted = new ItemStack(Backrooms.DOTTED_WALLPAPER_PATTERN, rand.nextInt(4) + 1);
ItemStack red = new ItemStack(Backrooms.RED_WALLPAPER_PATTERN, rand.nextInt(4) + 1);
ItemStack dottedred = new ItemStack(Backrooms.DOTTED_RED_WALLPAPER_PATTERN, rand.nextInt(4) + 1);
ItemEntity normalItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(),
normal);
ItemEntity dottedItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(),
dotted);
ItemEntity redItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(),
red);
ItemEntity dottedRedItem = new ItemEntity(world, hit.getPos().getX(), hit.getPos().getY(), hit.getPos().getZ(),
dottedred);

if (world.getBlockState(pos) == Backrooms.WALLPAPER.getDefaultState()) {
world.spawnEntity(normalItem);
Expand All @@ -66,6 +69,10 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt
if (world.getBlockState(pos) == Backrooms.RED_WALLPAPER.getDefaultState()) {
world.spawnEntity(redItem);
}
if (world.getBlockState(pos) == Backrooms.DOTTED_RED_WALLPAPER.getDefaultState()) {
world.spawnEntity(dottedRedItem);
}


world.setBlockState(pos, Blocks.OAK_PLANKS.getDefaultState());
player.playSound(BackroomsSoundEvents.TEAR, 1, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level1": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level2": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level3": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
"hidden": false
},
"criteria": {
"level0": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "backrooms",
"version": "1.2.0",
"version": "1.2.1",

"name": "The Backrooms",
"description": "The backrooms, endless mono yellow rooms to traverse.",
Expand Down

0 comments on commit 3f579d9

Please sign in to comment.