Skip to content

Commit 0119faf

Browse files
authored
fix: fix crash with despoil loot modifier for deaths without a killer entity
1 parent fe8ed77 commit 0119faf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/github/elenterius/biomancy/loot/DespoilLootModifier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ protected LootParams createLootParams(LootContext context) {
179179
.withParameter(LootContextParams.THIS_ENTITY, context.getParam(LootContextParams.THIS_ENTITY))
180180
.withParameter(LootContextParams.ORIGIN, context.getParam(LootContextParams.ORIGIN))
181181
.withParameter(LootContextParams.DAMAGE_SOURCE, context.getParam(LootContextParams.DAMAGE_SOURCE))
182-
.withOptionalParameter(LootContextParams.KILLER_ENTITY, context.getParam(LootContextParams.KILLER_ENTITY))
183-
.withOptionalParameter(LootContextParams.DIRECT_KILLER_ENTITY, context.getParam(LootContextParams.DIRECT_KILLER_ENTITY));
182+
.withOptionalParameter(LootContextParams.KILLER_ENTITY, context.getParamOrNull(LootContextParams.KILLER_ENTITY))
183+
.withOptionalParameter(LootContextParams.DIRECT_KILLER_ENTITY, context.getParamOrNull(LootContextParams.DIRECT_KILLER_ENTITY));
184184

185185
if (context.hasParam(LootContextParams.LAST_DAMAGE_PLAYER)) {
186186
Player player = context.getParam(LootContextParams.LAST_DAMAGE_PLAYER);

0 commit comments

Comments
 (0)