    001/*
    002 * Forge Mod Loader
    003 * Copyright (c) 2012-2013 cpw.
    004 * All rights reserved. This program and the accompanying materials
    005 * are made available under the terms of the GNU Lesser Public License v2.1
    006 * which accompanies this distribution, and is available at
    007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    008 *
    009 * Contributors:
    010 *     cpw - implementation
    011 */
    012
    013package cpw.mods.fml.common;
    014
    015import java.util.EnumSet;
    016
    017public class SingleIntervalHandler implements IScheduledTickHandler
    018{
    019    private ITickHandler wrapped;
    020    public SingleIntervalHandler(ITickHandler handler)
    021    {
    022        this.wrapped=handler;
    023    }
    024
    025    @Override
    026    public void tickStart(EnumSet<TickType> type, Object... tickData)
    027    {
    028        wrapped.tickStart(type, tickData);
    029    }
    030
    031    @Override
    032    public void tickEnd(EnumSet<TickType> type, Object... tickData)
    033    {
    034        wrapped.tickEnd(type, tickData);
    035    }
    036
    037    @Override
    038    public EnumSet<TickType> ticks()
    039    {
    040        return wrapped.ticks();
    041    }
    042
    043    @Override
    044    public String getLabel()
    045    {
    046        return wrapped.getLabel();
    047    }
    048
    049    @Override
    050    public int nextTickSpacing()
    051    {
    052        return 1;
    053    }
    054
    055}