Skip to content

Commit

Permalink
Graves will generate again when origins is present
Browse files Browse the repository at this point in the history
  • Loading branch information
B1n-ry committed Dec 3, 2023
1 parent 2809804 commit 25c10f4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# You're in Grave Danger 2.0.0-beta.5

### Fixes
* Fixed issue where no graves generated while origins was loaded

---

# You're in Grave Danger 2.0.0-beta.4

### Fixes
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ dependencies {
modCompileOnly "curse.maven:levelz-${project.levelz_version}"

// Dev dependencies
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
modCompileOnly "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cardinal_components_version}"
modCompileOnly "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cardinal_components_version}"
modCompileOnly "curse.maven:libz-${project.libz_version}"
modCompileOnly "io.wispforest:owo-lib:${project.owo_version}"
// modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
// modCompileOnly "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cardinal_components_version}"
// modCompileOnly "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cardinal_components_version}"
// modCompileOnly "curse.maven:libz-${project.libz_version}"
// modCompileOnly "io.wispforest:owo-lib:${project.owo_version}"
}

processResources {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.parallel=true
loader_version=0.14.24

# Mod Properties
mod_version = 2.0.0-beta.4
mod_version = 2.0.0-beta.5
maven_group = com.b1n_ry.yigd
archives_base_name = youre-in-grave-danger

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/com/b1n_ry/yigd/compat/OriginsCompat.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
package com.b1n_ry.yigd.compat;

import com.b1n_ry.yigd.components.InventoryComponent;
import com.b1n_ry.yigd.config.DropType;
import com.b1n_ry.yigd.config.YigdConfig;
import com.b1n_ry.yigd.data.DeathContext;
import com.b1n_ry.yigd.events.DropRuleEvent;
import com.b1n_ry.yigd.util.DropRule;
import io.github.apace100.apoli.component.PowerHolderComponent;
import io.github.apace100.apoli.component.PowerHolderComponentImpl;
import io.github.apace100.apoli.power.Active;
import io.github.apace100.apoli.power.InventoryPower;
import net.minecraft.inventory.Inventories;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement;
import net.minecraft.nbt.NbtHelper;
import net.minecraft.nbt.NbtList;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.collection.DefaultedList;
Expand Down Expand Up @@ -72,7 +69,7 @@ public CompatComponent<Map<String, DefaultedList<ItemStack>>> getNewComponent(Se
}

private static class OriginsCompatComponent extends CompatComponent<Map<String, DefaultedList<ItemStack>>> {
private Map<String, DefaultedList<DropRule>> inventoryDropRules = new HashMap<>();
private Map<String, DefaultedList<DropRule>> inventoryDropRules;

public OriginsCompatComponent(ServerPlayerEntity player) {
super(player);
Expand All @@ -87,7 +84,7 @@ public Map<String, DefaultedList<ItemStack>> getInventory(ServerPlayerEntity pla
YigdConfig.CompatConfig compatConfig = YigdConfig.getConfig().compatConfig;

Map<String, DefaultedList<ItemStack>> inventory = new HashMap<>();
this.inventoryDropRules.clear();
this.inventoryDropRules = new HashMap<>();

List<InventoryPower> powers = PowerHolderComponent.getPowers(player, InventoryPower.class);
for (InventoryPower inventoryPower : powers) {
Expand Down Expand Up @@ -176,7 +173,6 @@ public DefaultedList<ItemStack> storeToPlayer(ServerPlayerEntity player) {
public CompatComponent<Map<String, DefaultedList<ItemStack>>> handleDropRules(DeathContext context) {
Map<String, DefaultedList<ItemStack>> soulbound = new HashMap<>();


Vec3d deathPos = context.getDeathPos();
for (Map.Entry<String, DefaultedList<ItemStack>> entry : this.inventory.entrySet()) {
String key = entry.getKey();
Expand Down

0 comments on commit 25c10f4

Please sign in to comment.