Files
Gadomancy/src/main/java/makeo/gadomancy/common/utils/ItemUtils.java
T

25 lines
649 B
Java

package makeo.gadomancy.common.utils;
import net.minecraft.entity.item.EntityItem;
import java.util.Random;
/**
* This class is part of the Gadomancy Mod
* Gadomancy is Open Source and distributed under the
* GNU LESSER GENERAL PUBLIC LICENSE
* for more read the LICENSE file
* <p/>
* Created by HellFirePvP @ 12.11.2015 23:13
*/
public class ItemUtils {
public static void applyRandomDropOffset(EntityItem item, Random rand) {
double xs = rand.nextFloat() * 0.7F - 0.35D;
double ys = rand.nextFloat() * 0.7F - 0.35D;
double zs = rand.nextFloat() * 0.7F - 0.35D;
item.setVelocity(xs, ys, zs);
}
}