Implement config and fix small bugs

This commit is contained in:
2025-11-09 13:03:08 +01:00
parent 459a5f7843
commit d655f6a25d
10 changed files with 129 additions and 166 deletions
@@ -1,11 +1,11 @@
package net.fretux.ascend.network;
import net.fretux.ascend.player.PlayerStatsProvider;
import net.fretux.ascend.player.StatEffects;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.network.NetworkEvent;
import net.fretux.ascend.player.PlayerStatsProvider;
import net.minecraftforge.network.PacketDistributor;
import net.minecraft.nbt.CompoundTag;
@@ -31,9 +31,6 @@ public class ServerboundSpendPointPacket {
context.enqueueWork(() -> {
ServerPlayer player = context.getSender();
if (player == null) return;
System.out.println("[Ascend] Received spend packet '" + attribute + "' from " + player.getGameProfile().getName());
player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> {
boolean success = stats.spendPoints(attribute);
if (success) {