Search in sources :

Example 1 with EntityFXFloatingCube

use of hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube in project SomeModjam5Mod by HellFirePvP.

the class TileFissureDevice method handleOuterAnimations.

@SideOnly(Side.CLIENT)
private void handleOuterAnimations(Object cubeObj, int radius) {
    EntityFXFloatingCube cube = (EntityFXFloatingCube) cubeObj;
    cube.setTumbleIntensityMultiplier(0.04F);
    cube.setScale((radius + 2) * 2);
    float add = 0.00175F;
    float remove = 0.00625F;
    if (this.percDrawFissure >= 0.75F) {
        cube.setAlphaMultiplier(Math.min(0.1F, cube.getAlphaMultiplier() + add));
    } else {
        cube.setAlphaMultiplier(Math.max(0F, cube.getAlphaMultiplier() - remove));
    }
}
Also used : EntityFXFloatingCube(hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with EntityFXFloatingCube

use of hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube in project Fracture by HellFirePvP.

the class TileFissureDevice method setupCube.

@SideOnly(Side.CLIENT)
private Object setupCube(float baseScale, float scaleGrow) {
    EntityFXFloatingCube cube = new EntityFXFloatingCube(10, AssetLibrary.loadTexture(AssetLoader.TextureLocation.BLOCKS, "core_edge"));
    cube.setRefreshFunction(() -> Minecraft.getMinecraft().player != null && Minecraft.getMinecraft().player.world.provider.getDimension() == this.world.provider.getDimension() && Minecraft.getMinecraft().world.getTileEntity(getPos()) instanceof TileFissureDevice && !Minecraft.getMinecraft().world.getTileEntity(getPos()).isInvalid() && ((TileFissureDevice) Minecraft.getMinecraft().world.getTileEntity(getPos())).getStructureDepth() > 0 && Minecraft.getMinecraft().world.getTileEntity(getPos()) == TileFissureDevice.this);
    cube.setPosition(new Vector3(this).add(0.5, 0.8, 0.5));
    cube.setPositionController((fx, position, motionToBeMoved) -> {
        Vector3 base = new Vector3(TileFissureDevice.this).add(0.5, 0.8, 0.5);
        base.addY(percActive * 0.5);
        return base;
    });
    cube.setScaleFunction((fx, pTicks, scaleIn) -> baseScale + baseScale * (percActive * scaleGrow));
    cube.tumble();
    EffectHandler.getInstance().registerFX(cube);
    return cube;
}
Also used : EntityFXFloatingCube(hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube) Vector3(hellfirepvp.fracture.common.util.Vector3) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 3 with EntityFXFloatingCube

use of hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube in project Fracture by HellFirePvP.

the class TileFissureDevice method handleOuterAnimations.

@SideOnly(Side.CLIENT)
private void handleOuterAnimations(Object cubeObj, int radius) {
    EntityFXFloatingCube cube = (EntityFXFloatingCube) cubeObj;
    cube.setTumbleIntensityMultiplier(0.04F);
    cube.setScale((radius + 2) * 2);
    float add = 0.00175F;
    float remove = 0.00625F;
    if (this.percDrawFissure >= 0.75F) {
        cube.setAlphaMultiplier(Math.min(0.15F, cube.getAlphaMultiplier() + add));
    } else {
        cube.setAlphaMultiplier(Math.max(0F, cube.getAlphaMultiplier() - remove));
    }
}
Also used : EntityFXFloatingCube(hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 4 with EntityFXFloatingCube

use of hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube in project Fracture by HellFirePvP.

the class TileFissureDevice method handleAnimations.

@SideOnly(Side.CLIENT)
private void handleAnimations(Object cubeObj) {
    EntityFXFloatingCube cube = (EntityFXFloatingCube) cubeObj;
    cube.setTumbleIntensityMultiplier(this.percActive * 0.6F);
    cube.setAlphaMultiplier(1 - (1 - (0.8F + 0.2F * this.percActive)));
    Color result = new Color(39 + ((int) ((46 - 39) * this.percActive)), 39 + ((int) ((212 - 39) * this.percActive)), 39 + ((int) ((-39) * this.percActive)));
    cube.setColor(result);
}
Also used : EntityFXFloatingCube(hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 5 with EntityFXFloatingCube

use of hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube in project Fracture by HellFirePvP.

the class TileFissureDevice method setupOuterCube.

@SideOnly(Side.CLIENT)
private Object setupOuterCube(int radius) {
    EntityFXFloatingCube cube = new EntityFXFloatingCube(10, AssetLibrary.loadTexture(AssetLoader.TextureLocation.BLOCKS, "core_edge"));
    cube.setRefreshFunction(() -> Minecraft.getMinecraft().player != null && Minecraft.getMinecraft().player.world.provider.getDimension() == this.world.provider.getDimension() && Minecraft.getMinecraft().world.getTileEntity(getPos()) instanceof TileFissureDevice && !Minecraft.getMinecraft().world.getTileEntity(getPos()).isInvalid() && ((TileFissureDevice) Minecraft.getMinecraft().world.getTileEntity(getPos())).getStructureDepth() > 0 && Minecraft.getMinecraft().world.getTileEntity(getPos()) == TileFissureDevice.this);
    cube.setAlphaMultiplier(0F);
    cube.setPosition(new Vector3(getPos()).add(0.5, 0.5, 0.5));
    cube.setScale(radius * 2);
    cube.setTumbleIntensityMultiplier(0.04F);
    cube.setColor(new Color(0x2DE400));
    cube.tumble();
    EffectHandler.getInstance().registerFX(cube);
    return cube;
}
Also used : EntityFXFloatingCube(hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube) Vector3(hellfirepvp.fracture.common.util.Vector3) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

EntityFXFloatingCube (hellfirepvp.fracture.client.effect.fx.EntityFXFloatingCube)8 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)8 Vector3 (hellfirepvp.fracture.common.util.Vector3)4