mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-21 04:22:25 +00:00
25 lines
649 B
Java
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);
|
|
}
|
|
|
|
}
|