001/* 002 * Trident - A Multithreaded Server Alternative 003 * Copyright 2014 The TridentSDK Team 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package net.tridentsdk.effect.particle; 018 019import net.tridentsdk.effect.RemoteEffect; 020import net.tridentsdk.util.Vector; 021 022/** 023 * Represents a particle effect 024 * 025 * @author The TridentSDK Team 026 * @since 0.4-alpha 027 */ 028public interface ParticleEffect extends RemoteEffect<ParticleEffectType> { 029 /** 030 * Set the count how many of the effects should be spawned 031 * 032 * @param count The count how many should be spawned 033 */ 034 void setCount(int count); 035 036 /** 037 * Set the particle to be long distance<br> 038 * Increases distance from 256 to 65536 039 * 040 * @param longDistance Whether the particle should be long distance 041 */ 042 void setLongDistance(boolean longDistance); 043 044 /** 045 * Set the data of the particle<br> 046 * Only used for ICON_CRACK, BLOCK_CRACK and BLOCK_DUST<br> 047 * ICON_CRACK requires array of two integers<br> 048 * BLOCK_CRACK and BLOCK_DUST requires an array of a single integer 049 * 050 * @param data Data of the particle 051 */ 052 void setData(int[] data); 053 054 /** 055 * The randomized offset for each particle<br> 056 * If multiple particles are spawned, this will be re-run for each 057 * 058 * @param offset The offset for each particle 059 */ 060 void setOffset(Vector offset); 061 062 /** 063 * Returns the count of how many particles will be spawned 064 * 065 * @return The count of how many particles will be spawned 066 */ 067 int count(); 068 069 /** 070 * Returns whether the particle should be long distance 071 * 072 * @return Whether the particle should be long distance 073 */ 074 boolean longDistance(); 075 076 /** 077 * Returns the data of the particle 078 * 079 * @return The data of the particle 080 */ 081 int[] data(); 082 083 /** 084 * Returns the offset for each particle 085 * 086 * @return The offset for each particle 087 */ 088 Vector offset(); 089}