<commit_before>package com.creativemd.playerrevive.config;

import com.creativemd.igcm.api.ConfigBranch;
import com.creativemd.igcm.api.segments.BooleanSegment;
import com.creativemd.igcm.api.segments.IntegerSegment;
import com.creativemd.playerrevive.PlayerRevive;

import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.fml.relauncher.Side;

public class PlayerReviveBranch extends ConfigBranch {

	public PlayerReviveBranch() {
		super(I18n.translateToLocal("playerrevive.config.branch_name"), new ItemStack(Items.TOTEM_OF_UNDYING));
	}

	@Override
	public void createChildren() {
		registerElement("playerReviveTime", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_revive_time"), 100, 1, Integer.MAX_VALUE));
		registerElement("playerReviveSurviveTime", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_revive_survive_time"), 1200, 1, Integer.MAX_VALUE));
		
		registerElement("playerHealthAfter", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_health_after"), 2, 1, 20));
		registerElement("playerFoodAfter", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_food_after"), 6, 1, 20));
		
		registerElement("banPlayerAfterDeath", new BooleanSegment(I18n.translateToLocal("playerrevive.config.ban_player_after_death"), false));
		
		registerElement("exhaustion", new BooleanSegment(I18n.translateToLocal("playerrevive.config.exhaustion"), false));
	}

	@Override
	public boolean requiresSynchronization() {
		return true;
	}

	@Override
	public void onRecieveFrom(Side side) {
		PlayerRevive.playerReviveTime = (Integer) getValue("playerReviveTime");
		PlayerRevive.playerReviveSurviveTime = (Integer) getValue("playerReviveSurviveTime");
		
		PlayerRevive.playerHealthAfter = (Integer) getValue("playerHealthAfter");
		PlayerRevive.playerFoodAfter = (Integer) getValue("playerFoodAfter");<commit_msg>Fixed crash when IGCM is installed<commit_after>package com.creativemd.playerrevive.config;

import com.creativemd.igcm.api.ConfigBranch;
import com.creativemd.igcm.api.segments.BooleanSegment;
import com.creativemd.igcm.api.segments.FloatSegment;
import com.creativemd.igcm.api.segments.IntegerSegment;
import com.creativemd.playerrevive.PlayerRevive;

import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.fml.relauncher.Side;

public class PlayerReviveBranch extends ConfigBranch {

	public PlayerReviveBranch() {
		super(I18n.translateToLocal("playerrevive.config.branch_name"), new ItemStack(Items.TOTEM_OF_UNDYING));
	}

	@Override
	public void createChildren() {
		registerElement("playerReviveTime", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_revive_time"), 100, 1, Integer.MAX_VALUE));
		registerElement("playerReviveSurviveTime", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_revive_survive_time"), 1200, 1, Integer.MAX_VALUE));
		
		registerElement("playerHealthAfter", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_health_after"), 2, 1, 20));
		registerElement("playerFoodAfter", new IntegerSegment(I18n.translateToLocal("playerrevive.config.player_food_after"), 6, 1, 20));
		
		registerElement("banPlayerAfterDeath", new BooleanSegment(I18n.translateToLocal("playerrevive.config.ban_player_after_death"), false));
		
		registerElement("exhaustion", new FloatSegment(I18n.translateToLocal("playerrevive.config.exhaustion"), 0.5F, 0, 10000));
	}

	@Override
	public boolean requiresSynchronization() {
		return true;
	}

	@Override
	public void onRecieveFrom(Side side) {
		PlayerRevive.playerReviveTime = (Integer) getValue("playerReviveTime");
		PlayerRevive.playerReviveSurviveTime = (Integer) getValue("playerReviveSurviveTime");
		
		PlayerRevive.playerHealthAfter = (Integer) getValue("playerHealthAfter");
		PlayerRevive.playerFoodAfter = (Integer) getValue("playerFoodAfter");
{'fraction_non_alphanumeric': 0.11262553802008608, 'fraction_numerical': 0.017694882831181254, 'mean_word_length': 8.015086206896552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6989207', 'n_tokens_mistral': 1407, 'n_tokens_neox': 1298, 'n_words': 190}