Skip to content

Commit

Permalink
Fix some attribute crashes and another fluid stack crash
Browse files Browse the repository at this point in the history
  • Loading branch information
BluSpring committed Sep 20, 2024
1 parent 1319b72 commit c0f9126
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ else if (side.getAxis().isHorizontal())
var ctx = builder.create(LootContextParamSets.ENTITY);
lootTable.getRandomItems(ctx).forEach(((LivingEntity) (Object) this)::spawnAtLocation);
}

/*@ModifyReturnValue(method = "createLivingAttributes", at = @At("RETURN"))
private static AttributeSupplier.Builder kilt$addForgeAttributes(AttributeSupplier.Builder original) {
return original
.add(ForgeMod.SWIM_SPEED.get())
.add(ForgeMod.NAMETAG_DISTANCE.get())
.add(ForgeMod.ENTITY_GRAVITY.get())
.add(ForgeMod.STEP_HEIGHT.get());
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,12 @@ public float getDigSpeed(BlockState blockState, @Nullable BlockPos blockPos) {
if (blockPos != null)
cir.setReturnValue(ForgeEventFactory.getBreakSpeed((Player) (Object) this, state, cir.getReturnValue(), blockPos));
}

/*@ModifyReturnValue(method = "createAttributes", at = @At("RETURN"))
private static AttributeSupplier.Builder kilt$addForgeAttributes(AttributeSupplier.Builder original) {
return original
.add(ForgeMod.BLOCK_REACH.get())
.add(Attributes.ATTACK_KNOCKBACK)
.add(ForgeMod.ENTITY_REACH.get());
}*/
}

0 comments on commit c0f9126

Please sign in to comment.