<commit_before>package net.gigimoi.zombietc.event;

import com.google.gson.Gson;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.gigimoi.zombietc.ZombieTC;
import net.gigimoi.zombietc.api.ITileEntityPurchasable;
import net.gigimoi.zombietc.block.BlockNode;
import net.gigimoi.zombietc.client.ClientProxy;
import net.gigimoi.zombietc.entity.EntityZZombie;
import net.gigimoi.zombietc.item.weapon.ItemWeapon;
import net.gigimoi.zombietc.net.MessageChangeEditorMode;
import net.gigimoi.zombietc.net.MessagePurchaseTile;
import net.gigimoi.zombietc.net.MessageRegeneratePathMap;
import net.gigimoi.zombietc.net.MessageSetWave;
import net.gigimoi.zombietc.net.map.MessageAddBarricade;
import net.gigimoi.zombietc.net.map.MessageAddNode;
import net.gigimoi.zombietc.net.map.MessageAddNodeConnection;
import net.gigimoi.zombietc.net.map.MessagePrepareStaticVariables;
import net.gigimoi.zombietc.tile.TileZTC;
import net.gigimoi.zombietc.util.*;
import net.gigimoi.zombietc.util.pathfinding.MCNode;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.world.WorldEvent;
import org.lwjgl.input.Keyboard;

import javax.vecmath.Vector3f;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;

/**
 * Created by gigimoi on 7/14/2014.
 */
public class GameManager {
    public static ArrayList<Point3> blockBarricades = new ArrayList<Point3>();
    public static ArrayList<Vector3f> spawnPositions = new ArrayList<Vector3f>();
    public static ArrayList<World> worldsSpawnedTo = new ArrayList<World>();
    public boolean activating;
    public int wave = 0;
    int zombiesToSpawn = 0;
    int zombiesAlive = 0;
    int timeToNextWave = 0;
    int nextWaveZombies = 0;
    int currentWaveMaxZombies = 0;
    short refreshFoodbarsCooldown = 0;
    private Random _r = new Random();
    private int activateMessageDuration = 0;
    private String activateMessage;

    @SubscribeEvent
    public void onTick(TickEvent event) {
        refreshFoodbarsCooldown++;
        if (refreshFoodbarsCooldown > 200 && ZombieTC.proxy.getWorld(event.side) != null) {
            refreshFoodbarsCooldown = 0;<commit_msg>Always nighttime in-game, always daytime in editor.<commit_after>package net.gigimoi.zombietc.event;

import com.google.gson.Gson;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.gigimoi.zombietc.ZombieTC;
import net.gigimoi.zombietc.api.ITileEntityPurchasable;
import net.gigimoi.zombietc.block.BlockNode;
import net.gigimoi.zombietc.client.ClientProxy;
import net.gigimoi.zombietc.entity.EntityZZombie;
import net.gigimoi.zombietc.item.weapon.ItemWeapon;
import net.gigimoi.zombietc.net.MessageChangeEditorMode;
import net.gigimoi.zombietc.net.MessagePurchaseTile;
import net.gigimoi.zombietc.net.MessageRegeneratePathMap;
import net.gigimoi.zombietc.net.MessageSetWave;
import net.gigimoi.zombietc.net.map.MessageAddBarricade;
import net.gigimoi.zombietc.net.map.MessageAddNode;
import net.gigimoi.zombietc.net.map.MessageAddNodeConnection;
import net.gigimoi.zombietc.net.map.MessagePrepareStaticVariables;
import net.gigimoi.zombietc.tile.TileZTC;
import net.gigimoi.zombietc.util.*;
import net.gigimoi.zombietc.util.pathfinding.MCNode;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.world.WorldEvent;
import org.lwjgl.input.Keyboard;

import javax.vecmath.Vector3f;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;

/**
 * Created by gigimoi on 7/14/2014.
 */
public class GameManager {
    public static ArrayList<Point3> blockBarricades = new ArrayList<Point3>();
    public static ArrayList<Vector3f> spawnPositions = new ArrayList<Vector3f>();
    public static ArrayList<World> worldsSpawnedTo = new ArrayList<World>();
    public boolean activating;
    public int wave = 0;
    int zombiesToSpawn = 0;
    int zombiesAlive = 0;
    int timeToNextWave = 0;
    int nextWaveZombies = 0;
    int currentWaveMaxZombies = 0;
    short refreshFoodbarsCooldown = 0;
    private Random _r = new Random();
    private int activateMessageDuration = 0;
    private String activateMessage;

    @SubscribeEvent
    public void onTick(TickEvent event) {
        if(ZombieTC.proxy.getWorld(event.side) != null) ZombieTC.proxy.getWorld(event.side).setWorldTime(ZombieTC.editorModeManager.enabled ? 1000 : 15000);
        refreshFoodbarsCooldown++;
        if (refreshFoodbarsCooldown > 200 && ZombieTC.proxy.getWorld(event.side) != null) {
            refreshFoodbarsCooldown = 0;
{'fraction_non_alphanumeric': 0.10156112962638134, 'fraction_numerical': 0.01034906156814594, 'mean_word_length': 5.265934065934066, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '4552440', 'n_tokens_mistral': 2040, 'n_tokens_neox': 1980, 'n_words': 326}