mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
maybe crashing servers instantly shouldn't be a feature
This commit is contained in:
parent
fdd9952fef
commit
ac5a661c67
@ -10,6 +10,8 @@ import org.lwjgl.util.vector.Vector4f;
|
||||
import com.hbm.particle.ParticleSpentCasing;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -89,6 +91,7 @@ public class CasingEjector implements Cloneable {
|
||||
public float getYawFactor() { return this.randomYaw; }
|
||||
public float getPitchFactor() { return this.randomPitch; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void spawnCasing(TextureManager textureManager, SpentCasing config, World world, double x, double y, double z, float pitch, float yaw, boolean crouched) {
|
||||
Vec3 rotatedMotionVec = rotateVector(getMotion(), pitch + (float) rand.nextGaussian() * getPitchFactor(), yaw + (float) rand.nextGaussian() * getPitchFactor(), getPitchFactor(), getPitchFactor());
|
||||
ParticleSpentCasing casing = new ParticleSpentCasing(textureManager, world, x, y, z, rotatedMotionVec.xCoord, rotatedMotionVec.yCoord, rotatedMotionVec.zCoord, (float) (getPitchFactor() * rand.nextGaussian()), (float) (getYawFactor() * rand.nextGaussian()), config);
|
||||
@ -102,6 +105,7 @@ public class CasingEjector implements Cloneable {
|
||||
}
|
||||
|
||||
// Rotate a position
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static void offsetCasing(ParticleSpentCasing casing, Vec3 offset, float pitch, float yaw, boolean crouched) {
|
||||
// x-axis offset, 0 if crouched to center
|
||||
final float oX = (float) (crouched ? 0 : offset.xCoord);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user