use of net.katsstuff.mirror.data.Vector3 in project Solar by ArekkuusuJerii.
the class BlockSchrodingerGlyph method onBlockDestroyedByPlayer.
@Override
public void onBlockDestroyedByPlayer(World world, BlockPos pos, IBlockState state) {
Vector3 vec = Vector3.Center().add(pos.getX(), pos.getY(), pos.getZ());
Megumin.chant(world, vec, 5F, false).Oh_blackness_shrouded_in_light().Frenzied_blaze_clad_in_night().In_the_name_of_the_crimson_demons().let_the_collapse_of_thine_origin_manifest().Summon_before_me_the_root_of_thy_power_hidden_within_the_lands().of_the_kingdom_of_demise().EXPLOSION();
}
use of net.katsstuff.mirror.data.Vector3 in project Solar by ArekkuusuJerii.
the class BlockBlinker method randomDisplayTick.
@Override
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
EnumFacing facing = state.getValue(BlockDirectional.FACING);
boolean active = state.getValue(State.ACTIVE);
Vector3 back = getOffSet(facing.getOpposite(), pos);
facing = facing.getOpposite();
for (int i = 0; i < 3 + rand.nextInt(6); i++) {
Quat x = Quat.fromAxisAngle(Vector3.Forward(), (rand.nextFloat() * 2F - 1F) * 5);
Quat z = Quat.fromAxisAngle(Vector3.Right(), (rand.nextFloat() * 2F - 1F) * 5);
double speed = 0.01D + rand.nextDouble() * 0.015D;
Vector3 speedVec = new Vector3.WrappedVec3i(facing.getDirectionVec()).asImmutable().multiply(speed).rotate(x.multiply(z));
FXUtil.spawnLight(world, back, speedVec, 60, 2.5F, active ? 0x49FFFF : 0xFFFFFF, Light.GLOW);
}
}
use of net.katsstuff.mirror.data.Vector3 in project Solar by ArekkuusuJerii.
the class BlockDilaton method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) {
if (state.getValue(State.ACTIVE)) {
boolean powered = world.isBlockPowered(pos);
EnumFacing facing = state.getValue(BlockDirectional.FACING);
Vector3 posVec = Vector3.apply(pos.getX(), pos.getY(), pos.getZ()).add(0.5D);
for (int i = 0; i < 1 + rand.nextInt(3); i++) {
Quat x = Quat.fromAxisAngle(Vector3.Forward(), (rand.nextFloat() * 2F - 1F) * 6);
Quat z = Quat.fromAxisAngle(Vector3.Right(), (rand.nextFloat() * 2F - 1F) * 6);
double speed = 0.025D + 0.005D * rand.nextDouble();
Vector3 speedVec = new Vector3.WrappedVec3i(facing.getDirectionVec()).asImmutable().multiply(speed).rotate(x.multiply(z));
FXUtil.spawnLight(world, posVec, speedVec, 60, 2F, powered ? 0x49FFFF : 0xFF0303, Light.GLOW);
}
}
}
use of net.katsstuff.mirror.data.Vector3 in project Solar by ArekkuusuJerii.
the class TileGravityHopper method spawnParticles.
private void spawnParticles() {
if (world.getTotalWorldTime() % 180 == 0) {
EnumFacing facing = getFacing();
Vector3 back = getOffSet(facing);
Vector3 speedVec = new Vector3.WrappedVec3i(facing.getDirectionVec()).asImmutable().multiply(0.005D);
FXUtil.spawnNeutron(world, back, speedVec, 40, 0.25F, 0xFF0303, false);
} else if (world.getTotalWorldTime() % 4 == 0 && world.rand.nextBoolean()) {
EnumFacing facing = getFacing().getOpposite();
Vector3 back = getOffSet(facing);
double speed = world.rand.nextDouble() * 0.015D;
Vector3 speedVec = new Vector3.WrappedVec3i(facing.getDirectionVec()).asImmutable().multiply(speed);
FXUtil.spawnLight(world, back, speedVec, 30, 2F, 0x49FFFF, Light.GLOW);
}
}
use of net.katsstuff.mirror.data.Vector3 in project Solar by ArekkuusuJerii.
the class TileVacuumConveyor method transposeItems.
private void transposeItems() {
boolean impulse = false;
if (world.isAirBlock(pos.offset(getFacingLazy().getOpposite()))) {
applyGravity(attractInverse, 4D);
impulse = true;
}
if (world.isAirBlock(pos.offset(getFacingLazy()))) {
if (impulse) {
BlockPos offset = getPos().offset(getFacingLazy());
Vector3 spawn = Vector3.apply(offset.getX(), offset.getY(), offset.getZ()).add(0.5D);
getItemsFiltered(new AxisAlignedBB(getPos()).grow(0.5D)).forEach(entity -> {
impulseEntityItem(spawn, entity);
});
}
applyGravity(repulseInverse, -4D);
}
}
Aggregations